From b7453951713709066356142b4bdb237ded64c792 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 10 May 2024 16:40:05 +0800 Subject: [PATCH 01/15] =?UTF-8?q?feat(tiktokshop):=20=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=20API=EF=BC=88=E5=8D=B3=20v202309?= =?UTF-8?q?=20API=EF=BC=89=EF=BC=8C=E5=B9=B6=E6=A0=87=E8=AE=B0=E6=97=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=20API=20=E4=B8=BA=E5=B7=B2=E5=BA=9F=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...yChainSyncPackageFulfillmentDataRequest.cs | 2 +- ...ChainSyncPackageFulfillmentDataResponse.cs | 2 +- .../Legacy/TikTokShopLegacyResponse.cs | 8 +- ...opClientExecuteAuthorizationExtensions.cs} | 12 +- .../TikTokShopClientExecuteEventExtensions.cs | 77 ++ ...ikTokShopClientExecuteFinanceExtensions.cs | 79 -- ...kShopClientExecuteFulfillmentExtensions.cs | 424 ---------- ...hopClientExecuteGlobalProductExtensions.cs | 247 ------ ...TokShopClientExecuteLogisticsExtensions.cs | 151 ---- .../TikTokShopClientExecuteOrderExtensions.cs | 73 -- ...ikTokShopClientExecuteProductExtensions.cs | 495 ------------ ...TokShopClientExecutePromotionExtensions.cs | 169 ---- ...ikTokShopClientExecuteReverseExtensions.cs | 131 ---- ...TikTokShopClientExecuteSellerExtensions.cs | 20 +- ...kShopClientExecuteSupplyChainExtensions.cs | 10 +- .../TikTokShopRequestSigningInterceptor.cs | 44 +- .../AuthorizationGetShopsRequest.cs | 9 + .../AuthorizationGetShopsResponse.cs} | 40 +- .../Models/Event/EventDeleteWebhookRequest.cs | 15 + .../Event/EventDeleteWebhookResponse.cs | 15 + .../Models/Event/EventGetWebhooksRequest.cs | 9 + .../EventGetWebhooksResponse.cs} | 49 +- .../Models/Event/EventUpdateWebhookRequest.cs | 24 + .../Event/EventUpdateWebhookResponse.cs | 15 + .../FinanceGetOrderSettlementListRequest.cs | 15 - .../FinanceGetOrderSettlementListResponse.cs | 77 -- .../FinanceSearchSettlementsRequest.cs | 44 -- .../FinanceSearchSettlementsResponse.cs | 321 -------- .../FinanceSearchTransactionsRequest.cs | 46 -- .../FinanceSearchTransactionsResponse.cs | 77 -- .../FulfillmentBatchShipPackageRequest.cs | 62 -- .../FulfillmentBatchShipPackageResponse.cs | 28 - .../FulfillmentCreateLabelRequest.cs | 64 -- .../FulfillmentCreateLabelResponse.cs | 70 -- .../FulfillmentGetPackageDetailRequest.cs | 15 - .../FulfillmentGetPackageDetailResponse.cs | 204 ----- ...ulfillmentGetPackagePickupConfigRequest.cs | 15 - ...lfillmentGetPackagePickupConfigResponse.cs | 76 -- ...llmentGetPackageShippingDocumentRequest.cs | 29 - ...lmentGetPackageShippingDocumentResponse.cs | 21 - ...ulfillmentGetPackageShippingInfoRequest.cs | 15 - ...lfillmentGetPackageShippingInfoResponse.cs | 41 - .../FulfillmentGetShippingServiceRequest.cs | 83 -- .../FulfillmentGetShippingServiceResponse.cs | 160 ---- .../FulfillmentSearchPackagesRequest.cs | 79 -- .../FulfillmentShipPackageRequest.cs | 73 -- .../FulfillmentShipPackageResponse.cs | 49 -- ...lmentUpdatePackageDeliveryStatusRequest.cs | 58 -- ...mentUpdatePackageDeliveryStatusResponse.cs | 49 -- ...illmentUpdatePackageShippingInfoRequest.cs | 29 - ...llmentUpdatePackageShippingInfoResponse.cs | 28 - .../FulfillmentConfirmOrderSplitRequest.cs | 44 -- .../FulfillmentConfirmOrderSplitResponse.cs | 93 --- .../FulfillmentRemovePackageOrdersRequest.cs | 24 - .../FulfillmentRemovePackageOrdersResponse.cs | 74 -- .../FulfillmentVerifyOrderSplitRequest.cs | 17 - .../FulfillmentVerifyOrderSplitResponse.cs | 67 -- ...fillmentConfirmPreCombinePackageRequest.cs | 37 - ...illmentConfirmPreCombinePackageResponse.cs | 74 -- ...fillmentSearchPreCombinePackagesRequest.cs | 23 - ...illmentSearchPreCombinePackagesResponse.cs | 63 -- .../Upload/FulfillmentUploadFileRequest.cs | 22 - .../Upload/FulfillmentUploadFileResponse.cs | 42 - .../Upload/FulfillmentUploadImageRequest.cs | 22 - .../Upload/FulfillmentUploadImageResponse.cs | 49 -- .../GlobalProductGetAttributeListRequest.cs | 15 - .../GlobalProductGetAttributeListResponse.cs | 80 -- .../GlobalProductGetCategoryListRequest.cs | 9 - .../GlobalProductGetCategoryListResponse.cs | 64 -- .../GlobalProductGetCategoryRulesRequest.cs | 15 - .../GlobalProductGetCategoryRulesResponse.cs | 78 -- .../GlobalProductCreateProductRequest.cs | 333 -------- .../GlobalProductCreateProductResponse.cs | 64 -- .../GlobalProductDeleteProductsRequest.cs | 17 - .../GlobalProductDeleteProductsResponse.cs | 21 - .../GlobalProductGetProductDetailRequest.cs | 20 - .../GlobalProductGetProductDetailResponse.cs | 397 ---------- .../GlobalProductPublishProductRequest.cs | 78 -- .../GlobalProductPublishProductResponse.cs | 122 --- .../GlobalProductSearchProductsRequest.cs | 68 -- .../GlobalProductSearchProductsResponse.cs | 98 --- .../GlobalProductUpdateProductPriceRequest.cs | 44 -- ...GlobalProductUpdateProductPriceResponse.cs | 64 -- .../GlobalProductUpdateProductRequest.cs | 315 -------- .../GlobalProductUpdateProductResponse.cs | 125 --- .../LogisticsGetShippingDocumentRequest.cs | 29 - .../LogisticsGetShippingDocumentResponse.cs | 21 - .../LogisticsGetShippingInfoRequest.cs | 15 - .../LogisticsGetShippingInfoResponse.cs | 54 -- ...LogisticsGetShippingProviderListRequest.cs | 9 - ...ogisticsGetShippingProviderListResponse.cs | 124 --- ...ticsGetSubscribedDeliveryOptionsRequest.cs | 17 - ...icsGetSubscribedDeliveryOptionsResponse.cs | 69 -- .../LogisticsGetWarehouseListResponse.cs | 159 ---- .../LogisticsUpdateShippingInfoRequest.cs | 29 - .../LogisticsUpdateShippingInfoResponse.cs | 9 - .../Order/OrderGetOrderDetailRequest.cs | 22 - .../Order/OrderGetOrderDetailResponse.cs | 727 ------------------ .../Models/Order/OrderSearchOrdersRequest.cs | 86 --- .../Models/Order/OrderSearchOrdersResponse.cs | 70 -- .../Models/Order/OrderShipOrderRequest.cs | 15 - .../Models/Order/OrderShipOrderResponse.cs | 9 - .../Category/ProductCreateBrandRequest.cs | 15 - .../Category/ProductCreateBrandResponse.cs | 22 - .../ProductGetAttributeListRequest.cs | 15 - .../ProductGetAttributeListResponse.cs | 108 --- .../Category/ProductGetBrandListRequest.cs | 45 -- .../Category/ProductGetBrandListResponse.cs | 56 -- .../Category/ProductGetCategoryListRequest.cs | 13 - .../ProductGetCategoryListResponse.cs | 64 -- .../ProductGetCategoryRulesRequest.cs | 15 - .../ProductGetCategoryRulesResponse.cs | 107 --- .../ProductRecommendCategoryRequest.cs | 44 -- .../ProductRecommendCategoryResponse.cs | 71 -- .../Product/ProductActivateProductsRequest.cs | 17 - .../ProductActivateProductsResponse.cs | 69 -- .../Product/ProductCreateProductRequest.cs | 423 ---------- .../Product/ProductCreateProductResponse.cs | 86 --- .../ProductDeactivateProductsRequest.cs | 17 - .../ProductDeactivateProductsResponse.cs | 21 - .../Product/ProductDeleteProductsRequest.cs | 17 - .../Product/ProductDeleteProductsResponse.cs | 21 - .../Product/ProductGetProductDetailRequest.cs | 27 - .../ProductGetProductDetailResponse.cs | 660 ---------------- .../Product/ProductGetProductStocksRequest.cs | 29 - .../ProductGetProductStocksResponse.cs | 179 ----- .../Models/Product/ProductPrecheckRequest.cs | 13 - .../Models/Product/ProductPrecheckResponse.cs | 99 --- .../Product/ProductRecoverProductsRequest.cs | 17 - .../Product/ProductRecoverProductsResponse.cs | 21 - .../Product/ProductSaveProductDraftRequest.cs | 347 --------- .../ProductSaveProductDraftResponse.cs | 71 -- .../Product/ProductSearchProductsRequest.cs | 68 -- .../Product/ProductSearchProductsResponse.cs | 173 ----- .../ProductUpdateProductPriceRequest.cs | 44 -- .../ProductUpdateProductPriceResponse.cs | 21 - .../Product/ProductUpdateProductRequest.cs | 354 --------- .../Product/ProductUpdateProductResponse.cs | 71 -- .../ProductUpdateProductStockRequest.cs | 51 -- .../ProductUpdateProductStockResponse.cs | 42 - .../Upload/ProductUploadFileRequest.cs | 22 - .../Upload/ProductUploadFileResponse.cs | 42 - .../Upload/ProductUploadImageRequest.cs | 22 - .../Upload/ProductUploadImageResponse.cs | 49 -- ...romotionAddOrUpdateActivityItemsRequest.cs | 139 ---- ...omotionAddOrUpdateActivityItemsResponse.cs | 57 -- .../PromotionRemoveActivityItemsRequest.cs | 38 - .../PromotionRemoveActivityItemsResponse.cs | 43 -- .../PromotionCreateActivityRequest.cs | 57 -- .../PromotionCreateActivityResponse.cs | 50 -- .../PromotionDeactivateActivityRequest.cs | 22 - .../PromotionDeactivateActivityResponse.cs | 50 -- .../PromotionGetActivityDetailRequest.cs | 15 - .../PromotionGetActivityDetailResponse.cs | 192 ----- .../PromotionSearchActivitiesRequest.cs | 37 - .../PromotionSearchActivitiesResponse.cs | 98 --- .../PromotionUpdateActivityRequest.cs | 43 -- .../PromotionUpdateActivityResponse.cs | 43 -- .../Reverse/ReverseCancelOrderRequest.cs | 22 - .../Reverse/ReverseCancelOrderResponse.cs | 21 - .../ReverseConfirmReverseRequestRequest.cs | 15 - .../ReverseConfirmReverseRequestResponse.cs | 9 - .../ReverseGetRejectReasonListRequest.cs | 29 - .../ReverseGetRejectReasonListResponse.cs | 48 -- .../ReverseRejectReverseRequestRequest.cs | 29 - .../ReverseRejectReverseRequestResponse.cs | 9 - .../ReverseSearchReverseOrdersRequest.cs | 86 --- .../ReverseSearchReverseOrdersResponse.cs | 223 ------ .../SellerCheckGlobalProductModeRequest.cs | 9 - .../SellerCheckGlobalProductModeResponse.cs | 21 - .../SellerGetGlobalActiveShopListRequest.cs | 9 - .../SellerGetPermissionsRequest.cs} | 4 +- .../Seller/SellerGetPermissionsResponse.cs | 21 + .../Models/Seller/SellerGetShopsRequest.cs | 9 + ...tResponse.cs => SellerGetShopsResponse.cs} | 20 +- .../Shop/ShopGetAuthorizedShopListRequest.cs | 9 - ...ChainSyncPackageFulfillmentDataResponse.cs | 49 -- ...t.cs => SupplyChainSyncPackagesRequest.cs} | 163 ++-- .../SupplyChainSyncPackagesResponse.cs | 70 ++ .../TikTokShopClient.cs | 10 +- .../TikTokShopEndpoints.cs | 9 +- .../TikTokShopRequest.cs | 20 +- .../TikTokShopResponse.cs | 8 +- .../IMPORTANT_CodeAnalyzeTests.cs | 58 ++ .../Auth/AuthGetTokenResponse.json | 0 .../Auth/AuthRefreshTokenResponse.json | 0 ...FinanceGetOrderSettlementListResponse.json | 0 .../FinanceSearchSettlementsRequest.json | 0 .../FinanceSearchSettlementsResponse.json | 0 .../FinanceSearchTransactionsRequest.json | 0 .../FinanceSearchTransactionsResponse.json | 0 .../FulfillmentBatchShipPackageRequest.json | 0 .../FulfillmentBatchShipPackageResponse.json | 0 .../FulfillmentCreateLabelRequest.json | 0 .../FulfillmentCreateLabelResponse.json | 0 .../FulfillmentGetPackageDetailResponse.json | 0 ...illmentGetPackagePickupConfigResponse.json | 0 ...entGetPackageShippingDocumentResponse.json | 0 ...illmentGetPackageShippingInfoResponse.json | 0 .../FulfillmentGetShippingServiceRequest.json | 0 ...FulfillmentGetShippingServiceResponse.json | 0 .../FulfillmentSearchPackagesRequest.json | 0 .../FulfillmentSearchPackagesResponse.json | 0 .../FulfillmentShipPackageRequest.json | 0 .../FulfillmentShipPackageResponse.json | 0 ...entUpdatePackageDeliveryStatusRequest.json | 0 ...ntUpdatePackageDeliveryStatusResponse.json | 0 ...lmentUpdatePackageShippingInfoRequest.json | 0 ...mentUpdatePackageShippingInfoResponse.json | 0 .../FulfillmentConfirmOrderSplitRequest.json | 0 .../FulfillmentConfirmOrderSplitResponse.json | 0 ...FulfillmentRemovePackageOrdersRequest.json | 0 ...ulfillmentRemovePackageOrdersResponse.json | 0 .../FulfillmentVerifyOrderSplitRequest.json | 0 .../FulfillmentVerifyOrderSplitResponse.json | 0 ...llmentConfirmPreCombinePackageRequest.json | 0 ...lmentConfirmPreCombinePackageResponse.json | 0 ...lmentSearchPreCombinePackagesResponse.json | 0 .../Upload/FulfillmentUploadFileRequest.json | 0 .../Upload/FulfillmentUploadFileResponse.json | 0 .../Upload/FulfillmentUploadImageRequest.json | 0 .../FulfillmentUploadImageResponse.json | 0 ...GlobalProductGetAttributeListResponse.json | 0 .../GlobalProductGetCategoryListResponse.json | 0 ...GlobalProductGetCategoryRulesResponse.json | 0 .../GlobalProductCreateProductRequest.json | 0 .../GlobalProductCreateProductResponse.json | 0 .../GlobalProductDeleteProductsRequest.json | 0 .../GlobalProductDeleteProductsResponse.json | 0 ...GlobalProductGetProductDetailResponse.json | 0 .../GlobalProductPublishProductRequest.json | 0 .../GlobalProductPublishProductResponse.json | 0 .../GlobalProductSearchProductsRequest.json | 0 .../GlobalProductSearchProductsResponse.json | 0 ...lobalProductUpdateProductPriceRequest.json | 0 ...obalProductUpdateProductPriceResponse.json | 0 .../GlobalProductUpdateProductRequest.json | 0 .../GlobalProductUpdateProductResponse.json | 0 .../LogisticsGetShippingDocumentResponse.json | 0 .../LogisticsGetShippingInfoResponse.json | 0 ...isticsGetShippingProviderListResponse.json | 0 ...csGetSubscribedDeliveryOptionsRequest.json | 0 ...sGetSubscribedDeliveryOptionsResponse.json | 0 .../LogisticsGetWarehouseListResponse.json | 0 .../LogisticsUpdateShippingInfoRequest.json | 0 .../Order/OrderGetOrderDetailRequest.json | 0 .../Order/OrderGetOrderDetailResponse.json | 0 .../Order/OrderSearchOrdersRequest.json | 0 .../Order/OrderSearchOrdersResponse.json | 0 .../Order/OrderShipOrderRequest.json | 0 .../Category/ProductCreateBrandRequest.json | 0 .../Category/ProductCreateBrandResponse.json | 0 .../ProductGetAttributeListResponse.json | 0 .../Category/ProductGetBrandListResponse.json | 0 .../ProductGetCategoryListResponse.json | 0 .../ProductGetCategoryRulesResponse.json | 0 .../ProductRecommendCategoryRequest.json | 0 .../ProductRecommendCategoryResponse.json | 0 .../ProductActivateProductsRequest.json | 0 .../ProductActivateProductsResponse.json | 0 .../Product/ProductCreateProductRequest.json | 0 .../Product/ProductCreateProductResponse.json | 0 .../ProductDeactivateProductsRequest.json | 0 .../ProductDeactivateProductsResponse.json | 0 .../Product/ProductDeleteProductsRequest.json | 0 .../ProductDeleteProductsResponse.json | 0 .../ProductGetProductDetailResponse.json | 0 .../ProductGetProductStocksRequest.json | 0 .../ProductGetProductStocksResponse.json | 0 .../Product/ProductPrecheckResponse.json | 0 .../ProductRecoverProductsRequest.json | 0 .../ProductRecoverProductsResponse.json | 0 .../Product/ProductSearchProductsRequest.json | 0 .../ProductSearchProductsResponse.json | 0 .../ProductUpdateProductPriceRequest.json | 0 .../ProductUpdateProductPriceResponse.json | 0 .../Product/ProductUpdateProductRequest.json | 0 .../Product/ProductUpdateProductResponse.json | 0 .../ProductUpdateProductStockRequest.json | 0 .../ProductUpdateProductStockResponse.json | 0 .../Upload/ProductUploadFileRequest.json | 0 .../Upload/ProductUploadFileResponse.json | 0 .../Upload/ProductUploadImageRequest.json | 0 .../Upload/ProductUploadImageResponse.json | 0 ...motionAddOrUpdateActivityItemsRequest.json | 0 ...otionAddOrUpdateActivityItemsResponse.json | 0 .../PromotionRemoveActivityItemsRequest.json | 0 .../PromotionRemoveActivityItemsResponse.json | 0 .../PromotionCreateActivityRequest.json | 0 .../PromotionCreateActivityResponse.json | 0 .../PromotionDeactivateActivityRequest.json | 0 .../PromotionDeactivateActivityResponse.json | 0 .../PromotionGetActivityDetailResponse.json | 0 .../PromotionSearchActivitiesRequest.json | 0 .../PromotionSearchActivitiesResponse.json | 0 .../PromotionUpdateActivityRequest.json | 0 .../PromotionUpdateActivityResponse.json | 0 .../Reverse/ReverseCancelOrderRequest.json | 0 .../Reverse/ReverseCancelOrderResponse.json | 0 .../ReverseConfirmReverseRequestRequest.json | 0 .../ReverseGetRejectReasonListResponse.json | 0 .../ReverseRejectReverseRequestRequest.json | 0 .../ReverseSearchReverseOrdersRequest.json | 0 .../ReverseSearchReverseOrdersResponse.json | 0 .../SellerCheckGlobalProductModeResponse.json | 0 ...SellerGetGlobalActiveShopListResponse.json | 0 .../ShopGetAuthorizedShopListResponse.json | 0 ...hainSyncPackageFulfillmentDataRequest.json | 0 ...ainSyncPackageFulfillmentDataResponse.json | 0 .../_/Auth/AuthGetTokenResponse.json | 15 + .../_/Auth/AuthRefreshTokenResponse.json | 15 + .../_/Event/EventDeleteWebhookRequest.json | 3 + .../_/Event/EventGetWebhooksResponse.json | 16 + .../_/Event/EventUpdateWebhookRequest.json | 4 + .../Seller/SellerGetPermissionsResponse.json | 10 + .../_/Seller/SellerGetShopsResponse.json | 13 + .../_/Shop/AuthorizationGetShopsResponse.json | 17 + .../SupplyChainSyncPackagesRequest.json | 34 + .../SupplyChainSyncPackagesResponse.json | 20 + .../TestCase_RequestSigningTests.cs | 88 +++ 320 files changed, 774 insertions(+), 13083 deletions(-) rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/{TikTokShopClientExecuteShopExtensions.cs => TikTokShopClientExecuteAuthorizationExtensions.cs} (51%) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteEventExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteGlobalProductExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReverseExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsRequest.cs rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/{Shop/ShopGetAuthorizedShopListResponse.cs => Authorization/AuthorizationGetShopsResponse.cs} (55%) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksRequest.cs rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/{Fulfillment/FulfillmentSearchPackagesResponse.cs => Event/EventGetWebhooksResponse.cs} (50%) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeResponse.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListRequest.cs rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/{Logistics/LogisticsGetWarehouseListRequest.cs => Seller/SellerGetPermissionsRequest.cs} (50%) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsRequest.cs rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/{SellerGetGlobalActiveShopListResponse.cs => SellerGetShopsResponse.cs} (66%) delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListRequest.cs delete mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/{SupplyChainSyncPackageFulfillmentDataRequest.cs => SupplyChainSyncPackagesRequest.cs} (55%) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesResponse.cs rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Auth/AuthGetTokenResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Auth/AuthRefreshTokenResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Finance/FinanceGetOrderSettlementListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Finance/FinanceSearchSettlementsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Finance/FinanceSearchSettlementsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Finance/FinanceSearchTransactionsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Finance/FinanceSearchTransactionsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentBatchShipPackageRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentBatchShipPackageResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentCreateLabelRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentCreateLabelResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentGetPackageDetailResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentGetPackagePickupConfigResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentGetPackageShippingInfoResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentGetShippingServiceRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentGetShippingServiceResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentSearchPackagesRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentSearchPackagesResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentShipPackageRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentShipPackageResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Upload/FulfillmentUploadFileRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Upload/FulfillmentUploadFileResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Upload/FulfillmentUploadImageRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Fulfillment/Upload/FulfillmentUploadImageResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/Category/GlobalProductGetAttributeListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/Category/GlobalProductGetCategoryListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductCreateProductRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductCreateProductResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductDeleteProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductDeleteProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductGetProductDetailResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductPublishProductRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductPublishProductResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductSearchProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductSearchProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductUpdateProductPriceRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductUpdateProductPriceResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductUpdateProductRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/GlobalProduct/GlobalProductUpdateProductResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsGetShippingDocumentResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsGetShippingInfoResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsGetShippingProviderListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsGetWarehouseListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Logistics/LogisticsUpdateShippingInfoRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Order/OrderGetOrderDetailRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Order/OrderGetOrderDetailResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Order/OrderSearchOrdersRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Order/OrderSearchOrdersResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Order/OrderShipOrderRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductCreateBrandRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductCreateBrandResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductGetAttributeListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductGetBrandListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductGetCategoryListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductGetCategoryRulesResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductRecommendCategoryRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Category/ProductRecommendCategoryResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductActivateProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductActivateProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductCreateProductRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductCreateProductResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductDeactivateProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductDeactivateProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductDeleteProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductDeleteProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductGetProductDetailResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductGetProductStocksRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductGetProductStocksResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductPrecheckResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductRecoverProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductRecoverProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductSearchProductsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductSearchProductsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductUpdateProductPriceRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductUpdateProductPriceResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductUpdateProductRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductUpdateProductResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductUpdateProductStockRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/ProductUpdateProductStockResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Upload/ProductUploadFileRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Upload/ProductUploadFileResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Upload/ProductUploadImageRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Product/Upload/ProductUploadImageResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/Items/PromotionRemoveActivityItemsRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/Items/PromotionRemoveActivityItemsResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionCreateActivityRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionCreateActivityResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionDeactivateActivityRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionDeactivateActivityResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionGetActivityDetailResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionSearchActivitiesRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionSearchActivitiesResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionUpdateActivityRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Promotion/PromotionUpdateActivityResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseCancelOrderRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseCancelOrderResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseConfirmReverseRequestRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseGetRejectReasonListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseRejectReverseRequestRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseSearchReverseOrdersRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Reverse/ReverseSearchReverseOrdersResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Seller/SellerCheckGlobalProductModeResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Seller/SellerGetGlobalActiveShopListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/Shop/ShopGetAuthorizedShopListResponse.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.json (100%) rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/{ => Legacy}/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.json (100%) create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthGetTokenResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthRefreshTokenResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventDeleteWebhookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventGetWebhooksResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventUpdateWebhookRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetPermissionsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetShopsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Shop/AuthorizationGetShopsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/TestCase_RequestSigningTests.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs index 760e0c36..4480b151 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs @@ -116,7 +116,7 @@ public class SKU public int? Length { get; set; } /// - /// 获取或设置宽度单位。 + /// 获取或设置宽度。 /// [Newtonsoft.Json.JsonProperty("width")] [System.Text.Json.Serialization.JsonPropertyName("width")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs index bf9321e4..a0647746 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs @@ -42,7 +42,7 @@ public class FailedPackage /// [Newtonsoft.Json.JsonProperty("success_package_list")] [System.Text.Json.Serialization.JsonPropertyName("success_package_list")] - public string[] SucceededPackageList { get; set; } = default!; + public string[] SucceededPackageIdList { get; set; } = default!; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyResponse.cs index 0b63e64a..7fdaa8d8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyResponse.cs @@ -14,14 +14,14 @@ public abstract class TikTokShopLegacyResponse : CommonResponseBase, ICommonResp [Newtonsoft.Json.JsonProperty("code")] [System.Text.Json.Serialization.JsonPropertyName("code")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public virtual int ErrorCode { get; set; } + public virtual int Code { get; set; } /// /// 获取 TikTok Shop API 返回的错误信息。 /// [Newtonsoft.Json.JsonProperty("message")] [System.Text.Json.Serialization.JsonPropertyName("message")] - public virtual string? ErrorMessage { get; set; } + public virtual string? Message { get; set; } /// /// 获取 TikTok Shop API 返回的请求唯一标识。 @@ -33,13 +33,13 @@ public abstract class TikTokShopLegacyResponse : CommonResponseBase, ICommonResp /// /// 获取一个值,该值指示调用 TikTok API 是否成功。 /// - /// (即 HTTP 状态码为 200,且 值为 0) + /// (即 HTTP 状态码为 200,且 值为 0) /// /// /// public override bool IsSuccessful() { - return GetRawStatus() == 200 && ErrorCode == 0; + return GetRawStatus() == 200 && Code == 0; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteShopExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthorizationExtensions.cs similarity index 51% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteShopExtensions.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthorizationExtensions.cs index 9b108658..0d395a3e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteShopExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthorizationExtensions.cs @@ -6,28 +6,28 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop { - public static class TikTokShopClientExecuteShopExtensions + public static class TikTokShopClientExecuteAuthorizationExtensions { /// - /// 异步调用 [GET] /shop/get_authorized_shop 接口。 + /// 异步调用 [GET] /authorization/{version}/shops 接口。 /// /// REF:
- /// + /// ///
///
/// /// /// /// - public static async Task ExecuteShopGetAuthorizedShopListAsync(this TikTokShopClient client, Models.ShopGetAuthorizedShopListRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteAuthorizationGetShopsAsync(this TikTokShopClient client, Models.AuthorizationGetShopsRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "shop", "get_authorized_shop"); + .CreateFlurlRequest(request, HttpMethod.Get, "authorization", request.ApiVersion, "shops"); - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteEventExtensions.cs new file mode 100644 index 00000000..77856804 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteEventExtensions.cs @@ -0,0 +1,77 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteEventExtensions + { + /// + /// 异步调用 [GET] /event/{version}/webhooks 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteEventGetWebhooksAsync(this TikTokShopClient client, Models.EventGetWebhooksRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "event", request.ApiVersion, "webhooks"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [PUT] /event/{version}/webhooks 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteEventUpdateWebhookAsync(this TikTokShopClient client, Models.EventUpdateWebhookRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Put, "event", request.ApiVersion, "webhooks"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [DELETE] /event/{version}/webhooks 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteEventDeleteWebhookAsync(this TikTokShopClient client, Models.EventDeleteWebhookRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Delete, "event", request.ApiVersion, "webhooks"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs deleted file mode 100644 index b8ffce40..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteFinanceExtensions - { - /// - /// 异步调用 [POST] /finance/transactions/search 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFinanceSearchTransactionsAsync(this TikTokShopClient client, Models.FinanceSearchTransactionsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "finance", "transactions", "search"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /finance/settlements/search 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFinanceSearchSettlementsAsync(this TikTokShopClient client, Models.FinanceSearchSettlementsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "finance", "settlements", "search"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /finance/order/settlements 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFinanceGetOrderSettlementListAsync(this TikTokShopClient client, Models.FinanceGetOrderSettlementListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "finance", "order", "settlements") - .SetQueryParam("order_id", request.OrderId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs deleted file mode 100644 index 37ddddde..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs +++ /dev/null @@ -1,424 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteFulfillmentExtensions - { - /// - /// 异步调用 [POST] /fulfillment/search 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentSearchPackagesAsync(this TikTokShopClient client, Models.FulfillmentSearchPackagesRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "search"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /fulfillment/detail 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentGetPackageDetailAsync(this TikTokShopClient client, Models.FulfillmentGetPackageDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", "detail") - .SetQueryParam("package_id", request.PackageId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /fulfillment/shipping_info 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentGetPackageShippingInfoAsync(this TikTokShopClient client, Models.FulfillmentGetPackageShippingInfoRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", "shipping_info") - .SetQueryParam("package_id", request.PackageId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /fulfillment/shipping_document 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentGetPackageShippingDocumentAsync(this TikTokShopClient client, Models.FulfillmentGetPackageShippingDocumentRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", "shipping_document") - .SetQueryParam("package_id", request.PackageId) - .SetQueryParam("document_type", request.DocumentType); - - if (request.DocumentSize is not null) - flurlReq.SetQueryParam("document_size", request.DocumentSize); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/rts 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentShipPackageAsync(this TikTokShopClient client, Models.FulfillmentShipPackageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "rts"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/batch_rts 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentBatchShipPackageAsync(this TikTokShopClient client, Models.FulfillmentBatchShipPackageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "batch_rts"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /fulfillment/package_pickup_config/list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentGetPackagePickupConfigAsync(this TikTokShopClient client, Models.FulfillmentGetPackagePickupConfigRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", "package_pickup_config", "list") - .SetQueryParam("package_id", request.PackageId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/shipping_info/update 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentUpdatePackageShippingInfoAsync(this TikTokShopClient client, Models.FulfillmentUpdatePackageShippingInfoRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "shipping_info", "update"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/delivery 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentUpdatePackageDeliveryStatusAsync(this TikTokShopClient client, Models.FulfillmentUpdatePackageDeliveryStatusRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "delivery"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/shipping_service/get 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentGetShippingServiceAsync(this TikTokShopClient client, Models.FulfillmentGetShippingServiceRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "shipping_service", "get"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/create_label 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentCreateLabelAsync(this TikTokShopClient client, Models.FulfillmentCreateLabelRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "create_label"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - #region Order - /// - /// 异步调用 [POST] /fulfillment/order_split/verify 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentVerifyOrderSplitAsync(this TikTokShopClient client, Models.FulfillmentVerifyOrderSplitRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "order_split", "verify"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/order_split/confirm 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentConfirmOrderSplitAsync(this TikTokShopClient client, Models.FulfillmentConfirmOrderSplitRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "order_split", "confirm"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/package/remove 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentRemovePackageOrdersAsync(this TikTokShopClient client, Models.FulfillmentRemovePackageOrdersRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "package", "remove"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - - #region PreCombinePackage - /// - /// 异步调用 [GET] /fulfillment/pre_combine_pkg/list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentSearchPreCombinePackagesAsync(this TikTokShopClient client, Models.FulfillmentSearchPreCombinePackagesRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", "pre_combine_pkg", "list") - .SetQueryParam("cursor", request.PageCursor) - .SetQueryParam("page_size", request.PageSize); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/pre_combine_pkg/confirm 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentConfirmPreCombinePackageAsync(this TikTokShopClient client, Models.FulfillmentConfirmPreCombinePackageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "pre_combine_pkg", "confirm"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - - #region Upload - /// - /// 异步调用 [POST] /fulfillment/uploadimage 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentUploadImageAsync(this TikTokShopClient client, Models.FulfillmentUploadImageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "uploadimage"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /fulfillment/uploadfile 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteFulfillmentUploadFileAsync(this TikTokShopClient client, Models.FulfillmentUploadFileRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", "uploadfile"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteGlobalProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteGlobalProductExtensions.cs deleted file mode 100644 index ece7cbbd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteGlobalProductExtensions.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteGlobalProductExtensions - { - /// - /// 异步调用 [POST] /product/global_products/search 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductSearchProductsAsync(this TikTokShopClient client, Models.GlobalProductSearchProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "product", "global_products", "search") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /product/global_products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductGetProductDetailAsync(this TikTokShopClient client, Models.GlobalProductGetProductDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "product", "global_products") - .SetQueryParam("product_id", request.GlobalProductId) - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /product/global_products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductCreateProductAsync(this TikTokShopClient client, Models.GlobalProductCreateProductRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "product", "global_products") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [PUT] /product/global_products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductUpdateProductAsync(this TikTokShopClient client, Models.GlobalProductUpdateProductRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Put, "product", "global_products") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [PUT] /product/global_products/prices 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductUpdateProductPriceAsync(this TikTokShopClient client, Models.GlobalProductUpdateProductPriceRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Put, "product", "global_products", "prices") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /product/global_products/publish 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductPublishProductAsync(this TikTokShopClient client, Models.GlobalProductPublishProductRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "product", "global_products", "publish") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [DELETE] /product/global_products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductDeleteProductsAsync(this TikTokShopClient client, Models.GlobalProductDeleteProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Delete, "product", "global_products") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - #region Category - /// - /// 异步调用 [GET] /product/global_products/categories 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductGetCategoryListAsync(this TikTokShopClient client, Models.GlobalProductGetCategoryListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "product", "global_products", "categories") - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /product/global_products/attributes 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductGetAttributeListAsync(this TikTokShopClient client, Models.GlobalProductGetAttributeListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "product", "global_products", "attributes") - .SetQueryParam("category_id", request.CategoryId) - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /product/global_products/categories/rules 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteGlobalProductGetCategoryRulesAsync(this TikTokShopClient client, Models.GlobalProductGetCategoryRulesRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "product", "global_products", "categories", "rules") - .SetQueryParam("category_id", request.CategoryId) - .RemoveQueryParam("shop_cipher"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs deleted file mode 100644 index 5f8ae48a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteLogisticsExtensions - { - /// - /// 异步调用 [GET] /logistics/get_warehouse_list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteLogisticsGetWarehouseListAsync(this TikTokShopClient client, Models.LogisticsGetWarehouseListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "logistics", "get_warehouse_list"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /logistics/get_subscribed_deliveryoptions 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteLogisticsGetSubscribedDeliveryOptionsAsync(this TikTokShopClient client, Models.LogisticsGetSubscribedDeliveryOptionsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "logistics", "get_subscribed_deliveryoptions"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /logistics/shipping_providers 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteLogisticsGetShippingProviderListAsync(this TikTokShopClient client, Models.LogisticsGetShippingProviderListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "logistics", "shipping_providers"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /logistics/shipping_document 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteLogisticsGetShippingDocumentAsync(this TikTokShopClient client, Models.LogisticsGetShippingDocumentRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "logistics", "shipping_document") - .SetQueryParam("order_id", request.OrderId) - .SetQueryParam("document_type", request.DocumentType); - - if (request.DocumentSize is not null) - flurlReq.SetQueryParam("document_size", request.DocumentSize); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /logistics/ship/get 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteLogisticsGetShippingInfoAsync(this TikTokShopClient client, Models.LogisticsGetShippingInfoRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "logistics", "ship", "get") - .SetQueryParam("order_id", request.OrderId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /logistics/tracking 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteLogisticsUpdateShippingInfoAsync(this TikTokShopClient client, Models.LogisticsUpdateShippingInfoRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "logistics", "tracking") - .SetQueryParam("order_id", request.OrderId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs deleted file mode 100644 index e1edd089..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteOrderExtensions - { - /// - /// 异步调用 [POST] /orders/search 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteOrderSearchOrdersAsync(this TikTokShopClient client, Models.OrderSearchOrdersRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "orders", "search"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /orders/detail/query 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteOrderGetOrderDetailAsync(this TikTokShopClient client, Models.OrderGetOrderDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "orders", "detail", "query"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /orders/rts 接口。 - /// - /// - /// - /// - /// - public static async Task ExecuteOrderShipOrderAsync(this TikTokShopClient client, Models.OrderShipOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "orders", "rts"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs deleted file mode 100644 index 8b0db782..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs +++ /dev/null @@ -1,495 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteProductExtensions - { - /// - /// 异步调用 [POST] /products/search 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductSearchProductsAsync(this TikTokShopClient client, Models.ProductSearchProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "search"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /products/details 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductGetProductDetailAsync(this TikTokShopClient client, Models.ProductGetProductDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "products", "details") - .SetQueryParam("product_id", request.ProductId); - - if (request.RequireAuditVersion is not null) - flurlReq.SetQueryParam("need_audit_version", request.RequireAuditVersion.Value ? "true" : "false"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductCreateProductAsync(this TikTokShopClient client, Models.ProductCreateProductRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [PUT] /products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductUpdateProductAsync(this TikTokShopClient client, Models.ProductUpdateProductRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Put, "products"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/stock/list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductGetProductStocksAsync(this TikTokShopClient client, Models.ProductGetProductStocksRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "stock", "list"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [PUT] /products/stocks 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductUpdateProductStockAsync(this TikTokShopClient client, Models.ProductUpdateProductStockRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Put, "products", "stocks"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [PUT] /products/prices 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductUpdateProductPriceAsync(this TikTokShopClient client, Models.ProductUpdateProductPriceRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Put, "products", "prices"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [DELETE] /products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductDeleteProductsAsync(this TikTokShopClient client, Models.ProductDeleteProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Delete, "products"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/recover 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductRecoverProductsAsync(this TikTokShopClient client, Models.ProductRecoverProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "recover"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/activate 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductActivateProductsAsync(this TikTokShopClient client, Models.ProductActivateProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "activate"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/inactivated_products 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductDeactivateProductsAsync(this TikTokShopClient client, Models.ProductDeactivateProductsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "inactivated_products"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/save_draft 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductSaveProductDraftAsync(this TikTokShopClient client, Models.ProductSaveProductDraftRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "save_draft"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/pre_check 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductPrecheckAsync(this TikTokShopClient client, Models.ProductPrecheckRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "pre_check"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - #region Upload - /// - /// 异步调用 [POST] /products/upload_files 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductUploadFileAsync(this TikTokShopClient client, Models.ProductUploadFileRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "upload_files"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/upload_imgs 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductUploadImageAsync(this TikTokShopClient client, Models.ProductUploadImageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "upload_imgs"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - - #region Category - /// - /// 异步调用 [GET] /products/categories 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductGetCategoryListAsync(this TikTokShopClient client, Models.ProductGetCategoryListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "products", "categories"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /products/brands 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductGetBrandListAsync(this TikTokShopClient client, Models.ProductGetBrandListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "products", "brands") - .SetQueryParam("page_number", request.PageNumber) - .SetQueryParam("page_size", request.PageSize); - - if (request.CategoryId is not null) - flurlReq.SetQueryParam("category_id", request.CategoryId); - - if (request.IsOnlyAuthorized is not null) - flurlReq.SetQueryParam("only_authorized", request.IsOnlyAuthorized.Value ? "true" : "false"); - - if (request.BrandSuggest is not null) - flurlReq.SetQueryParam("brand_suggest", request.BrandSuggest); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /products/brand 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductCreateBrandAsync(this TikTokShopClient client, Models.ProductCreateBrandRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "products", "brand"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /products/attributes 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductGetAttributeListAsync(this TikTokShopClient client, Models.ProductGetAttributeListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "products", "attributes") - .SetQueryParam("category_id", request.CategoryId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /products/categories/rules 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductGetCategoryRulesAsync(this TikTokShopClient client, Models.ProductGetCategoryRulesRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "products", "categories", "rules") - .SetQueryParam("category_id", request.CategoryId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /product/category_recommend 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteProductRecommendCategoryAsync(this TikTokShopClient client, Models.ProductRecommendCategoryRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "product", "category_recommend"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs deleted file mode 100644 index bdfee44a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecutePromotionExtensions - { - /// - /// 异步调用 [POST] /promotion/activity/list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionSearchActivitiesAsync(this TikTokShopClient client, Models.PromotionSearchActivitiesRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "promotion", "activity", "list"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /promotion/activity/get 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionGetActivityDetailAsync(this TikTokShopClient client, Models.PromotionGetActivityDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "promotion", "activity", "get") - .SetQueryParam("promotion_id", request.PromotionId); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /promotion/activity/create 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionCreateActivityAsync(this TikTokShopClient client, Models.PromotionCreateActivityRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "promotion", "activity", "create"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /promotion/activity/update 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionUpdateActivityAsync(this TikTokShopClient client, Models.PromotionUpdateActivityRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "promotion", "activity", "update"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /promotion/activity/deactivate 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionDeactivateActivityAsync(this TikTokShopClient client, Models.PromotionDeactivateActivityRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "promotion", "activity", "deactivate"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - #region Items - /// - /// 异步调用 [POST] /promotion/activity/items/addorupdate 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionAddOrUpdateActivityItemsAsync(this TikTokShopClient client, Models.PromotionAddOrUpdateActivityItemsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "promotion", "activity", "items", "addorupdate"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /promotion/activity/items/remove 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecutePromotionRemoveActivityItemsAsync(this TikTokShopClient client, Models.PromotionRemoveActivityItemsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "promotion", "activity", "items", "remove"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReverseExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReverseExtensions.cs deleted file mode 100644 index 5bb33067..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReverseExtensions.cs +++ /dev/null @@ -1,131 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop -{ - public static class TikTokShopClientExecuteReverseExtensions - { - /// - /// 异步调用 [POST] /reverse/reverse_order/list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteReverseSearchReverseOrdersAsync(this TikTokShopClient client, Models.ReverseSearchReverseOrdersRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "reverse", "reverse_order", "list"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /reverse/reverse_request/confirm 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteReverseConfirmReverseRequestAsync(this TikTokShopClient client, Models.ReverseConfirmReverseRequestRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "reverse", "reverse_request", "confirm"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /reverse/reverse_request/reject 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteReverseRejectReverseRequestAsync(this TikTokShopClient client, Models.ReverseRejectReverseRequestRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "reverse", "reverse_request", "reject"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [POST] /reverse/order/cancel 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteReverseCancelOrderAsync(this TikTokShopClient client, Models.ReverseCancelOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "reverse", "order", "cancel"); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// 异步调用 [GET] /reverse/reverse_reason/list 接口。 - /// - /// REF:
- /// - ///
- ///
- /// - /// - /// - /// - public static async Task ExecuteReverseGetRejectReasonListAsync(this TikTokShopClient client, Models.ReverseGetRejectReasonListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "reverse", "reverse_reason", "list"); - - if (request.ActionType is not null) - flurlReq.SetQueryParam("reverse_action_type", request.ActionType.Value); - - if (request.ReasonType is not null) - flurlReq.SetQueryParam("reason_type", request.ReasonType.Value); - - if (request.FulfillmentStatus is not null) - flurlReq.SetQueryParam("fulfillment_status", request.FulfillmentStatus.Value); - - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSellerExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSellerExtensions.cs index 0f0869ee..3049ff1d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSellerExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSellerExtensions.cs @@ -9,47 +9,47 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop public static class TikTokShopClientExecuteSellerExtensions { /// - /// 异步调用 [GET] /seller/global/active_shops 接口。 + /// 异步调用 [GET] /seller/{version}/permissions 接口。 /// /// REF:
- /// + /// ///
///
/// /// /// /// - public static async Task ExecuteSellerGetGlobalActiveShopListAsync(this TikTokShopClient client, Models.SellerGetGlobalActiveShopListRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteSellerGetPermissionsAsync(this TikTokShopClient client, Models.SellerGetPermissionsRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "seller", "global", "active_shops"); + .CreateFlurlRequest(request, HttpMethod.Get, "seller", request.ApiVersion, "permissions"); - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } /// - /// 异步调用 [GET] /seller/manage_global_product/check 接口。 + /// 异步调用 [GET] /seller/{version}/shops 接口。 /// /// REF:
- /// + /// ///
///
/// /// /// /// - public static async Task ExecuteSellerCheckGlobalProductModeAsync(this TikTokShopClient client, Models.SellerCheckGlobalProductModeRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteSellerGetShopsAsync(this TikTokShopClient client, Models.SellerGetShopsRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Get, "seller", "manage_global_product", "check"); + .CreateFlurlRequest(request, HttpMethod.Get, "seller", request.ApiVersion, "shops"); - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSupplyChainExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSupplyChainExtensions.cs index d5313250..9cbd5d64 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSupplyChainExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteSupplyChainExtensions.cs @@ -9,25 +9,25 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop public static class TikTokShopClientExecuteSupplyChainExtensions { /// - /// 异步调用 [POST] /supply_chain/package_shipment_confirmation 接口。 + /// 异步调用 [POST] /supply_chain/{version}/packages/sync 接口。 /// /// REF:
- /// + /// ///
///
/// /// /// /// - public static async Task ExecuteSupplyChainSyncPackageFulfillmentDataAsync(this TikTokShopClient client, Models.SupplyChainSyncPackageFulfillmentDataRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteSupplyChainSyncPackagesAsync(this TikTokShopClient client, Models.SupplyChainSyncPackagesRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); IFlurlRequest flurlReq = client - .CreateFlurlRequest(request, HttpMethod.Post, "supply_chain", "package_shipment_confirmation"); + .CreateFlurlRequest(request, HttpMethod.Post, "supply_chain", request.ApiVersion, "packages", "sync"); - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Interceptors/TikTokShopRequestSigningInterceptor.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Interceptors/TikTokShopRequestSigningInterceptor.cs index d7f00120..82c0fcfd 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Interceptors/TikTokShopRequestSigningInterceptor.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Interceptors/TikTokShopRequestSigningInterceptor.cs @@ -1,6 +1,6 @@ using System; -using System.Collections.Generic; using System.Linq; +using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Flurl; @@ -8,6 +8,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Interceptors { + using SKIT.FlurlHttpClient.Internal; + internal class TikTokShopRequestSigningInterceptor : HttpInterceptor { private readonly string _baseUrl; @@ -19,7 +21,7 @@ public TikTokShopRequestSigningInterceptor(string baseUrl, string appSecret) _appSecret = appSecret; } - public override Task BeforeCallAsync(HttpInterceptorContext context, CancellationToken cancellationToken = default) + public override async Task BeforeCallAsync(HttpInterceptorContext context, CancellationToken cancellationToken = default) { if (context is null) throw new ArgumentNullException(nameof(context)); if (context.FlurlCall.Completed) throw new TikTokShopException("Failed to sign request. This interceptor must be called before request completed."); @@ -28,23 +30,33 @@ public override Task BeforeCallAsync(HttpInterceptorContext context, Cancellatio if (!requestUrl.StartsWith(_baseUrl, StringComparison.OrdinalIgnoreCase)) { // 非基地址的请求跳过签名(如 Auth API) - return Task.CompletedTask; + return; + } + + string body = string.Empty; + if (context.FlurlCall.HttpRequestMessage?.Content is not null) + { + if (context.FlurlCall.HttpRequestMessage.Method != HttpMethod.Get && + context.FlurlCall.HttpRequestMessage.Content is not MultipartFormDataContent) + { + HttpContent httpContent = context.FlurlCall.HttpRequestMessage.Content; + body = await _AsyncEx.RunTaskWithCancellationTokenAsync(httpContent.ReadAsStringAsync(), cancellationToken).ConfigureAwait(false); + } } - IList ignoreQueryNames = new List(); - string signText; + string signature; try { - var queryParams = new QueryParamCollection(context.FlurlCall.HttpRequestMessage.RequestUri!.Query); + var queryParams = new QueryParamCollection(context.FlurlCall.HttpRequestMessage?.RequestUri?.Query); queryParams.Remove("access_token"); queryParams.Remove("sign"); string msgText = string.Format( - "{0}{1}{2}", - arg0: _appSecret, - arg1: context.FlurlCall.HttpRequestMessage.RequestUri.AbsolutePath, - arg2: string.Join(string.Empty, queryParams + "{0}{1}{2}{3}{4}", + _appSecret, + context.FlurlCall.HttpRequestMessage?.RequestUri?.AbsolutePath, + string.Join(string.Empty, queryParams .ToDictionary(k => k.Name, v => v.Value.ToString()) .OrderBy(k => k.Key, StringComparer.Ordinal) .Where(e => @@ -52,25 +64,25 @@ public override Task BeforeCallAsync(HttpInterceptorContext context, Cancellatio if (string.IsNullOrEmpty(e.Value)) { // 过滤空参数,空参数不参与签名 - ignoreQueryNames.Add(e.Key); + context.FlurlCall.Request.RemoveQueryParam(e.Key); return false; } return true; }) .Select(e => $"{e.Key}{e.Value}") - ) + ), + body, + _appSecret ); - signText = Utilities.HMACUtility.HashWithSHA256(_appSecret, msgText).Value!; + signature = Utilities.HMACUtility.HashWithSHA256(_appSecret, msgText).Value!; } catch (Exception ex) { throw new TikTokShopException("Failed to sign request. Please see the inner exception for more details.", ex); } - context.FlurlCall.Request.SetQueryParam("sign", signText); - context.FlurlCall.Request.RemoveQueryParams(ignoreQueryNames); - return Task.CompletedTask; + context.FlurlCall.Request.SetQueryParam("sign", signature); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsRequest.cs new file mode 100644 index 00000000..6183d693 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /authorization/{version}/shops 接口的请求。 + /// + public class AuthorizationGetShopsRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsResponse.cs similarity index 55% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsResponse.cs index 0c0a741e..7557a854 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Authorization/AuthorizationGetShopsResponse.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models { /// - /// 表示 [GET] /shop/get_authorized_shop 接口的响应。 + /// 表示 [GET] /authorization/{version}/shops 接口的响应。 /// - public class ShopGetAuthorizedShopListResponse : TikTokShopResponse + public class AuthorizationGetShopsResponse : TikTokShopResponse { public static class Types { @@ -16,17 +16,17 @@ public class Shop /// /// 获取或设置店铺 ID。 /// - [Newtonsoft.Json.JsonProperty("shop_id")] - [System.Text.Json.Serialization.JsonPropertyName("shop_id")] + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] public string ShopId { get; set; } = default!; /// /// 获取或设置店铺名称。 /// - [Newtonsoft.Json.JsonProperty("shop_name")] - [System.Text.Json.Serialization.JsonPropertyName("shop_name")] - public string ShopName { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; /// /// 获取或设置所在地。 @@ -36,19 +36,33 @@ public class Shop public string Region { get; set; } = default!; /// - /// 获取或设置店铺类型。 + /// 获取或设置卖家类型。 /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int Type { get; set; } + [Newtonsoft.Json.JsonProperty("seller_type")] + [System.Text.Json.Serialization.JsonPropertyName("seller_type")] + public string SellerType { get; set; } = default!; + + /// + /// 获取或设置店铺密码。 + /// + [Newtonsoft.Json.JsonProperty("cipher")] + [System.Text.Json.Serialization.JsonPropertyName("cipher")] + public string Cipher { get; set; } = default!; + + /// + /// 获取或设置店铺编码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = default!; } } /// /// 获取或设置店铺列表。 /// - [Newtonsoft.Json.JsonProperty("shop_list")] - [System.Text.Json.Serialization.JsonPropertyName("shop_list")] + [Newtonsoft.Json.JsonProperty("shops")] + [System.Text.Json.Serialization.JsonPropertyName("shops")] public Types.Shop[] ShopList { get; set; } = default!; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookRequest.cs new file mode 100644 index 00000000..8ab7de8c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /event/{version}/webhooks 接口的请求。 + /// + public class EventDeleteWebhookRequest : TikTokShopRequest + { + /// + /// 获取或设置事件类型。 + /// + [Newtonsoft.Json.JsonProperty("event_type")] + [System.Text.Json.Serialization.JsonPropertyName("event_type")] + public string EventType { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookResponse.cs new file mode 100644 index 00000000..8d9c3e27 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventDeleteWebhookResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /event/{version}/webhooks 接口的响应。 + /// + public class EventDeleteWebhookResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksRequest.cs new file mode 100644 index 00000000..1da5e720 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /event/{version}/webhooks 接口的请求。 + /// + public class EventGetWebhooksRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksResponse.cs similarity index 50% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksResponse.cs index 27485213..b8698367 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventGetWebhooksResponse.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models { /// - /// 表示 [POST] /fulfillment/search 接口的响应。 + /// 表示 [GET] /event/{version}/webhooks 接口的响应。 /// - public class FulfillmentSearchPackagesResponse : TikTokShopResponse + public class EventGetWebhooksResponse : TikTokShopResponse { public static class Types { @@ -11,22 +11,21 @@ public class Data { public static class Types { - public class Package + public class Webhook { /// - /// 获取或设置包裹 ID。 + /// 获取或设置事件类型。 /// - [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; } = default!; + [Newtonsoft.Json.JsonProperty("event_type")] + [System.Text.Json.Serialization.JsonPropertyName("event_type")] + public string EventType { get; set; } = default!; /// - /// 获取或设置包裹状态。 + /// 获取或设置回调地址。 /// - [Newtonsoft.Json.JsonProperty("package_status")] - [System.Text.Json.Serialization.JsonPropertyName("package_status")] - public int PackageStatus { get; set; } + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string WebhookUrl { get; set; } = default!; /// /// 获取或设置创建时间戳。 @@ -45,32 +44,18 @@ public class Package } /// - /// 获取或设置包裹列表。 + /// 获取或设置 Webhook 列表。 /// - [Newtonsoft.Json.JsonProperty("package_list")] - [System.Text.Json.Serialization.JsonPropertyName("package_list")] - public Types.Package[] PackageList { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("webhooks")] + [System.Text.Json.Serialization.JsonPropertyName("webhooks")] + public Types.Webhook[] WebhookList { get; set; } = default!; /// /// 获取或设置总数量。 /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] public int TotalCount { get; set; } - - /// - /// 获取或设置下一页分页游标。 - /// - [Newtonsoft.Json.JsonProperty("next_cursor")] - [System.Text.Json.Serialization.JsonPropertyName("next_cursor")] - public string? NextCursor { get; set; } - - /// - /// 获取或设置是否还有更多。 - /// - [Newtonsoft.Json.JsonProperty("more")] - [System.Text.Json.Serialization.JsonPropertyName("more")] - public bool HasMore { get; set; } } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookRequest.cs new file mode 100644 index 00000000..885e5fe2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookRequest.cs @@ -0,0 +1,24 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /event/{version}/webhooks 接口的请求。 + /// + public class EventUpdateWebhookRequest : TikTokShopRequest + { + /// + /// 获取或设置事件类型。 + /// + [Newtonsoft.Json.JsonProperty("event_type", Order = 1)] + [System.Text.Json.Serialization.JsonPropertyName("event_type")] + [System.Text.Json.Serialization.JsonPropertyOrder(1)] + public string EventType { get; set; } = string.Empty; + + /// + /// 获取或设置回调地址。 + /// + [Newtonsoft.Json.JsonProperty("address", Order = 2)] + [System.Text.Json.Serialization.JsonPropertyName("address")] + [System.Text.Json.Serialization.JsonPropertyOrder(2)] + public string WebhookUrl { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookResponse.cs new file mode 100644 index 00000000..6a86f6f7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Event/EventUpdateWebhookResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /event/{version}/webhooks 接口的响应。 + /// + public class EventUpdateWebhookResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListRequest.cs deleted file mode 100644 index bb5a4619..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /finance/order/settlements 接口的请求。 - /// - public class FinanceGetOrderSettlementListRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string OrderId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListResponse.cs deleted file mode 100644 index a93e5b5f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderSettlementListResponse.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /finance/order/settlements 接口的响应。 - /// - public class FinanceGetOrderSettlementListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Settlement - { - public static class Types - { - public class SettlementInfo : FinanceSearchSettlementsResponse.Types.Data.Types.Settlement.Types.SettlementInfo - { - } - } - - /// - /// 获取或设置结算 ID。 - /// - [Newtonsoft.Json.JsonProperty("unique_key")] - [System.Text.Json.Serialization.JsonPropertyName("unique_key")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long SettlementId { get; set; } - - /// - /// 获取或设置结算状态。 - /// - [Newtonsoft.Json.JsonProperty("sett_status")] - [System.Text.Json.Serialization.JsonPropertyName("sett_status")] - public int SettlementStatus { get; set; } - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string? ProductName { get; set; } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - public string? SKUId { get; set; } - - /// - /// 获取或设置 SKU 名称。 - /// - [Newtonsoft.Json.JsonProperty("sku_name")] - [System.Text.Json.Serialization.JsonPropertyName("sku_name")] - public string? SKUName { get; set; } - - /// - /// 获取或设置结算信息。 - /// - [Newtonsoft.Json.JsonProperty("settlement_info")] - [System.Text.Json.Serialization.JsonPropertyName("settlement_info")] - public Types.SettlementInfo SettlementInfo { get; set; } = default!; - } - } - - /// - /// 获取或设置结算列表。 - /// - [Newtonsoft.Json.JsonProperty("settlement_list")] - [System.Text.Json.Serialization.JsonPropertyName("settlement_list")] - public Types.Settlement[] SettlementList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsRequest.cs deleted file mode 100644 index 1dab1f51..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /finance/settlements/search 接口的请求。 - /// - public class FinanceSearchSettlementsRequest : TikTokShopRequest - { - /// - /// 获取或设置结算时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("request_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("request_time_from")] - public long? SettlementTimestampFrom { get; set; } - - /// - /// 获取或设置结算时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("request_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("request_time_to")] - public long? SettlementTimestampTo { get; set; } - - /// - /// 获取或设置排序方式。 - /// - [Newtonsoft.Json.JsonProperty("sort_type")] - [System.Text.Json.Serialization.JsonPropertyName("sort_type")] - public int? SortType { get; set; } - - /// - /// 获取或设置分页游标。 - /// - [Newtonsoft.Json.JsonProperty("cursor")] - [System.Text.Json.Serialization.JsonPropertyName("cursor")] - public string? PageCursor { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsResponse.cs deleted file mode 100644 index d77b27bd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchSettlementsResponse.cs +++ /dev/null @@ -1,321 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /finance/settlements/search 接口的响应。 - /// - public class FinanceSearchSettlementsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Settlement - { - public static class Types - { - public class SettlementInfo - { - /// - /// 获取或设置币种。 - /// - [Newtonsoft.Json.JsonProperty("currency")] - [System.Text.Json.Serialization.JsonPropertyName("currency")] - public string Currency { get; set; } = default!; - - /// - /// 获取或设置用户支付金额。 - /// - [Newtonsoft.Json.JsonProperty("user_pay")] - [System.Text.Json.Serialization.JsonPropertyName("user_pay")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal UserPaidAmount { get; set; } - - /// - /// 获取或设置平台促销金额。 - /// - [Newtonsoft.Json.JsonProperty("platform_promotion")] - [System.Text.Json.Serialization.JsonPropertyName("platform_promotion")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PlatformPromotionAmount { get; set; } - - /// - /// 获取或设置退款金额。 - /// - [Newtonsoft.Json.JsonProperty("refund")] - [System.Text.Json.Serialization.JsonPropertyName("refund")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal RefundAmount { get; set; } - - /// - /// 获取或设置支付服务费。 - /// - [Newtonsoft.Json.JsonProperty("payment_fee")] - [System.Text.Json.Serialization.JsonPropertyName("payment_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PaymentFee { get; set; } - - /// - /// 获取或设置交易服务费。 - /// - [Newtonsoft.Json.JsonProperty("transaction_fee")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal TransactionFee { get; set; } - - /// - /// 获取或设置固定费用。 - /// - [Newtonsoft.Json.JsonProperty("flat_fee")] - [System.Text.Json.Serialization.JsonPropertyName("flat_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal FlatFee { get; set; } - - /// - /// 获取或设置销售费用。 - /// - [Newtonsoft.Json.JsonProperty("sales_fee")] - [System.Text.Json.Serialization.JsonPropertyName("sales_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SalesFee { get; set; } - - /// - /// 获取或设置 SFP 服务费。 - /// - [Newtonsoft.Json.JsonProperty("sfp_service_fee")] - [System.Text.Json.Serialization.JsonPropertyName("sfp_service_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SFPServiceFee { get; set; } - - /// - /// 获取或设置运输费。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFee { get; set; } - - /// - /// 获取或设置小额订单费。 - /// - [Newtonsoft.Json.JsonProperty("small_order_fee")] - [System.Text.Json.Serialization.JsonPropertyName("small_order_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SmallOrderFee { get; set; } - - /// - /// 获取或设置平台佣金。 - /// - [Newtonsoft.Json.JsonProperty("platform_commission")] - [System.Text.Json.Serialization.JsonPropertyName("platform_commission")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PlatformCommission { get; set; } - - /// - /// 获取或设置联盟佣金。 - /// - [Newtonsoft.Json.JsonProperty("affiliate_commission")] - [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal AffiliateCommission { get; set; } - - /// - /// 获取或设置联盟服务商佣金。 - /// - [Newtonsoft.Json.JsonProperty("affiliate_partner_commission")] - [System.Text.Json.Serialization.JsonPropertyName("affiliate_partner_commission")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal AffiliatePartnerCommission { get; set; } - - /// - /// 获取或设置增值税。 - /// - [Newtonsoft.Json.JsonProperty("vat")] - [System.Text.Json.Serialization.JsonPropertyName("vat")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal VAT { get; set; } - - /// - /// 获取或设置商品及服务税。 - /// - [Newtonsoft.Json.JsonProperty("gst")] - [System.Text.Json.Serialization.JsonPropertyName("gst")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal GST { get; set; } - - /// - /// 获取或设置运输补贴金额。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee_subsidy")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_subsidy")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFeeSubsidyAmount { get; set; } - - /// - /// 获取或设置卖方原因扣除金额。 - /// - [Newtonsoft.Json.JsonProperty("seller_reason_fund_deduction")] - [System.Text.Json.Serialization.JsonPropertyName("seller_reason_fund_deduction")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SellerReasonFundDeductionAmount { get; set; } - - /// - /// 获取或设置运费调整金额。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee_adjustment")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_adjustment")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFeeAdjustmentAmount { get; set; } - - /// - /// 获取或设置促销调整金额。 - /// - [Newtonsoft.Json.JsonProperty("promotion_adjustment")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_adjustment")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PromotionAdjustmentAmount { get; set; } - - /// - /// 获取或设置其他调整金额。 - /// - [Newtonsoft.Json.JsonProperty("other_adjustment")] - [System.Text.Json.Serialization.JsonPropertyName("other_adjustment")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal OtherAdjustmentAmount { get; set; } - - /// - /// 获取或设置冲正金额。 - /// - [Newtonsoft.Json.JsonProperty("charge_back")] - [System.Text.Json.Serialization.JsonPropertyName("charge_back")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ChargeBackAmount { get; set; } - - /// - /// 获取或设置客服补偿金额。 - /// - [Newtonsoft.Json.JsonProperty("customer_service_compensation")] - [System.Text.Json.Serialization.JsonPropertyName("customer_service_compensation")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal CustomerServiceCompensationAmount { get; set; } - - /// - /// 获取或设置扣除卖家优惠后小计金额。 - /// - [Newtonsoft.Json.JsonProperty("subtotal_after_seller_discounts")] - [System.Text.Json.Serialization.JsonPropertyName("subtotal_after_seller_discounts")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SubtotalAfterSellerDiscountAmount { get; set; } - - /// - /// 获取或设置去除卖家优惠后退款小计金额。 - /// - [Newtonsoft.Json.JsonProperty("refund_subtotal_after_seller_discounts")] - [System.Text.Json.Serialization.JsonPropertyName("refund_subtotal_after_seller_discounts")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SubtotalAfterSellerDiscountRefundAmount { get; set; } - - /// - /// 获取或设置结算金额。 - /// - [Newtonsoft.Json.JsonProperty("settlement_amount")] - [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SettlementAmount { get; set; } - - /// - /// 获取或设置结算时间戳。 - /// - [Newtonsoft.Json.JsonProperty("settlement_time")] - [System.Text.Json.Serialization.JsonPropertyName("settlement_time")] - public long SettlementTimestamp { get; set; } - } - } - - /// - /// 获取或设置结算 ID。 - /// - [Newtonsoft.Json.JsonProperty("unique_key")] - [System.Text.Json.Serialization.JsonPropertyName("unique_key")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long SettlementId { get; set; } - - /// - /// 获取或设置订单 ID。 - /// - [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!; - - /// - /// 获取或设置调整 ID。 - /// - [Newtonsoft.Json.JsonProperty("adjustment_id")] - [System.Text.Json.Serialization.JsonPropertyName("adjustment_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AdjustmentId { get; set; } = default!; - - /// - /// 获取或设置关联订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("related_order_id")] - [System.Text.Json.Serialization.JsonPropertyName("related_order_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string RelatedOrderId { get; set; } = default!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string? ProductName { get; set; } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - public string? SKUId { get; set; } - - /// - /// 获取或设置 SKU 名称。 - /// - [Newtonsoft.Json.JsonProperty("sku_name")] - [System.Text.Json.Serialization.JsonPropertyName("sku_name")] - public string? SKUName { get; set; } - - /// - /// 获取或设置结算信息。 - /// - [Newtonsoft.Json.JsonProperty("settlement_info")] - [System.Text.Json.Serialization.JsonPropertyName("settlement_info")] - public Types.SettlementInfo SettlementInfo { get; set; } = default!; - } - } - - /// - /// 获取或设置结算列表。 - /// - [Newtonsoft.Json.JsonProperty("settlement_list")] - [System.Text.Json.Serialization.JsonPropertyName("settlement_list")] - public Types.Settlement[] SettlementList { get; set; } = default!; - - /// - /// 获取或设置下一页分页游标。 - /// - [Newtonsoft.Json.JsonProperty("next_cursor")] - [System.Text.Json.Serialization.JsonPropertyName("next_cursor")] - public string? NextCursor { get; set; } - - /// - /// 获取或设置是否还有更多。 - /// - [Newtonsoft.Json.JsonProperty("more")] - [System.Text.Json.Serialization.JsonPropertyName("more")] - public bool HasMore { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsRequest.cs deleted file mode 100644 index 67e9cb5a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsRequest.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /finance/transactions/search 接口的请求。 - /// - public class FinanceSearchTransactionsRequest : TikTokShopRequest - { - /// - /// 获取或设置结算时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("request_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("request_time_from")] - public long? SettlementTimestampFrom { get; set; } - - /// - /// 获取或设置结算时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("request_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("request_time_to")] - public long? SettlementTimestampTo { get; set; } - - /// - /// 获取或设置交易类型列表。 - /// - [Newtonsoft.Json.JsonProperty("transaction_type")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_type")] - public IList TransactionTypeList { get; set; } = new List(); - - /// - /// 获取或设置分页起始位置。 - /// - [Newtonsoft.Json.JsonProperty("offset")] - [System.Text.Json.Serialization.JsonPropertyName("offset")] - public int PageOffset { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsResponse.cs deleted file mode 100644 index adfc983d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceSearchTransactionsResponse.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /finance/transactions/search 接口的响应。 - /// - public class FinanceSearchTransactionsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Transaction - { - /// - /// 获取或设置交易类型。 - /// - [Newtonsoft.Json.JsonProperty("transaction_type")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_type")] - public int TransactionType { get; set; } - - /// - /// 获取或设置交易状态。 - /// - [Newtonsoft.Json.JsonProperty("transaction_status")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_status")] - public int TransactionStatus { get; set; } - - /// - /// 获取或设置币种。 - /// - [Newtonsoft.Json.JsonProperty("transaction_currency")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_currency")] - public string Currency { get; set; } = default!; - - /// - /// 获取或设置退款金额。 - /// - [Newtonsoft.Json.JsonProperty("transaction_amount")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_amount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal Amount { get; set; } - - /// - /// 获取或设置交易时间戳。 - /// - [Newtonsoft.Json.JsonProperty("transaction_time")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_time")] - public long TransactionTimestamp { get; set; } - } - } - - /// - /// 获取或设置交易列表。 - /// - [Newtonsoft.Json.JsonProperty("transaction_list")] - [System.Text.Json.Serialization.JsonPropertyName("transaction_list")] - public Types.Transaction[] TransactionList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - - /// - /// 获取或设置是否还有更多。 - /// - [Newtonsoft.Json.JsonProperty("more")] - [System.Text.Json.Serialization.JsonPropertyName("more")] - public bool HasMore { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageRequest.cs deleted file mode 100644 index 1369438a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageRequest.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/batch_rts 接口的请求。 - /// - public class FulfillmentBatchShipPackageRequest : TikTokShopRequest - { - public static class Types - { - public class Package - { - public static class Types - { - public class PickupInfo : FulfillmentShipPackageRequest.Types.PickupInfo - { - } - - public class SelfShipment : FulfillmentShipPackageRequest.Types.SelfShipment - { - } - } - - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置提货类型。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_type")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_type")] - public int? PickupType { get; set; } - - /// - /// 获取或设置上门提货信息。 - /// - [Newtonsoft.Json.JsonProperty("pick_up")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up")] - public Types.PickupInfo? PickupInfo { get; set; } - - /// - /// 获取或设置自配送信息。 - /// - [Newtonsoft.Json.JsonProperty("self_shipment")] - [System.Text.Json.Serialization.JsonPropertyName("self_shipment")] - public Types.SelfShipment? SelfShipment { get; set; } - } - } - - /// - /// 获取或设置包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("package_list")] - [System.Text.Json.Serialization.JsonPropertyName("package_list")] - public IList PackageList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageResponse.cs deleted file mode 100644 index b7997a4a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentBatchShipPackageResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/batch_rts 接口的响应。 - /// - public class FulfillmentBatchShipPackageResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedPackage : FulfillmentShipPackageResponse.Types.Data.Types.FailedPackage - { - } - } - - /// - /// 获取或设置失败包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("fail_packages_list")] - [System.Text.Json.Serialization.JsonPropertyName("fail_packages_list")] - public Types.FailedPackage[] FailedPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelRequest.cs deleted file mode 100644 index bf6cb948..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelRequest.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/create_label 接口的请求。 - /// - public class FulfillmentCreateLabelRequest : TikTokShopRequest - { - public static class Types - { - public class Dimension : FulfillmentGetShippingServiceRequest.Types.Dimension - { - } - } - - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202304"; - - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置重量。 - /// - [Newtonsoft.Json.JsonProperty("weight")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] - [System.Text.Json.Serialization.JsonPropertyName("weight")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))] - public decimal? Weight { get; set; } - - /// - /// 获取或设置重量单位。 - /// - [Newtonsoft.Json.JsonProperty("weight_unit")] - [System.Text.Json.Serialization.JsonPropertyName("weight_unit")] - public int? WeightUnit { get; set; } - - /// - /// 获取或设置尺寸信息。 - /// - [Newtonsoft.Json.JsonProperty("dimension")] - [System.Text.Json.Serialization.JsonPropertyName("dimension")] - public Types.Dimension? Dimension { get; set; } - - /// - /// 获取或设置尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("dimension_unit")] - public int? DimensionUnit { get; set; } - - /// - /// 获取或设置货运服务 ID。 - /// - [Newtonsoft.Json.JsonProperty("shipping_service_id")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_service_id")] - public string? ShippingServiceId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelResponse.cs deleted file mode 100644 index d30c9989..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentCreateLabelResponse.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/create_label 接口的响应。 - /// - public class FulfillmentCreateLabelResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Dimension : FulfillmentGetShippingServiceResponse.Types.Data.Types.Dimension - { - } - - public class ShippingServiceInfo : FulfillmentGetShippingServiceResponse.Types.Data.Types.ShippingServiceInfo - { - } - } - - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置重量。 - /// - [Newtonsoft.Json.JsonProperty("weight")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] - [System.Text.Json.Serialization.JsonPropertyName("weight")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Weight { get; set; } - - /// - /// 获取或设置重量单位。 - /// - [Newtonsoft.Json.JsonProperty("weight_unit")] - [System.Text.Json.Serialization.JsonPropertyName("weight_unit")] - public int? WeightUnit { get; set; } - - /// - /// 获取或设置尺寸信息。 - /// - [Newtonsoft.Json.JsonProperty("dimension")] - [System.Text.Json.Serialization.JsonPropertyName("dimension")] - public Types.Dimension? Dimension { get; set; } - - /// - /// 获取或设置尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("dimension_unit")] - public int? DimensionUnit { get; set; } - - /// - /// 获取或设置货运服务信息。 - /// - [Newtonsoft.Json.JsonProperty("shipping_service_info")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_service_info")] - public Types.ShippingServiceInfo? ShippingServiceInfo { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailRequest.cs deleted file mode 100644 index f4295de0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/detail 接口的请求。 - /// - public class FulfillmentGetPackageDetailRequest : TikTokShopRequest - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PackageId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailResponse.cs deleted file mode 100644 index 77b44cb5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageDetailResponse.cs +++ /dev/null @@ -1,204 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/detail 接口的响应。 - /// - public class FulfillmentGetPackageDetailResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class OrderInfo - { - public static class Types - { - public class SKU - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置 SKU 名称。 - /// - [Newtonsoft.Json.JsonProperty("sku_name")] - [System.Text.Json.Serialization.JsonPropertyName("sku_name")] - public string SKUName { get; set; } = default!; - - /// - /// 获取或设置 SKU 图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("sku_image")] - [System.Text.Json.Serialization.JsonPropertyName("sku_image")] - public string SKUImageUrl { get; set; } = default!; - - /// - /// 获取或设置数量。 - /// - [Newtonsoft.Json.JsonProperty("quantity")] - [System.Text.Json.Serialization.JsonPropertyName("quantity")] - public int Quantity { get; set; } - } - } - - /// - /// 获取或设置订单 ID。 - /// - [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!; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("sku_list")] - public Types.SKU[] SKUList { get; set; } = default!; - } - } - - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置包裹状态。 - /// - [Newtonsoft.Json.JsonProperty("package_status")] - [System.Text.Json.Serialization.JsonPropertyName("package_status")] - public int PackageStatus { get; set; } - - /// - /// 获取或设置包裹冻结状态。 - /// - [Newtonsoft.Json.JsonProperty("package_freeze_status")] - [System.Text.Json.Serialization.JsonPropertyName("package_freeze_status")] - public int PackageFreezeStatus { get; set; } - - /// - /// 获取或设置订单列表。 - /// - [Newtonsoft.Json.JsonProperty("order_info_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_info_list")] - public Types.OrderInfo[] OrderInfoList { get; set; } = default!; - - /// - /// 获取或设置订单项 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_line_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_line_id_list")] - public string[]? OrderLineIdList { get; set; } = default!; - - /// - /// 获取或设置拆/合包标记。 - /// - [Newtonsoft.Json.JsonProperty("sc_tag")] - [System.Text.Json.Serialization.JsonPropertyName("sc_tag")] - public int SplitOrCombineTag { get; set; } - - /// - /// 获取或设置打印标记。 - /// - [Newtonsoft.Json.JsonProperty("print_tag")] - [System.Text.Json.Serialization.JsonPropertyName("print_tag")] - public int PrintTag { get; set; } - - /// - /// 获取或设置 SKU 标记。 - /// - [Newtonsoft.Json.JsonProperty("sku_tag")] - [System.Text.Json.Serialization.JsonPropertyName("sku_tag")] - public int SKUTag { get; set; } - - /// - /// 获取或设置备注标记。 - /// - [Newtonsoft.Json.JsonProperty("note_tag")] - [System.Text.Json.Serialization.JsonPropertyName("note_tag")] - public int NoteTag { get; set; } - - /// - /// 获取或设置配送方式。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option")] - public int DeliveryOption { get; set; } - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] - public string ShippingProviderId { get; set; } = default!; - - /// - /// 获取或设置运输服务商名称。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider")] - public string ShippingProviderName { get; set; } = default!; - - /// - /// 获取或设置物流单号。 - /// - [Newtonsoft.Json.JsonProperty("tracking_number")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] - public string TrackingNumber { get; set; } = default!; - - /// - /// 获取或设置提货方式。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_type")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_type")] - public int PickupType { get; set; } - - /// - /// 获取或设置上门提货开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_start_time")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_start_time")] - public long? PickupStartTimestamp { get; set; } - - /// - /// 获取或设置上门提货结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_end_time")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_end_time")] - public long? PickupEndTimestamp { get; set; } - - /// - /// 获取或设置是否因运输问题取消。 - /// - [Newtonsoft.Json.JsonProperty("cancel_because_logistic_issue")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_because_logistic_issue")] - public int? CancelBecauseLogisticIssue { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigRequest.cs deleted file mode 100644 index 9268cf71..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/package_pickup_config/list 接口的请求。 - /// - public class FulfillmentGetPackagePickupConfigRequest : TikTokShopRequest - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PackageId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigResponse.cs deleted file mode 100644 index 9e9ed5ca..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackagePickupConfigResponse.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/package_pickup_config/list 接口的响应。 - /// - public class FulfillmentGetPackagePickupConfigResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class PickupTime - { - /// - /// 获取或设置开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("start_time")] - [System.Text.Json.Serialization.JsonPropertyName("start_time")] - public long StartTimestamp { get; set; } - - /// - /// 获取或设置结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("end_time")] - [System.Text.Json.Serialization.JsonPropertyName("end_time")] - public long EndTimestamp { get; set; } - - /// - /// 获取或设置是否可预约。 - /// - [Newtonsoft.Json.JsonProperty("avaliable")] - [System.Text.Json.Serialization.JsonPropertyName("avaliable")] - public bool IsAvaliable { get; set; } - } - } - - /// - /// 获取或设置是否支持上门提货。 - /// - [Newtonsoft.Json.JsonProperty("is_pick_up")] - [System.Text.Json.Serialization.JsonPropertyName("is_pick_up")] - public bool IsPickUp { get; set; } - - /// - /// 获取或设置上门提货时间列表。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_time_list")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_time_list")] - public Types.PickupTime[]? PickupTimeList { get; set; } - - /// - /// 获取或设置是否支持网点交货。 - /// - [Newtonsoft.Json.JsonProperty("is_drop_off")] - [System.Text.Json.Serialization.JsonPropertyName("is_drop_off")] - public bool IsDropOff { get; set; } - - /// - /// 获取或设置网点交货 URL。 - /// - [Newtonsoft.Json.JsonProperty("drop_off_point_url")] - [System.Text.Json.Serialization.JsonPropertyName("drop_off_point_url")] - public string? DropOffPointUrl { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("is_van_collection")] - [System.Text.Json.Serialization.JsonPropertyName("is_van_collection")] - public bool? IsVanCollection { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentRequest.cs deleted file mode 100644 index f79234f5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/shipping_document 接口的请求。 - /// - public class FulfillmentGetPackageShippingDocumentRequest : TikTokShopRequest - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int DocumentType { get; set; } - - /// - /// 获取或设置文件尺寸。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int? DocumentSize { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.cs deleted file mode 100644 index 091b5417..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/shipping_document 接口的响应。 - /// - public class FulfillmentGetPackageShippingDocumentResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置文件 URL。 - /// - [Newtonsoft.Json.JsonProperty("doc_url")] - [System.Text.Json.Serialization.JsonPropertyName("doc_url")] - public string DocumentUrl { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoRequest.cs deleted file mode 100644 index 2f19d1b3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/shipping_info 接口的请求。 - /// - public class FulfillmentGetPackageShippingInfoRequest : TikTokShopRequest - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PackageId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoResponse.cs deleted file mode 100644 index c70337da..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetPackageShippingInfoResponse.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/shipping_info 接口的响应。 - /// - public class FulfillmentGetPackageShippingInfoResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class TrackingInfo - { - /// - /// 获取或设置描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - - /// - /// 获取或设置轨迹列表。 - /// - [Newtonsoft.Json.JsonProperty("tracking_info_list")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_info_list")] - public Types.TrackingInfo[] TrackingInfoList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceRequest.cs deleted file mode 100644 index ef056c7f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceRequest.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/shipping_service/get 接口的请求。 - /// - public class FulfillmentGetShippingServiceRequest : TikTokShopRequest - { - public static class Types - { - public class Dimension - { - /// - /// 获取或设置长度。 - /// - [Newtonsoft.Json.JsonProperty("length")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] - [System.Text.Json.Serialization.JsonPropertyName("length")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))] - public decimal? Length { get; set; } - - /// - /// 获取或设置宽度。 - /// - [Newtonsoft.Json.JsonProperty("width")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] - [System.Text.Json.Serialization.JsonPropertyName("width")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))] - public decimal? Width { get; set; } - - /// - /// 获取或设置高度。 - /// - [Newtonsoft.Json.JsonProperty("height")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] - [System.Text.Json.Serialization.JsonPropertyName("height")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))] - public decimal? Height { get; set; } - } - } - - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202304"; - - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置重量。 - /// - [Newtonsoft.Json.JsonProperty("weight")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] - [System.Text.Json.Serialization.JsonPropertyName("weight")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))] - public decimal? Weight { get; set; } - - /// - /// 获取或设置重量单位。 - /// - [Newtonsoft.Json.JsonProperty("weight_unit")] - [System.Text.Json.Serialization.JsonPropertyName("weight_unit")] - public int? WeightUnit { get; set; } - - /// - /// 获取或设置尺寸信息。 - /// - [Newtonsoft.Json.JsonProperty("dimension")] - [System.Text.Json.Serialization.JsonPropertyName("dimension")] - public Types.Dimension? Dimension { get; set; } - - /// - /// 获取或设置尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("dimension_unit")] - public int? DimensionUnit { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceResponse.cs deleted file mode 100644 index df47b990..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentGetShippingServiceResponse.cs +++ /dev/null @@ -1,160 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/shipping_service/get 接口的响应。 - /// - public class FulfillmentGetShippingServiceResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Dimension - { - /// - /// 获取或设置长度。 - /// - [Newtonsoft.Json.JsonProperty("length")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] - [System.Text.Json.Serialization.JsonPropertyName("length")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Length { get; set; } - - /// - /// 获取或设置宽度。 - /// - [Newtonsoft.Json.JsonProperty("width")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] - [System.Text.Json.Serialization.JsonPropertyName("width")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Width { get; set; } - - /// - /// 获取或设置高度。 - /// - [Newtonsoft.Json.JsonProperty("height")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] - [System.Text.Json.Serialization.JsonPropertyName("height")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Height { get; set; } - } - - public class ShippingServiceInfo - { - /// - /// 获取或设置服务 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string ServiceId { get; set; } = default!; - - /// - /// 获取或设置服务名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string ServiceName { get; set; } = default!; - - /// - /// 获取或设置价格。 - /// - [Newtonsoft.Json.JsonProperty("price")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] - [System.Text.Json.Serialization.JsonPropertyName("price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal Price { get; set; } - - /// - /// 获取或设置价格币种。 - /// - [Newtonsoft.Json.JsonProperty("currency")] - [System.Text.Json.Serialization.JsonPropertyName("currency")] - public string Currency { get; set; } = default!; - - /// - /// 获取或设置预计最早运输时间戳。 - /// - [Newtonsoft.Json.JsonProperty("delivery_time_start")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_time_start")] - public int DeliveryTimestampStart { get; set; } - - /// - /// 获取或设置预计最晚运输时间戳。 - /// - [Newtonsoft.Json.JsonProperty("delivery_time_end")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_time_end")] - public int DeliveryTimestampEnd { get; set; } - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("provider_id")] - public string? ProviderId { get; set; } - - /// - /// 获取或设置运输服务商名称 - /// - [Newtonsoft.Json.JsonProperty("provider_name")] - [System.Text.Json.Serialization.JsonPropertyName("provider_name")] - public string? ProviderName { get; set; } - - /// - /// 获取或设置是否默认。 - /// - [Newtonsoft.Json.JsonProperty("is_default")] - [System.Text.Json.Serialization.JsonPropertyName("is_default")] - public bool? IsDefault { get; set; } - } - } - - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置重量。 - /// - [Newtonsoft.Json.JsonProperty("weight")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] - [System.Text.Json.Serialization.JsonPropertyName("weight")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Weight { get; set; } - - /// - /// 获取或设置重量单位。 - /// - [Newtonsoft.Json.JsonProperty("weight_unit")] - [System.Text.Json.Serialization.JsonPropertyName("weight_unit")] - public int? WeightUnit { get; set; } - - /// - /// 获取或设置尺寸信息。 - /// - [Newtonsoft.Json.JsonProperty("dimension")] - [System.Text.Json.Serialization.JsonPropertyName("dimension")] - public Types.Dimension? Dimension { get; set; } - - /// - /// 获取或设置尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("dimension_unit")] - public int? DimensionUnit { get; set; } - - /// - /// 获取或设置货运服务列表。 - /// - [Newtonsoft.Json.JsonProperty("shipping_service_info")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_service_info")] - public Types.ShippingServiceInfo[] ShippingServiceList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesRequest.cs deleted file mode 100644 index da85ea7e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentSearchPackagesRequest.cs +++ /dev/null @@ -1,79 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/search 接口的请求。 - /// - public class FulfillmentSearchPackagesRequest : TikTokShopRequest - { - /// - /// 获取或设置创建时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_from")] - public long? CreateTimestampFrom { get; set; } - - /// - /// 获取或设置创建时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_to")] - public long? CreateTimestampTo { get; set; } - - /// - /// 获取或设置更新时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_from")] - public long? UpdateTimestampFrom { get; set; } - - /// - /// 获取或设置更新时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_to")] - public long? UpdateTimestampTo { get; set; } - - /// - /// 获取或设置包裹状态。 - /// - [Newtonsoft.Json.JsonProperty("package_status")] - [System.Text.Json.Serialization.JsonPropertyName("package_status")] - public int? PackageStatus { get; set; } - - /// - /// 获取或设置是否因运输问题取消。 - /// - [Newtonsoft.Json.JsonProperty("cancel_because_logistic_issue")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_because_logistic_issue")] - public int? CancelBecauseLogisticIssue { get; set; } - - /// - /// 获取或设置排序字段。 - /// - [Newtonsoft.Json.JsonProperty("sort_by")] - [System.Text.Json.Serialization.JsonPropertyName("sort_by")] - public string? SortBy { get; set; } - - /// - /// 获取或设置排序方式。 - /// - [Newtonsoft.Json.JsonProperty("sort_type")] - [System.Text.Json.Serialization.JsonPropertyName("sort_type")] - public int? SortType { get; set; } - - /// - /// 获取或设置分页游标。 - /// - [Newtonsoft.Json.JsonProperty("cursor")] - [System.Text.Json.Serialization.JsonPropertyName("cursor")] - public string? PageCursor { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageRequest.cs deleted file mode 100644 index 79d092c0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageRequest.cs +++ /dev/null @@ -1,73 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/rts 接口的请求。 - /// - public class FulfillmentShipPackageRequest : TikTokShopRequest - { - public static class Types - { - public class PickupInfo - { - /// - /// 获取或设置开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_start_time")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_start_time")] - public long? StartTimestamp { get; set; } - - /// - /// 获取或设置结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_end_time")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_end_time")] - public long? EndTimestamp { get; set; } - } - - public class SelfShipment - { - /// - /// 获取或设置物流单号。 - /// - [Newtonsoft.Json.JsonProperty("tracking_number")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] - public string TrackingNumber { get; set; } = string.Empty; - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] - public string ShippingProviderId { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置提货方式。 - /// - [Newtonsoft.Json.JsonProperty("pick_up_type")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up_type")] - public int? PickupType { get; set; } - - /// - /// 获取或设置上门提货信息。 - /// - [Newtonsoft.Json.JsonProperty("pick_up")] - [System.Text.Json.Serialization.JsonPropertyName("pick_up")] - public Types.PickupInfo? PickupInfo { get; set; } - - /// - /// 获取或设置自配送信息。 - /// - [Newtonsoft.Json.JsonProperty("self_shipment")] - [System.Text.Json.Serialization.JsonPropertyName("self_shipment")] - public Types.SelfShipment? SelfShipment { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageResponse.cs deleted file mode 100644 index a58e4e21..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentShipPackageResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/rts 接口的响应。 - /// - public class FulfillmentShipPackageResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置失败原因编码。 - /// - [Newtonsoft.Json.JsonProperty("fail_code")] - [System.Text.Json.Serialization.JsonPropertyName("fail_code")] - public int FailReasonCode { get; set; } - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("fail_reason")] - [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置失败包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("fail_packages")] - [System.Text.Json.Serialization.JsonPropertyName("fail_packages")] - public Types.FailedPackage[] FailedPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.cs deleted file mode 100644 index 27b71367..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/delivery 接口的请求。 - /// - public class FulfillmentUpdatePackageDeliveryStatusRequest : TikTokShopRequest - { - public static class Types - { - public class Package - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置配送类型。 - /// - [Newtonsoft.Json.JsonProperty("delivery_type")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_type")] - public int? DeliveryType { get; set; } - - /// - /// 获取或设置原因编码。 - /// - [Newtonsoft.Json.JsonProperty("reason")] - [System.Text.Json.Serialization.JsonPropertyName("reason")] - public int? ReasonCode { get; set; } - - /// - /// 获取或设置附件文件类型。 - /// - [Newtonsoft.Json.JsonProperty("file_type")] - [System.Text.Json.Serialization.JsonPropertyName("file_type")] - public int? AttachmentFileType { get; set; } - - /// - /// 获取或设置附件文件 URL。 - /// - [Newtonsoft.Json.JsonProperty("file_url")] - [System.Text.Json.Serialization.JsonPropertyName("file_url")] - public string? AttachmentFileUrl { get; set; } - } - } - - /// - /// 获取或设置包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("delivery_packages")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_packages")] - public IList PackageList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.cs deleted file mode 100644 index 5704713e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/delivery 接口的响应。 - /// - public class FulfillmentUpdatePackageDeliveryStatusResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置失败原因编码。 - /// - [Newtonsoft.Json.JsonProperty("err_code")] - [System.Text.Json.Serialization.JsonPropertyName("err_code")] - public int FailReasonCode { get; set; } - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置处理失败的包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("fail_packages")] - [System.Text.Json.Serialization.JsonPropertyName("fail_packages")] - public Types.FailedPackage[] FailedPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.cs deleted file mode 100644 index c4a9fe40..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/shipping_info/update 接口的请求。 - /// - public class FulfillmentUpdatePackageShippingInfoRequest : TikTokShopRequest - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置物流单号。 - /// - [Newtonsoft.Json.JsonProperty("tracking_number")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] - public string TrackingNumber { get; set; } = string.Empty; - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("provider_id")] - public string ShippingProviderId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.cs deleted file mode 100644 index 9ee36939..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/shipping_info/update 接口的响应。 - /// - public class FulfillmentUpdatePackageShippingInfoResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置更新结果。 - /// - [Newtonsoft.Json.JsonProperty("update_success")] - [System.Text.Json.Serialization.JsonPropertyName("update_success")] - public bool Result { get; set; } - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("failed_reason")] - [System.Text.Json.Serialization.JsonPropertyName("failed_reason")] - public string? FailedReason { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.cs deleted file mode 100644 index a328e912..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/order_split/confirm 接口的请求。 - /// - public class FulfillmentConfirmOrderSplitRequest : TikTokShopRequest - { - public static class Types - { - public class PreSplitPackage - { - /// - /// 获取或设置预拆包 ID。 - /// - [Newtonsoft.Json.JsonProperty("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonPropertyName("pre_split_pkg_id")] - public string PreSplitPackageId { get; set; } = string.Empty; - - /// - /// 获取或设置订单项 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_line_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_line_id_list")] - public IList OrderLineIdList { get; set; } = new List(); - } - } - - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("order_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_id")] - public string OrderId { get; set; } = string.Empty; - - /// - /// 获取或设置预拆包列表。 - /// - [Newtonsoft.Json.JsonProperty("split_group")] - [System.Text.Json.Serialization.JsonPropertyName("split_group")] - public IList PreSplitPackageList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.cs deleted file mode 100644 index 5d954ac9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/order_split/confirm 接口的响应。 - /// - public class FulfillmentConfirmOrderSplitResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Result - { - /// - /// 获取或设置预拆包 ID。 - /// - [Newtonsoft.Json.JsonProperty("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonPropertyName("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PreSplitPackageId { get; set; } = default!; - - /// - /// 获取或设置确认结果。 - /// - [Newtonsoft.Json.JsonProperty("confirm_result")] - [System.Text.Json.Serialization.JsonPropertyName("confirm_result")] - public bool ConfirmResult { get; set; } - } - - public class SucceededSplitPackage - { - /// - /// 获取或设置预拆包 ID。 - /// - [Newtonsoft.Json.JsonProperty("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonPropertyName("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PreSplitPackageId { get; set; } = default!; - - /// - /// 获取或设置包裹 ID。 - /// - [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 PackgeId { get; set; } = default!; - } - - public class FailedSplitPackage - { - /// - /// 获取或设置预拆包 ID。 - /// - [Newtonsoft.Json.JsonProperty("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonPropertyName("pre_split_pkg_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PreSplitPackageId { get; set; } = default!; - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("fail_reason")] - [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("confirm_result_list")] - [System.Text.Json.Serialization.JsonPropertyName("confirm_result_list")] - public Types.Result[] ResultList { get; set; } = default!; - - /// - /// 获取或设置处理成功的预拆包列表。 - /// - [Newtonsoft.Json.JsonProperty("success_list")] - [System.Text.Json.Serialization.JsonPropertyName("success_list")] - public Types.SucceededSplitPackage[] SucceededSplitPackageList { get; set; } = default!; - - /// - /// 获取或设置处理失败的预拆包列表。 - /// - [Newtonsoft.Json.JsonProperty("fail_list")] - [System.Text.Json.Serialization.JsonPropertyName("fail_list")] - public Types.FailedSplitPackage[] FailedSplitPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.cs deleted file mode 100644 index 8315094a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/package/remove 接口的请求。 - /// - public class FulfillmentRemovePackageOrdersRequest : TikTokShopRequest - { - /// - /// 获取或设置包裹 ID。 - /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] - public string PackageId { get; set; } = string.Empty; - - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public IList OrderIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.cs deleted file mode 100644 index 85e3ad4e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/package/remove 接口的响应。 - /// - public class FulfillmentRemovePackageOrdersResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class SucceededPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public string[] OrderIdList { get; set; } = default!; - } - - public class FailedPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置失败原因编码。 - /// - [Newtonsoft.Json.JsonProperty("code")] - [System.Text.Json.Serialization.JsonPropertyName("code")] - public int FailReasonCode { get; set; } - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置成功包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("package_list")] - [System.Text.Json.Serialization.JsonPropertyName("package_list")] - public Types.SucceededPackage[] SucceededPackageList { get; set; } = default!; - - /// - /// 获取或设置失败包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_package_list")] - [System.Text.Json.Serialization.JsonPropertyName("failed_package_list")] - public Types.FailedPackage[] FailedPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.cs deleted file mode 100644 index 2ecadf39..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/order_split/verify 接口的请求。 - /// - public class FulfillmentVerifyOrderSplitRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public IList OrderIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.cs deleted file mode 100644 index c81d1837..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.cs +++ /dev/null @@ -1,67 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/order_split/verify 接口的响应。 - /// - public class FulfillmentVerifyOrderSplitResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Result - { - /// - /// 获取或设置订单 ID。 - /// - [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!; - - /// - /// 获取或设置验证结果。 - /// - [Newtonsoft.Json.JsonProperty("verify_order_result")] - [System.Text.Json.Serialization.JsonPropertyName("verify_order_result")] - public bool VerifyOrderResult { get; set; } - } - - public class FailedOrder - { - /// - /// 获取或设置订单 ID。 - /// - [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!; - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("fail_reason")] - [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("result_list")] - [System.Text.Json.Serialization.JsonPropertyName("result_list")] - public Types.Result[] ResultList { get; set; } = default!; - - /// - /// 获取或设置处理失败的订单列表。 - /// - [Newtonsoft.Json.JsonProperty("fail_list")] - [System.Text.Json.Serialization.JsonPropertyName("fail_list")] - public Types.FailedOrder[] FailedOrderList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.cs deleted file mode 100644 index 017c93b0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/pre_combine_pkg/confirm 接口的请求。 - /// - public class FulfillmentConfirmPreCombinePackageRequest : TikTokShopRequest - { - public static class Types - { - public class PreCombinePackage - { - /// - /// 获取或设置预合包 ID。 - /// - [Newtonsoft.Json.JsonProperty("pre_combine_pkg_id")] - [System.Text.Json.Serialization.JsonPropertyName("pre_combine_pkg_id")] - public string PreCombinePackageId { get; set; } = string.Empty; - - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public IList OrderIdList { get; set; } = new List(); - } - } - - /// - /// 获取或设置预合包列表。 - /// - [Newtonsoft.Json.JsonProperty("pre_combine_pkg_list")] - [System.Text.Json.Serialization.JsonPropertyName("pre_combine_pkg_list")] - public IList PreCombinePackageList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.cs deleted file mode 100644 index 38cb0283..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/pre_combine_pkg/confirm 接口的响应。 - /// - public class FulfillmentConfirmPreCombinePackageResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class SucceededPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public string[] OrderIdList { get; set; } = default!; - } - - public class FailedPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置失败原因编码。 - /// - [Newtonsoft.Json.JsonProperty("code")] - [System.Text.Json.Serialization.JsonPropertyName("code")] - public int FailReasonCode { get; set; } - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置处理成功的包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("package_list")] - [System.Text.Json.Serialization.JsonPropertyName("package_list")] - public Types.SucceededPackage[] SucceededPackageList { get; set; } = default!; - - /// - /// 获取或设置处理失败的包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_package_list")] - [System.Text.Json.Serialization.JsonPropertyName("failed_package_list")] - public Types.FailedPackage[] FailedPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesRequest.cs deleted file mode 100644 index 2db529df..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesRequest.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/pre_combine_pkg/list 接口的请求。 - /// - public class FulfillmentSearchPreCombinePackagesRequest : TikTokShopRequest - { - /// - /// 获取或设置分页游标。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? PageCursor { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.cs deleted file mode 100644 index f9ee968a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /fulfillment/pre_combine_pkg/list 接口的响应。 - /// - public class FulfillmentSearchPreCombinePackagesResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class PreCombinePackage - { - /// - /// 获取或设置预合包 ID。 - /// - [Newtonsoft.Json.JsonProperty("pre_combine_pkg_id")] - [System.Text.Json.Serialization.JsonPropertyName("pre_combine_pkg_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PreCombinePackageId { get; set; } = default!; - - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public string[] OrderIdList { get; set; } = default!; - } - } - - /// - /// 获取或设置预合包列表。 - /// - [Newtonsoft.Json.JsonProperty("pre_combine_pkg_list")] - [System.Text.Json.Serialization.JsonPropertyName("pre_combine_pkg_list")] - public Types.PreCombinePackage[] PreCombinePackageList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - - /// - /// 获取或设置下一页分页游标。 - /// - [Newtonsoft.Json.JsonProperty("next_cursor")] - [System.Text.Json.Serialization.JsonPropertyName("next_cursor")] - public string? NextCursor { get; set; } - - /// - /// 获取或设置是否还有更多。 - /// - [Newtonsoft.Json.JsonProperty("more")] - [System.Text.Json.Serialization.JsonPropertyName("more")] - public bool HasMore { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs deleted file mode 100644 index c619520e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/uploadfile 接口的请求。 - /// - public class FulfillmentUploadFileRequest : TikTokShopRequest - { - /// - /// 获取或设置经 Base64 编码的文件内容。 - /// - [Newtonsoft.Json.JsonProperty("file_data")] - [System.Text.Json.Serialization.JsonPropertyName("file_data")] - public string EncodingFileData { get; set; } = string.Empty; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("file_name")] - [System.Text.Json.Serialization.JsonPropertyName("file_name")] - public string FileName { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs deleted file mode 100644 index 4f616161..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/uploadfile 接口的响应。 - /// - public class FulfillmentUploadFileResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("file_id")] - [System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string FileId { get; set; } = default!; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("file_name")] - [System.Text.Json.Serialization.JsonPropertyName("file_name")] - public string FileName { get; set; } = default!; - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonProperty("file_type")] - [System.Text.Json.Serialization.JsonPropertyName("file_type")] - public string FileType { get; set; } = default!; - - /// - /// 获取或设置文件 URL。 - /// - [Newtonsoft.Json.JsonProperty("file_url")] - [System.Text.Json.Serialization.JsonPropertyName("file_url")] - public string FileUrl { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs deleted file mode 100644 index d8b38b99..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/uploadimage 接口的请求。 - /// - public class FulfillmentUploadImageRequest : TikTokShopRequest - { - /// - /// 获取或设置经 Base64 编码的图片内容。 - /// - [Newtonsoft.Json.JsonProperty("img_data")] - [System.Text.Json.Serialization.JsonPropertyName("img_data")] - public string EncodingImageData { get; set; } = string.Empty; - - /// - /// 获取或设置图片使用场景。 - /// - [Newtonsoft.Json.JsonProperty("img_scene")] - [System.Text.Json.Serialization.JsonPropertyName("img_scene")] - public int Scene { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs deleted file mode 100644 index f3824f32..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /fulfillment/uploadimage 接口的响应。 - /// - public class FulfillmentUploadImageResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("img_id")] - [System.Text.Json.Serialization.JsonPropertyName("img_id")] - public string ImageId { get; set; } = default!; - - /// - /// 获取或设置图片使用场景。 - /// - [Newtonsoft.Json.JsonProperty("img_scene")] - [System.Text.Json.Serialization.JsonPropertyName("img_scene")] - public int Scene { get; set; } - - /// - /// 获取或设置图片宽度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("img_width")] - [System.Text.Json.Serialization.JsonPropertyName("img_width")] - public int Width { get; set; } - - /// - /// 获取或设置图片高度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("img_height")] - [System.Text.Json.Serialization.JsonPropertyName("img_height")] - public int Height { get; set; } - - /// - /// 获取或设置图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("img_url")] - [System.Text.Json.Serialization.JsonPropertyName("img_url")] - public string ImageUrl { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListRequest.cs deleted file mode 100644 index 2ef01429..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products/attributes 接口的请求。 - /// - public class GlobalProductGetAttributeListRequest : TikTokShopRequest - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string CategoryId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListResponse.cs deleted file mode 100644 index 6a030139..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetAttributeListResponse.cs +++ /dev/null @@ -1,80 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products/attributes 接口的响应。 - /// - public class GlobalProductGetAttributeListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Attribute - { - public static class Types - { - public class IntputSettings : ProductGetAttributeListResponse.Types.Data.Types.Attribute.Types.IntputSettings - { - /// - /// 获取或设置必填地区列表。 - /// - [Newtonsoft.Json.JsonProperty("mandatory_regions")] - [System.Text.Json.Serialization.JsonPropertyName("mandatory_regions")] - public string[]? MandatoryRegionList { get; set; } - } - - public class AttributeValue : ProductGetAttributeListResponse.Types.Data.Types.Attribute.Types.AttributeValue - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string AttributeName { get; set; } = default!; - - /// - /// 获取或设置属性类型。 - /// - [Newtonsoft.Json.JsonProperty("attribute_type")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_type")] - public int AttributeType { get; set; } - - /// - /// 获取或设置输入配置信息。 - /// - [Newtonsoft.Json.JsonProperty("input_type")] - [System.Text.Json.Serialization.JsonPropertyName("input_type")] - public Types.IntputSettings IntputSettings { get; set; } = default!; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("values")] - [System.Text.Json.Serialization.JsonPropertyName("values")] - public Types.AttributeValue[] ValueList { get; set; } = default!; - } - } - - /// - /// 获取或设置属性列表。 - /// - [Newtonsoft.Json.JsonProperty("attributes")] - [System.Text.Json.Serialization.JsonPropertyName("attributes")] - public Types.Attribute[] AttributeList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListRequest.cs deleted file mode 100644 index 31577fc2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products/categories 接口的请求。 - /// - public class GlobalProductGetCategoryListRequest : TikTokShopRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListResponse.cs deleted file mode 100644 index 2a15468a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryListResponse.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products/categories 接口的响应。 - /// - public class GlobalProductGetCategoryListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Category - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CategoryId { get; set; } = default!; - - /// - /// 获取或设置上级分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("parent_id")] - [System.Text.Json.Serialization.JsonPropertyName("parent_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ParentCategoryId { get; set; } = default!; - - /// - /// 获取或设置分类名称。 - /// - [Newtonsoft.Json.JsonProperty("category_name")] - [System.Text.Json.Serialization.JsonPropertyName("category_name")] - public string CategoryName { get; set; } = default!; - - /// - /// 获取或设置是否是子分类。 - /// - [Newtonsoft.Json.JsonProperty("is_leaf")] - [System.Text.Json.Serialization.JsonPropertyName("is_leaf")] - public bool IsLeaf { get; set; } - - /// - /// 获取或设置状态列表。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int[] StatusList { get; set; } = default!; - } - } - - /// - /// 获取或设置分类列表。 - /// - [Newtonsoft.Json.JsonProperty("category_list")] - [System.Text.Json.Serialization.JsonPropertyName("category_list")] - public Types.Category[] CategoryList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesRequest.cs deleted file mode 100644 index 6ea6b418..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products/categories/rules 接口的请求。 - /// - public class GlobalProductGetCategoryRulesRequest : TikTokShopRequest - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string CategoryId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.cs deleted file mode 100644 index a1a0f10d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products/categories/rules 接口的响应。 - /// - public class GlobalProductGetCategoryRulesResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class CategoryRule - { - public static class Types - { - public class ProductCertification : ProductGetCategoryRulesResponse.Types.Data.Types.CategoryRule.Types.ProductCertification - { - /// - /// 获取或设置必填地区列表。 - /// - [Newtonsoft.Json.JsonProperty("mandatory_regions")] - [System.Text.Json.Serialization.JsonPropertyName("mandatory_regions")] - public string[]? MandatoryRegionList { get; set; } - - /// - /// 获取或设置选填地区列表。 - /// - [Newtonsoft.Json.JsonProperty("optional_regions")] - [System.Text.Json.Serialization.JsonPropertyName("optional_regions")] - public string[]? OptionalRegionList { get; set; } - } - - public class SizeChartRule - { - /// - /// 获取或设置是否必填。 - /// - [Newtonsoft.Json.JsonProperty("is_size_chart_mandatory")] - [System.Text.Json.Serialization.JsonPropertyName("is_size_chart_mandatory")] - public bool IsMandatory { get; set; } - } - } - - /// - /// 获取或设置是否支持输入尺码表。 - /// - [Newtonsoft.Json.JsonProperty("support_size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("support_size_chart")] - public bool IsSupportSizeChart { get; set; } - - /// - /// 获取或设置尺码表规则信息。 - /// - [Newtonsoft.Json.JsonProperty("size_chart_rule")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart_rule")] - public Types.SizeChartRule? SizeChartRule { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public Types.ProductCertification[] ProductCertificationList { get; set; } = default!; - } - } - - /// - /// 获取或设置分类规则列表。 - /// - [Newtonsoft.Json.JsonProperty("category_rules")] - [System.Text.Json.Serialization.JsonPropertyName("category_rules")] - public Types.CategoryRule[] CategoryRuleList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductRequest.cs deleted file mode 100644 index 4255d77d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductRequest.cs +++ /dev/null @@ -1,333 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/global_products 接口的请求。 - /// - public class GlobalProductCreateProductRequest : TikTokShopRequest - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.Image - { - } - - public class SizeChart - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string ImageId { get; set; } = string.Empty; - } - - public class GlobalSKU - { - public static class Types - { - public class SalesAttribute - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("attribute_name")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_name")] - public string? AttributeName { get; set; } - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string? ValueId { get; set; } - - /// - /// 获取或设置自定义属性值。 - /// - [Newtonsoft.Json.JsonProperty("custom_value")] - [System.Text.Json.Serialization.JsonPropertyName("custom_value")] - public string? CustomValue { get; set; } - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class IdentifierCodeInfo : ProductCreateProductRequest.Types.SKU.Types.IdentifierCodeInfo - { - } - - public class StockInfo - { - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - public string WarehouseId { get; set; } = string.Empty; - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - } - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public IList? SalesAttributeList { get; set; } - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public IList? StockInfoList { get; set; } - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue : ProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("attribute_values")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_values")] - public IList ValueList { get; set; } = new List(); - } - - public class ProductCertification - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.ProductCertification.Types.Image - { - } - - public class File : ProductCreateProductRequest.Types.ProductCertification.Types.File - { - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CertificationId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public IList? FileList { get; set; } - } - - public class ExemptionOfIdentifierCode - { - /// - /// 获取或设置 GTIN 豁免原因类型。 - /// - [Newtonsoft.Json.JsonProperty("exemption_reason")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_reason")] - public int? ExemptionReasonType { get; set; } - } - } - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = string.Empty; - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("category_id")] - [System.Text.Json.Serialization.JsonPropertyName("category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CategoryId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public int? WarrantyPeriodId { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int? PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int? PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int? PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int? PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string? PackageDimensionUnit { get; set; } - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置配送服务 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("delivery_service_ids")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_service_ids")] - public IList? DeliveryServiceIdList { get; set; } - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList? GlobalSKUList { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public IList? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public IList? ProductAttributeList { get; set; } - - /// - /// 获取或设置产品标识码豁免信息。 - /// - [Newtonsoft.Json.JsonProperty("exemption_of_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_of_identifier_code")] - public Types.ExemptionOfIdentifierCode? ExemptionOfIdentifierCode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductResponse.cs deleted file mode 100644 index 6f6c3b16..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductCreateProductResponse.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/global_products 接口的响应。 - /// - public class GlobalProductCreateProductResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class GlobalSKU - { - public static class Types - { - public class SalesAttribute : ProductCreateProductResponse.Types.Data.Types.SKU.Types.SalesAttribute - { - } - } - - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("global_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalSKUId { get; set; } = default!; - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("global_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalProductId { get; set; } = default!; - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.GlobalSKU[] GlobalSKUList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsRequest.cs deleted file mode 100644 index e9be5da2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [DELETE] /product/global_products 接口的请求。 - /// - public class GlobalProductDeleteProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置全球商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("global_product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_ids")] - public IList GlobalProductIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsResponse.cs deleted file mode 100644 index 78fa804e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductDeleteProductsResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [DELETE] /product/global_products 接口的响应。 - /// - public class GlobalProductDeleteProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置删除失败的全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("failed_global_product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_global_product_ids")] - public string[]? FailedGlobalProductIdList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailRequest.cs deleted file mode 100644 index 326e3fb0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailRequest.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products 接口的请求。 - /// - public class GlobalProductGetProductDetailRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202306"; - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string GlobalProductId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailResponse.cs deleted file mode 100644 index 50badee5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductGetProductDetailResponse.cs +++ /dev/null @@ -1,397 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /product/global_products 接口的响应。 - /// - public class GlobalProductGetProductDetailResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class LocalProduct - { - /// - /// 获取或设置店铺所在地。 - /// - [Newtonsoft.Json.JsonProperty("region")] - [System.Text.Json.Serialization.JsonPropertyName("region")] - public string Region { get; set; } = default!; - - /// - /// 获取或设置本地商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string LocalProductId { get; set; } = default!; - } - - public class Image - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string ImageId { get; set; } = default!; - } - - public class SizeChart : Data.Types.Image - { - } - - public class GlobalSKU - { - public static class Types - { - public class SalesAttribute - { - public static class Types - { - public class Image : Data.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("attribute_name")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_name")] - public string AttributeName { get; set; } = default!; - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - - /// - /// 获取或设置自定义属性值。 - /// - [Newtonsoft.Json.JsonProperty("custom_value")] - [System.Text.Json.Serialization.JsonPropertyName("custom_value")] - public string? CustomValue { get; set; } - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class StockInfo - { - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - - public class IdentifierCodeInfo : ProductGetProductDetailResponse.Types.Data.Types.SKU.Types.IdentifierCodeInfo - { - } - } - - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalSKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public Types.SalesAttribute[]? SalesAttributeList { get; set; } - - /// - /// 获取或设置库存信息。 - /// - [Newtonsoft.Json.JsonProperty("stock_info")] - [System.Text.Json.Serialization.JsonPropertyName("stock_info")] - public Types.StockInfo StockInfo { get; set; } = default!; - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductCertification - { - public static class Types - { - public class Image : Data.Types.Image - { - } - - public class File - { - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string FileId { get; set; } = default!; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string FileName { get; set; } = default!; - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public string FileType { get; set; } = default!; - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CertificationId { get; set; } = default!; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public Types.Image[]? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public Types.File[]? FileList { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue - { - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - - /// - /// 获取或设置属性值名称。 - /// - [Newtonsoft.Json.JsonProperty("value_name")] - [System.Text.Json.Serialization.JsonPropertyName("value_name")] - public string ValueName { get; set; } = default!; - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("attribute_values")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_values")] - public Types.ProductAttributeValue[] ValueList { get; set; } = default!; - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("global_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalProductId { get; set; } = default!; - - /// - /// 获取或设置本地商品列表。 - /// - [Newtonsoft.Json.JsonProperty("local_products")] - [System.Text.Json.Serialization.JsonPropertyName("local_products")] - public Types.LocalProduct[] LocalProduct { get; set; } = default!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = default!; - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("product_status")] - [System.Text.Json.Serialization.JsonPropertyName("product_status")] - public int ProductStatus { get; set; } - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("category_id")] - [System.Text.Json.Serialization.JsonPropertyName("category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CategoryId { get; set; } = default!; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public Types.Image[] ImageList { get; set; } = default!; - - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public int? WarrantyPeriodId { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string PackageDimensionUnit { get; set; } = default!; - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.GlobalSKU[]? GlobalSKUList { get; set; } = default!; - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public Types.ProductCertification[]? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public Types.ProductAttribute[]? ProductAttributeList { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductRequest.cs deleted file mode 100644 index 6bbc985e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductRequest.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/global_products/publish 接口的请求。 - /// - public class GlobalProductPublishProductRequest : TikTokShopRequest - { - public static class Types - { - public class Shop - { - public static class Types - { - public class GlobalSKU - { - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string GlobalSKUId { get; set; } = string.Empty; - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal? OriginalPrice { get; set; } - - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - public string? WarehouseId { get; set; } - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - } - - /// - /// 获取或设置店铺所在地。 - /// - [Newtonsoft.Json.JsonProperty("region")] - [System.Text.Json.Serialization.JsonPropertyName("region")] - public string Region { get; set; } = string.Empty; - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("global_product_sku")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_sku")] - public IList GlobalSKUList { get; set; } = new List(); - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("global_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] - public string GlobalProductId { get; set; } = string.Empty; - - /// - /// 获取或设置店铺列表。 - /// - [Newtonsoft.Json.JsonProperty("publishable_shops")] - [System.Text.Json.Serialization.JsonPropertyName("publishable_shops")] - public IList ShopList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductResponse.cs deleted file mode 100644 index 4b415cb0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductPublishProductResponse.cs +++ /dev/null @@ -1,122 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/global_products/publish 接口的响应。 - /// - public class GlobalProductPublishProductResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Result - { - public static class Types - { - public class SKU - { - public static class Types - { - public class Attribute - { - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - } - } - - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("global_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalSKUId { get; set; } = default!; - - /// - /// 获取或设置本地 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("local_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("local_sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string LocalSKUId { get; set; } = default!; - - /// - /// 获取或设置本地卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("local_seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("local_seller_sku")] - public string? LocalSellerSKU { get; set; } - - /// - /// 获取或设置 SKU 属性列表。 - /// - [Newtonsoft.Json.JsonProperty("local_sale_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("local_sale_attributes")] - public Types.Attribute[] AttributeList { get; set; } = default!; - } - } - - /// - /// 获取或设置店铺 ID。 - /// - [Newtonsoft.Json.JsonProperty("shop_id")] - [System.Text.Json.Serialization.JsonPropertyName("shop_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ShopId { get; set; } = default!; - - /// - /// 获取或设置店铺所在地。 - /// - [Newtonsoft.Json.JsonProperty("shop_region")] - [System.Text.Json.Serialization.JsonPropertyName("shop_region")] - public string ShopRegion { get; set; } = default!; - - /// - /// 获取或设置发布结果。 - /// - [Newtonsoft.Json.JsonProperty("local_product_publish_result")] - [System.Text.Json.Serialization.JsonPropertyName("local_product_publish_result")] - public int PublishResult { get; set; } - - /// - /// 获取或设置本地商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("local_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("local_product_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string LocalProductId { get; set; } = default!; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[] SKUList { get; set; } = default!; - } - } - - /// - /// 获取或设置结果列表。 - /// - [Newtonsoft.Json.JsonProperty("publish_list")] - [System.Text.Json.Serialization.JsonPropertyName("publish_list")] - public Types.Result[] ResultList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsRequest.cs deleted file mode 100644 index 045b1d01..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsRequest.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/global_products/search 接口的请求。 - /// - public class GlobalProductSearchProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置创建时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_from")] - public long? CreateTimestampFrom { get; set; } - - /// - /// 获取或设置创建时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_to")] - public long? CreateTimestampTo { get; set; } - - /// - /// 获取或设置更新时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_from")] - public long? UpdateTimestampFrom { get; set; } - - /// - /// 获取或设置更新时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_to")] - public long? UpdateTimestampTo { get; set; } - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int? ProductStatus { get; set; } - - /// - /// 获取或设置卖家 SKU 信息列表。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku_list")] - public IList? SellerSKUList { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page_number")] - [System.Text.Json.Serialization.JsonPropertyName("page_number")] - public int PageNumber { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsResponse.cs deleted file mode 100644 index 40539ae2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductSearchProductsResponse.cs +++ /dev/null @@ -1,98 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/global_products/search 接口的响应。 - /// - public class GlobalProductSearchProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class GlobalProduct - { - public static class Types - { - public class GlobalSKU - { - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalSKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalProductId { get; set; } = default!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string ProductName { get; set; } = default!; - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int ProductStatus { get; set; } - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.GlobalSKU[] GlobalSKUList { get; set; } = default!; - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - - /// - /// 获取或设置全球商品列表。 - /// - [Newtonsoft.Json.JsonProperty("global_products")] - [System.Text.Json.Serialization.JsonPropertyName("global_products")] - public Types.GlobalProduct[] GlobalProductList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceRequest.cs deleted file mode 100644 index a7c8f053..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /product/global_products/prices 接口的请求。 - /// - public class GlobalProductUpdateProductPriceRequest : TikTokShopRequest - { - public static class Types - { - public class GlobalSKU - { - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string GlobalSKUId { get; set; } = string.Empty; - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal OriginalPrice { get; set; } - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("global_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] - public string GlobalProductId { get; set; } = string.Empty; - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList GlobalSKUList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceResponse.cs deleted file mode 100644 index d7a9c2de..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductPriceResponse.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /product/global_products/prices 接口的响应。 - /// - public class GlobalProductUpdateProductPriceResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedGlobalSKU - { - /// - /// 获取或设置店铺所在地。 - /// - [Newtonsoft.Json.JsonProperty("region")] - [System.Text.Json.Serialization.JsonPropertyName("region")] - public string Region { get; set; } = default!; - - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("global_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalSKUId { get; set; } = default!; - - /// - /// 获取或设置本地 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("local_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("local_sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string LocalSKUId { get; set; } = default!; - - /// - /// 获取或设置失败原因编码。 - /// - [Newtonsoft.Json.JsonProperty("failed_code")] - [System.Text.Json.Serialization.JsonPropertyName("failed_code")] - public int FailReasonCode { get; set; } - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("failed_msg")] - [System.Text.Json.Serialization.JsonPropertyName("failed_msg")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置更新失败的全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_skus")] - [System.Text.Json.Serialization.JsonPropertyName("failed_skus")] - public Types.FailedGlobalSKU[]? FailedGlobalSKUList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductRequest.cs deleted file mode 100644 index 5adb084a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductRequest.cs +++ /dev/null @@ -1,315 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /product/global_products 接口的请求。 - /// - public class GlobalProductUpdateProductRequest : TikTokShopRequest - { - public static class Types - { - public class Image : GlobalProductCreateProductRequest.Types.Image - { - } - - public class SizeChart : GlobalProductCreateProductRequest.Types.SizeChart - { - } - - public class ProductCertification - { - public static class Types - { - public class Image : GlobalProductCreateProductRequest.Types.ProductCertification.Types.Image - { - } - - public class File : GlobalProductCreateProductRequest.Types.ProductCertification.Types.File - { - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CertificationId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public IList? FileList { get; set; } - } - - public class GlobalSKU - { - public static class Types - { - public class SalesAttribute - { - public static class Types - { - public class Image : GlobalProductCreateProductRequest.Types.GlobalSKU.Types.SalesAttribute.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("attribute_name")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_name")] - public string? AttributeName { get; set; } - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string? ValueId { get; set; } - - /// - /// 获取或设置自定义属性值。 - /// - [Newtonsoft.Json.JsonProperty("custom_value")] - [System.Text.Json.Serialization.JsonPropertyName("custom_value")] - public string? CustomValue { get; set; } - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class IdentifierCodeInfo : GlobalProductCreateProductRequest.Types.GlobalSKU.Types.IdentifierCodeInfo - { - } - - public class StockInfo : GlobalProductCreateProductRequest.Types.GlobalSKU.Types.StockInfo - { - } - } - - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string? GlobalSKUId { get; set; } - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("sku_price")] - [System.Text.Json.Serialization.JsonPropertyName("sku_price")] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public IList? SalesAttributeList { get; set; } - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public IList? StockInfoList { get; set; } - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue : GlobalProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("attribute_values")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_values")] - public IList ValueList { get; set; } = new List(); - } - - public class ExemptionOfIdentifierCode : GlobalProductCreateProductRequest.Types.ExemptionOfIdentifierCode - { - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("global_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] - public string GlobalProductId { get; set; } = string.Empty; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = string.Empty; - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("category_id")] - [System.Text.Json.Serialization.JsonPropertyName("category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CategoryId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public int? WarrantyPeriodId { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int? PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int? PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int? PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int? PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string? PackageDimensionUnit { get; set; } - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList? GlobalSKUList { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public IList? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public IList? ProductAttributeList { get; set; } - - /// - /// 获取或设置产品标识码豁免信息。 - /// - [Newtonsoft.Json.JsonProperty("exemption_of_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_of_identifier_code")] - public Types.ExemptionOfIdentifierCode? ExemptionOfIdentifierCode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductResponse.cs deleted file mode 100644 index 1319b97c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/GlobalProduct/GlobalProductUpdateProductResponse.cs +++ /dev/null @@ -1,125 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /product/global_products 接口的响应。 - /// - public class GlobalProductUpdateProductResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class LocalProduct - { - /// - /// 获取或设置店铺所在地。 - /// - [Newtonsoft.Json.JsonProperty("local_product_region")] - [System.Text.Json.Serialization.JsonPropertyName("local_product_region")] - public string Region { get; set; } = default!; - - /// - /// 获取或设置本地商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("local_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("local_product_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string LocalProductId { get; set; } = default!; - - /// - /// 获取或设置编辑结果。 - /// - [Newtonsoft.Json.JsonProperty("local_product_edit_result")] - [System.Text.Json.Serialization.JsonPropertyName("local_product_edit_result")] - public int EditResult { get; set; } - } - - public class GlobalSKU - { - public static class Types - { - public class SalesAttribute - { - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string AttributeName { get; set; } = default!; - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - - /// - /// 获取或设置属性值名称。 - /// - [Newtonsoft.Json.JsonProperty("value_name")] - [System.Text.Json.Serialization.JsonPropertyName("value_name")] - public string ValueName { get; set; } = default!; - } - } - - /// - /// 获取或设置全球 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("global_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("global_sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string GlobalSKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sku_property")] - [System.Text.Json.Serialization.JsonPropertyName("sku_property")] - public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; - } - } - - /// - /// 获取或设置全球商品 ID。 - /// - [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 GlobalProductId { get; set; } = default!; - - /// - /// 获取或设置本地商品列表。 - /// - [Newtonsoft.Json.JsonProperty("local_product_info")] - [System.Text.Json.Serialization.JsonPropertyName("local_product_info")] - public Types.LocalProduct[] LocalProductList { get; set; } = default!; - - /// - /// 获取或设置全球 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.GlobalSKU[] GlobalSKUList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentRequest.cs deleted file mode 100644 index 1fef57a1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/shipping_document 接口的请求。 - /// - public class LogisticsGetShippingDocumentRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string OrderId { get; set; } = string.Empty; - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string DocumentType { get; set; } = string.Empty; - - /// - /// 获取或设置文件尺寸。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? DocumentSize { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentResponse.cs deleted file mode 100644 index 549da352..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingDocumentResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/shipping_document 接口的响应。 - /// - public class LogisticsGetShippingDocumentResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置文件 URL。 - /// - [Newtonsoft.Json.JsonProperty("doc_url")] - [System.Text.Json.Serialization.JsonPropertyName("doc_url")] - public string DocumentUrl { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoRequest.cs deleted file mode 100644 index 7916dfd8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/ship/get 接口的请求。 - /// - public class LogisticsGetShippingInfoRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string OrderId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoResponse.cs deleted file mode 100644 index ea6e2ea9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingInfoResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/ship/get 接口的响应。 - /// - public class LogisticsGetShippingInfoResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class TrackingInfo - { - public static class Types - { - public class TrackingInfo - { - /// - /// 获取或设置描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - - /// - /// 获取或设置轨迹列表。 - /// - [Newtonsoft.Json.JsonProperty("tracking_info")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_info")] - public Types.TrackingInfo[] TrackingInfoList { get; set; } = default!; - } - } - - /// - /// 获取或设置轨迹列表。 - /// - [Newtonsoft.Json.JsonProperty("tracking_info_list")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_info_list")] - public Types.TrackingInfo[] TrackingInfoList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListRequest.cs deleted file mode 100644 index 6bc8024c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/shipping_providers 接口的请求。 - /// - public class LogisticsGetShippingProviderListRequest : TikTokShopRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListResponse.cs deleted file mode 100644 index 6a313b5c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetShippingProviderListResponse.cs +++ /dev/null @@ -1,124 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/shipping_providers 接口的响应。 - /// - public class LogisticsGetShippingProviderListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class DeliveryOption - { - public static class Types - { - public class ItemWeightLimit - { - /// - /// 获取或设置最小重量。 - /// - [Newtonsoft.Json.JsonProperty("min_weight")] - [System.Text.Json.Serialization.JsonPropertyName("min_weight")] - public int MinWeight { get; set; } - - /// - /// 获取或设置最大重量。 - /// - [Newtonsoft.Json.JsonProperty("max_weight")] - [System.Text.Json.Serialization.JsonPropertyName("max_weight")] - public int MaxWeight { get; set; } - } - - public class ItemDimensionLimit - { - /// - /// 获取或设置长度。 - /// - [Newtonsoft.Json.JsonProperty("length")] - [System.Text.Json.Serialization.JsonPropertyName("length")] - public int Length { get; set; } - - /// - /// 获取或设置宽度。 - /// - [Newtonsoft.Json.JsonProperty("width")] - [System.Text.Json.Serialization.JsonPropertyName("width")] - public int Width { get; set; } - - /// - /// 获取或设置高度。 - /// - [Newtonsoft.Json.JsonProperty("height")] - [System.Text.Json.Serialization.JsonPropertyName("height")] - public int Height { get; set; } - } - - public class ShippingProvider - { - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] - public string ShippingProviderId { get; set; } = default!; - - /// - /// 获取或设置运输服务商名称。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_name")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] - public string ShippingProviderName { get; set; } = default!; - } - } - - /// - /// 获取或设置配送方式 ID。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_id")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string DeliveryOptionId { get; set; } = default!; - - /// - /// 获取或设置配送方式名称。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_name")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_name")] - public string DeliveryOptionName { get; set; } = default!; - - /// - /// 获取或设置货品重量限制信息。 - /// - [Newtonsoft.Json.JsonProperty("item_weight_limit")] - [System.Text.Json.Serialization.JsonPropertyName("item_weight_limit")] - public Types.ItemWeightLimit ItemWeightLimit { get; set; } = default!; - - /// - /// 获取或设置货品尺寸限制信息。 - /// - [Newtonsoft.Json.JsonProperty("item_dimension_limit")] - [System.Text.Json.Serialization.JsonPropertyName("item_dimension_limit")] - public Types.ItemDimensionLimit ItemDimensionLimit { get; set; } = default!; - - /// - /// 获取或设置运输服务商列表。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_list")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_list")] - public Types.ShippingProvider[] ShippingProviderList { get; set; } = default!; - } - } - - /// - /// 获取或设置配送方式列表。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_list")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_list")] - public Types.DeliveryOption[] DeliveryOptionList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.cs deleted file mode 100644 index e14aaa07..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /logistics/get_subscribed_deliveryoptions 接口的请求。 - /// - public class LogisticsGetSubscribedDeliveryOptionsRequest : TikTokShopRequest - { - /// - /// 获取或设置仓库 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id_list")] - public IList WarehouseIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.cs deleted file mode 100644 index e4659596..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /logistics/get_subscribed_deliveryoptions 接口的响应。 - /// - public class LogisticsGetSubscribedDeliveryOptionsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Warehouse - { - public static class Types - { - public class WarehouseDeliveryOption - { - /// - /// 获取或设置配送方式。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option")] - public int DeliveryOption { get; set; } - - /// - /// 获取或设置服务 ID。 - /// - [Newtonsoft.Json.JsonProperty("service_id")] - [System.Text.Json.Serialization.JsonPropertyName("service_id")] - public string? ServiceId { get; set; } = default!; - - /// - /// 获取或设置服务名称。 - /// - [Newtonsoft.Json.JsonProperty("service_name")] - [System.Text.Json.Serialization.JsonPropertyName("service_name")] - public string? ServiceName { get; set; } - } - } - - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string WarehouseId { get; set; } = default!; - - /// - /// 获取或设置配送方式列表。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_delivery")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_delivery")] - public Types.WarehouseDeliveryOption[] DeliveryOptionList { get; set; } = default!; - } - } - - /// - /// 获取或设置仓库列表。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_list")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_list")] - public Types.Warehouse[] WarehouseList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListResponse.cs deleted file mode 100644 index afae6f44..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListResponse.cs +++ /dev/null @@ -1,159 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /logistics/get_warehouse_list 接口的响应。 - /// - public class LogisticsGetWarehouseListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Warehouse - { - public static class Types - { - public class Address - { - /// - /// 获取或设置完整地址。 - /// - [Newtonsoft.Json.JsonProperty("full_address")] - [System.Text.Json.Serialization.JsonPropertyName("full_address")] - public string FullAddress { get; set; } = default!; - - /// - /// 获取或设置国家或地区编码。 - /// - [Newtonsoft.Json.JsonProperty("region_code")] - [System.Text.Json.Serialization.JsonPropertyName("region_code")] - public string RegionCode { get; set; } = default!; - - /// - /// 获取或设置国家或地区。 - /// - [Newtonsoft.Json.JsonProperty("region")] - [System.Text.Json.Serialization.JsonPropertyName("region")] - public string Region { get; set; } = default!; - - /// - /// 获取或设置州/省。 - /// - [Newtonsoft.Json.JsonProperty("state")] - [System.Text.Json.Serialization.JsonPropertyName("state")] - public string State { get; set; } = default!; - - /// - /// 获取或设置市。 - /// - [Newtonsoft.Json.JsonProperty("city")] - [System.Text.Json.Serialization.JsonPropertyName("city")] - public string City { get; set; } = default!; - - /// - /// 获取或设置县。 - /// - [Newtonsoft.Json.JsonProperty("district")] - [System.Text.Json.Serialization.JsonPropertyName("district")] - public string District { get; set; } = default!; - - /// - /// 获取或设置镇。 - /// - [Newtonsoft.Json.JsonProperty("town")] - [System.Text.Json.Serialization.JsonPropertyName("town")] - public string Town { get; set; } = default!; - - /// - /// 获取或设置电话号码。 - /// - [Newtonsoft.Json.JsonProperty("phone")] - [System.Text.Json.Serialization.JsonPropertyName("phone")] - public string PhoneNumber { get; set; } = default!; - - /// - /// 获取或设置联系人姓名。 - /// - [Newtonsoft.Json.JsonProperty("contact_person")] - [System.Text.Json.Serialization.JsonPropertyName("contact_person")] - public string ContactName { get; set; } = default!; - - /// - /// 获取或设置邮编。 - /// - [Newtonsoft.Json.JsonProperty("zipcode")] - [System.Text.Json.Serialization.JsonPropertyName("zipcode")] - public string ZipCode { get; set; } = default!; - } - } - - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - public string WarehouseId { get; set; } = default!; - - /// - /// 获取或设置仓库名称。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_name")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_name")] - public string WarehouseName { get; set; } = default!; - - /// - /// 获取或设置仓库类型。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_type")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_type")] - public int Type { get; set; } - - /// - /// 获取或设置仓库子类型。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_sub_type")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_sub_type")] - public int SubType { get; set; } - - /// - /// 获取或设置有效状态。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_effect_status")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_effect_status")] - public int EffectStatus { get; set; } - - /// - /// 获取或设置状态。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_status")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_status")] - public int Status { get; set; } - - /// - /// 获取或设置是否默认。 - /// - [Newtonsoft.Json.JsonProperty("is_default")] - [System.Text.Json.Serialization.JsonPropertyName("is_default")] - public bool IsDefault { get; set; } - - /// - /// 获取或设置地址信息。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_address")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_address")] - public Types.Address Address { get; set; } = default!; - } - } - - /// - /// 获取或设置仓库列表。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_list")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_list")] - public Types.Warehouse[] WarehouseList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoRequest.cs deleted file mode 100644 index 1c236a89..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /logistics/tracking 接口的请求。 - /// - public class LogisticsUpdateShippingInfoRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("order_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_id")] - public string OrderId { get; set; } = string.Empty; - - /// - /// 获取或设置物流单号。 - /// - [Newtonsoft.Json.JsonProperty("tracking_number")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] - public string TrackingNumber { get; set; } = string.Empty; - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("provider_id")] - public string ShippingProviderId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoResponse.cs deleted file mode 100644 index b65c2a80..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsUpdateShippingInfoResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /logistics/tracking 接口的响应。 - /// - public class LogisticsUpdateShippingInfoResponse : TikTokShopResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs deleted file mode 100644 index 68b97585..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /orders/detail/query 接口的请求。 - /// - public class OrderGetOrderDetailRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202305"; - - /// - /// 获取或设置订单 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("order_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] - public IList OrderIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs deleted file mode 100644 index d88cb102..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs +++ /dev/null @@ -1,727 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /orders/detail/query 接口的响应。 - /// - public class OrderGetOrderDetailResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Order : OrderSearchOrdersResponse.Types.Data.Types.Order - { - public static class Types - { - public class PaymentInfo - { - /// - /// 获取或设置币种。 - /// - [Newtonsoft.Json.JsonProperty("currency")] - [System.Text.Json.Serialization.JsonPropertyName("currency")] - public string Currency { get; set; } = default!; - - /// - /// 获取或设置总金额。 - /// - [Newtonsoft.Json.JsonProperty("total_amount")] - [System.Text.Json.Serialization.JsonPropertyName("total_amount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal TotalAmount { get; set; } - - /// - /// 获取或设置 SKU 总金额。 - /// - [Newtonsoft.Json.JsonProperty("sub_total")] - [System.Text.Json.Serialization.JsonPropertyName("sub_total")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SubtotalAmount { get; set; } - - /// - /// 获取或设置运费。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFee { get; set; } - - /// - /// 获取或设置运费税。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee_tax")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_tax")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFeeTax { get; set; } - - /// - /// 获取或设置卖家优惠金额。 - /// - [Newtonsoft.Json.JsonProperty("seller_discount")] - [System.Text.Json.Serialization.JsonPropertyName("seller_discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SellerDiscount { get; set; } - - /// - /// 获取或设置平台优惠金额。 - /// - [Newtonsoft.Json.JsonProperty("platform_discount")] - [System.Text.Json.Serialization.JsonPropertyName("platform_discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PlatformDiscount { get; set; } - - /// - /// 获取或设置商品原价。 - /// - [Newtonsoft.Json.JsonProperty("original_total_product_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_total_product_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal OriginalTotalProductPrice { get; set; } - - /// - /// 获取或设置运费原价。 - /// - [Newtonsoft.Json.JsonProperty("original_shipping_fee")] - [System.Text.Json.Serialization.JsonPropertyName("original_shipping_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal OriginalShippingFee { get; set; } - - /// - /// 获取或设置运费卖家优惠金额。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee_seller_discount")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_seller_discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFeeSellerDiscount { get; set; } - - /// - /// 获取或设置运费平台优惠金额。 - /// - [Newtonsoft.Json.JsonProperty("shipping_fee_platform_discount")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_platform_discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ShippingFeePlatformDiscount { get; set; } - - /// - /// 获取或设置零售配送费。 - /// - [Newtonsoft.Json.JsonProperty("retail_delivery_fee")] - [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal RetailDeliveryFee { get; set; } - - /// - /// 获取或设置税费。 - /// - [Newtonsoft.Json.JsonProperty("taxes")] - [System.Text.Json.Serialization.JsonPropertyName("taxes")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal Taxes { get; set; } - - /// - /// 获取或设置小额订单费。 - /// - [Newtonsoft.Json.JsonProperty("small_order_fee")] - [System.Text.Json.Serialization.JsonPropertyName("small_order_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SmallOrderFee { get; set; } - - /// - /// 获取或设置商品税。 - /// - [Newtonsoft.Json.JsonProperty("product_taxes")] - [System.Text.Json.Serialization.JsonPropertyName("product_taxes")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal ProductTaxes { get; set; } - } - - public class RecipientAddress - { - /// - /// 获取或设置完整地址。 - /// - [Newtonsoft.Json.JsonProperty("full_address")] - [System.Text.Json.Serialization.JsonPropertyName("full_address")] - public string FullAddress { get; set; } = default!; - - /// - /// 获取或设置国家或地区编码。 - /// - [Newtonsoft.Json.JsonProperty("region_code")] - [System.Text.Json.Serialization.JsonPropertyName("region_code")] - public string RegionCode { get; set; } = default!; - - /// - /// 获取或设置电话号码。 - /// - [Newtonsoft.Json.JsonProperty("phone")] - [System.Text.Json.Serialization.JsonPropertyName("phone")] - public string PhoneNumber { get; set; } = default!; - - /// - /// 获取或设置联系人姓名。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string ContactName { get; set; } = default!; - - /// - /// 获取或设置邮编。 - /// - [Newtonsoft.Json.JsonProperty("zipcode")] - [System.Text.Json.Serialization.JsonPropertyName("zipcode")] - public string ZipCode { get; set; } = default!; - - /// - /// 获取或设置详细地址。 - /// - [Newtonsoft.Json.JsonProperty("address_detail")] - [System.Text.Json.Serialization.JsonPropertyName("address_detail")] - public string AddressDetail { get; set; } = default!; - - /// - /// 获取或设置地址行 1。 - /// - [Newtonsoft.Json.JsonProperty("addressline1")] - [System.Text.Json.Serialization.JsonPropertyName("addressline1")] - public string? AddressLine1 { get; set; } - - /// - /// 获取或设置地址行 2。 - /// - [Newtonsoft.Json.JsonProperty("addressline2")] - [System.Text.Json.Serialization.JsonPropertyName("addressline2")] - public string? AddressLine2 { get; set; } - - /// - /// 获取或设置地址行 3。 - /// - [Newtonsoft.Json.JsonProperty("addressline3")] - [System.Text.Json.Serialization.JsonPropertyName("addressline3")] - public string? AddressLine3 { get; set; } - - /// - /// 获取或设置地址行 4。 - /// - [Newtonsoft.Json.JsonProperty("addressline4")] - [System.Text.Json.Serialization.JsonPropertyName("addressline4")] - public string? AddressLine4 { get; set; } - } - - public class Package - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - } - - public class DistrictInfo - { - /// - /// 获取或设置行政区划名称。 - /// - [Newtonsoft.Json.JsonProperty("address_level_name")] - [System.Text.Json.Serialization.JsonPropertyName("address_level_name")] - public string AddressLevelName { get; set; } = default!; - - /// - /// 获取或设置行政区划名称。 - /// - [Newtonsoft.Json.JsonProperty("address_name")] - [System.Text.Json.Serialization.JsonPropertyName("address_name")] - public string AddressName { get; set; } = default!; - } - - public class OrderLine - { - public static class Types - { - public class ItemTax - { - /// - /// 获取或设置税费类型。 - /// - [Newtonsoft.Json.JsonProperty("tax_type")] - [System.Text.Json.Serialization.JsonPropertyName("tax_type")] - public int TaxType { get; set; } - - /// - /// 获取或设置税费金额。 - /// - [Newtonsoft.Json.JsonProperty("tax_amount")] - [System.Text.Json.Serialization.JsonPropertyName("tax_amount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal TaxAmount { get; set; } - } - } - - /// - /// 获取或设置订单行 ID。 - /// - [Newtonsoft.Json.JsonProperty("order_line_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_line_id")] - public string OrderLineId { get; set; } = default!; - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = default!; - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置 SKU 名称。 - /// - [Newtonsoft.Json.JsonProperty("sku_name")] - [System.Text.Json.Serialization.JsonPropertyName("sku_name")] - public string SKUName { get; set; } = default!; - - /// - /// 获取或设置 SKU 类型。 - /// - [Newtonsoft.Json.JsonProperty("sku_type")] - [System.Text.Json.Serialization.JsonPropertyName("sku_type")] - public int SKUType { get; set; } - - /// - /// 获取或设置 SKU 图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("sku_image")] - [System.Text.Json.Serialization.JsonPropertyName("sku_image")] - public string SKUImageUrl { get; set; } = default!; - - /// - /// 获取或设置数量。 - /// - [Newtonsoft.Json.JsonProperty("quantity")] - [System.Text.Json.Serialization.JsonPropertyName("quantity")] - public int Quantity { get; set; } - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置售价。 - /// - [Newtonsoft.Json.JsonProperty("sale_price")] - [System.Text.Json.Serialization.JsonPropertyName("sale_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SalePrice { get; set; } - - /// - /// 获取或设置平台优惠金额。 - /// - [Newtonsoft.Json.JsonProperty("platform_discount")] - [System.Text.Json.Serialization.JsonPropertyName("platform_discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PlatformDiscount { get; set; } - - /// - /// 获取或设置卖家优惠金额。 - /// - [Newtonsoft.Json.JsonProperty("seller_discount")] - [System.Text.Json.Serialization.JsonPropertyName("seller_discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SellerDiscount { get; set; } - - /// - /// 获取或设置零售配送费。 - /// - [Newtonsoft.Json.JsonProperty("retail_delivery_fee")] - [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal RetailDeliveryFee { get; set; } - - /// - /// 获取或设置小额订单费。 - /// - [Newtonsoft.Json.JsonProperty("small_order_fee")] - [System.Text.Json.Serialization.JsonPropertyName("small_order_fee")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal SmallOrderFee { get; set; } - - /// - /// 获取或设置显示状态。 - /// - [Newtonsoft.Json.JsonProperty("display_status")] - [System.Text.Json.Serialization.JsonPropertyName("display_status")] - public int DisplayStatus { get; set; } - - /// - /// 获取或设置取消者。 - /// - [Newtonsoft.Json.JsonProperty("cancel_user")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_user")] - public string? CancelUser { get; set; } - - /// - /// 获取或设置取消原因。 - /// - [Newtonsoft.Json.JsonProperty("cancel_reason")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] - public string? CancelReason { get; set; } - - /// - /// 获取或设置准备发货时间戳。 - /// - [Newtonsoft.Json.JsonProperty("rts_time")] - [System.Text.Json.Serialization.JsonPropertyName("rts_time")] - public long? ReadyToShipTimestamp { get; set; } - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] - public string? ShippingProviderId { get; set; } - - /// - /// 获取或设置运输服务商名称。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_name")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] - public string? ShippingProviderName { get; set; } - - /// - /// 获取或设置物流单号。 - /// - [Newtonsoft.Json.JsonProperty("tracking_number")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] - public string? TrackingNumber { get; set; } - - /// - /// 获取或设置包裹 ID。 - /// - [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; } - - /// - /// 获取或设置包裹状态。 - /// - [Newtonsoft.Json.JsonProperty("package_status")] - [System.Text.Json.Serialization.JsonPropertyName("package_status")] - public int? PackageStatus { get; set; } - - /// - /// 获取或设置包裹冻结状态。 - /// - [Newtonsoft.Json.JsonProperty("package_freeze_status")] - [System.Text.Json.Serialization.JsonPropertyName("package_freeze_status")] - public int? PackageFreezeStatus { get; set; } - - /// - /// 获取或设置是否是礼品。 - /// - [Newtonsoft.Json.JsonProperty("is_gift")] - [System.Text.Json.Serialization.JsonPropertyName("is_gift")] - public bool IsGift { get; set; } - - /// - /// 获取或设置商品税费列表。 - /// - [Newtonsoft.Json.JsonProperty("item_tax")] - [System.Text.Json.Serialization.JsonPropertyName("item_tax")] - public Types.ItemTax[]? ItemTaxList { get; set; } - } - } - - /// - /// 获取或设置支付方式。 - /// - [Newtonsoft.Json.JsonProperty("payment_method")] - [System.Text.Json.Serialization.JsonPropertyName("payment_method")] - public string PaymentMethod { get; set; } = default!; - - /// - /// 获取或设置支付方式类型。 - /// - [Newtonsoft.Json.JsonProperty("payment_method_type")] - [System.Text.Json.Serialization.JsonPropertyName("payment_method_type")] - public int PaymentMethodType { get; set; } - - /// - /// 获取或设置支付方式名称。 - /// - [Newtonsoft.Json.JsonProperty("payment_method_name")] - [System.Text.Json.Serialization.JsonPropertyName("payment_method_name")] - public string? PaymentMethodName { get; set; } - - /// - /// 获取或设置支付信息。 - /// - [Newtonsoft.Json.JsonProperty("payment_info")] - [System.Text.Json.Serialization.JsonPropertyName("payment_info")] - public Types.PaymentInfo PaymentInfo { get; set; } = default!; - - /// - /// 获取或设置配送方式。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option")] - public string DeliveryOption { get; set; } = default!; - - /// - /// 获取或设置配送方式类型。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_type")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_type")] - public int DeliveryOptionType { get; set; } - - /// - /// 获取或设置配送方式描述。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_description")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_description")] - public string? DeliveryOptionDescription { get; set; } - - /// - /// 获取或设置配送方式 ID。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_id")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_id")] - public string? DeliveryOptionId { get; set; } - - /// - /// 获取或设置发货 SLA 时间戳。 - /// - [Newtonsoft.Json.JsonProperty("delivery_sla")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_sla")] - public long? DeliverySLATimestamp { get; set; } - - /// - /// 获取或设置运输服务商。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider")] - public string? ShippingProvider { get; set; } - - /// - /// 获取或设置运输服务商 ID。 - /// - [Newtonsoft.Json.JsonProperty("shipping_provider_id")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] - public string? ShippingProviderId { get; set; } - - /// - /// 获取或设置买家用户 ID。 - /// - [Newtonsoft.Json.JsonProperty("buyer_uid")] - [System.Text.Json.Serialization.JsonPropertyName("buyer_uid")] - public string? BuyerUserId { get; set; } - - /// - /// 获取或设置买家备注。 - /// - [Newtonsoft.Json.JsonProperty("buyer_message")] - [System.Text.Json.Serialization.JsonPropertyName("buyer_message")] - public string? BuyerMessage { get; set; } - - /// - /// 获取或设置买家匿名邮箱。 - /// - [Newtonsoft.Json.JsonProperty("buyer_email")] - [System.Text.Json.Serialization.JsonPropertyName("buyer_email")] - public string? BuyerEmail { get; set; } - - /// - /// 获取或设置卖家备注。 - /// - [Newtonsoft.Json.JsonProperty("seller_note")] - [System.Text.Json.Serialization.JsonPropertyName("seller_note")] - public string? SellerNotes { get; set; } - - /// - /// 获取或设置收货地址信息。 - /// - [Newtonsoft.Json.JsonProperty("recipient_address")] - [System.Text.Json.Serialization.JsonPropertyName("recipient_address")] - public Types.RecipientAddress RecipientAddress { get; set; } = default!; - - /// - /// 获取或设置收件人地址更新状态。 - /// - [Newtonsoft.Json.JsonProperty("receiver_address_updated")] - [System.Text.Json.Serialization.JsonPropertyName("receiver_address_updated")] - public int ReceiverAddressUpdatedStatus { get; set; } - - /// - /// 获取或设置物流单号。 - /// - [Newtonsoft.Json.JsonProperty("tracking_number")] - [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] - public string? TrackingNumber { get; set; } - - /// - /// 获取或设置包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("package_list")] - [System.Text.Json.Serialization.JsonPropertyName("package_list")] - public Types.Package[]? PackageList { get; set; } = default!; - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置付款时间戳。 - /// - [Newtonsoft.Json.JsonProperty("paid_time")] - [System.Text.Json.Serialization.JsonPropertyName("paid_time")] - public long? PaidTimestamp { get; set; } - - /// - /// 获取或设置取消订单者。 - /// - [Newtonsoft.Json.JsonProperty("cancel_user")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_user")] - public string? CancelUser { get; set; } - - /// - /// 获取或设置取消订单原因。 - /// - [Newtonsoft.Json.JsonProperty("cancel_reason")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] - public string? CancelReason { get; set; } - - /// - /// 获取或设置 RTS 时间戳。 - /// - [Newtonsoft.Json.JsonProperty("rts_time")] - [System.Text.Json.Serialization.JsonPropertyName("rts_time")] - public long? ReadyToShipTimestamp { get; set; } - - /// - /// 获取或设置 RTS SLA 时间戳。 - /// - [Newtonsoft.Json.JsonProperty("rts_sla")] - [System.Text.Json.Serialization.JsonPropertyName("rts_sla")] - public long? ReadyToShipSLATimestamp { get; set; } - - /// - /// 获取或设置 TTS SLA 时间戳。 - /// - [Newtonsoft.Json.JsonProperty("tts_sla")] - [System.Text.Json.Serialization.JsonPropertyName("tts_sla")] - public long? TikTokShopSLATimestamp { get; set; } - - /// - /// 获取或设置取消订单 SLA 时间戳。 - /// - [Newtonsoft.Json.JsonProperty("cancel_order_sla")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_order_sla")] - public long? CancelOrderSLATimestamp { get; set; } - - /// - /// 获取或设置合单或拆单标记。 - /// - [Newtonsoft.Json.JsonProperty("split_or_combine_tag")] - [System.Text.Json.Serialization.JsonPropertyName("split_or_combine_tag")] - public string? SplitOrCombineTag { get; set; } - - /// - /// 获取或设置配送类型。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_type")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")] - public int? FulfillmentType { get; set; } - - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - public string? WarehouseId { get; set; } - - /// - /// 获取或设置是否货到付款。 - /// - [Newtonsoft.Json.JsonProperty("is_cod")] - [System.Text.Json.Serialization.JsonPropertyName("is_cod")] - public bool IsCashOnDelivery { get; set; } - - /// - /// 获取或设置行政区划列表。 - /// - [Newtonsoft.Json.JsonProperty("district_info_list")] - [System.Text.Json.Serialization.JsonPropertyName("district_info_list")] - public Types.DistrictInfo[]? DistrictInfoList { get; set; } - - /// - /// 获取或设置订单行列表。 - /// - [Newtonsoft.Json.JsonProperty("order_line_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_line_list")] - public Types.OrderLine[]? OrderLineList { get; set; } - - /// - /// 获取或设置个人税务登记号。 - /// - [Newtonsoft.Json.JsonProperty("cpf")] - [System.Text.Json.Serialization.JsonPropertyName("cpf")] - public string? CPFNumber { get; set; } - - /// - /// 获取或设置需要上传发票状态。 - /// - [Newtonsoft.Json.JsonProperty("need_upload_invoice")] - [System.Text.Json.Serialization.JsonPropertyName("need_upload_invoice")] - public int? NeedUploadInvoiceStatus { get; set; } - - /// - /// 获取或设置是否是示例订单。 - /// - [Newtonsoft.Json.JsonProperty("is_sample_order")] - [System.Text.Json.Serialization.JsonPropertyName("is_sample_order")] - public bool? IsSampleOrder { get; set; } - } - } - - /// - /// 获取或设置订单列表。 - /// - [Newtonsoft.Json.JsonProperty("order_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_list")] - public Types.Order[] OrderList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs deleted file mode 100644 index 8360f677..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /orders/search 接口的请求。 - /// - public class OrderSearchOrdersRequest : TikTokShopRequest - { - /// - /// 获取或设置创建时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_from")] - public long? CreateTimestampFrom { get; set; } - - /// - /// 获取或设置创建时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_to")] - public long? CreateTimestampTo { get; set; } - - /// - /// 获取或设置更新时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_from")] - public long? UpdateTimestampFrom { get; set; } - - /// - /// 获取或设置更新时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_to")] - public long? UpdateTimestampTo { get; set; } - - /// - /// 获取或设置订单状态。 - /// - [Newtonsoft.Json.JsonProperty("order_status")] - [System.Text.Json.Serialization.JsonPropertyName("order_status")] - public int? OrderStatus { get; set; } - - /// - /// 获取或设置配送方式类型。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_type")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_type")] - public int? DeliveryOptionType { get; set; } - - /// - /// 获取或设置买家用户 ID。 - /// - [Newtonsoft.Json.JsonProperty("buyer_uid")] - [System.Text.Json.Serialization.JsonPropertyName("buyer_uid")] - public string? BuyerUserId { get; set; } - - /// - /// 获取或设置排序字段。 - /// - [Newtonsoft.Json.JsonProperty("sort_by")] - [System.Text.Json.Serialization.JsonPropertyName("sort_by")] - public string? SortBy { get; set; } - - /// - /// 获取或设置排序方式。 - /// - [Newtonsoft.Json.JsonProperty("sort_type")] - [System.Text.Json.Serialization.JsonPropertyName("sort_type")] - public int? SortType { get; set; } - - /// - /// 获取或设置分页游标。 - /// - [Newtonsoft.Json.JsonProperty("cursor")] - [System.Text.Json.Serialization.JsonPropertyName("cursor")] - public string? PageCursor { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs deleted file mode 100644 index e7797f76..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /orders/search 接口的响应。 - /// - public class OrderSearchOrdersResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Order - { - /// - /// 获取或设置订单 ID。 - /// - [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!; - - /// - /// 获取或设置订单状态。 - /// - [Newtonsoft.Json.JsonProperty("order_status")] - [System.Text.Json.Serialization.JsonPropertyName("order_status")] - public int OrderStatus { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - - /// - /// 获取或设置订单列表。 - /// - [Newtonsoft.Json.JsonProperty("order_list")] - [System.Text.Json.Serialization.JsonPropertyName("order_list")] - public Types.Order[] OrderList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - - /// - /// 获取或设置下一页分页游标。 - /// - [Newtonsoft.Json.JsonProperty("next_cursor")] - [System.Text.Json.Serialization.JsonPropertyName("next_cursor")] - public string? NextCursor { get; set; } - - /// - /// 获取或设置是否还有更多。 - /// - [Newtonsoft.Json.JsonProperty("more")] - [System.Text.Json.Serialization.JsonPropertyName("more")] - public bool HasMore { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderRequest.cs deleted file mode 100644 index 4bb28be9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /orders/rts 接口的请求。 - /// - public class OrderShipOrderRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("order_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_id")] - public string OrderId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderResponse.cs deleted file mode 100644 index a873027f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderShipOrderResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /orders/rts 接口的响应。 - /// - public class OrderShipOrderResponse : TikTokShopResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandRequest.cs deleted file mode 100644 index 6a0075c0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/brand 接口的请求。 - /// - public class ProductCreateBrandRequest : TikTokShopRequest - { - /// - /// 获取或设置品牌名称。 - /// - [Newtonsoft.Json.JsonProperty("brand_name")] - [System.Text.Json.Serialization.JsonPropertyName("brand_name")] - public string BrandName { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandResponse.cs deleted file mode 100644 index f9327e4e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductCreateBrandResponse.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/brand 接口的响应。 - /// - public class ProductCreateBrandResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置品牌 ID。 - /// - [Newtonsoft.Json.JsonProperty("brand_id")] - [System.Text.Json.Serialization.JsonPropertyName("brand_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string BrandId { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListRequest.cs deleted file mode 100644 index b4c9c369..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/attributes 接口的请求。 - /// - public class ProductGetAttributeListRequest : TikTokShopRequest - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string CategoryId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListResponse.cs deleted file mode 100644 index 50ce3b9f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetAttributeListResponse.cs +++ /dev/null @@ -1,108 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/attributes 接口的响应。 - /// - public class ProductGetAttributeListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Attribute - { - public static class Types - { - public class IntputSettings - { - /// - /// 获取或设置是否必填。 - /// - [Newtonsoft.Json.JsonProperty("is_mandatory")] - [System.Text.Json.Serialization.JsonPropertyName("is_mandatory")] - public bool IsMandatory { get; set; } - - /// - /// 获取或设置是否允许多选。 - /// - [Newtonsoft.Json.JsonProperty("is_multiple_selected")] - [System.Text.Json.Serialization.JsonPropertyName("is_multiple_selected")] - public bool IsMultipleSelected { get; set; } - - /// - /// 获取或设置是否允许自定义。 - /// - [Newtonsoft.Json.JsonProperty("is_customized")] - [System.Text.Json.Serialization.JsonPropertyName("is_customized")] - public bool IsCustomized { get; set; } - } - - public class AttributeValue - { - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - - /// - /// 获取或设置属性值名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string ValueName { get; set; } = default!; - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string AttributeName { get; set; } = default!; - - /// - /// 获取或设置属性类型。 - /// - [Newtonsoft.Json.JsonProperty("attribute_type")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_type")] - public int AttributeType { get; set; } - - /// - /// 获取或设置输入配置信息。 - /// - [Newtonsoft.Json.JsonProperty("input_type")] - [System.Text.Json.Serialization.JsonPropertyName("input_type")] - public Types.IntputSettings IntputSettings { get; set; } = default!; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("values")] - [System.Text.Json.Serialization.JsonPropertyName("values")] - public Types.AttributeValue[] ValueList { get; set; } = default!; - } - } - - /// - /// 获取或设置属性列表。 - /// - [Newtonsoft.Json.JsonProperty("attributes")] - [System.Text.Json.Serialization.JsonPropertyName("attributes")] - public Types.Attribute[] AttributeList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListRequest.cs deleted file mode 100644 index ceec6de9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListRequest.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/brands 接口的请求。 - /// - public class ProductGetBrandListRequest : TikTokShopRequest - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? CategoryId { get; set; } - - /// - /// 获取或设置是否仅返回已授权品牌。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public bool? IsOnlyAuthorized { get; set; } - - /// - /// 获取或设置品牌搜索建议。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? BrandSuggest { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int PageNumber { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListResponse.cs deleted file mode 100644 index 725a78f3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetBrandListResponse.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/brands 接口的响应。 - /// - public class ProductGetBrandListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Brand - { - /// - /// 获取或设置品牌 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string BrandId { get; set; } = default!; - - /// - /// 获取或设置品牌名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string BrandName { get; set; } = default!; - - /// - /// 获取或设置授权状态。 - /// - [Newtonsoft.Json.JsonProperty("authorized_status")] - [System.Text.Json.Serialization.JsonPropertyName("authorized_status")] - public int AuthorizedStatus { get; set; } - } - } - - /// - /// 获取或设置品牌列表。 - /// - [Newtonsoft.Json.JsonProperty("brand_list")] - [System.Text.Json.Serialization.JsonPropertyName("brand_list")] - public Types.Brand[] BrandList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total_num")] - [System.Text.Json.Serialization.JsonPropertyName("total_num")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListRequest.cs deleted file mode 100644 index 48cf2b92..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/categories 接口的请求。 - /// - public class ProductGetCategoryListRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202303"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListResponse.cs deleted file mode 100644 index 734f9551..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryListResponse.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/categories 接口的响应。 - /// - public class ProductGetCategoryListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Category - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CategoryId { get; set; } = default!; - - /// - /// 获取或设置上级分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("parent_id")] - [System.Text.Json.Serialization.JsonPropertyName("parent_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ParentCategoryId { get; set; } = default!; - - /// - /// 获取或设置本地显示名称。 - /// - [Newtonsoft.Json.JsonProperty("local_display_name")] - [System.Text.Json.Serialization.JsonPropertyName("local_display_name")] - public string LocalDisplayName { get; set; } = default!; - - /// - /// 获取或设置是否是子分类。 - /// - [Newtonsoft.Json.JsonProperty("is_leaf")] - [System.Text.Json.Serialization.JsonPropertyName("is_leaf")] - public bool IsLeaf { get; set; } - - /// - /// 获取或设置状态列表。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int[] StatusList { get; set; } = default!; - } - } - - /// - /// 获取或设置分类列表。 - /// - [Newtonsoft.Json.JsonProperty("category_list")] - [System.Text.Json.Serialization.JsonPropertyName("category_list")] - public Types.Category[] CategoryList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs deleted file mode 100644 index 9f0ebc8e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/categories/rules 接口的请求。 - /// - public class ProductGetCategoryRulesRequest : TikTokShopRequest - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string CategoryId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs deleted file mode 100644 index e7f73318..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs +++ /dev/null @@ -1,107 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/categories/rules 接口的响应。 - /// - public class ProductGetCategoryRulesResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class CategoryRule - { - public static class Types - { - public class ProductCertification - { - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CertificationId { get; set; } = default!; - - /// - /// 获取或设置商品认证名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string CertificationName { get; set; } = default!; - - /// - /// 获取或设置示例。 - /// - [Newtonsoft.Json.JsonProperty("sample")] - [System.Text.Json.Serialization.JsonPropertyName("sample")] - public string? Sample { get; set; } - - /// - /// 获取或设置是否必填。 - /// - [Newtonsoft.Json.JsonProperty("is_mandatory")] - [System.Text.Json.Serialization.JsonPropertyName("is_mandatory")] - public bool IsMandatory { get; set; } - } - - public class ExemptionOfIdentifierCode - { - /// - /// 获取或设置是否支持 GTIN 豁免。 - /// - [Newtonsoft.Json.JsonProperty("support_identifier_code_exemption")] - [System.Text.Json.Serialization.JsonPropertyName("support_identifier_code_exemption")] - public bool IsSupportIdentifierCodeExemption { get; set; } - } - } - - /// - /// 获取或设置是否支持输入尺码表。 - /// - [Newtonsoft.Json.JsonProperty("support_size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("support_size_chart")] - public bool IsSupportSizeChart { get; set; } - - /// - /// 获取或设置是否支持货到付款。 - /// - [Newtonsoft.Json.JsonProperty("support_cod")] - [System.Text.Json.Serialization.JsonPropertyName("support_cod")] - public bool IsSupportCashOnDelivery { get; set; } - - /// - /// 获取或设置是否必填尺码表。 - /// - [Newtonsoft.Json.JsonProperty("is_size_chart_mandatory")] - [System.Text.Json.Serialization.JsonPropertyName("is_size_chart_mandatory")] - public bool IsSizeChartMandatory { get; set; } - - /// - /// 获取或设置产品标识码豁免信息。 - /// - [Newtonsoft.Json.JsonProperty("exemption_of_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_of_identifier_code")] - public Types.ExemptionOfIdentifierCode? ExemptionOfIdentifierCode { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public Types.ProductCertification[] ProductCertificationList { get; set; } = default!; - } - } - - /// - /// 获取或设置分类规则列表。 - /// - [Newtonsoft.Json.JsonProperty("category_rules")] - [System.Text.Json.Serialization.JsonPropertyName("category_rules")] - public Types.CategoryRule[] CategoryRuleList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryRequest.cs deleted file mode 100644 index 196a58d8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/category_recommend 接口的请求。 - /// - public class ProductRecommendCategoryRequest : TikTokShopRequest - { - public static class Types - { - public class Image - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string ImageId { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = string.Empty; - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryResponse.cs deleted file mode 100644 index 43b376a1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoryResponse.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /product/category_recommend 接口的响应。 - /// - public class ProductRecommendCategoryResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Category - { - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CategoryId { get; set; } = default!; - - /// - /// 获取或设置分类名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string CategoryName { get; set; } = default!; - - /// - /// 获取或设置分类层级。 - /// - [Newtonsoft.Json.JsonProperty("level")] - [System.Text.Json.Serialization.JsonPropertyName("level")] - public int Level { get; set; } - - /// - /// 获取或设置是否是子分类。 - /// - [Newtonsoft.Json.JsonProperty("is_leaf")] - [System.Text.Json.Serialization.JsonPropertyName("is_leaf")] - public bool IsLeaf { get; set; } - } - } - - /// - /// 获取或设置推荐分类列表。 - /// - [Newtonsoft.Json.JsonProperty("categories")] - [System.Text.Json.Serialization.JsonPropertyName("categories")] - public Types.Category[] CategoryList { get; set; } = default!; - - /// - /// 获取或设置推荐子分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("leaf_category_id")] - [System.Text.Json.Serialization.JsonPropertyName("leaf_category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string LeafCategoryId { get; set; } = default!; - - /// - /// 获取或设置优先级。 - /// - [Newtonsoft.Json.JsonProperty("priority")] - [System.Text.Json.Serialization.JsonPropertyName("priority")] - public int Priority { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs deleted file mode 100644 index 122bfd3b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/activate 接口的请求。 - /// - public class ProductActivateProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList ProductIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs deleted file mode 100644 index f360a753..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/activate 接口的响应。 - /// - public class ProductActivateProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedReason - { - public static class Types - { - public class Error - { - /// - /// 获取或设置错误码。 - /// - [Newtonsoft.Json.JsonProperty("status_code")] - [System.Text.Json.Serialization.JsonPropertyName("status_code")] - public int ErrorCode { get; set; } - - /// - /// 获取或设置错误信息。 - /// - [Newtonsoft.Json.JsonProperty("reason")] - [System.Text.Json.Serialization.JsonPropertyName("reason")] - public string? ErrorMessage { get; set; } - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置错误列表。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public Types.Error[] ErrorList { get; set; } = default!; - } - } - - /// - /// 获取或设置启用失败的商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("failed_product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_product_ids")] - public string[]? FailedProductIdList { get; set; } - - /// - /// 获取或设置失败原因列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_reasons")] - [System.Text.Json.Serialization.JsonPropertyName("failed_reasons")] - public Types.FailedReason[]? FailedReasonList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs deleted file mode 100644 index 63139674..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs +++ /dev/null @@ -1,423 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products 接口的请求。 - /// - public class ProductCreateProductRequest : TikTokShopRequest - { - public static class Types - { - public class Image - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string ImageId { get; set; } = string.Empty; - } - - public class Video - { - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("video_id")] - [System.Text.Json.Serialization.JsonPropertyName("video_id")] - public string FileId { get; set; } = string.Empty; - } - - public class SizeChart - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("img_id")] - [System.Text.Json.Serialization.JsonPropertyName("img_id")] - public string ImageId { get; set; } = string.Empty; - } - - public class SKU - { - public static class Types - { - public class SalesAttribute - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("attribute_name")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_name")] - public string? AttributeName { get; set; } - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string? ValueId { get; set; } - - /// - /// 获取或设置自定义属性值。 - /// - [Newtonsoft.Json.JsonProperty("custom_value")] - [System.Text.Json.Serialization.JsonPropertyName("custom_value")] - public string? CustomValue { get; set; } - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class StockInfo - { - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - public string WarehouseId { get; set; } = string.Empty; - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - - public class IdentifierCodeInfo - { - /// - /// 获取或设置标识码类型。 - /// - [Newtonsoft.Json.JsonProperty("identifier_code_type")] - [System.Text.Json.Serialization.JsonPropertyName("identifier_code_type")] - public int IdentifierCodeType { get; set; } - - /// - /// 获取或设置标识码。 - /// - [Newtonsoft.Json.JsonProperty("identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("identifier_code")] - public string IdentifierCode { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置外部 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_sku_id")] - public string? OuterSKUId { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public IList? SalesAttributeList { get; set; } - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public IList? StockInfoList { get; set; } - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductCertification - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.Image - { - } - - public class File - { - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string FileId { get; set; } = string.Empty; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string? FileName { get; set; } - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public string? FileType { get; set; } - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CertificationId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public IList? FileList { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue - { - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - public string ValueId { get; set; } = string.Empty; - - /// - /// 获取或设置属性值名称。 - /// - [Newtonsoft.Json.JsonProperty("value_name")] - [System.Text.Json.Serialization.JsonPropertyName("value_name")] - public string ValueName { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("attribute_values")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_values")] - public IList ValueList { get; set; } = new List(); - } - - public class ExemptionOfIdentifierCode - { - /// - /// 获取或设置 GTIN 豁免原因类型。 - /// - [Newtonsoft.Json.JsonProperty("exemption_reason")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_reason")] - public int? ExemptionReasonType { get; set; } - } - } - - /// - /// 获取或设置外部商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_product_id")] - public string? OuterProductId { get; set; } = string.Empty; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = string.Empty; - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("category_id")] - [System.Text.Json.Serialization.JsonPropertyName("category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CategoryId { get; set; } = string.Empty; - - /// - /// 获取或设置品牌 ID。 - /// - [Newtonsoft.Json.JsonProperty("brand_id")] - [System.Text.Json.Serialization.JsonPropertyName("brand_id")] - public string? BrandId { get; set; } - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置视频信息。 - /// - [Newtonsoft.Json.JsonProperty("product_video")] - [System.Text.Json.Serialization.JsonPropertyName("product_video")] - public Types.Video? Video { get; set; } - - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public int? WarrantyPeriodId { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int? PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int? PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int? PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int? PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string? PackageDimensionUnit { get; set; } - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置是否开启货到付款。 - /// - [Newtonsoft.Json.JsonProperty("is_cod_open")] - [System.Text.Json.Serialization.JsonPropertyName("is_cod_open")] - public bool IsCashOnDeliveryOpen { get; set; } - - /// - /// 获取或设置配送服务 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("delivery_service_ids")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_service_ids")] - public IList? DeliveryServiceIdList { get; set; } - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList? SKUList { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public IList? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public IList? ProductAttributeList { get; set; } - - /// - /// 获取或设置产品标识码豁免信息。 - /// - [Newtonsoft.Json.JsonProperty("exemption_of_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_of_identifier_code")] - public Types.ExemptionOfIdentifierCode? ExemptionOfIdentifierCode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs deleted file mode 100644 index b8e37403..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products 接口的响应。 - /// - public class ProductCreateProductResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class SKU - { - public static class Types - { - public class SalesAttribute - { - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - } - } - - /// - /// 获取或设置外部 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_sku_id")] - public string? OuterSKUId { get; set; } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[] SKUList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs deleted file mode 100644 index bafd6f4f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/inactivated_products 接口的请求。 - /// - public class ProductDeactivateProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList ProductIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs deleted file mode 100644 index 4d447b8e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/inactivated_products 接口的响应。 - /// - public class ProductDeactivateProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置关闭失败的商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("failed_product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_product_ids")] - public string[]? FailedProductIdList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs deleted file mode 100644 index 4afd4434..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [DELETE] /products 接口的请求。 - /// - public class ProductDeleteProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList ProductIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs deleted file mode 100644 index 6cf646cb..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [DELETE] /products 接口的响应。 - /// - public class ProductDeleteProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置删除失败的商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("failed_product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_product_ids")] - public string[]? FailedProductIdList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs deleted file mode 100644 index 5d95090d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/details 接口的请求。 - /// - public class ProductGetProductDetailRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202306"; - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string ProductId { get; set; } = string.Empty; - - /// - /// 获取或设置是否返回审核中的版本。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public bool? RequireAuditVersion { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs deleted file mode 100644 index bf2daae7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs +++ /dev/null @@ -1,660 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /products/details 接口的响应。 - /// - public class ProductGetProductDetailResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Category : ProductGetCategoryListResponse.Types.Data.Types.Category - { - } - - public class Brand - { - /// - /// 获取或设置品牌 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string BrandId { get; set; } = default!; - - /// - /// 获取或设置品牌名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string BrandName { get; set; } = default!; - - /// - /// 获取或设置品牌状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int BrandStatus { get; set; } - } - - public class Image - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string ImageId { get; set; } = default!; - - /// - /// 获取或设置图片宽度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("width")] - [System.Text.Json.Serialization.JsonPropertyName("width")] - public int Width { get; set; } - - /// - /// 获取或设置图片高度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("height")] - [System.Text.Json.Serialization.JsonPropertyName("height")] - public int Height { get; set; } - - /// - /// 获取或设置图片 URL 列表。 - /// - [Newtonsoft.Json.JsonProperty("url_list")] - [System.Text.Json.Serialization.JsonPropertyName("url_list")] - public string[] ImageUrlList { get; set; } = default!; - - /// - /// 获取或设置缩略图 URL 列表。 - /// - [Newtonsoft.Json.JsonProperty("thumb_url_list")] - [System.Text.Json.Serialization.JsonPropertyName("thumb_url_list")] - public string[]? ThumbnailUrlList { get; set; } - } - - public class Video - { - public static class Types - { - public class VideoInfo - { - /// - /// 获取或设置主 URL。 - /// - [Newtonsoft.Json.JsonProperty("main_url")] - [System.Text.Json.Serialization.JsonPropertyName("main_url")] - public string MainUrl { get; set; } = default!; - - /// - /// 获取或设置备用 URL。 - /// - [Newtonsoft.Json.JsonProperty("backup_url")] - [System.Text.Json.Serialization.JsonPropertyName("backup_url")] - public string BackupUrl { get; set; } = default!; - - /// - /// 获取或设置 URL 过期时间戳。 - /// - [Newtonsoft.Json.JsonProperty("url_expire")] - [System.Text.Json.Serialization.JsonPropertyName("url_expire")] - public long UrlExpireTimestamp { get; set; } - - /// - /// 获取或设置视频宽度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("width")] - [System.Text.Json.Serialization.JsonPropertyName("width")] - public int Width { get; set; } - - /// - /// 获取或设置视频高度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("height")] - [System.Text.Json.Serialization.JsonPropertyName("height")] - public int Height { get; set; } - - /// - /// 获取或设置文件大小(单位:字节)。 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int FileSize { get; set; } - - /// - /// 获取或设置文件哈希值。 - /// - [Newtonsoft.Json.JsonProperty("file_hash")] - [System.Text.Json.Serialization.JsonPropertyName("file_hash")] - public string FileHash { get; set; } = default!; - - /// - /// 获取或设置格式。 - /// - [Newtonsoft.Json.JsonProperty("format")] - [System.Text.Json.Serialization.JsonPropertyName("format")] - public string Format { get; set; } = default!; - - /// - /// 获取或设置比特率。 - /// - [Newtonsoft.Json.JsonProperty("bitrate")] - [System.Text.Json.Serialization.JsonPropertyName("bitrate")] - public int BitRate { get; set; } - } - } - - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string FileId { get; set; } = default!; - - /// - /// 获取或设置视频时长(单位:秒)。 - /// - [Newtonsoft.Json.JsonProperty("duration")] - [System.Text.Json.Serialization.JsonPropertyName("duration")] - public int Duration { get; set; } - - /// - /// 获取或设置视频封面 URL。 - /// - [Newtonsoft.Json.JsonProperty("post_url")] - [System.Text.Json.Serialization.JsonPropertyName("post_url")] - public string PosterUrl { get; set; } = default!; - - /// - /// 获取或设置视频媒体类型。 - /// - [Newtonsoft.Json.JsonProperty("media_type")] - [System.Text.Json.Serialization.JsonPropertyName("media_type")] - public string MediaType { get; set; } = default!; - - /// - /// 获取或设置视频信息列表。 - /// - [Newtonsoft.Json.JsonProperty("video_infos")] - [System.Text.Json.Serialization.JsonPropertyName("video_infos")] - public Types.VideoInfo[]? VideoInfoList { get; set; } - } - - public class WarrantyPeriod - { - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_id")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_id")] - public string Id { get; set; } = default!; - - /// - /// 获取或设置质保期描述。 - /// - [Newtonsoft.Json.JsonProperty("warranty_description")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_description")] - public string Description { get; set; } = default!; - } - - public class SizeChart : Data.Types.Image - { - } - - public class DeliveryService - { - /// - /// 获取或设置配送服务 ID。 - /// - [Newtonsoft.Json.JsonProperty("delivery_service_id")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_service_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string DeliveryServiceId { get; set; } = default!; - - /// - /// 获取或设置配送方式名称。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_name")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_name")] - public string DeliveryOptionName { get; set; } = default!; - - /// - /// 获取或设置配送服务状态。 - /// - [Newtonsoft.Json.JsonProperty("delivery_service_status")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_service_status")] - public bool DeliveryServiceStatus { get; set; } - } - - public class SKU - { - public static class Types - { - public class PriceInfo : ProductSearchProductsResponse.Types.Data.Types.Product.Types.SKU.Types.PriceInfo - { - } - - public class SalesAttribute - { - public static class Types - { - public class Image : Data.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string AttributeName { get; set; } = default!; - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - - /// - /// 获取或设置属性值名称。 - /// - [Newtonsoft.Json.JsonProperty("value_name")] - [System.Text.Json.Serialization.JsonPropertyName("value_name")] - public string ValueName { get; set; } = default!; - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class StockInfo : ProductSearchProductsResponse.Types.Data.Types.Product.Types.SKU.Types.StockInfo - { - } - - public class IdentifierCodeInfo - { - /// - /// 获取或设置标识码类型。 - /// - [Newtonsoft.Json.JsonProperty("identifier_code_type")] - [System.Text.Json.Serialization.JsonPropertyName("identifier_code_type")] - public int IdentifierCodeType { get; set; } - - /// - /// 获取或设置标识码。 - /// - [Newtonsoft.Json.JsonProperty("identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("identifier_code")] - public string IdentifierCode { get; set; } = default!; - } - } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public Types.SalesAttribute[]? SalesAttributeList { get; set; } - - /// - /// 获取或设置价格信息。 - /// - [Newtonsoft.Json.JsonProperty("price")] - [System.Text.Json.Serialization.JsonPropertyName("price")] - public Types.PriceInfo PriceInfo { get; set; } = default!; - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public Types.StockInfo[] StockInfoList { get; set; } = default!; - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductCertification - { - public static class Types - { - public class Image : Data.Types.Image - { - } - - public class File - { - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string FileId { get; set; } = default!; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string FileName { get; set; } = default!; - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public string FileType { get; set; } = default!; - - /// - /// 获取或设置文件 URL 列表。 - /// - [Newtonsoft.Json.JsonProperty("list")] - [System.Text.Json.Serialization.JsonPropertyName("list")] - public string[] FileUrlList { get; set; } = default!; - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string CertificationId { get; set; } = default!; - - /// - /// 获取或设置商品认证名称。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string CertificationName { get; set; } = default!; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public Types.Image[]? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public Types.File[]? FileList { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue - { - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ValueId { get; set; } = default!; - - /// - /// 获取或设置属性值名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string ValueName { get; set; } = default!; - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string AttributeId { get; set; } = default!; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string AttributeName { get; set; } = default!; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("values")] - [System.Text.Json.Serialization.JsonPropertyName("values")] - public Types.ProductAttributeValue[] ValueList { get; set; } = default!; - } - - public class QCReason - { - /// - /// 获取或设置原因。 - /// - [Newtonsoft.Json.JsonProperty("reason")] - [System.Text.Json.Serialization.JsonPropertyName("reason")] - public string? Reason { get; set; } - - /// - /// 获取或设置子项列表。 - /// - [Newtonsoft.Json.JsonProperty("sub_reasons")] - [System.Text.Json.Serialization.JsonPropertyName("sub_reasons")] - public string[]? SubReasonList { get; set; } - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = default!; - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("product_status")] - [System.Text.Json.Serialization.JsonPropertyName("product_status")] - public int ProductStatus { get; set; } - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置分类列表。 - /// - [Newtonsoft.Json.JsonProperty("category_list")] - [System.Text.Json.Serialization.JsonPropertyName("category_list")] - public Types.Category[] CategoryList { get; set; } = default!; - - /// - /// 获取或设置品牌信息。 - /// - [Newtonsoft.Json.JsonProperty("brand")] - [System.Text.Json.Serialization.JsonPropertyName("brand")] - public Types.Brand? Brand { get; set; } - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public Types.Image[] ImageList { get; set; } = default!; - - /// - /// 获取或设置视频信息。 - /// - [Newtonsoft.Json.JsonProperty("video")] - [System.Text.Json.Serialization.JsonPropertyName("video")] - public Types.Video? Video { get; set; } - - /// - /// 获取或设置质保期信息。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public Types.WarrantyPeriod? WarrantyPeriod { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string PackageDimensionUnit { get; set; } = default!; - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置是否开启货到付款。 - /// - [Newtonsoft.Json.JsonProperty("is_cod_open")] - [System.Text.Json.Serialization.JsonPropertyName("is_cod_open")] - public bool IsCashOnDeliveryOpen { get; set; } - - /// - /// 获取或设置配送服务列表。 - /// - [Newtonsoft.Json.JsonProperty("delivery_services")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_services")] - public Types.DeliveryService[]? DeliveryServiceList { get; set; } - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[]? SKUList { get; set; } = default!; - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public Types.ProductCertification[]? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public Types.ProductAttribute[]? ProductAttributeList { get; set; } - - /// - /// 获取或设置 QC 原因列表。 - /// - [Newtonsoft.Json.JsonProperty("qc_reasons")] - [System.Text.Json.Serialization.JsonPropertyName("qc_reasons")] - public Types.QCReason[]? QCReasonList { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksRequest.cs deleted file mode 100644 index 7f0bbc78..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/stock/list 接口的请求。 - /// - public class ProductGetProductStocksRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202305"; - - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList? ProductIdList { get; set; } - - /// - /// 获取或设置 SKU ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("sku_ids")] - [System.Text.Json.Serialization.JsonPropertyName("sku_ids")] - public IList? SKUIdList { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksResponse.cs deleted file mode 100644 index fef6cd06..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductStocksResponse.cs +++ /dev/null @@ -1,179 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/stock/list 接口的响应。 - /// - public class ProductGetProductStocksResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Product - { - public static class Types - { - public class SKU - { - public static class Types - { - public class WarehouseStockInfo - { - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - public string WarehouseId { get; set; } = default!; - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - - /// - /// 获取或设置已订购库存。 - /// - [Newtonsoft.Json.JsonProperty("committed_stock")] - [System.Text.Json.Serialization.JsonPropertyName("committed_stock")] - public int CommittedStock { get; set; } - } - - public class TotalAvailableStockDistribution - { - public static class Types - { - public class CampaignStockInfo - { - /// - /// 获取或设置活动名称。 - /// - [Newtonsoft.Json.JsonProperty("campaign_name")] - [System.Text.Json.Serialization.JsonPropertyName("campaign_name")] - public string CampaignName { get; set; } = default!; - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - - public class CreatorStockInfo - { - /// - /// 获取或设置创作者名称。 - /// - [Newtonsoft.Json.JsonProperty("creator_name")] - [System.Text.Json.Serialization.JsonPropertyName("creator_name")] - public string CreatorName { get; set; } = default!; - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - } - - /// - /// 获取或设置活动库存列表。 - /// - [Newtonsoft.Json.JsonProperty("campaign_stock")] - [System.Text.Json.Serialization.JsonPropertyName("campaign_stock")] - public Types.CampaignStockInfo[]? CampaignStockList { get; set; } - - /// - /// 获取或设置创作者库存列表。 - /// - [Newtonsoft.Json.JsonProperty("creator_stock")] - [System.Text.Json.Serialization.JsonPropertyName("creator_stock")] - public Types.CreatorStockInfo[]? CreatorStockList { get; set; } - - /// - /// 获取或设置店内库存。 - /// - [Newtonsoft.Json.JsonProperty("in_shop_stock")] - [System.Text.Json.Serialization.JsonPropertyName("in_shop_stock")] - public int? InShopStock { get; set; } - } - } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置总可用库存。 - /// - [Newtonsoft.Json.JsonProperty("total_available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("total_available_stock")] - public int TotalAvailableStock { get; set; } - - /// - /// 获取或设置总已订购库存。 - /// - [Newtonsoft.Json.JsonProperty("total_committed_stock")] - [System.Text.Json.Serialization.JsonPropertyName("total_committed_stock")] - public int TotalCommittedStock { get; set; } - - /// - /// 获取或设置各仓库库存列表。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_stock_infos")] - public Types.WarehouseStockInfo[] WarehouseStockList { get; set; } = default!; - - /// - /// 获取或设置总可用库存分布信息。 - /// - [Newtonsoft.Json.JsonProperty("total_available_stock_distribution")] - [System.Text.Json.Serialization.JsonPropertyName("total_available_stock_distribution")] - public Types.TotalAvailableStockDistribution TotalAvailableStockDistribution { get; set; } = default!; - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[] SKU { get; set; } = default!; - } - } - - /// - /// 获取或设置商品列表。 - /// - [Newtonsoft.Json.JsonProperty("product_stocks")] - [System.Text.Json.Serialization.JsonPropertyName("product_stocks")] - public Types.Product[] ProductList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckRequest.cs deleted file mode 100644 index 61daa603..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/pre_check 接口的请求。 - /// - public class ProductPrecheckRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202306"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckResponse.cs deleted file mode 100644 index 4ba8569e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductPrecheckResponse.cs +++ /dev/null @@ -1,99 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/pre_check 接口的响应。 - /// - public class ProductPrecheckResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class ShopInfo - { - public static class Types - { - public class GNEInfo - { - /// - /// 获取或设置产品数量限制 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("product_quantity_limit")] - [System.Text.Json.Serialization.JsonPropertyName("product_quantity_limit")] - public string ProductQuantityLimitString { get; set; } = default!; - } - - public class LogisticsInfo - { - /// - /// 获取或设置发货仓库 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("delivery_warehouse")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_warehouse")] - public string DeliveryWarehouseLimitString { get; set; } = default!; - - /// - /// 获取或设置退货仓库 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("return_warehouse")] - [System.Text.Json.Serialization.JsonPropertyName("return_warehouse")] - public string ReturnWarehouseLimitString { get; set; } = default!; - - /// - /// 获取或设置货运模板 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("shipping_template")] - [System.Text.Json.Serialization.JsonPropertyName("shipping_template")] - public string ShippingTemplateJson { get; set; } = default!; - - /// - /// 获取或设置物流服务 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("logistics_service")] - [System.Text.Json.Serialization.JsonPropertyName("logistics_service")] - public string LogisticsServiceJson { get; set; } = default!; - } - } - - /// - /// 获取或设置店铺状态 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("shop_status")] - [System.Text.Json.Serialization.JsonPropertyName("shop_status")] - public string ShopInfoJson { get; set; } = default!; - - /// - /// 获取或设置税费信息 JSON 字符串。 - /// - [Newtonsoft.Json.JsonProperty("tax_info")] - [System.Text.Json.Serialization.JsonPropertyName("tax_info")] - public string TaxInfoJson { get; set; } = default!; - - /// - /// 获取或设置 GNE 信息。 - /// - [Newtonsoft.Json.JsonProperty("gne_info")] - [System.Text.Json.Serialization.JsonPropertyName("gne_info")] - public Types.GNEInfo GNEInfo { get; set; } = default!; - - /// - /// 获取或设置物流信息。 - /// - [Newtonsoft.Json.JsonProperty("logistics_info")] - [System.Text.Json.Serialization.JsonPropertyName("logistics_info")] - public Types.LogisticsInfo LogisticsInfo { get; set; } = default!; - } - } - - /// - /// 获取或设置店铺信息。 - /// - [Newtonsoft.Json.JsonProperty("shop_info")] - [System.Text.Json.Serialization.JsonPropertyName("shop_info")] - public Types.ShopInfo ShopInfo { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs deleted file mode 100644 index e4bfd6ef..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/recover 接口的请求。 - /// - public class ProductRecoverProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList ProductIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs deleted file mode 100644 index 3427d84c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/recover 接口的响应。 - /// - public class ProductRecoverProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置恢复失败的商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("failed_product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_product_ids")] - public string[]? FailedProductIdList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftRequest.cs deleted file mode 100644 index 8cbd957b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftRequest.cs +++ /dev/null @@ -1,347 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/save_draft 接口的请求。 - /// - public class ProductSaveProductDraftRequest : TikTokShopRequest - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.Image - { - } - - public class Video : ProductCreateProductRequest.Types.Video - { - } - - public class SizeChart : ProductCreateProductRequest.Types.SizeChart - { - } - - public class ProductCertification - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.ProductCertification.Types.Image - { - } - - public class File : ProductCreateProductRequest.Types.ProductCertification.Types.File - { - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CertificationId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public IList? FileList { get; set; } - } - - public class SKU - { - public static class Types - { - public class SalesAttribute - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("attribute_name")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_name")] - public string? AttributeName { get; set; } - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string? ValueId { get; set; } - - /// - /// 获取或设置自定义属性值。 - /// - [Newtonsoft.Json.JsonProperty("custom_value")] - [System.Text.Json.Serialization.JsonPropertyName("custom_value")] - public string? CustomValue { get; set; } - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class StockInfo : ProductCreateProductRequest.Types.SKU.Types.StockInfo - { - } - - public class IdentifierCodeInfo : ProductCreateProductRequest.Types.SKU.Types.IdentifierCodeInfo - { - } - } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string? SKUId { get; set; } - - /// - /// 获取或设置外部 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_sku_id")] - public string? OuterSKUId { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public IList? SalesAttributeList { get; set; } - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public IList? StockInfoList { get; set; } - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue : ProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("attribute_values")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_values")] - public IList ValueList { get; set; } = new List(); - } - - public class ExemptionOfIdentifierCode : ProductCreateProductRequest.Types.ExemptionOfIdentifierCode - { - } - } - - /// - /// 获取或设置外部商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_product_id")] - public string? OuterProductId { get; set; } = string.Empty; - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public string? ProductId { get; set; } - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = string.Empty; - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("category_id")] - [System.Text.Json.Serialization.JsonPropertyName("category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CategoryId { get; set; } = string.Empty; - - /// - /// 获取或设置品牌 ID。 - /// - [Newtonsoft.Json.JsonProperty("brand_id")] - [System.Text.Json.Serialization.JsonPropertyName("brand_id")] - public string? BrandId { get; set; } - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置视频信息。 - /// - [Newtonsoft.Json.JsonProperty("product_video")] - [System.Text.Json.Serialization.JsonPropertyName("product_video")] - public Types.Video? Video { get; set; } - - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public int? WarrantyPeriodId { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int? PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int? PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int? PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int? PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string? PackageDimensionUnit { get; set; } - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置是否开启货到付款。 - /// - [Newtonsoft.Json.JsonProperty("is_cod_open")] - [System.Text.Json.Serialization.JsonPropertyName("is_cod_open")] - public bool IsCashOnDeliveryOpen { get; set; } - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList? SKUList { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public IList? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public IList? ProductAttributeList { get; set; } - - /// - /// 获取或设置产品标识码豁免信息。 - /// - [Newtonsoft.Json.JsonProperty("exemption_of_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_of_identifier_code")] - public Types.ExemptionOfIdentifierCode? ExemptionOfIdentifierCode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftResponse.cs deleted file mode 100644 index 9a2d8f9b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSaveProductDraftResponse.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/save_draft 接口的响应。 - /// - public class ProductSaveProductDraftResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class SKU - { - public static class Types - { - public class SalesAttribute : ProductCreateProductResponse.Types.Data.Types.SKU.Types.SalesAttribute - { - } - } - - /// - /// 获取或设置外部 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_sku_id")] - public string? OuterSKUId { get; set; } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[] SKUList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs deleted file mode 100644 index 9c6e967b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/search 接口的请求。 - /// - public class ProductSearchProductsRequest : TikTokShopRequest - { - /// - /// 获取或设置创建时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_from")] - public long? CreateTimestampFrom { get; set; } - - /// - /// 获取或设置创建时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("create_time_to")] - public long? CreateTimestampTo { get; set; } - - /// - /// 获取或设置更新时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_from")] - public long? UpdateTimestampFrom { get; set; } - - /// - /// 获取或设置更新时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_to")] - public long? UpdateTimestampTo { get; set; } - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("search_status")] - [System.Text.Json.Serialization.JsonPropertyName("search_status")] - public int? ProductStatus { get; set; } - - /// - /// 获取或设置卖家 SKU 信息列表。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku_list")] - public IList? SellerSKUList { get; set; } - - /// - /// 获取或设置分页页数。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("page_number")] - [System.Text.Json.Serialization.JsonPropertyName("page_number")] - public int PageNumber { get; set; } = 1; - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs deleted file mode 100644 index e965a277..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs +++ /dev/null @@ -1,173 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/search 接口的响应。 - /// - public class ProductSearchProductsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Product - { - public static class Types - { - public class SKU - { - public static class Types - { - public class PriceInfo - { - /// - /// 获取或设置币种。 - /// - [Newtonsoft.Json.JsonProperty("currency")] - [System.Text.Json.Serialization.JsonPropertyName("currency")] - public string Currency { get; set; } = default!; - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置含税价。 - /// - [Newtonsoft.Json.JsonProperty("price_include_vat")] - [System.Text.Json.Serialization.JsonPropertyName("price_include_vat")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal PriceIncludeVAT { get; set; } - } - - public class StockInfo - { - /// - /// 获取或设置仓库 ID。 - /// - [Newtonsoft.Json.JsonProperty("warehouse_id")] - [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string WarehouseId { get; set; } = default!; - - /// - /// 获取或设置可用库存。 - /// - [Newtonsoft.Json.JsonProperty("available_stock")] - [System.Text.Json.Serialization.JsonPropertyName("available_stock")] - public int AvailableStock { get; set; } - } - } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置价格信息。 - /// - [Newtonsoft.Json.JsonProperty("price")] - [System.Text.Json.Serialization.JsonPropertyName("price")] - public Types.PriceInfo PriceInfo { get; set; } = default!; - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public Types.StockInfo[] StockInfoList { get; set; } = default!; - } - } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ProductId { get; set; } = default!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string ProductName { get; set; } = default!; - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int ProductStatus { get; set; } - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[] SKUList { get; set; } = default!; - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - - /// - /// 获取或设置销售地区列表。 - /// - [Newtonsoft.Json.JsonProperty("sale_regions")] - [System.Text.Json.Serialization.JsonPropertyName("sale_regions")] - public string[]? SalesRegionList { get; set; } - - /// - /// 获取或设置全球同步失败原因列表。 - /// - [Newtonsoft.Json.JsonProperty("global_sync_failed_reasons")] - [System.Text.Json.Serialization.JsonPropertyName("global_sync_failed_reasons")] - public string[]? GlobalSyncFailedReasonList { get; set; } - } - } - - /// - /// 获取或设置商品列表。 - /// - [Newtonsoft.Json.JsonProperty("products")] - [System.Text.Json.Serialization.JsonPropertyName("products")] - public Types.Product[] ProductList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs deleted file mode 100644 index eda38642..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /products/prices 接口的请求。 - /// - public class ProductUpdateProductPriceRequest : TikTokShopRequest - { - public static class Types - { - public class SKU - { - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string SKUId { get; set; } = string.Empty; - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal OriginalPrice { get; set; } - } - } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public string ProductId { get; set; } = string.Empty; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList SKUList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs deleted file mode 100644 index 40467486..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /products/prices 接口的响应。 - /// - public class ProductUpdateProductPriceResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置更新失败的 SKU ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_sku_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_sku_ids")] - public string[]? FailedSKUIdList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs deleted file mode 100644 index 5144d68a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs +++ /dev/null @@ -1,354 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /products 接口的请求。 - /// - public class ProductUpdateProductRequest : TikTokShopRequest - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.Image - { - } - - public class Video : ProductCreateProductRequest.Types.Video - { - } - - public class SizeChart : ProductCreateProductRequest.Types.SizeChart - { - } - - public class SKU - { - public static class Types - { - public class SalesAttribute - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性名称。 - /// - [Newtonsoft.Json.JsonProperty("attribute_name")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_name")] - public string? AttributeName { get; set; } - - /// - /// 获取或设置属性值 ID。 - /// - [Newtonsoft.Json.JsonProperty("value_id")] - [System.Text.Json.Serialization.JsonPropertyName("value_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string? ValueId { get; set; } - - /// - /// 获取或设置自定义属性值。 - /// - [Newtonsoft.Json.JsonProperty("custom_value")] - [System.Text.Json.Serialization.JsonPropertyName("custom_value")] - public string? CustomValue { get; set; } - - /// - /// 获取或设置图片信息。 - /// - [Newtonsoft.Json.JsonProperty("sku_img")] - [System.Text.Json.Serialization.JsonPropertyName("sku_img")] - public Types.Image? Image { get; set; } - } - - public class StockInfo : ProductCreateProductRequest.Types.SKU.Types.StockInfo - { - } - - public class IdentifierCodeInfo : ProductCreateProductRequest.Types.SKU.Types.IdentifierCodeInfo - { - } - } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string? SKUId { get; set; } - - /// - /// 获取或设置外部 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_sku_id")] - public string? OuterSKUId { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public IList? SalesAttributeList { get; set; } - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public IList? StockInfoList { get; set; } - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置原价。 - /// - [Newtonsoft.Json.JsonProperty("original_price")] - [System.Text.Json.Serialization.JsonPropertyName("original_price")] - public decimal OriginalPrice { get; set; } - - /// - /// 获取或设置产品标识码信息。 - /// - [Newtonsoft.Json.JsonProperty("product_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("product_identifier_code")] - public Types.IdentifierCodeInfo? IdentifierCodeInfo { get; set; } - } - - public class ProductCertification - { - public static class Types - { - public class Image : ProductCreateProductRequest.Types.ProductCertification.Types.Image - { - } - - public class File : ProductCreateProductRequest.Types.ProductCertification.Types.File - { - } - } - - /// - /// 获取或设置商品认证 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CertificationId { get; set; } = string.Empty; - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置文件列表。 - /// - [Newtonsoft.Json.JsonProperty("files")] - [System.Text.Json.Serialization.JsonPropertyName("files")] - public IList? FileList { get; set; } - } - - public class ProductAttribute - { - public static class Types - { - public class ProductAttributeValue : ProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue - { - } - } - - /// - /// 获取或设置属性 ID。 - /// - [Newtonsoft.Json.JsonProperty("attribute_id")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_id")] - public string AttributeId { get; set; } = string.Empty; - - /// - /// 获取或设置属性值列表。 - /// - [Newtonsoft.Json.JsonProperty("attribute_values")] - [System.Text.Json.Serialization.JsonPropertyName("attribute_values")] - public IList ValueList { get; set; } = new List(); - } - - public class ExemptionOfIdentifierCode : ProductCreateProductRequest.Types.ExemptionOfIdentifierCode - { - } - } - - /// - /// 获取或设置外部商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_product_id")] - public string? OuterProductId { get; set; } = string.Empty; - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public string ProductId { get; set; } = string.Empty; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("product_name")] - [System.Text.Json.Serialization.JsonPropertyName("product_name")] - public string ProductName { get; set; } = string.Empty; - - /// - /// 获取或设置商品描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置分类 ID。 - /// - [Newtonsoft.Json.JsonProperty("category_id")] - [System.Text.Json.Serialization.JsonPropertyName("category_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] - public string CategoryId { get; set; } = string.Empty; - - /// - /// 获取或设置品牌 ID。 - /// - [Newtonsoft.Json.JsonProperty("brand_id")] - [System.Text.Json.Serialization.JsonPropertyName("brand_id")] - public string? BrandId { get; set; } - - /// - /// 获取或设置图片列表。 - /// - [Newtonsoft.Json.JsonProperty("images")] - [System.Text.Json.Serialization.JsonPropertyName("images")] - public IList? ImageList { get; set; } - - /// - /// 获取或设置视频信息。 - /// - [Newtonsoft.Json.JsonProperty("product_video")] - [System.Text.Json.Serialization.JsonPropertyName("product_video")] - public Types.Video? Video { get; set; } - - /// - /// 获取或设置质保期 ID。 - /// - [Newtonsoft.Json.JsonProperty("warranty_period")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_period")] - public int? WarrantyPeriodId { get; set; } - - /// - /// 获取或设置质保政策。 - /// - [Newtonsoft.Json.JsonProperty("warranty_policy")] - [System.Text.Json.Serialization.JsonPropertyName("warranty_policy")] - public string? WarrantyPolicy { get; set; } - - /// - /// 获取或设置包装长度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_length")] - [System.Text.Json.Serialization.JsonPropertyName("package_length")] - public int? PackageLength { get; set; } - - /// - /// 获取或设置包装宽度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_width")] - [System.Text.Json.Serialization.JsonPropertyName("package_width")] - public int? PackageWidth { get; set; } - - /// - /// 获取或设置包装高度(单位:厘米)。 - /// - [Newtonsoft.Json.JsonProperty("package_height")] - [System.Text.Json.Serialization.JsonPropertyName("package_height")] - public int? PackageHeight { get; set; } - - /// - /// 获取或设置包装重量(单位:千克)。 - /// - [Newtonsoft.Json.JsonProperty("package_weight")] - [System.Text.Json.Serialization.JsonPropertyName("package_weight")] - public int? PackageWeight { get; set; } - - /// - /// 获取或设置包装尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("package_dimension_unit")] - [System.Text.Json.Serialization.JsonPropertyName("package_dimension_unit")] - public string? PackageDimensionUnit { get; set; } - - /// - /// 获取或设置尺码表。 - /// - [Newtonsoft.Json.JsonProperty("size_chart")] - [System.Text.Json.Serialization.JsonPropertyName("size_chart")] - public Types.SizeChart? SizeChart { get; set; } - - /// - /// 获取或设置是否开启货到付款。 - /// - [Newtonsoft.Json.JsonProperty("is_cod_open")] - [System.Text.Json.Serialization.JsonPropertyName("is_cod_open")] - public bool IsCashOnDeliveryOpen { get; set; } - - /// - /// 获取或设置配送服务 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("delivery_service_ids")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_service_ids")] - public IList? DeliveryServiceIdList { get; set; } - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList? SKUList { get; set; } - - /// - /// 获取或设置商品认证列表。 - /// - [Newtonsoft.Json.JsonProperty("product_certifications")] - [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public IList? ProductCertificationList { get; set; } - - /// - /// 获取或设置商品属性列表。 - /// - [Newtonsoft.Json.JsonProperty("product_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] - public IList? ProductAttributeList { get; set; } - - /// - /// 获取或设置产品标识码豁免信息。 - /// - [Newtonsoft.Json.JsonProperty("exemption_of_identifier_code")] - [System.Text.Json.Serialization.JsonPropertyName("exemption_of_identifier_code")] - public Types.ExemptionOfIdentifierCode? ExemptionOfIdentifierCode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs deleted file mode 100644 index 6f7eface..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /products 接口的响应。 - /// - public class ProductUpdateProductResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class SKU - { - public static class Types - { - public class SalesAttribute : ProductCreateProductResponse.Types.Data.Types.SKU.Types.SalesAttribute - { - } - } - - /// - /// 获取或设置外部 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("outer_sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("outer_sku_id")] - public string? OuterSKUId { get; set; } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置销售属性列表。 - /// - [Newtonsoft.Json.JsonProperty("sales_attributes")] - [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] - public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public Types.SKU[] SKUList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockRequest.cs deleted file mode 100644 index 17052f8b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockRequest.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /products/stocks 接口的请求。 - /// - public class ProductUpdateProductStockRequest : TikTokShopRequest - { - public static class Types - { - public class SKU - { - public static class Types - { - public class StockInfo : ProductCreateProductRequest.Types.SKU.Types.StockInfo - { - } - } - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public string SKUId { get; set; } = string.Empty; - - /// - /// 获取或设置库存信息列表。 - /// - [Newtonsoft.Json.JsonProperty("stock_infos")] - [System.Text.Json.Serialization.JsonPropertyName("stock_infos")] - public IList StockInfoList { get; set; } = new List(); - } - } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public string ProductId { get; set; } = string.Empty; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("skus")] - [System.Text.Json.Serialization.JsonPropertyName("skus")] - public IList SKUList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockResponse.cs deleted file mode 100644 index 0bffa3d3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductStockResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [PUT] /products/stocks 接口的响应。 - /// - public class ProductUpdateProductStockResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedSKU - { - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置更新失败的仓库 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_warehouse_ids")] - [System.Text.Json.Serialization.JsonPropertyName("failed_warehouse_ids")] - public string[] FailedWarehouseIdList { get; set; } = default!; - } - } - - /// - /// 获取或设置更新失败的 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_skus")] - [System.Text.Json.Serialization.JsonPropertyName("failed_skus")] - public Types.FailedSKU[]? FailedSKUList { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs deleted file mode 100644 index c8524dbf..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/upload_files 接口的请求。 - /// - public class ProductUploadFileRequest : TikTokShopRequest - { - /// - /// 获取或设置经 Base64 编码的文件内容。 - /// - [Newtonsoft.Json.JsonProperty("file_data")] - [System.Text.Json.Serialization.JsonPropertyName("file_data")] - public string EncodingFileData { get; set; } = string.Empty; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("file_name")] - [System.Text.Json.Serialization.JsonPropertyName("file_name")] - public string FileName { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs deleted file mode 100644 index 6aca2f3f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/upload_files 接口的响应。 - /// - public class ProductUploadFileResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置文件 ID。 - /// - [Newtonsoft.Json.JsonProperty("file_id")] - [System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string FileId { get; set; } = default!; - - /// - /// 获取或设置文件名称。 - /// - [Newtonsoft.Json.JsonProperty("file_name")] - [System.Text.Json.Serialization.JsonPropertyName("file_name")] - public string FileName { get; set; } = default!; - - /// - /// 获取或设置文件类型。 - /// - [Newtonsoft.Json.JsonProperty("file_type")] - [System.Text.Json.Serialization.JsonPropertyName("file_type")] - public string FileType { get; set; } = default!; - - /// - /// 获取或设置文件 URL。 - /// - [Newtonsoft.Json.JsonProperty("file_url")] - [System.Text.Json.Serialization.JsonPropertyName("file_url")] - public string FileUrl { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs deleted file mode 100644 index 2a17e359..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/upload_imgs 接口的请求。 - /// - public class ProductUploadImageRequest : TikTokShopRequest - { - /// - /// 获取或设置经 Base64 编码的图片内容。 - /// - [Newtonsoft.Json.JsonProperty("img_data")] - [System.Text.Json.Serialization.JsonPropertyName("img_data")] - public string EncodingImageData { get; set; } = string.Empty; - - /// - /// 获取或设置图片使用场景。 - /// - [Newtonsoft.Json.JsonProperty("img_scene")] - [System.Text.Json.Serialization.JsonPropertyName("img_scene")] - public int Scene { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs deleted file mode 100644 index 34e5724c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /products/upload_imgs 接口的响应。 - /// - public class ProductUploadImageResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("img_id")] - [System.Text.Json.Serialization.JsonPropertyName("img_id")] - public string ImageId { get; set; } = default!; - - /// - /// 获取或设置图片使用场景。 - /// - [Newtonsoft.Json.JsonProperty("img_scene")] - [System.Text.Json.Serialization.JsonPropertyName("img_scene")] - public int Scene { get; set; } - - /// - /// 获取或设置图片宽度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("img_width")] - [System.Text.Json.Serialization.JsonPropertyName("img_width")] - public int Width { get; set; } - - /// - /// 获取或设置图片高度(单位:像素)。 - /// - [Newtonsoft.Json.JsonProperty("img_height")] - [System.Text.Json.Serialization.JsonPropertyName("img_height")] - public int Height { get; set; } - - /// - /// 获取或设置图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("img_url")] - [System.Text.Json.Serialization.JsonPropertyName("img_url")] - public string ImageUrl { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.cs deleted file mode 100644 index df128b4f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/items/addorupdate 接口的请求。 - /// - public class PromotionAddOrUpdateActivityItemsRequest : TikTokShopRequest - { - public static class Types - { - public class Product - { - public static class Types - { - public class SKU - { - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public string ProductId { get; set; } = string.Empty; - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - public string SKUId { get; set; } = string.Empty; - - /// - /// 获取或设置促销价格。 - /// - [Newtonsoft.Json.JsonProperty("promotion_price")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? PromotionPrice { get; set; } - - /// - /// 获取或设置折扣比例(单位:百分数)。 - /// - [Newtonsoft.Json.JsonProperty("discount")] - [System.Text.Json.Serialization.JsonPropertyName("discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Discount { get; set; } - - /// - /// 获取或设置库存上限。 - /// 默认值:-1 - /// - [Newtonsoft.Json.JsonProperty("num_limit")] - [System.Text.Json.Serialization.JsonPropertyName("num_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int StockLimit { get; set; } = -1; - - /// - /// 获取或设置用户使用上限。 - /// 默认值:-1 - /// - [Newtonsoft.Json.JsonProperty("user_limit")] - [System.Text.Json.Serialization.JsonPropertyName("user_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int UserLimit { get; set; } = -1; - } - } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public string ProductId { get; set; } = string.Empty; - - /// - /// 获取或设置促销价格。 - /// - [Newtonsoft.Json.JsonProperty("promotion_price")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? PromotionPrice { get; set; } - - /// - /// 获取或设置折扣比例(单位:百分数)。 - /// - [Newtonsoft.Json.JsonProperty("discount")] - [System.Text.Json.Serialization.JsonPropertyName("discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Discount { get; set; } - - /// - /// 获取或设置库存上限。 - /// 默认值:-1 - /// - [Newtonsoft.Json.JsonProperty("num_limit")] - [System.Text.Json.Serialization.JsonPropertyName("num_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int StockLimit { get; set; } = -1; - - /// - /// 获取或设置用户使用上限。 - /// 默认值:-1 - /// - [Newtonsoft.Json.JsonProperty("user_limit")] - [System.Text.Json.Serialization.JsonPropertyName("user_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int UserLimit { get; set; } = -1; - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("sku_list")] - public IList? SKUList { get; set; } - } - } - - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = string.Empty; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - public string PromotionId { get; set; } = string.Empty; - - /// - /// 获取或设置商品列表。 - /// - [Newtonsoft.Json.JsonProperty("product_list")] - [System.Text.Json.Serialization.JsonPropertyName("product_list")] - public IList ProductList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.cs deleted file mode 100644 index 82c00e57..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/items/addorupdate 接口的响应。 - /// - public class PromotionAddOrUpdateActivityItemsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = default!; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置活动状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - - /// - /// 获取或设置商品数量。 - /// - [Newtonsoft.Json.JsonProperty("item_count")] - [System.Text.Json.Serialization.JsonPropertyName("item_count")] - public int ProductCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsRequest.cs deleted file mode 100644 index b993de1a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/items/remove 接口的请求。 - /// - public class PromotionRemoveActivityItemsRequest : TikTokShopRequest - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = string.Empty; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - public string PromotionId { get; set; } = string.Empty; - - /// - /// 获取或设置 SPU ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("spu_list")] - [System.Text.Json.Serialization.JsonPropertyName("spu_list")] - public IList? SPUIdList { get; set; } - - /// - /// 获取或设置 SKU ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("sku_list")] - public IList? SKUIdList { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsResponse.cs deleted file mode 100644 index cf3f90a1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/Items/PromotionRemoveActivityItemsResponse.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/items/remove 接口的响应。 - /// - public class PromotionRemoveActivityItemsResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = default!; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置活动状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs deleted file mode 100644 index 9cc41060..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/create 接口的请求。 - /// - public class PromotionCreateActivityRequest : TikTokShopRequest - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = string.Empty; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - public string PromotionId { get; set; } = string.Empty; - - /// - /// 获取或设置促销类型。 - /// - [Newtonsoft.Json.JsonProperty("promotion_type")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_type")] - public int PromotionType { get; set; } - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = string.Empty; - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置活动开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("begin_time")] - [System.Text.Json.Serialization.JsonPropertyName("begin_time")] - public long BeginTimestamp { get; set; } - - /// - /// 获取或设置活动结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("end_time")] - [System.Text.Json.Serialization.JsonPropertyName("end_time")] - public long EndTimestamp { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs deleted file mode 100644 index e898f497..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/create 接口的响应。 - /// - public class PromotionCreateActivityResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = default!; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置活动状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs deleted file mode 100644 index 36e8df5a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/deactivate 接口的请求。 - /// - public class PromotionDeactivateActivityRequest : TikTokShopRequest - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = string.Empty; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - public string PromotionId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs deleted file mode 100644 index 95901d12..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/deactivate 接口的响应。 - /// - public class PromotionDeactivateActivityResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = default!; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置活动状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs deleted file mode 100644 index d13d486d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /promotion/activity/get 接口的请求。 - /// - public class PromotionGetActivityDetailRequest : TikTokShopRequest - { - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PromotionId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs deleted file mode 100644 index 09326f08..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs +++ /dev/null @@ -1,192 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /promotion/activity/get 接口的响应。 - /// - public class PromotionGetActivityDetailResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Product - { - public static class Types - { - public class SKU - { - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置促销价格。 - /// - [Newtonsoft.Json.JsonProperty("promotion_price")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? PromotionPrice { get; set; } - - /// - /// 获取或设置折扣比例(单位:百分数)。 - /// - [Newtonsoft.Json.JsonProperty("discount")] - [System.Text.Json.Serialization.JsonPropertyName("discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Discount { get; set; } - - /// - /// 获取或设置库存上限。 - /// - [Newtonsoft.Json.JsonProperty("num_limit")] - [System.Text.Json.Serialization.JsonPropertyName("num_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int StockLimit { get; set; } - - /// - /// 获取或设置用户使用上限。 - /// - [Newtonsoft.Json.JsonProperty("user_limit")] - [System.Text.Json.Serialization.JsonPropertyName("user_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int UserLimit { get; set; } - } - } - - /// - /// 获取或设置商品 ID。 - /// - [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!; - - /// - /// 获取或设置促销价格。 - /// - [Newtonsoft.Json.JsonProperty("promotion_price")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_price")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? PromotionPrice { get; set; } - - /// - /// 获取或设置折扣比例(单位:百分数)。 - /// - [Newtonsoft.Json.JsonProperty("discount")] - [System.Text.Json.Serialization.JsonPropertyName("discount")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal? Discount { get; set; } - - /// - /// 获取或设置库存上限。 - /// - [Newtonsoft.Json.JsonProperty("num_limit")] - [System.Text.Json.Serialization.JsonPropertyName("num_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int StockLimit { get; set; } - - /// - /// 获取或设置用户使用上限。 - /// - [Newtonsoft.Json.JsonProperty("user_limit")] - [System.Text.Json.Serialization.JsonPropertyName("user_limit")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int UserLimit { get; set; } - - /// - /// 获取或设置 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("sku_list")] - public Types.SKU[]? SKUList { get; set; } - } - } - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置促销类型。 - /// - [Newtonsoft.Json.JsonProperty("promotion_type")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_type")] - public int PromotionType { get; set; } - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置商品列表。 - /// - [Newtonsoft.Json.JsonProperty("product_list")] - [System.Text.Json.Serialization.JsonPropertyName("product_list")] - public Types.Product[] ProductList { get; set; } = default!; - - /// - /// 获取或设置活动状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置活动开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("begin_time")] - [System.Text.Json.Serialization.JsonPropertyName("begin_time")] - public long BeginTimestamp { get; set; } - - /// - /// 获取或设置活动结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("end_time")] - [System.Text.Json.Serialization.JsonPropertyName("end_time")] - public long EndTimestamp { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs deleted file mode 100644 index b040eb71..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/list 接口的请求。 - /// - public class PromotionSearchActivitiesRequest : TikTokShopRequest - { - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string? Title { get; set; } - - /// - /// 获取或设置促销状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int? Status { get; set; } - - /// - /// 获取或设置分页页数。 - /// - [Newtonsoft.Json.JsonProperty("page_number")] - [System.Text.Json.Serialization.JsonPropertyName("page_number")] - public int? PageNumber { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("page_size")] - [System.Text.Json.Serialization.JsonPropertyName("page_size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs deleted file mode 100644 index dc5a6e4c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs +++ /dev/null @@ -1,98 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/list 接口的响应。 - /// - public class PromotionSearchActivitiesResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Promotion - { - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置促销类型。 - /// - [Newtonsoft.Json.JsonProperty("promotion_type")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_type")] - public int PromotionType { get; set; } - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置活动状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置活动开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("begin_time")] - [System.Text.Json.Serialization.JsonPropertyName("begin_time")] - public long BeginTimestamp { get; set; } - - /// - /// 获取或设置活动结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("end_time")] - [System.Text.Json.Serialization.JsonPropertyName("end_time")] - public long EndTimestamp { get; set; } - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - - /// - /// 获取或设置促销列表。 - /// - [Newtonsoft.Json.JsonProperty("promotion_list")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_list")] - public Types.Promotion[] PromotionList { get; set; } = default!; - - /// - /// 获取或设置总数量。 - /// - [Newtonsoft.Json.JsonProperty("total")] - [System.Text.Json.Serialization.JsonPropertyName("total")] - public int TotalCount { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs deleted file mode 100644 index f8d734b9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/update 接口的请求。 - /// - public class PromotionUpdateActivityRequest : TikTokShopRequest - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = string.Empty; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - public string PromotionId { get; set; } = string.Empty; - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = string.Empty; - - /// - /// 获取或设置活动开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("begin_time")] - [System.Text.Json.Serialization.JsonPropertyName("begin_time")] - public long BeginTimestamp { get; set; } - - /// - /// 获取或设置活动结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("end_time")] - [System.Text.Json.Serialization.JsonPropertyName("end_time")] - public long EndTimestamp { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs deleted file mode 100644 index 1f6bd437..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /promotion/activity/update 接口的响应。 - /// - public class PromotionUpdateActivityResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置请求序列号。 - /// - [Newtonsoft.Json.JsonProperty("request_serial_no")] - [System.Text.Json.Serialization.JsonPropertyName("request_serial_no")] - public string RequestSerialNumber { get; set; } = default!; - - /// - /// 获取或设置促销 ID。 - /// - [Newtonsoft.Json.JsonProperty("promotion_id")] - [System.Text.Json.Serialization.JsonPropertyName("promotion_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string PromotionId { get; set; } = default!; - - /// - /// 获取或设置活动标题。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderRequest.cs deleted file mode 100644 index 195698bc..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/order/cancel 接口的请求。 - /// - public class ReverseCancelOrderRequest : TikTokShopRequest - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("order_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_id")] - public string OrderId { get; set; } = string.Empty; - - /// - /// 获取或设置取消原因标识。 - /// - [Newtonsoft.Json.JsonProperty("cancel_reason_key")] - [System.Text.Json.Serialization.JsonPropertyName("cancel_reason_key")] - public string CancelReasonKey { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderResponse.cs deleted file mode 100644 index 15c78bdb..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseCancelOrderResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/order/cancel 接口的响应。 - /// - public class ReverseCancelOrderResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置撤回订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("reverse_main_order_id")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_main_order_id")] - public string? ReverseOrderId { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestRequest.cs deleted file mode 100644 index 2123d443..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/reverse_request/confirm 接口的请求。 - /// - public class ReverseConfirmReverseRequestRequest : TikTokShopRequest - { - /// - /// 获取或设置撤回订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("reverse_order_id")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_order_id")] - public string ReverseOrderId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestResponse.cs deleted file mode 100644 index 408d4b71..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseConfirmReverseRequestResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/reverse_request/confirm 接口的响应。 - /// - public class ReverseConfirmReverseRequestResponse : TikTokShopResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListRequest.cs deleted file mode 100644 index 9cf424d7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /reverse/reverse_reason/list 接口的请求。 - /// - public class ReverseGetRejectReasonListRequest : TikTokShopRequest - { - /// - /// 获取或设置操作类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int? ActionType { get; set; } - - /// - /// 获取或设置原因类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int? ReasonType { get; set; } - - /// - /// 获取或设置配送状态。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int? FulfillmentStatus { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListResponse.cs deleted file mode 100644 index 433a6b94..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseGetRejectReasonListResponse.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /reverse/reverse_reason/list 接口的响应。 - /// - public class ReverseGetRejectReasonListResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Reason - { - /// - /// 获取或设置原因标识。 - /// - [Newtonsoft.Json.JsonProperty("reverse_reason_key")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_reason_key")] - public string ReasonKey { get; set; } = default!; - - /// - /// 获取或设置原因。 - /// - [Newtonsoft.Json.JsonProperty("reverse_reason")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_reason")] - public string ReasonText { get; set; } = default!; - - /// - /// 获取或设置可用的订单状态列表。 - /// - [Newtonsoft.Json.JsonProperty("available_order_status_list")] - [System.Text.Json.Serialization.JsonPropertyName("available_order_status_list")] - public int[] AvailableOrderStatusList { get; set; } = default!; - } - } - - /// - /// 获取或设置原因列表。 - /// - [Newtonsoft.Json.JsonProperty("reverse_reason_list")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_reason_list")] - public Types.Reason[] ReasonList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestRequest.cs deleted file mode 100644 index ee6afdc6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/reverse_request/reject 接口的请求。 - /// - public class ReverseRejectReverseRequestRequest : TikTokShopRequest - { - /// - /// 获取或设置撤回订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("reverse_order_id")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_order_id")] - public string ReverseOrderId { get; set; } = string.Empty; - - /// - /// 获取或设置拒绝原因标识。 - /// - [Newtonsoft.Json.JsonProperty("reverse_reject_reason_key")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_reject_reason_key")] - public string RejectReasonKey { get; set; } = string.Empty; - - /// - /// 获取或设置注释。 - /// - [Newtonsoft.Json.JsonProperty("reverse_reject_comments")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_reject_comments")] - public string? RejectComments { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestResponse.cs deleted file mode 100644 index 4fb0d1af..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseRejectReverseRequestResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/reverse_request/reject 接口的响应。 - /// - public class ReverseRejectReverseRequestResponse : TikTokShopResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersRequest.cs deleted file mode 100644 index 357c7186..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersRequest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/reverse_order/list 接口的请求。 - /// - public class ReverseSearchReverseOrdersRequest : TikTokShopRequest - { - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? ApiVersion { get; set; } = "202307"; - - /// - /// 获取或设置更新时间范围起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_from")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_from")] - public long? UpdateTimestampFrom { get; set; } - - /// - /// 获取或设置更新时间范围截止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time_to")] - [System.Text.Json.Serialization.JsonPropertyName("update_time_to")] - public long? UpdateTimestampTo { get; set; } - - /// - /// 获取或设置撤回类型。 - /// - [Newtonsoft.Json.JsonProperty("reverse_type")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_type")] - public int? ReverseType { get; set; } - - /// - /// 获取或设置撤回订单状态。 - /// - [Newtonsoft.Json.JsonProperty("reverse_order_status")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_order_status")] - public int? ReverseOrderStatus { get; set; } - - /// - /// 获取或设置订单 ID。 - /// - [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; } - - /// - /// 获取或设置撤回订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("reverse_order_id")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_order_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string? ReverseOrderId { get; set; } - - /// - /// 获取或设置排序字段。 - /// - [Newtonsoft.Json.JsonProperty("sort_by")] - [System.Text.Json.Serialization.JsonPropertyName("sort_by")] - public int? SortBy { get; set; } - - /// - /// 获取或设置排序方式。 - /// - [Newtonsoft.Json.JsonProperty("sort_type")] - [System.Text.Json.Serialization.JsonPropertyName("sort_type")] - public int? SortType { get; set; } - - /// - /// 获取或设置分页起始位置。 - /// - [Newtonsoft.Json.JsonProperty("offset")] - [System.Text.Json.Serialization.JsonPropertyName("offset")] - public int PageOffset { get; set; } - - /// - /// 获取或设置分页每页数量。 - /// 默认值:10 - /// - [Newtonsoft.Json.JsonProperty("size")] - [System.Text.Json.Serialization.JsonPropertyName("size")] - public int PageSize { get; set; } = 10; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersResponse.cs deleted file mode 100644 index e60ad51f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Reverse/ReverseSearchReverseOrdersResponse.cs +++ /dev/null @@ -1,223 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /reverse/reverse_order/list 接口的响应。 - /// - public class ReverseSearchReverseOrdersResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class ReverseOrder - { - public static class Types - { - public class ReturnSKU - { - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("return_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("return_product_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ProductId { get; set; } = default!; - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("return_product_name")] - [System.Text.Json.Serialization.JsonPropertyName("return_product_name")] - public string ProductName { get; set; } = default!; - - /// - /// 获取或设置 SKU ID。 - /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string SKUId { get; set; } = default!; - - /// - /// 获取或设置 SKU 名称。 - /// - [Newtonsoft.Json.JsonProperty("sku_name")] - [System.Text.Json.Serialization.JsonPropertyName("sku_name")] - public string SKUName { get; set; } = default!; - - /// - /// 获取或设置卖家 SKU 信息。 - /// - [Newtonsoft.Json.JsonProperty("seller_sku")] - [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] - public string? SellerSKU { get; set; } - - /// - /// 获取或设置数量。 - /// - [Newtonsoft.Json.JsonProperty("return_quantity")] - [System.Text.Json.Serialization.JsonPropertyName("return_quantity")] - public int Quantity { get; set; } - - /// - /// 获取或设置图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("product_images")] - [System.Text.Json.Serialization.JsonPropertyName("product_images")] - public string? ImageUrl { get; set; } - } - - public class ReverseRecord - { - /// - /// 获取或设置描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// 获取或设置撤回原因。 - /// - [Newtonsoft.Json.JsonProperty("reason_text")] - [System.Text.Json.Serialization.JsonPropertyName("reason_text")] - public string? ReverseReason { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("update_time")] - [System.Text.Json.Serialization.JsonPropertyName("update_time")] - public long UpdateTimestamp { get; set; } - - /// - /// 获取或设置补充材料留言。 - /// - [Newtonsoft.Json.JsonProperty("additional_message")] - [System.Text.Json.Serialization.JsonPropertyName("additional_message")] - public string? AdditionalMessage { get; set; } - - /// - /// 获取或设置补充材料图片 URL 列表。 - /// - [Newtonsoft.Json.JsonProperty("additional_image_list")] - [System.Text.Json.Serialization.JsonPropertyName("additional_image_list")] - public string[]? AdditionalImageUrlList { get; set; } - } - } - - /// - /// 获取或设置撤回订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("reverse_order_id")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_order_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] - public string ReverseOrderId { get; set; } = default!; - - /// - /// 获取或设置订单 ID。 - /// - [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!; - - /// - /// 获取或设置撤回类型。 - /// - [Newtonsoft.Json.JsonProperty("reverse_type")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_type")] - public int ReverseType { get; set; } - - /// - /// 获取或设置撤回订单状态。 - /// - [Newtonsoft.Json.JsonProperty("reverse_status_value")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_status_value")] - public int ReverseOrderStatus { get; set; } - - /// - /// 获取或设置撤回记录列表。 - /// - [Newtonsoft.Json.JsonProperty("reverse_record_list")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_record_list")] - public Types.ReverseRecord[] ReverseRecordList { get; set; } = default!; - - /// - /// 获取或设置退货类型。 - /// - [Newtonsoft.Json.JsonProperty("return_type")] - [System.Text.Json.Serialization.JsonPropertyName("return_type")] - public int? ReturnType { get; set; } - - /// - /// 获取或设置退货原因。 - /// - [Newtonsoft.Json.JsonProperty("return_reason")] - [System.Text.Json.Serialization.JsonPropertyName("return_reason")] - public string? ReturnReason { get; set; } - - /// - /// 获取或设置退货 SKU 列表。 - /// - [Newtonsoft.Json.JsonProperty("return_item_list")] - [System.Text.Json.Serialization.JsonPropertyName("return_item_list")] - public Types.ReturnSKU[]? ReturnSKUList { get; set; } - - /// - /// 获取或设置退货物流单号。 - /// - [Newtonsoft.Json.JsonProperty("return_tracking_id")] - [System.Text.Json.Serialization.JsonPropertyName("return_tracking_id")] - public string? ReturnTrackingNumber { get; set; } - - /// - /// 获取或设置币种。 - /// - [Newtonsoft.Json.JsonProperty("currency")] - [System.Text.Json.Serialization.JsonPropertyName("currency")] - public string Currency { get; set; } = default!; - - /// - /// 获取或设置退款金额。 - /// - [Newtonsoft.Json.JsonProperty("refund_total")] - [System.Text.Json.Serialization.JsonPropertyName("refund_total")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] - public decimal RefundAmount { get; set; } - - /// - /// 获取或设置申请时间戳。 - /// - [Newtonsoft.Json.JsonProperty("reverse_request_time")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_request_time")] - public long RequestTimestamp { get; set; } - - /// - /// 获取或设置更新时间戳。 - /// - [Newtonsoft.Json.JsonProperty("reverse_update_time")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_update_time")] - public long UpdateTimestamp { get; set; } - } - } - - /// - /// 获取或设置撤回订单列表。 - /// - [Newtonsoft.Json.JsonProperty("reverse_list")] - [System.Text.Json.Serialization.JsonPropertyName("reverse_list")] - public Types.ReverseOrder[] ReverseOrderList { get; set; } = default!; - - /// - /// 获取或设置是否还有更多。 - /// - [Newtonsoft.Json.JsonProperty("more")] - [System.Text.Json.Serialization.JsonPropertyName("more")] - public bool HasMore { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeRequest.cs deleted file mode 100644 index af640423..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /seller/manage_global_product/check 接口的请求。 - /// - public class SellerCheckGlobalProductModeRequest : TikTokShopRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeResponse.cs deleted file mode 100644 index 3622200c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerCheckGlobalProductModeResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /seller/manage_global_product/check 接口的响应。 - /// - public class SellerCheckGlobalProductModeResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置是否可使用全球商品。 - /// - [Newtonsoft.Json.JsonProperty("can_use_global_product")] - [System.Text.Json.Serialization.JsonPropertyName("can_use_global_product")] - public bool CanUseGlobalProduct { get; set; } - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListRequest.cs deleted file mode 100644 index 05b2cff0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /seller/global/active_shops 接口的请求。 - /// - public class SellerGetGlobalActiveShopListRequest : TikTokShopRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsRequest.cs similarity index 50% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsRequest.cs index 8c5cc8b3..07989d57 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseListRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsRequest.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models { /// - /// 表示 [GET] /logistics/get_warehouse_list 接口的请求。 + /// 表示 [GET] /seller/{version}/permissions 接口的请求。 /// - public class LogisticsGetWarehouseListRequest : TikTokShopRequest + public class SellerGetPermissionsRequest : TikTokShopRequest { } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsResponse.cs new file mode 100644 index 00000000..00282c0d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetPermissionsResponse.cs @@ -0,0 +1,21 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /seller/{version}/permissions 接口的响应。 + /// + public class SellerGetPermissionsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置权限列表。 + /// + [Newtonsoft.Json.JsonProperty("permissions")] + [System.Text.Json.Serialization.JsonPropertyName("permissions")] + public string[] PermissionList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsRequest.cs new file mode 100644 index 00000000..c5240737 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /seller/{version}/shops 接口的请求。 + /// + public class SellerGetShopsRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsResponse.cs similarity index 66% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsResponse.cs index e7ce6a98..79697978 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetGlobalActiveShopListResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Seller/SellerGetShopsResponse.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models { /// - /// 表示 [GET] /seller/global/active_shops 接口的响应。 + /// 表示 [GET] /seller/{version}/shops 接口的响应。 /// - public class SellerGetGlobalActiveShopListResponse : TikTokShopResponse + public class SellerGetShopsResponse : TikTokShopResponse { public static class Types { @@ -16,26 +16,26 @@ public class Shop /// /// 获取或设置店铺 ID。 /// - [Newtonsoft.Json.JsonProperty("shop_id")] - [System.Text.Json.Serialization.JsonPropertyName("shop_id")] + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] public string ShopId { get; set; } = default!; /// /// 获取或设置所在地。 /// - [Newtonsoft.Json.JsonProperty("shop_region")] - [System.Text.Json.Serialization.JsonPropertyName("shop_region")] + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] public string Region { get; set; } = default!; } } /// - /// 获取或设置活跃店铺列表。 + /// 获取或设置店铺列表。 /// - [Newtonsoft.Json.JsonProperty("active_shops")] - [System.Text.Json.Serialization.JsonPropertyName("active_shops")] - public Types.Shop[] ActiveShopList { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("shops")] + [System.Text.Json.Serialization.JsonPropertyName("shops")] + public Types.Shop[] ShopList { get; set; } = default!; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListRequest.cs deleted file mode 100644 index 21df8113..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Shop/ShopGetAuthorizedShopListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [GET] /shop/get_authorized_shop 接口的请求。 - /// - public class ShopGetAuthorizedShopListRequest : TikTokShopRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs deleted file mode 100644 index d1823165..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models -{ - /// - /// 表示 [POST] /supply_chain/package_shipment_confirmation 接口的响应。 - /// - public class SupplyChainSyncPackageFulfillmentDataResponse : TikTokShopResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class FailedPackage - { - /// - /// 获取或设置包裹 ID。 - /// - [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; } = default!; - - /// - /// 获取或设置失败原因。 - /// - [Newtonsoft.Json.JsonProperty("fail_reason")] - [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] - public string? FailReason { get; set; } - } - } - - /// - /// 获取或设置导入失败的包裹列表。 - /// - [Newtonsoft.Json.JsonProperty("failed_package_list")] - [System.Text.Json.Serialization.JsonPropertyName("failed_package_list")] - public Types.FailedPackage[] FailedPackageList { get; set; } = default!; - - /// - /// 获取或设置导入成功的包裹 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("success_package_list")] - [System.Text.Json.Serialization.JsonPropertyName("success_package_list")] - public string[] SucceededPackageList { get; set; } = default!; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesRequest.cs similarity index 55% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesRequest.cs index b1082a87..2f653bd1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesRequest.cs @@ -3,9 +3,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models { /// - /// 表示 [POST] /supply_chain/package_shipment_confirmation 接口的请求。 + /// 表示 [POST] /supply_chain/{version}/packages/sync 接口的请求。 /// - public class SupplyChainSyncPackageFulfillmentDataRequest : TikTokShopRequest + public class SupplyChainSyncPackagesRequest : TikTokShopRequest { public static class Types { @@ -13,13 +13,61 @@ public class Package { public static class Types { + public class Dimension + { + /// + /// 获取或设置长度。 + /// + [Newtonsoft.Json.JsonProperty("length")] + [System.Text.Json.Serialization.JsonPropertyName("length")] + public int? Length { get; set; } + + /// + /// 获取或设置宽度。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int? Width { get; set; } + + /// + /// 获取或设置高度。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int? Height { get; set; } + + /// + /// 获取或设置单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string? Unit { get; set; } + } + + public class Weight + { + /// + /// 获取或设置重量。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public int? Value { get; set; } + + /// + /// 获取或设置单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string? Unit { get; set; } + } + public class SKU { /// /// 获取或设置 SKU ID。 /// - [Newtonsoft.Json.JsonProperty("sku_id")] - [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] public string SKUId { get; set; } = string.Empty; /// @@ -34,23 +82,23 @@ public class SKU /// /// 获取或设置包裹 ID。 /// - [Newtonsoft.Json.JsonProperty("package_id")] - [System.Text.Json.Serialization.JsonPropertyName("package_id")] + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] public string PackageId { get; set; } = string.Empty; /// /// 获取或设置 SKU 列表。 /// - [Newtonsoft.Json.JsonProperty("sku_list")] - [System.Text.Json.Serialization.JsonPropertyName("sku_list")] + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] public IList SKUList { get; set; } = new List(); /// /// 获取或设置 WMS 订单号。 /// - [Newtonsoft.Json.JsonProperty("wms_order_no")] - [System.Text.Json.Serialization.JsonPropertyName("wms_order_no")] - public string WMSOrderNumber { get; set; } = string.Empty; + [Newtonsoft.Json.JsonProperty("wms_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wms_order_id")] + public string WMSOrderId { get; set; } = string.Empty; /// /// 获取或设置供应商仓库编码。 @@ -62,9 +110,9 @@ public class SKU /// /// 获取或设置发货城市。 /// - [Newtonsoft.Json.JsonProperty("shipped_city")] - [System.Text.Json.Serialization.JsonPropertyName("shipped_city")] - public string? ShippedCity { get; set; } + [Newtonsoft.Json.JsonProperty("shipping_origin_city")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_origin_city")] + public string? ShippingOriginCity { get; set; } /// /// 获取或设置时区。 @@ -74,11 +122,25 @@ public class SKU public string TimeZone { get; set; } = string.Empty; /// - /// 获取或设置发货时间字符串(格式:yyyy/MM/dd HH:mm:ss)。 + /// 获取或设置发货时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("ship_time_millis")] + [System.Text.Json.Serialization.JsonPropertyName("ship_time_millis")] + public long ShipTimeMilliseconds { get; set; } + + /// + /// 获取或设置创建时间毫秒级时间戳。 /// - [Newtonsoft.Json.JsonProperty("shipped_time")] - [System.Text.Json.Serialization.JsonPropertyName("shipped_time")] - public string ShippedTimeString { get; set; } = string.Empty; + [Newtonsoft.Json.JsonProperty("create_time_millis")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_millis")] + public long CreateTimeMilliseconds { get; set; } + + /// + /// 获取或设置交接时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("handover_time_millis")] + [System.Text.Json.Serialization.JsonPropertyName("handover_time_millis")] + public long HandoverTimeMilliseconds { get; set; } /// /// 获取或设置运输服务商 ID。 @@ -102,67 +164,18 @@ public class SKU public string TrackingNumber { get; set; } = string.Empty; /// - /// 获取或设置配送方式名称。 - /// - [Newtonsoft.Json.JsonProperty("delivery_option_name")] - [System.Text.Json.Serialization.JsonPropertyName("delivery_option_name")] - public string? DeliveryOptionName { get; set; } - - /// - /// 获取或设置长度。 - /// - [Newtonsoft.Json.JsonProperty("length")] - [System.Text.Json.Serialization.JsonPropertyName("length")] - public int? Length { get; set; } - - /// - /// 获取或设置宽度单位。 - /// - [Newtonsoft.Json.JsonProperty("width")] - [System.Text.Json.Serialization.JsonPropertyName("width")] - public int? Width { get; set; } - - /// - /// 获取或设置高度。 + /// 获取或设置尺寸信息。 /// - [Newtonsoft.Json.JsonProperty("height")] - [System.Text.Json.Serialization.JsonPropertyName("height")] - public int? Height { get; set; } + [Newtonsoft.Json.JsonProperty("dimension")] + [System.Text.Json.Serialization.JsonPropertyName("dimension")] + public Types.Dimension? Dimension { get; set; } /// - /// 获取或设置重量。 + /// 获取或设置重量信息。 /// [Newtonsoft.Json.JsonProperty("weight")] [System.Text.Json.Serialization.JsonPropertyName("weight")] - public int? Weight { get; set; } - - /// - /// 获取或设置尺寸单位。 - /// - [Newtonsoft.Json.JsonProperty("length_unit")] - [System.Text.Json.Serialization.JsonPropertyName("length_unit")] - public int? DimensionUnit { get; set; } - - /// - /// 获取或设置重量单位。 - /// - [Newtonsoft.Json.JsonProperty("weight_unit")] - [System.Text.Json.Serialization.JsonPropertyName("weight_unit")] - public int? WeightUnit { get; set; } - - /// - /// 获取或设置创建时间字符串(格式:yyyy/MM/dd HH:mm:ss)。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public string CreateTimeString { get; set; } = string.Empty; - - /// - /// 获取或设置交接时间字符串(格式:yyyy/MM/dd HH:mm:ss)。 - /// - [Newtonsoft.Json.JsonProperty("hand_over_time")] - [System.Text.Json.Serialization.JsonPropertyName("hand_over_time")] - public string HandOverTimeString { get; set; } = string.Empty; + public Types.Weight? Weight { get; set; } } } @@ -176,8 +189,8 @@ public class SKU /// /// 获取或设置包裹列表。 /// - [Newtonsoft.Json.JsonProperty("package")] - [System.Text.Json.Serialization.JsonPropertyName("package")] + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] public IList PackageList { get; set; } = new List(); } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesResponse.cs new file mode 100644 index 00000000..4d2001ef --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/SupplyChain/SupplyChainSyncPackagesResponse.cs @@ -0,0 +1,70 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /supply_chain/{version}/packages/sync 接口的响应。 + /// + public class SupplyChainSyncPackagesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置包裹 ID。 + /// + [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; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置导入成功的包裹 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("success_packages")] + [System.Text.Json.Serialization.JsonPropertyName("success_packages")] + public string[] SucceededPackageIdList { get; set; } = default!; + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs index d2e8e64c..d5eaee50 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs @@ -63,14 +63,12 @@ public IFlurlRequest CreateFlurlRequest(TikTokShopRequest request, HttpMethod ht { request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); } - + return flurlRequest + .WithHeader("x-tts-access-token", request.AccessToken) .SetQueryParam("app_key", Credentials.AppKey) - .SetQueryParam("access_token", request.AccessToken) - .SetQueryParam("timestamp", request.Timestamp) - .SetQueryParam("shop_id", request.ShopId) .SetQueryParam("shop_cipher", request.ShopCipher) - .SetQueryParam("version", request.ApiVersion); + .SetQueryParam("timestamp", request.Timestamp); } /// @@ -103,6 +101,8 @@ public async Task SendFlurlRequesAsJsontAsync(IFlurlRequest flurlRequest, { if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + flurlRequest.WithHeader(HttpHeaders.ContentType, MimeTypes.Json); // NOTICE: GET 请求也要设置 Content-Type 标头 + bool isSimpleRequest = data is null || flurlRequest.Verb == HttpMethod.Get || flurlRequest.Verb == HttpMethod.Head || diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEndpoints.cs index daafa466..ed12a61a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEndpoints.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEndpoints.cs @@ -8,17 +8,12 @@ public static class TikTokShopEndpoints /// /// 主域名(默认)。 /// - public const string DEFAULT = "https://open-api.tiktokglobalshop.com/api"; + public const string DEFAULT = "https://open-api.tiktokglobalshop.com"; /// /// 沙箱域名。 /// - public const string SANDBOX = "https://open-api-sandbox.tiktokglobalshop.com/api"; - - /// - /// 美国域名。 - /// - public const string REGION_US = "https://open-api.us.tiktokglobalshop.com/api"; + public const string SANDBOX = "https://open-api-sandbox.tiktokglobalshop.com"; } /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopRequest.cs index 3326cf7d..9ab3e10b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopRequest.cs @@ -13,31 +13,25 @@ public abstract class TikTokShopRequest : CommonRequestBase, ICommonRequest public virtual string? AccessToken { get; set; } /// - /// 获取或设置系统时间戳。如果不指定将由系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual long? Timestamp { get; set; } - - /// - /// 获取或设置店铺 ID。 + /// 获取或设置店铺密码。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ShopId { get; set; } + public virtual string? ShopCipher { get; set; } /// - /// 获取或设置店铺密码。 + /// 获取或设置系统时间戳。如果不指定将由系统自动生成。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ShopCipher { get; set; } + public virtual long? Timestamp { get; set; } /// - /// 获取或设置 API 版本号。如果不指定将使用系统所支持的最高版本号。 + /// 获取或设置 API 版本号。 + /// 默认值:202309 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ApiVersion { get; set; } + public virtual int ApiVersion { get; set; } = 202309; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopResponse.cs index f669db21..3058fbe5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopResponse.cs @@ -11,14 +11,14 @@ public abstract class TikTokShopResponse : CommonResponseBase, ICommonResponse [Newtonsoft.Json.JsonProperty("code")] [System.Text.Json.Serialization.JsonPropertyName("code")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public virtual int ErrorCode { get; set; } + public virtual int Code { get; set; } /// /// 获取 TikTok Shop API 返回的错误信息。 /// [Newtonsoft.Json.JsonProperty("message")] [System.Text.Json.Serialization.JsonPropertyName("message")] - public virtual string? ErrorMessage { get; set; } + public virtual string? Message { get; set; } /// /// 获取 TikTok Shop API 返回的请求唯一标识。 @@ -30,13 +30,13 @@ public abstract class TikTokShopResponse : CommonResponseBase, ICommonResponse /// /// 获取一个值,该值指示调用 TikTok API 是否成功。 /// - /// (即 HTTP 状态码为 200,且 值为 0) + /// (即 HTTP 状态码为 200,且 值为 0) /// /// /// public override bool IsSuccessful() { - return GetRawStatus() == 200 && ErrorCode == 0; + return GetRawStatus() == 200 && Code == 0; } } diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs index 5dc8b5f7..208df410 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs @@ -6,6 +6,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests { + using SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy; + public class CodeAnalyzeTests { // NOTICE: @@ -14,6 +16,14 @@ public class CodeAnalyzeTests [Fact(DisplayName = "代码质量分析")] public void CodeAnalyze() + { + Assert.Multiple( + CodeAnalyze_BaseSDK, + CodeAnalyze_ExtendedSDK_Legacy + ); + } + + private void CodeAnalyze_BaseSDK() { Assert.Null(Record.Exception(() => { @@ -23,6 +33,7 @@ public void CodeAnalyze() SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop", + IgnoreExecutingExtensionTypes = static type => type.Namespace!.Contains(".ExtendedSDK."), ThrowOnNotFoundRequestModelTypes = true, ThrowOnNotFoundResponseModelTypes = true, ThrowOnNotFoundExecutingExtensionTypes = true @@ -42,6 +53,53 @@ public void CodeAnalyze() SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/"), ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/_/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/_/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/_/", + ThrowOnNotFoundRequestModelClassCodeFiles = true, + ThrowOnNotFoundResponseModelClassCodeFiles = true, + ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundRequestModelSerializationSampleFiles = true, + ThrowOnNotFoundResponseModelSerializationSampleFiles = true + }; + new SourceFileAnalyzer(options).AssertNoIssues(); + })); + } + + private void CodeAnalyze_ExtendedSDK_Legacy() + { + Assert.Null(Record.Exception(() => + { + var options = new TypeDeclarationAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(TikTokShopLegacyClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy.Models", + SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy", + ThrowOnNotFoundRequestModelTypes = true, + ThrowOnNotFoundResponseModelTypes = true, + ThrowOnNotFoundExecutingExtensionTypes = true + }; + new TypeDeclarationAnalyzer(options).AssertNoIssues(); + })); + + Assert.Null(Record.Exception(() => + { + string workdir = Environment.CurrentDirectory; + string projdir = Path.Combine(workdir, "../../../../../"); + + var options = new SourceFileAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(TikTokShopLegacyClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy.Models", + ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/"), + ProjectSourceRequestModelClassCodeSubDirectory = "ExtendedSDK/Legacy/Models/", + ProjectSourceResponseModelClassCodeSubDirectory = "ExtendedSDK/Legacy/Models/", + ProjectSourceExecutingExtensionClassCodeSubDirectory = "ExtendedSDK/Legacy/Extensions/", + ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/Legacy/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/Legacy/", ThrowOnNotFoundRequestModelClassCodeFiles = true, ThrowOnNotFoundResponseModelClassCodeFiles = true, ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Auth/AuthGetTokenResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Auth/AuthGetTokenResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Auth/AuthGetTokenResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Auth/AuthGetTokenResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Auth/AuthRefreshTokenResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Auth/AuthRefreshTokenResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Auth/AuthRefreshTokenResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Auth/AuthRefreshTokenResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceGetOrderSettlementListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceGetOrderSettlementListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceGetOrderSettlementListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceGetOrderSettlementListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchSettlementsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchSettlementsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchSettlementsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchSettlementsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchSettlementsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchSettlementsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchSettlementsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchSettlementsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchTransactionsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchTransactionsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchTransactionsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchTransactionsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchTransactionsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchTransactionsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Finance/FinanceSearchTransactionsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Finance/FinanceSearchTransactionsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentBatchShipPackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentBatchShipPackageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentBatchShipPackageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentBatchShipPackageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentBatchShipPackageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentBatchShipPackageResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentBatchShipPackageResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentBatchShipPackageResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentCreateLabelRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentCreateLabelRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentCreateLabelRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentCreateLabelRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentCreateLabelResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentCreateLabelResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentCreateLabelResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentCreateLabelResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackageDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackageDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackageDetailResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackageDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackagePickupConfigResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackagePickupConfigResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackagePickupConfigResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackagePickupConfigResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackageShippingDocumentResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackageShippingInfoResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackageShippingInfoResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetPackageShippingInfoResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetPackageShippingInfoResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetShippingServiceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetShippingServiceRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetShippingServiceRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetShippingServiceRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetShippingServiceResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetShippingServiceResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentGetShippingServiceResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentGetShippingServiceResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentSearchPackagesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentSearchPackagesRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentSearchPackagesRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentSearchPackagesRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentSearchPackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentSearchPackagesResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentSearchPackagesResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentSearchPackagesResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentShipPackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentShipPackageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentShipPackageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentShipPackageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentShipPackageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentShipPackageResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentShipPackageResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentShipPackageResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageDeliveryStatusRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageDeliveryStatusResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageShippingInfoRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/FulfillmentUpdatePackageShippingInfoResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentConfirmOrderSplitRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentConfirmOrderSplitResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentRemovePackageOrdersRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentRemovePackageOrdersResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentVerifyOrderSplitRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Order/FulfillmentVerifyOrderSplitResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/PreCombinePackage/FulfillmentConfirmPreCombinePackageResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/PreCombinePackage/FulfillmentSearchPreCombinePackagesResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadFileRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadFileRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadFileRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadFileRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadFileResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadFileResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadFileResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadFileResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadImageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadImageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadImageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadImageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadImageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadImageResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Fulfillment/Upload/FulfillmentUploadImageResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Fulfillment/Upload/FulfillmentUploadImageResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/Category/GlobalProductGetAttributeListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/Category/GlobalProductGetAttributeListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/Category/GlobalProductGetAttributeListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/Category/GlobalProductGetAttributeListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/Category/GlobalProductGetCategoryListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/Category/GlobalProductGetCategoryListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/Category/GlobalProductGetCategoryListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/Category/GlobalProductGetCategoryListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/Category/GlobalProductGetCategoryRulesResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductCreateProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductCreateProductRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductCreateProductRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductCreateProductRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductCreateProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductCreateProductResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductCreateProductResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductCreateProductResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductDeleteProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductDeleteProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductDeleteProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductDeleteProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductDeleteProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductDeleteProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductDeleteProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductDeleteProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductGetProductDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductGetProductDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductGetProductDetailResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductGetProductDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductPublishProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductPublishProductRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductPublishProductRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductPublishProductRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductPublishProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductPublishProductResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductPublishProductResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductPublishProductResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductSearchProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductSearchProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductSearchProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductSearchProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductSearchProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductSearchProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductSearchProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductSearchProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductPriceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductPriceRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductPriceRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductPriceRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductPriceResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductPriceResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductPriceResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductPriceResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/GlobalProduct/GlobalProductUpdateProductResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/GlobalProduct/GlobalProductUpdateProductResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetShippingDocumentResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetShippingDocumentResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetShippingDocumentResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetShippingDocumentResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetShippingInfoResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetShippingInfoResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetShippingInfoResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetShippingInfoResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetShippingProviderListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetShippingProviderListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetShippingProviderListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetShippingProviderListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetSubscribedDeliveryOptionsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetSubscribedDeliveryOptionsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetWarehouseListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetWarehouseListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsGetWarehouseListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsGetWarehouseListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsUpdateShippingInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsUpdateShippingInfoRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Logistics/LogisticsUpdateShippingInfoRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Logistics/LogisticsUpdateShippingInfoRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderGetOrderDetailRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderGetOrderDetailRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderGetOrderDetailRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderGetOrderDetailRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderGetOrderDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderGetOrderDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderGetOrderDetailResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderGetOrderDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderSearchOrdersRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderSearchOrdersRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderSearchOrdersRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderSearchOrdersRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderSearchOrdersResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderSearchOrdersResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderSearchOrdersResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderSearchOrdersResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderShipOrderRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderShipOrderRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Order/OrderShipOrderRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Order/OrderShipOrderRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductCreateBrandRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductCreateBrandRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductCreateBrandRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductCreateBrandRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductCreateBrandResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductCreateBrandResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductCreateBrandResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductCreateBrandResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetAttributeListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetAttributeListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetAttributeListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetAttributeListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetBrandListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetBrandListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetBrandListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetBrandListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetCategoryListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetCategoryListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetCategoryListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetCategoryListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetCategoryRulesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetCategoryRulesResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductGetCategoryRulesResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductGetCategoryRulesResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductRecommendCategoryRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductRecommendCategoryRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductRecommendCategoryRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductRecommendCategoryRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductRecommendCategoryResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductRecommendCategoryResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Category/ProductRecommendCategoryResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Category/ProductRecommendCategoryResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductActivateProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductActivateProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductActivateProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductActivateProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductActivateProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductActivateProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductActivateProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductActivateProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductCreateProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductCreateProductRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductCreateProductRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductCreateProductRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductCreateProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductCreateProductResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductCreateProductResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductCreateProductResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeactivateProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeactivateProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeactivateProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeactivateProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeactivateProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeactivateProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeactivateProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeactivateProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeleteProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeleteProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeleteProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeleteProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeleteProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeleteProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductDeleteProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductDeleteProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductGetProductDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductGetProductDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductGetProductDetailResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductGetProductDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductGetProductStocksRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductGetProductStocksRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductGetProductStocksRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductGetProductStocksRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductGetProductStocksResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductGetProductStocksResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductGetProductStocksResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductGetProductStocksResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductPrecheckResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductPrecheckResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductPrecheckResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductPrecheckResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductRecoverProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductRecoverProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductRecoverProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductRecoverProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductRecoverProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductRecoverProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductRecoverProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductRecoverProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductSearchProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductSearchProductsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductSearchProductsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductSearchProductsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductSearchProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductSearchProductsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductSearchProductsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductSearchProductsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductPriceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductPriceRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductPriceRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductPriceRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductPriceResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductPriceResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductPriceResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductPriceResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductStockRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductStockRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductStockRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductStockRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductStockResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductStockResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/ProductUpdateProductStockResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/ProductUpdateProductStockResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadFileRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadFileRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadFileRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadFileRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadFileResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadFileResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadFileResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadFileResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadImageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadImageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadImageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadImageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadImageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadImageResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Product/Upload/ProductUploadImageResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Product/Upload/ProductUploadImageResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionAddOrUpdateActivityItemsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionAddOrUpdateActivityItemsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionRemoveActivityItemsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionRemoveActivityItemsRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionRemoveActivityItemsRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionRemoveActivityItemsRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionRemoveActivityItemsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionRemoveActivityItemsResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/Items/PromotionRemoveActivityItemsResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/Items/PromotionRemoveActivityItemsResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionCreateActivityRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionCreateActivityRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionCreateActivityRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionCreateActivityRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionCreateActivityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionCreateActivityResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionCreateActivityResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionCreateActivityResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionDeactivateActivityRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionDeactivateActivityRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionDeactivateActivityRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionDeactivateActivityRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionDeactivateActivityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionDeactivateActivityResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionDeactivateActivityResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionDeactivateActivityResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionGetActivityDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionGetActivityDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionGetActivityDetailResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionGetActivityDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionSearchActivitiesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionSearchActivitiesRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionSearchActivitiesRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionSearchActivitiesRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionSearchActivitiesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionSearchActivitiesResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionSearchActivitiesResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionSearchActivitiesResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionUpdateActivityRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionUpdateActivityRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionUpdateActivityRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionUpdateActivityRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionUpdateActivityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionUpdateActivityResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Promotion/PromotionUpdateActivityResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Promotion/PromotionUpdateActivityResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseCancelOrderRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseCancelOrderRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseCancelOrderRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseCancelOrderRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseCancelOrderResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseCancelOrderResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseCancelOrderResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseCancelOrderResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseConfirmReverseRequestRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseConfirmReverseRequestRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseConfirmReverseRequestRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseConfirmReverseRequestRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseGetRejectReasonListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseGetRejectReasonListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseGetRejectReasonListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseGetRejectReasonListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseRejectReverseRequestRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseRejectReverseRequestRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseRejectReverseRequestRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseRejectReverseRequestRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseSearchReverseOrdersRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseSearchReverseOrdersRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseSearchReverseOrdersRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseSearchReverseOrdersRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseSearchReverseOrdersResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseSearchReverseOrdersResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Reverse/ReverseSearchReverseOrdersResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Reverse/ReverseSearchReverseOrdersResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Seller/SellerCheckGlobalProductModeResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Seller/SellerCheckGlobalProductModeResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Seller/SellerCheckGlobalProductModeResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Seller/SellerCheckGlobalProductModeResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Seller/SellerGetGlobalActiveShopListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Seller/SellerGetGlobalActiveShopListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Seller/SellerGetGlobalActiveShopListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Seller/SellerGetGlobalActiveShopListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Shop/ShopGetAuthorizedShopListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Shop/ShopGetAuthorizedShopListResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Shop/ShopGetAuthorizedShopListResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/Shop/ShopGetAuthorizedShopListResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/Legacy/SupplyChain/SupplyChainSyncPackageFulfillmentDataResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthGetTokenResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthGetTokenResponse.json new file mode 100644 index 00000000..0a2b1842 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthGetTokenResponse.json @@ -0,0 +1,15 @@ +{ + "code": 0, + "message": "success", + "data": { + "access_token": "ROW_Fw8rBwAAAAAkW03FYd09DG-9INtpw361hWthei8S3fHX8iPJ5AUv99fLSCYD9-UucaqxTgNRzKZxi5-tfFMtdWqglEt5_iCk", + "access_token_expire_in": 1660556783, + "refresh_token": "NTUxZTNhYTQ2ZDk2YmRmZWNmYWY2YWY2YzkxNGYwNjQ3YjkzYTllYjA0YmNlMw", + "refresh_token_expire_in": 1691487031, + "open_id": "7010736057180325637", + "seller_name": "Jjj test shop", + "seller_base_region": "ID", + "user_type": 0 + }, + "request_id": "2022080809462301024509910319695C45" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthRefreshTokenResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthRefreshTokenResponse.json new file mode 100644 index 00000000..0a2b1842 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Auth/AuthRefreshTokenResponse.json @@ -0,0 +1,15 @@ +{ + "code": 0, + "message": "success", + "data": { + "access_token": "ROW_Fw8rBwAAAAAkW03FYd09DG-9INtpw361hWthei8S3fHX8iPJ5AUv99fLSCYD9-UucaqxTgNRzKZxi5-tfFMtdWqglEt5_iCk", + "access_token_expire_in": 1660556783, + "refresh_token": "NTUxZTNhYTQ2ZDk2YmRmZWNmYWY2YWY2YzkxNGYwNjQ3YjkzYTllYjA0YmNlMw", + "refresh_token_expire_in": 1691487031, + "open_id": "7010736057180325637", + "seller_name": "Jjj test shop", + "seller_base_region": "ID", + "user_type": 0 + }, + "request_id": "2022080809462301024509910319695C45" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventDeleteWebhookRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventDeleteWebhookRequest.json new file mode 100644 index 00000000..366588e9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventDeleteWebhookRequest.json @@ -0,0 +1,3 @@ +{ + "event_type": "ORDER_STATUS_CHANGE" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventGetWebhooksResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventGetWebhooksResponse.json new file mode 100644 index 00000000..35543cda --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventGetWebhooksResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "total_count": 1, + "webhooks": [ + { + "address": "https://partner.tiktokshop.com", + "create_time": 1635338186, + "event_type": "ORDER_STATUS_CHANGE", + "update_time": 1635338186 + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventUpdateWebhookRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventUpdateWebhookRequest.json new file mode 100644 index 00000000..f763655b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Event/EventUpdateWebhookRequest.json @@ -0,0 +1,4 @@ +{ + "address": "https://partner.tiktokshop.com", + "event_type": "ORDER_STATUS_CHANGE" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetPermissionsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetPermissionsResponse.json new file mode 100644 index 00000000..06c52fcd --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetPermissionsResponse.json @@ -0,0 +1,10 @@ +{ + "code": 0, + "data": { + "permissions": [ + "MANAGE_GLOBAL_PRODUCT" + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetShopsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetShopsResponse.json new file mode 100644 index 00000000..8865900c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Seller/SellerGetShopsResponse.json @@ -0,0 +1,13 @@ +{ + "code": 0, + "data": { + "shops": [ + { + "id": "36123502970007", + "region": "GB" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Shop/AuthorizationGetShopsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Shop/AuthorizationGetShopsResponse.json new file mode 100644 index 00000000..df2dbc90 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Shop/AuthorizationGetShopsResponse.json @@ -0,0 +1,17 @@ +{ + "code": 0, + "data": { + "shops": [ + { + "cipher": "GCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3", + "code": "CNGBCBA4LLU8", + "id": "7000714532876273420", + "name": "Maomao beauty shop", + "region": "GB", + "seller_type": "CROSS_BORDER" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesRequest.json new file mode 100644 index 00000000..d4a98ed0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesRequest.json @@ -0,0 +1,34 @@ +{ + "packages": [ + { + "create_time_millis": 1694176625765, + "dimension": { + "height": 42, + "length": 34, + "unit": "METER", + "width": 425 + }, + "handover_time_millis": 1694176625765, + "id": "28427944530283", + "provider_warehouse_code": "7475973290484254255", + "ship_time_millis": 1694176625765, + "shipping_origin_city": "CityA", + "shipping_provider_id": "2435653524354624", + "shipping_provider_name": "ProviderA", + "skus": [ + { + "id": "4235346547", + "quantity": 13 + } + ], + "time_zone": "UTC+8", + "tracking_number": "WB53452356", + "weight": { + "unit": "KILOGRAM", + "value": 342 + }, + "wms_order_id": "324246554745" + } + ], + "warehouse_provider_id": "7342984797904049750" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesResponse.json new file mode 100644 index 00000000..ba69ed05 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/SupplyChain/SupplyChainSyncPackagesResponse.json @@ -0,0 +1,20 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": "39003015", + "detail": { + "package_id": "4645645645" + }, + "message": "Provider is not supported by TikTok Shop" + } + ], + "success_packages": [ + "5345241234", + "42365346" + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/TestCase_RequestSigningTests.cs b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/TestCase_RequestSigningTests.cs new file mode 100644 index 00000000..f2f90448 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/TestCase_RequestSigningTests.cs @@ -0,0 +1,88 @@ +using System; +using System.Net; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Xunit; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests +{ + public partial class TestCase_RequestSigningTests + { + [Fact(DisplayName = "测试用例:即时配送请求签名")] + public async Task TestRequestSignature() + { + var mockClient = TikTokShopClientBuilder + .Create(new TikTokShopClientOptions() + { + AppKey = "68xu9ks5p4i8", + AppSecret = "e59af819cc" + }) + .UseHttpClient(new MockHttpClient()) + .Build(); + + // Sign GET request + { + var request = new Models.EventGetWebhooksRequest() + { + ShopCipher = "ROW_xkMbgAAAeVAQra0eZWebFQq5aIK", + Timestamp = 1696909648, + ApiVersion = 202309 + }; + var response = await mockClient.ExecuteEventGetWebhooksAsync(request); + + Assert.Equal("ed58e1b5e59865c22a7b828c1cab65007441f43cc91a6cb2f2cdc638e0995a37", response.GetRawHeaders().GetFirstValueOrEmpty(MOCK_HEADER_NAME), ignoreCase: true); + } + + // Sign non-GET request + { + var request = new Models.EventUpdateWebhookRequest() + { + ShopCipher = "ROW_xkMbgAAAeVAQra0eZWebFQq5aIK", + Timestamp = 1696909648, + ApiVersion = 202309, + EventType = "PACKAGE_UPDATE", + WebhookUrl = "https://partner.tiktokshop.com" + }; + var response = await mockClient.ExecuteEventUpdateWebhookAsync(request); + + Assert.Equal("701dd6deb2389fe4c469b89bd37fc56f96a6da6afeb4d01c9077a65169752fa7", response.GetRawHeaders().GetFirstValueOrEmpty(MOCK_HEADER_NAME), ignoreCase: true); + } + } + } + + partial class TestCase_RequestSigningTests + { + private const string MOCK_HEADER_NAME = "Mock-Sign"; + + public class MockHttpClient : HttpClient + { + public MockHttpClient() + : base(new MockHttpMessageHandler(new HttpClientHandler())) + { + } + } + + public class MockHttpMessageHandler : DelegatingHandler + { + public MockHttpMessageHandler(HttpMessageHandler innerHandler) + : base(innerHandler) + { + } + + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + var resp = new HttpResponseMessage + { + RequestMessage = request, + StatusCode = HttpStatusCode.NoContent, + Content = new ByteArrayContent(Array.Empty()), + }; + var queryParams = new QueryParamCollection(request.RequestUri?.Query); + resp.Headers.TryAddWithoutValidation(MOCK_HEADER_NAME, string.Join(",", queryParams.GetAll("sign"))); + return Task.FromResult(resp); + } + } + } +} From 17c9e56f13904e86f662fe06abad41b241bee8c1 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 10 May 2024 19:54:12 +0800 Subject: [PATCH 02/15] =?UTF-8?q?docs:=20=E5=AE=8C=E5=96=84=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/TikTokGlobalShop/Basic_LegacyAPI.md | 119 ++++++++++++++++++ .../TikTokGlobalShop/Basic_ModelDefinition.md | 96 ++------------ docs/TikTokGlobalShop/README.md | 9 +- 3 files changed, 135 insertions(+), 89 deletions(-) create mode 100644 docs/TikTokGlobalShop/Basic_LegacyAPI.md diff --git a/docs/TikTokGlobalShop/Basic_LegacyAPI.md b/docs/TikTokGlobalShop/Basic_LegacyAPI.md new file mode 100644 index 00000000..e9866bda --- /dev/null +++ b/docs/TikTokGlobalShop/Basic_LegacyAPI.md @@ -0,0 +1,119 @@ +## Legacy API (pre-v202309) + +Legacy API versions (pre-v202309) will no longer be supported or maintained from 2024-06-30 and will be retired on 2024-12-31. + +New apps should use v202309 exclusively and not legacy versions. + +If you are still using the legacy versions API, please follow below: + +```csharp +using SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy; + +var options = new TikTokShopLegacyClientOptions() +{ + AppKey = "${APP_KEY}", + AppSecret = "${APP_SECRET}}" +}; +var client = new TikTokShopLegacyClientBuilder.Create(options).Build(); +``` + +--- + +### APIs + +
+ +[View Details] + +- Authorization + - Get Access Token: `AuthGetToken` + - Refresh Access Token: `AuthRefreshToken` +- Shop + - Get Authorized Shop: `ShopGetAuthorizedShopList` +- Seller + - Get Active Shop List: `SellerGetGlobalActiveShopList` + - Check Global Product Mode: `SellerCheckGlobalProductMode` +- Product + - Upload File: `ProductUploadFile` + - Upload Image: `ProductUploadImage` + - Create Product: `ProductCreateProduct` + - Delete Product: `ProductDeleteProducts` + - Edit Product: `ProductUpdateProduct` + - Update Stock: `ProductUpdateProductStock` + - Get Product List: `ProductSearchProducts` + - Get Product Detail: `ProductGetProductDetail` + - Get Product Stock: `ProductGetProductStocks` + - Deactivate Product: `ProductDeactivateProducts` + - Activate Product: `ProductActivateProducts` + - Recover Deleted Product: `ProductRecoverProducts` + - Update Price: `ProductUpdateProductPrice` + - Get Categories: `ProductGetCategoryList` + - Get Brands: `ProductGetBrandList` + - Create Brand: `ProductCreateBrand` + - Get Attributes: `ProductGetAttributeList` + - Get Category Rule: `ProductGetCategoryRules` + - Category Recommended: `ProductRecommendCategory` + - Pre-check for Operating Product: `ProductPrecheck` +- Order + - Get Order Detail: `OrderGetOrderDetail` + - Get Order List: `OrderSearchOrders` + - Ship Order: `OrderShipOrder` +- Fulfillment + - Verify Order Split: `FulfillmentVerifyOrderSplit` + - Confirm Order Split: `FulfillmentConfirmOrderSplit` + - Search Pre Combine Package: `FulfillmentSearchPreCombinePackages` + - Get Package Shipping Document: `FulfillmentGetShippingDocument` + - Update Package Shipping Info: `FulfillmentUpdateShippingInfo` + - Get Package Shipping Info: `FulfillmentGetShippingInfo` + - Search Package: `FulfillmentSearchPackages` + - Ship Package: `FulfillmentShipPackage` + - Get Package Pickup Config: `FulfillmentGetPackagePickupConfigList` + - Remove Package Order: `FulfillmentRemovePackageOrders` + - Confirm Precombine Package: `FulfillmentConfirmPreCombinePackage` + - Get Package Detail: `FulfillmentGetPackageDetail` + - Fulfillment Upload Image: `FulfillmentUploadImage` + - Update Package Delivery Status: `FulfillmentUpdatePackageDeliveryStatus` + - Fulfillment Upload File: `FulfillmentUploadFile` + - Batch Ship Packages: `FulfillmentBatchShipPackage` + - Get Shipping Service: `FulfillmentGetShippingService` + - Create Label: `FulfillmentCreateLabel` +- Logistics + - Get Subscribed Delivery Options: `LogisticsGetSubscribedDeliveryOptions` + - Update Shipping Info: `LogisticsUpdateShippingInfo` + - Get Shipping Document: `LogisticsGetShippingDocument` + - Get Shipping Provider: `LogisticsGetShippingProviderList` + - Get Shipping Info: `LogisticsGetShippingInfo` + - Get Warehouse List: `LogisticsGetWarehouseList` +- Reverse + - Reject Reverse Request: `ReverseRejectReverseRequest` + - Get Reverse Order List: `ReverseSearchReverseOrders` + - Confirm Reverse Request: `ReverseConfirmReverseRequest` + - Cancel Order: `ReverseCancelOrder` + - Get Reject Reason List: `ReverseGetRejectReasonList` +- Finance + - Get Settlements: `FinanceSearchSettlements` + - Get Transactions: `FinanceSearchTransactions` + - Get Order Settlements: `FinanceGetOrderSettlementList` +- Global Product + - Create Global Product: `GlobalProductCreateProduct` + - Get Global Product List: `GlobalProductSearchProducts` + - Get Global Product Detail: `GlobalProductGetProductDetail` + - Publish Global Product: `GlobalProductPublishProduct` + - Update Global Product Price: `GlobalProductUpdateProductPrice` + - Get Global Categories: `GlobalProductGetCategoryList` + - Edit Global Product: `GlobalProductUpdateProduct` + - Get Global Attributes: `GlobalProductGetAttributeList` + - Get Global Category Rule: `GlobalProductGetCategoryRules` + - Delete Global Product: `GlobalProductDeleteProducts` +- Promotion + - Update Basic Information: `PromotionUpdateActivity` + - Get Promotion List: `PromotionSearchActivities` + - Deactivate Promotion: `PromotionDeactivateActivity` + - Remove Promotion Item: `PromotionRemoveActivityItems` + - Get Promotion Details: `PromotionGetActivityDetail` + - Add/Update Discount Item: `PromotionAddOrUpdateActivityItems` + - Add Promotion: `PromotionCreateActivity` +- Supply Chain + - Package Fulfillment Data Sync: `SupplyChainSyncPackageFulfillmentData` + +
diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index cd6d120e..e73325ba 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -14,95 +14,19 @@ Naming Policies: [View Details] -- Authorization +- Authentication - Get Access Token: `AuthGetToken` - Refresh Access Token: `AuthRefreshToken` -- Shop - - Get Authorized Shop: `ShopGetAuthorizedShopList` +- Authorization + - Get Authorized Shops: `AuthorizationGetShops` +- Event + - Get Shop Webhooks: `EventGetWebhooks` + - Update Shop Webhook: `EventUpdateWebhook` + - Delete Shop Webhook: `EventDeleteWebhook` - Seller - - Get Active Shop List: `SellerGetGlobalActiveShopList` - - Check Global Product Mode: `SellerCheckGlobalProductMode` -- Product - - Upload File: `ProductUploadFile` - - Upload Image: `ProductUploadImage` - - Create Product: `ProductCreateProduct` - - Delete Product: `ProductDeleteProducts` - - Edit Product: `ProductUpdateProduct` - - Update Stock: `ProductUpdateProductStock` - - Get Product List: `ProductSearchProducts` - - Get Product Detail: `ProductGetProductDetail` - - Get Product Stock: `ProductGetProductStocks` - - Deactivate Product: `ProductDeactivateProducts` - - Activate Product: `ProductActivateProducts` - - Recover Deleted Product: `ProductRecoverProducts` - - Update Price: `ProductUpdateProductPrice` - - Get Categories: `ProductGetCategoryList` - - Get Brands: `ProductGetBrandList` - - Create Brand: `ProductCreateBrand` - - Get Attributes: `ProductGetAttributeList` - - Get Category Rule: `ProductGetCategoryRules` - - Category Recommended: `ProductRecommendCategory` - - Pre-check for Operating Product: `ProductPrecheck` -- Order - - Get Order Detail: `OrderGetOrderDetail` - - Get Order List: `OrderSearchOrders` - - Ship Order: `OrderShipOrder` -- Fulfillment - - Verify Order Split: `FulfillmentVerifyOrderSplit` - - Confirm Order Split: `FulfillmentConfirmOrderSplit` - - Search Pre Combine Package: `FulfillmentSearchPreCombinePackages` - - Get Package Shipping Document: `FulfillmentGetShippingDocument` - - Update Package Shipping Info: `FulfillmentUpdateShippingInfo` - - Get Package Shipping Info: `FulfillmentGetShippingInfo` - - Search Package: `FulfillmentSearchPackages` - - Ship Package: `FulfillmentShipPackage` - - Get Package Pickup Config: `FulfillmentGetPackagePickupConfigList` - - Remove Package Order: `FulfillmentRemovePackageOrders` - - Confirm Precombine Package: `FulfillmentConfirmPreCombinePackage` - - Get Package Detail: `FulfillmentGetPackageDetail` - - Fulfillment Upload Image: `FulfillmentUploadImage` - - Update Package Delivery Status: `FulfillmentUpdatePackageDeliveryStatus` - - Fulfillment Upload File: `FulfillmentUploadFile` - - Batch Ship Packages: `FulfillmentBatchShipPackage` - - Get Shipping Service: `FulfillmentGetShippingService` - - Create Label: `FulfillmentCreateLabel` -- Logistics - - Get Subscribed Delivery Options: `LogisticsGetSubscribedDeliveryOptions` - - Update Shipping Info: `LogisticsUpdateShippingInfo` - - Get Shipping Document: `LogisticsGetShippingDocument` - - Get Shipping Provider: `LogisticsGetShippingProviderList` - - Get Shipping Info: `LogisticsGetShippingInfo` - - Get Warehouse List: `LogisticsGetWarehouseList` -- Reverse - - Reject Reverse Request: `ReverseRejectReverseRequest` - - Get Reverse Order List: `ReverseSearchReverseOrders` - - Confirm Reverse Request: `ReverseConfirmReverseRequest` - - Cancel Order: `ReverseCancelOrder` - - Get Reject Reason List: `ReverseGetRejectReasonList` -- Finance - - Get Settlements: `FinanceSearchSettlements` - - Get Transactions: `FinanceSearchTransactions` - - Get Order Settlements: `FinanceGetOrderSettlementList` -- Global Product - - Create Global Product: `GlobalProductCreateProduct` - - Get Global Product List: `GlobalProductSearchProducts` - - Get Global Product Detail: `GlobalProductGetProductDetail` - - Publish Global Product: `GlobalProductPublishProduct` - - Update Global Product Price: `GlobalProductUpdateProductPrice` - - Get Global Categories: `GlobalProductGetCategoryList` - - Edit Global Product: `GlobalProductUpdateProduct` - - Get Global Attributes: `GlobalProductGetAttributeList` - - Get Global Category Rule: `GlobalProductGetCategoryRules` - - Delete Global Product: `GlobalProductDeleteProducts` -- Promotion - - Update Basic Information: `PromotionUpdateActivity` - - Get Promotion List: `PromotionSearchActivities` - - Deactivate Promotion: `PromotionDeactivateActivity` - - Remove Promotion Item: `PromotionRemoveActivityItems` - - Get Promotion Details: `PromotionGetActivityDetail` - - Add/Update Discount Item: `PromotionAddOrUpdateActivityItems` - - Add Promotion: `PromotionCreateActivity` + - Get Seller Permissions: `SellerGetPermissions` + - Get Active Shops: `SellerGetShops` - Supply Chain - - Package Fulfillment Data Sync: `SupplyChainSyncPackageFulfillmentData` + - Confirm Package Shipment: `SupplyChainSyncPackages` diff --git a/docs/TikTokGlobalShop/README.md b/docs/TikTokGlobalShop/README.md index 3cb6cca4..d88d6f3c 100644 --- a/docs/TikTokGlobalShop/README.md +++ b/docs/TikTokGlobalShop/README.md @@ -49,7 +49,8 @@ using SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models; /* Example: Get Order List */ var request = new OrderSearchOrdersRequest() { - ShopId = "${SHOP_ID}" + AccessToken = "${ACCESS_TOKEN}", + ShopCipher = "${SHOP_CIPHER}", }; var response = await client.ExecuteOrderSearchOrdersAsync(request); if (response.IsSuccessful()) @@ -59,8 +60,8 @@ if (response.IsSuccessful()) } else { - Console.WriteLine("ErrorCode: " + response.ErrorCode); - Console.WriteLine("ErrorMessage: " + response.ErrorMessage); + Console.WriteLine("Code: " + response.Code); + Console.WriteLine("Message: " + response.Message); } ``` @@ -69,3 +70,5 @@ else ## Basic Usage - [API Reference Manual](./Basic_ModelDefinition.md) + +- [Legacy API (pre-v202309)](./Basic_LegacyAPI.md) From c0de05634bc8e18558dad5eb8bbb8dd8f359a30a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 11 May 2024 11:24:17 +0800 Subject: [PATCH 03/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E8=AE=A2=E5=8D=95=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokShopClientExecuteOrderExtensions.cs | 60 ++ .../Order/OrderGetOrderDetailRequest.cs | 17 + .../Order/OrderGetOrderDetailResponse.cs | 28 + .../Models/Order/OrderSearchOrdersRequest.cs | 93 ++ .../Models/Order/OrderSearchOrdersResponse.cs | 894 ++++++++++++++++++ .../_/Order/OrderGetOrderDetailResponse.json | 144 +++ .../_/Order/OrderSearchOrdersRequest.json | 10 + .../_/Order/OrderSearchOrdersResponse.json | 139 +++ 8 files changed, 1385 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderGetOrderDetailResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersResponse.json diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs new file mode 100644 index 00000000..c21d095d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs @@ -0,0 +1,60 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteOrderExtensions + { + /// + /// 异步调用 [POST] /order/{version}/orders/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOrderSearchOrdersAsync(this TikTokShopClient client, Models.OrderSearchOrdersRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "order", request.ApiVersion, "orders", "search") + .SetQueryParam("sort_field", request.SortField) + .SetQueryParam("sort_order", request.SortOrder) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /order/{version}/orders 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOrderGetOrderDetailAsync(this TikTokShopClient client, Models.OrderGetOrderDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "order", request.ApiVersion, "orders") + .SetQueryParam("ids", request.OrderIdList); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs new file mode 100644 index 00000000..f0b0cca3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /order/{version}/orders 接口的请求。 + /// + public class OrderGetOrderDetailRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public IList OrderIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs new file mode 100644 index 00000000..f3ba0d0e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /order/{version}/orders 接口的响应。 + /// + public class OrderGetOrderDetailResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Order : OrderSearchOrdersResponse.Types.Data.Types.Order + { + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("orders")] + [System.Text.Json.Serialization.JsonPropertyName("orders")] + public Types.Order[] OrderList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs new file mode 100644 index 00000000..e9d2b7cd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersRequest.cs @@ -0,0 +1,93 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /order/{version}/orders/search 接口的请求。 + /// + public class OrderSearchOrdersRequest : TikTokShopRequest + { + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_ge")] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_lt")] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置更新时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_ge")] + public long? UpdateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置更新时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_lt")] + public long? UpdateTimestampLessThan { get; set; } + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public string? OrderStatus { get; set; } + + /// + /// 获取或设置配送方式。 + /// + [Newtonsoft.Json.JsonProperty("shipping_type")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_type")] + public string? ShippingType { get; set; } + + /// + /// 获取或设置买家用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("buyer_user_id")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_user_id")] + public string? BuyerUserId { get; set; } + + /// + /// 获取或设置买家是否请求取消订单。 + /// + [Newtonsoft.Json.JsonProperty("is_buyer_request_cancel")] + [System.Text.Json.Serialization.JsonPropertyName("is_buyer_request_cancel")] + public bool? IsBuyerRequestCancel { get; set; } + + /// + /// 获取或设置排序字段。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortField { get; set; } + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortOrder { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs new file mode 100644 index 00000000..c1f5acbc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs @@ -0,0 +1,894 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /order/{version}/orders/search 接口的响应。 + /// + public class OrderSearchOrdersResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Order + { + public static class Types + { + public class Package + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string PackageId { get; set; } = default!; + } + + public class Payment + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置总金额。 + /// + [Newtonsoft.Json.JsonProperty("total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("total_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TotalAmount { get; set; } + + /// + /// 获取或设置 SKU 总金额。 + /// + [Newtonsoft.Json.JsonProperty("sub_total")] + [System.Text.Json.Serialization.JsonPropertyName("sub_total")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SubtotalAmount { get; set; } + + /// + /// 获取或设置运费。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFee { get; set; } + + /// + /// 获取或设置运费税。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_tax")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_tax")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeTax { get; set; } + + /// + /// 获取或设置卖家优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("seller_discount")] + [System.Text.Json.Serialization.JsonPropertyName("seller_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SellerDiscount { get; set; } + + /// + /// 获取或设置平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscount { get; set; } + + /// + /// 获取或设置商品原价。 + /// + [Newtonsoft.Json.JsonProperty("original_total_product_price")] + [System.Text.Json.Serialization.JsonPropertyName("original_total_product_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal OriginalTotalProductPrice { get; set; } + + /// + /// 获取或设置运费原价。 + /// + [Newtonsoft.Json.JsonProperty("original_shipping_fee")] + [System.Text.Json.Serialization.JsonPropertyName("original_shipping_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal OriginalShippingFee { get; set; } + + /// + /// 获取或设置运费卖家优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_seller_discount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_seller_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeSellerDiscount { get; set; } + + /// + /// 获取或设置运费平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_platform_discount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_platform_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeePlatformDiscount { get; set; } + + /// + /// 获取或设置零售配送费。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFee { get; set; } + + /// + /// 获取或设置税费。 + /// + [Newtonsoft.Json.JsonProperty("tax")] + [System.Text.Json.Serialization.JsonPropertyName("tax")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal Tax { get; set; } + + /// + /// 获取或设置小额订单费。 + /// + [Newtonsoft.Json.JsonProperty("small_order_fee")] + [System.Text.Json.Serialization.JsonPropertyName("small_order_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SmallOrderFee { get; set; } + + /// + /// 获取或设置商品税。 + /// + [Newtonsoft.Json.JsonProperty("product_tax")] + [System.Text.Json.Serialization.JsonPropertyName("product_tax")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ProductTax { get; set; } + + /// + /// 获取或设置买家服务费。 + /// + [Newtonsoft.Json.JsonProperty("buyer_service_fee")] + [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; } + } + + public class RecipientAddress + { + public static class Types + { + public class DistrictInfo + { + /// + /// 获取或设置行政区划级别。 + /// + [Newtonsoft.Json.JsonProperty("address_level")] + [System.Text.Json.Serialization.JsonPropertyName("address_level")] + public string AddressLevel { get; set; } = default!; + + /// + /// 获取或设置行政区划级别名称。 + /// + [Newtonsoft.Json.JsonProperty("address_level_name")] + [System.Text.Json.Serialization.JsonPropertyName("address_level_name")] + public string AddressLevelName { get; set; } = default!; + + /// + /// 获取或设置行政区划名称。 + /// + [Newtonsoft.Json.JsonProperty("address_name")] + [System.Text.Json.Serialization.JsonPropertyName("address_name")] + public string AddressName { get; set; } = default!; + } + + public class DeliveryPreferences + { + /// + /// 获取或设置归还地点。 + /// + [Newtonsoft.Json.JsonProperty("drop_off_location")] + [System.Text.Json.Serialization.JsonPropertyName("drop_off_location")] + public string DropOffLocation { get; set; } = default!; + } + } + + /// + /// 获取或设置完整地址。 + /// + [Newtonsoft.Json.JsonProperty("full_address")] + [System.Text.Json.Serialization.JsonPropertyName("full_address")] + public string FullAddress { get; set; } = default!; + + /// + /// 获取或设置国家或地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region_code")] + [System.Text.Json.Serialization.JsonPropertyName("region_code")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置电话号码。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string PhoneNumber { get; set; } = default!; + + /// + /// 获取或设置联系人姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string ContactName { get; set; } = default!; + + /// + /// 获取或设置邮编。 + /// + [Newtonsoft.Json.JsonProperty("postal_code")] + [System.Text.Json.Serialization.JsonPropertyName("postal_code")] + public string PostalCode { get; set; } = default!; + + /// + /// 获取或设置详细地址。 + /// + [Newtonsoft.Json.JsonProperty("address_detail")] + [System.Text.Json.Serialization.JsonPropertyName("address_detail")] + public string AddressDetail { get; set; } = default!; + + /// + /// 获取或设置地址行 1。 + /// + [Newtonsoft.Json.JsonProperty("address_line1")] + [System.Text.Json.Serialization.JsonPropertyName("address_line1")] + public string? AddressLine1 { get; set; } + + /// + /// 获取或设置地址行 2。 + /// + [Newtonsoft.Json.JsonProperty("address_line2")] + [System.Text.Json.Serialization.JsonPropertyName("address_line2")] + public string? AddressLine2 { get; set; } + + /// + /// 获取或设置地址行 3。 + /// + [Newtonsoft.Json.JsonProperty("address_line3")] + [System.Text.Json.Serialization.JsonPropertyName("address_line3")] + public string? AddressLine3 { get; set; } + + /// + /// 获取或设置地址行 4。 + /// + [Newtonsoft.Json.JsonProperty("address_line4")] + [System.Text.Json.Serialization.JsonPropertyName("address_line4")] + public string? AddressLine4 { get; set; } + + /// + /// 获取或设置行政区划信息。 + /// + [Newtonsoft.Json.JsonProperty("district_info")] + [System.Text.Json.Serialization.JsonPropertyName("district_info")] + public Types.DistrictInfo[]? DistrictInfoList { get; set; } + + /// + /// 获取或设置配送首选项。 + /// + [Newtonsoft.Json.JsonProperty("delivery_preferences")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_preferences")] + public Types.DeliveryPreferences? DeliveryPreferences { get; set; } + } + + public class LineItem + { + public static class Types + { + public class ItemTax + { + /// + /// 获取或设置税费类型。 + /// + [Newtonsoft.Json.JsonProperty("tax_type")] + [System.Text.Json.Serialization.JsonPropertyName("tax_type")] + public string TaxType { get; set; } = default!; + + /// + /// 获取或设置税率。 + /// + [Newtonsoft.Json.JsonProperty("tax_rate")] + [System.Text.Json.Serialization.JsonPropertyName("tax_rate")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TaxRate { get; set; } + + /// + /// 获取或设置税费。 + /// + [Newtonsoft.Json.JsonProperty("tax_amount")] + [System.Text.Json.Serialization.JsonPropertyName("tax_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TaxAmount { get; set; } + } + } + + /// + /// 获取或设置订单行 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string LineItemId { get; set; } = default!; + + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = default!; + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU 名称。 + /// + [Newtonsoft.Json.JsonProperty("sku_name")] + [System.Text.Json.Serialization.JsonPropertyName("sku_name")] + public string SKUName { get; set; } = default!; + + /// + /// 获取或设置 SKU 类型。 + /// + [Newtonsoft.Json.JsonProperty("sku_type")] + [System.Text.Json.Serialization.JsonPropertyName("sku_type")] + public string SKUType { get; set; } = default!; + + /// + /// 获取或设置 SKU 图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("sku_image")] + [System.Text.Json.Serialization.JsonPropertyName("sku_image")] + public string SKUImageUrl { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置原价。 + /// + [Newtonsoft.Json.JsonProperty("original_price")] + [System.Text.Json.Serialization.JsonPropertyName("original_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal OriginalPrice { get; set; } + + /// + /// 获取或设置售价。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalePrice { get; set; } + + /// + /// 获取或设置平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscount { get; set; } + + /// + /// 获取或设置卖家优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("seller_discount")] + [System.Text.Json.Serialization.JsonPropertyName("seller_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SellerDiscount { get; set; } + + /// + /// 获取或设置零售配送费。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFee { get; set; } + + /// + /// 获取或设置小额订单费。 + /// + [Newtonsoft.Json.JsonProperty("small_order_fee")] + [System.Text.Json.Serialization.JsonPropertyName("small_order_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SmallOrderFee { get; set; } + + /// + /// 获取或设置买家服务费。 + /// + [Newtonsoft.Json.JsonProperty("buyer_service_fee")] + [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; } + + /// + /// 获取或设置显示状态。 + /// + [Newtonsoft.Json.JsonProperty("display_status")] + [System.Text.Json.Serialization.JsonPropertyName("display_status")] + public string DisplayStatus { get; set; } = default!; + + /// + /// 获取或设置取消发起人。 + /// + [Newtonsoft.Json.JsonProperty("cancel_user")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_user")] + public string? CancelUser { get; set; } + + /// + /// 获取或设置取消原因。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] + public string? CancelReason { get; set; } + + /// + /// 获取或设置准备发货时间戳。 + /// + [Newtonsoft.Json.JsonProperty("rts_time")] + [System.Text.Json.Serialization.JsonPropertyName("rts_time")] + public long? ReadyToShipTimestamp { get; set; } + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string? ShippingProviderId { get; set; } + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_name")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] + public string? ShippingProviderName { get; set; } + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string? TrackingNumber { get; set; } + + /// + /// 获取或设置包裹 ID。 + /// + [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; } + + /// + /// 获取或设置包裹状态。 + /// + [Newtonsoft.Json.JsonProperty("package_status")] + [System.Text.Json.Serialization.JsonPropertyName("package_status")] + public string? PackageStatus { get; set; } + + /// + /// 获取或设置是否是礼品。 + /// + [Newtonsoft.Json.JsonProperty("is_gift")] + [System.Text.Json.Serialization.JsonPropertyName("is_gift")] + public bool IsGift { get; set; } + + /// + /// 获取或设置商品税费列表。 + /// + [Newtonsoft.Json.JsonProperty("item_tax")] + [System.Text.Json.Serialization.JsonPropertyName("item_tax")] + public Types.ItemTax[]? ItemTaxList { get; set; } + + /// + /// 获取或设置组合 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("combined_listing_skus")] + [System.Text.Json.Serialization.JsonPropertyName("combined_listing_skus")] + public CombinedListingSKU[]? CombinedListingSKUList { get; set; } + } + + public class CombinedListingSKU : LineItem + { + /// + /// 获取或设置 SKU 数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_count")] + [System.Text.Json.Serialization.JsonPropertyName("sku_count")] + public int SKUCount { get; set; } + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置支付方式名称。 + /// + [Newtonsoft.Json.JsonProperty("payment_method_name")] + [System.Text.Json.Serialization.JsonPropertyName("payment_method_name")] + public string? PaymentMethodName { get; set; } + + /// + /// 获取或设置支付信息。 + /// + [Newtonsoft.Json.JsonProperty("payment")] + [System.Text.Json.Serialization.JsonPropertyName("payment")] + public Types.Payment Payment { get; set; } = default!; + + /// + /// 获取或设置买家用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("user_id")] + [System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? BuyerUserId { get; set; } + + /// + /// 获取或设置买家匿名邮箱。 + /// + [Newtonsoft.Json.JsonProperty("buyer_email")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_email")] + public string? BuyerEmail { get; set; } + + /// + /// 获取或设置买家留言。 + /// + [Newtonsoft.Json.JsonProperty("buyer_message")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_message")] + public string? BuyerMessage { get; set; } + + /// + /// 获取或设置卖家备注。 + /// + [Newtonsoft.Json.JsonProperty("seller_note")] + [System.Text.Json.Serialization.JsonPropertyName("seller_note")] + public string? SellerNotes { get; set; } + + /// + /// 获取或设置订单行列表。 + /// + [Newtonsoft.Json.JsonProperty("line_items")] + [System.Text.Json.Serialization.JsonPropertyName("line_items")] + public Types.LineItem[]? LineItemList { get; set; } + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string? ShippingProviderId { get; set; } + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider")] + public string? ShippingProviderName { get; set; } + + /// + /// 获取或设置收货地址信息。 + /// + [Newtonsoft.Json.JsonProperty("recipient_address")] + [System.Text.Json.Serialization.JsonPropertyName("recipient_address")] + public Types.RecipientAddress RecipientAddress { get; set; } = default!; + + /// + /// 获取或设置是否已更改收货地址。 + /// + [Newtonsoft.Json.JsonProperty("has_updated_recipient_address")] + [System.Text.Json.Serialization.JsonPropertyName("has_updated_recipient_address")] + public bool HasUpdatedRecipientAddress { get; set; } + + /// + /// 获取或设置履约类型。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_type")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")] + public string? FulfillmentType { get; set; } + + /// + /// 获取或设置配送类型。 + /// + [Newtonsoft.Json.JsonProperty("delivery_type")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_type")] + public string? DeliveryType { get; set; } + + /// + /// 获取或设置配送方式 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_id")] + public string? DeliveryOptionId { get; set; } + + /// + /// 获取或设置配送方式名称。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_name")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_name")] + public string? DeliveryOptionName { get; set; } + + /// + /// 获取或设置配送截止日期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("delivery_due_time")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_due_time")] + public long? DeliveryDueTimestamp { get; set; } + + /// + /// 获取或设置配送方式所需时间戳。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_required_delivery_time")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_required_delivery_time")] + public long? DeliveryOptionRequiredDeliveryTimestamp { get; set; } + + /// + /// 获取或设置配送时间戳。 + /// + [Newtonsoft.Json.JsonProperty("delivery_time")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_time")] + public long? DeliveryTimestamp { get; set; } + + /// + /// 获取或设置发货方式。 + /// + [Newtonsoft.Json.JsonProperty("shipping_type")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_type")] + public string? ShippingType { get; set; } + + /// + /// 获取或设置发货截止日期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("shipping_due_time")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_due_time")] + public long? ShippingDueTimestamp { get; set; } + + /// + /// 获取或设置揽货截止日期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("collection_due_time")] + [System.Text.Json.Serialization.JsonPropertyName("collection_due_time")] + public long? CollectionDueTimestamp { get; set; } + + /// + /// 获取或设置揽货时间戳。 + /// + [Newtonsoft.Json.JsonProperty("collection_time")] + [System.Text.Json.Serialization.JsonPropertyName("collection_time")] + public long? CollectionTimestamp { get; set; } + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string? TrackingNumber { get; set; } + + /// + /// 获取或设置合单或拆单标记。 + /// + [Newtonsoft.Json.JsonProperty("split_or_combine_tag")] + [System.Text.Json.Serialization.JsonPropertyName("split_or_combine_tag")] + public string? SplitOrCombineTag { get; set; } + + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string? WarehouseId { get; set; } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public Types.Package[]? PackageList { get; set; } + + /// + /// 获取或设置付款时间戳。 + /// + [Newtonsoft.Json.JsonProperty("paid_time")] + [System.Text.Json.Serialization.JsonPropertyName("paid_time")] + public long? PaidTimestamp { get; set; } + + /// + /// 获取或设置 RTS 时间戳。 + /// + [Newtonsoft.Json.JsonProperty("rts_time")] + [System.Text.Json.Serialization.JsonPropertyName("rts_time")] + public long? ReadyToShipTimestamp { get; set; } + + /// + /// 获取或设置 RTS SLA 时间戳。 + /// + [Newtonsoft.Json.JsonProperty("rts_sla_time")] + [System.Text.Json.Serialization.JsonPropertyName("rts_sla_time")] + public long? ReadyToShipSLATimestamp { get; set; } + + /// + /// 获取或设置 TTS SLA 时间戳。 + /// + [Newtonsoft.Json.JsonProperty("tts_sla_time")] + [System.Text.Json.Serialization.JsonPropertyName("tts_sla_time")] + public long? TikTokShopSLATimestamp { get; set; } + + /// + /// 获取或设置发货 SLA 时间戳。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sla_time")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sla_time")] + public long? DeliverySLATimestamp { get; set; } + + /// + /// 获取或设置是否货到付款。 + /// + [Newtonsoft.Json.JsonProperty("is_cod")] + [System.Text.Json.Serialization.JsonPropertyName("is_cod")] + public bool IsCashOnDelivery { get; set; } + + /// + /// 获取或设置取消发起人。 + /// + [Newtonsoft.Json.JsonProperty("cancellation_initiator")] + [System.Text.Json.Serialization.JsonPropertyName("cancellation_initiator")] + public string? CancelUser { get; set; } + + /// + /// 获取或设置取消订单原因。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] + public string? CancelReason { get; set; } + + /// + /// 获取或设置取消订单 SLA 时间戳。 + /// + [Newtonsoft.Json.JsonProperty("cancel_order_sla_time")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_order_sla_time")] + public long? CancelOrderSLATimestamp { get; set; } + + /// + /// 获取或设置取消订单时间戳。 + /// + [Newtonsoft.Json.JsonProperty("cancel_time")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_time")] + public long? CancelTimestamp { get; set; } + + /// + /// 获取或设置请求取消订单时间戳。 + /// + [Newtonsoft.Json.JsonProperty("request_cancel_time")] + [System.Text.Json.Serialization.JsonPropertyName("request_cancel_time")] + public long? RequestCancelTimestamp { get; set; } + + /// + /// 获取或设置买家是否请求取消订单。 + /// + [Newtonsoft.Json.JsonProperty("is_buyer_request_cancel")] + [System.Text.Json.Serialization.JsonPropertyName("is_buyer_request_cancel")] + public bool? IsBuyerRequestCancel { get; set; } + + /// + /// 获取或设置个人税务登记号。 + /// + [Newtonsoft.Json.JsonProperty("cpf")] + [System.Text.Json.Serialization.JsonPropertyName("cpf")] + public string? CPFNumber { get; set; } + + /// + /// 获取或设置需要上传发票状态。 + /// + [Newtonsoft.Json.JsonProperty("need_upload_invoice")] + [System.Text.Json.Serialization.JsonPropertyName("need_upload_invoice")] + public string? NeedUploadInvoiceStatus { get; set; } + + /// + /// 获取或设置是否是示例订单。 + /// + [Newtonsoft.Json.JsonProperty("is_sample_order")] + [System.Text.Json.Serialization.JsonPropertyName("is_sample_order")] + public bool? IsSampleOrder { get; set; } + + /// + /// 获取或设置是否是延期订单。 + /// + [Newtonsoft.Json.JsonProperty("is_on_hold_order")] + [System.Text.Json.Serialization.JsonPropertyName("is_on_hold_order")] + public bool? IsOnHoldOrder { get; set; } + + /// + /// 获取或设置是否是替代订单。 + /// + [Newtonsoft.Json.JsonProperty("is_replacement_order")] + [System.Text.Json.Serialization.JsonPropertyName("is_replacement_order")] + public bool? IsReplacementOrder { get; set; } + + /// + /// 获取或设置替代订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("replaced_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("replaced_order_id")] + public string? ReplacedOrderId { get; set; } + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("orders")] + [System.Text.Json.Serialization.JsonPropertyName("orders")] + public Types.Order[] OrderList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderGetOrderDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderGetOrderDetailResponse.json new file mode 100644 index 00000000..41066c68 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderGetOrderDetailResponse.json @@ -0,0 +1,144 @@ +{ + "code": 0, + "data": { + "orders": [ + { + "buyer_email": "v2b2V5@chat.seller.tiktok.com", + "buyer_message": "Please ship asap!", + "cancel_order_sla_time": 1619621355, + "cancel_reason": "Pricing error", + "cancel_time": 1678389618, + "cancellation_initiator": "SELLER", + "collection_due_time": 1678389618, + "collection_time": 1678389618, + "cpf": "3213-31231412", + "create_time": 1619611561, + "delivery_due_time": 1678389618, + "delivery_option_id": "7091146663229654785", + "delivery_option_name": "Express shipping", + "delivery_option_required_delivery_time": 1678389618, + "delivery_sla_time": 1678389618, + "delivery_time": 1678389618, + "delivery_type": "HOME_DELIVERY", + "fulfillment_type": "FULFILLMENT_BY_SELLER", + "has_updated_recipient_address": false, + "id": "576461413038785752", + "is_buyer_request_cancel": false, + "is_cod": false, + "is_on_hold_order": false, + "is_replacement_order": false, + "is_sample_order": false, + "line_items": [ + { + "buyer_service_fee": "1000", + "cancel_reason": "Discount not as expected", + "cancel_user": "BUYER", + "combined_listing_skus": [ + { + "product_id": "1729582718312380456", + "sku_count": 1, + "sku_id": "2729382476852921123" + } + ], + "currency": "IDR", + "display_status": "TO_SHIP", + "id": "577086512123755123", + "is_gift": false, + "item_tax": [ + { + "tax_amount": "21.2", + "tax_rate": "0.35", + "tax_type": "SALES_TAX" + } + ], + "original_price": "0.01", + "package_id": "1153132168123859123", + "package_status": "TO_FULFILL", + "platform_discount": "0", + "product_id": "1729582718312380123", + "product_name": "Women's Winter Crochet Clothes", + "retail_delivery_fee": "1.28", + "rts_time": 1678389618, + "sale_price": "0.01", + "seller_discount": "0", + "seller_sku": "red_iphone_256", + "shipping_provider_id": "6617675021119438849", + "shipping_provider_name": "TT Virtual express", + "sku_id": "2729382476852921560", + "sku_image": "https://p16-oec-va.itexeitg.com/tos-maliva-d-o5syd03w52-us/46123e87d14f40b69b839", + "sku_name": "Iphone", + "sku_type": "PRE_ORDER", + "small_order_fee": "5000", + "tracking_number": "JX12345" + } + ], + "need_upload_invoice": "NEED_INVOICE", + "packages": [ + { + "id": "1152321127278713123" + } + ], + "paid_time": 1619611563, + "payment": { + "buyer_service_fee": "1000", + "currency": "IDR", + "original_shipping_fee": "5000", + "original_total_product_price": "5000", + "platform_discount": "5000", + "product_tax": "21.3", + "retail_delivery_fee": "1.28", + "seller_discount": "5000", + "shipping_fee": "5000", + "shipping_fee_platform_discount": "5000", + "shipping_fee_seller_discount": "5000", + "shipping_fee_tax": "11", + "small_order_fee": "3000", + "sub_total": "5000", + "tax": "5000", + "total_amount": "5000" + }, + "payment_method_name": "CCDC", + "recipient_address": { + "address_detail": "Unit one building 8", + "address_line1": "TikTok 5800 bristol Pkwy", + "address_line2": "Suite 100", + "address_line3": "\"\"", + "address_line4": "\"\"", + "delivery_preferences": { + "drop_off_location": "Front Door" + }, + "district_info": [ + { + "address_level": "L0", + "address_level_name": "Country", + "address_name": "United Kingdom" + } + ], + "full_address": "1199 Coleman Ave San Jose, CA 95110", + "name": "Zay", + "phone_number": "(+1)213-***-1234", + "postal_code": "95110", + "region_code": "US" + }, + "replaced_order_id": "576461416728782174", + "request_cancel_time": 1678389618, + "rts_sla_time": 1619611688, + "rts_time": 1619611563, + "seller_note": "seller note", + "shipping_due_time": 1678389618, + "shipping_provider": "TT Virtual express", + "shipping_provider_id": "6617675021119438849", + "shipping_type": "TIKTOK", + "split_or_combine_tag": "COMBINED", + "status": "UNPAID", + "tracking_number": "JX12345", + "tts_sla_time": 1619611761, + "update_time": 1619621355, + "user_id": "7021436810468230477", + "warehouse_id": "6955005333819123123" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersRequest.json new file mode 100644 index 00000000..b09ff885 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersRequest.json @@ -0,0 +1,10 @@ +{ + "buyer_user_id": "7213489962827123654", + "create_time_ge": 1623812664, + "create_time_lt": 1623812664, + "is_buyer_request_cancel": false, + "order_status": "UNPAID", + "shipping_type": "TIKTOK", + "update_time_ge": 1623812664, + "update_time_lt": 1623812664 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersResponse.json new file mode 100644 index 00000000..67baf678 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersResponse.json @@ -0,0 +1,139 @@ +{ + "code": 0, + "data": { + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA+7D1ud64MPNz5OaT", + "orders": [ + { + "buyer_email": "v2b2V5@chat.seller.tiktok.com\n", + "buyer_message": "Please ship asap!", + "cancel_order_sla_time": 1619621355, + "cancel_reason": "Pricing error", + "cancel_time": 1678389618, + "cancellation_initiator": "SELLER", + "collection_due_time": 1678389618, + "collection_time": 1678389618, + "cpf": "3213-31231412", + "create_time": 1619611561, + "delivery_due_time": 1678389618, + "delivery_option_id": "7091146663229654785", + "delivery_option_name": "Shipped from seller", + "delivery_option_required_delivery_time": 1678389618, + "delivery_sla_time": 1678389618, + "delivery_time": 1678389618, + "delivery_type": "HOME_DELIVERY", + "fulfillment_type": "FULFILLMENT_BY_SELLER", + "has_updated_recipient_address": false, + "id": "576461413038785752", + "is_buyer_request_cancel": false, + "is_cod": false, + "is_on_hold_order": false, + "is_replacement_order": false, + "is_sample_order": false, + "line_items": [ + { + "buyer_service_fee": "1000", + "cancel_reason": "Discount not as expected", + "cancel_user": "BUYER", + "currency": "IDR", + "display_status": "TO_SHIP", + "id": "577086512123755123", + "is_gift": false, + "item_tax": [ + { + "tax_amount": "21.2", + "tax_rate": "0.35", + "tax_type": "SALES_TAX" + } + ], + "original_price": "0.01", + "package_id": "1153132168123859123\n", + "package_status": "TO_FULFILL", + "platform_discount": "0", + "product_id": "1729582718312380123", + "product_name": "Women's Winter Crochet Clothes", + "retail_delivery_fee": "1.28", + "rts_time": 1678389618, + "sale_price": "0.01", + "seller_discount": "0", + "seller_sku": "red_iphone_256", + "shipping_provider_id": "6617675021119438849", + "shipping_provider_name": "TT Virtual express", + "sku_id": "2729382476852921560", + "sku_image": "https://p16-oec-va.itexeitg.com/tos-maliva-d-o5syd03w52-us/46123e87d14f40b69b839", + "sku_name": "Iphone", + "sku_type": "PRE_ORDER", + "small_order_fee": "5000", + "tracking_number": "JX12345" + } + ], + "need_upload_invoice": "NEED_INVOICE", + "packages": [ + { + "id": "1152321127278713123" + } + ], + "paid_time": 1619611563, + "payment": { + "buyer_service_fee": "1000", + "currency": "IDR", + "original_shipping_fee": "5000", + "original_total_product_price": "5000", + "platform_discount": "5000", + "product_tax": "21.3", + "retail_delivery_fee": "1.28", + "seller_discount": "5000", + "shipping_fee": "5000", + "shipping_fee_platform_discount": "5000", + "shipping_fee_seller_discount": "5000", + "shipping_fee_tax": "11", + "small_order_fee": "3000", + "sub_total": "5000", + "tax": "5000", + "total_amount": "5000" + }, + "payment_method_name": "CCDC", + "recipient_address": { + "address_detail": "Unit one building 8", + "address_line1": "TikTok 5800 bristol Pkwy", + "address_line2": "Suite 100", + "address_line3": " ", + "address_line4": " ", + "delivery_preferences": { + "drop_off_location": "Front Door" + }, + "district_info": [ + { + "address_level": "L0", + "address_level_name": "Country", + "address_name": "United Kingdom" + } + ], + "full_address": "1199 Coleman Ave San Jose, CA 95110", + "name": "Zay", + "phone_number": "(+1)213-***-1234", + "postal_code": "95110", + "region_code": "US" + }, + "replaced_order_id": "576461416728782174", + "request_cancel_time": 1678389618, + "rts_sla_time": 1619611688, + "rts_time": 1619611563, + "seller_note": "seller note", + "shipping_due_time": 1678389618, + "shipping_provider": "TT Virtual express", + "shipping_provider_id": "6617675021119438849", + "shipping_type": "TIKTOK", + "split_or_combine_tag": "COMBINED", + "status": "UNPAID", + "tracking_number": "JX12345", + "tts_sla_time": 1619611761, + "update_time": 1619621355, + "user_id": "7021436810468230477", + "warehouse_id": "6955005333819123123" + } + ], + "total_count": 22113 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 7b6052a6f650359317a81c5d6406f6b503d66ea7 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 11 May 2024 14:52:02 +0800 Subject: [PATCH 04/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E5=95=86=E5=93=81=E5=93=81=E7=89=8C=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 6 ++ .../Legacy/TikTokShopLegacyClient.cs | 2 +- .../Legacy/TikTokShopLegacyRequest.cs | 12 +-- ...ikTokShopClientExecuteProductExtensions.cs | 64 +++++++++++++++ .../Brand/ProductCreateBrandRequest.cs | 15 ++++ .../Brand/ProductCreateBrandResponse.cs | 22 ++++++ .../Product/Brand/ProductGetBrandsRequest.cs | 44 +++++++++++ .../Product/Brand/ProductGetBrandsResponse.cs | 77 +++++++++++++++++++ .../Brand/ProductCreateBrandRequest.json | 3 + .../Brand/ProductCreateBrandResponse.json | 8 ++ .../Brand/ProductGetBrandsResponse.json | 18 +++++ 11 files changed, 264 insertions(+), 7 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductGetBrandsResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index e73325ba..0bf67bda 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -26,6 +26,12 @@ Naming Policies: - Seller - Get Seller Permissions: `SellerGetPermissions` - Get Active Shops: `SellerGetShops` +- Products + - Get Brands: `ProductGetBrands` + - Create Custom Brands: `ProductCreateBrand` +- Orders + - Get Order List: `OrderSearchOrders` + - Get Order Detail: `OrderGetOrderDetail` - Supply Chain - Confirm Package Shipment: `SupplyChainSyncPackages` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyClient.cs index d67641cf..d4ffeb04 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyClient.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyClient.cs @@ -68,9 +68,9 @@ public IFlurlRequest CreateFlurlRequest(TikTokShopLegacyRequest request, HttpMet return flurlRequest .SetQueryParam("app_key", Credentials.AppKey) .SetQueryParam("access_token", request.AccessToken) - .SetQueryParam("timestamp", request.Timestamp) .SetQueryParam("shop_id", request.ShopId) .SetQueryParam("shop_cipher", request.ShopCipher) + .SetQueryParam("timestamp", request.Timestamp) .SetQueryParam("version", request.ApiVersion); } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyRequest.cs index 4d76406c..e357d41e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/TikTokShopLegacyRequest.cs @@ -16,25 +16,25 @@ public abstract class TikTokShopLegacyRequest : CommonRequestBase, ICommonReques public virtual string? AccessToken { get; set; } /// - /// 获取或设置系统时间戳。如果不指定将由系统自动生成。 + /// 获取或设置店铺 ID。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public virtual long? Timestamp { get; set; } + public virtual string? ShopId { get; set; } /// - /// 获取或设置店铺 ID。 + /// 获取或设置店铺密码。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ShopId { get; set; } + public virtual string? ShopCipher { get; set; } /// - /// 获取或设置店铺密码。 + /// 获取或设置系统时间戳。如果不指定将由系统自动生成。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ShopCipher { get; set; } + public virtual long? Timestamp { get; set; } /// /// 获取或设置 API 版本号。如果不指定将使用系统所支持的最高版本号。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs new file mode 100644 index 00000000..3a721cfc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs @@ -0,0 +1,64 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteProductExtensions + { + #region Brand + /// + /// 异步调用 [GET] /product/{version}/brands 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetBrandsAsync(this TikTokShopClient client, Models.ProductGetBrandsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "brands") + .SetQueryParam("category_id", request.CategoryId) + .SetQueryParam("brand_name", request.BrandName) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + if (request.IsAuthorized is not null) + flurlReq.SetQueryParam("is_authorized", request.IsAuthorized.Value ? "true" : "false"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/brands 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductCreateBrandAsync(this TikTokShopClient client, Models.ProductCreateBrandRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "brands"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandRequest.cs new file mode 100644 index 00000000..ec05fab0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/brands 接口的请求。 + /// + public class ProductCreateBrandRequest : TikTokShopRequest + { + /// + /// 获取或设置品牌名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandResponse.cs new file mode 100644 index 00000000..28eaa423 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductCreateBrandResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/brands 接口的响应。 + /// + public class ProductCreateBrandResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string BrandId { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsRequest.cs new file mode 100644 index 00000000..55874307 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsRequest.cs @@ -0,0 +1,44 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/brands 接口的请求。 + /// + public class ProductGetBrandsRequest : TikTokShopRequest + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? CategoryId { get; set; } + + /// + /// 获取或设置是否仅返回已授权品牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public bool? IsAuthorized { get; set; } + + /// + /// 获取或设置品牌名称。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? BrandName { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsResponse.cs new file mode 100644 index 00000000..8223c1ab --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Brand/ProductGetBrandsResponse.cs @@ -0,0 +1,77 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/brands 接口的响应。 + /// + public class ProductGetBrandsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Brand + { + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string BrandId { get; set; } = default!; + + /// + /// 获取或设置品牌名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置授权状态。 + /// + [Newtonsoft.Json.JsonProperty("authorized_status")] + [System.Text.Json.Serialization.JsonPropertyName("authorized_status")] + public string AuthorizedStatus { get; set; } = default!; + + /// + /// 获取或设置品牌状态。 + /// + [Newtonsoft.Json.JsonProperty("brand_status")] + [System.Text.Json.Serialization.JsonPropertyName("brand_status")] + public string BrandStatus { get; set; } = default!; + + /// + /// 获取或设置是否是 T1 品牌。 + /// + [Newtonsoft.Json.JsonProperty("is_t1_brand")] + [System.Text.Json.Serialization.JsonPropertyName("is_t1_brand")] + public bool IsT1Brand { get; set; } + } + } + + /// + /// 获取或设置品牌列表。 + /// + [Newtonsoft.Json.JsonProperty("brands")] + [System.Text.Json.Serialization.JsonPropertyName("brands")] + public Types.Brand[] BrandList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandRequest.json new file mode 100644 index 00000000..4c962662 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandRequest.json @@ -0,0 +1,3 @@ +{ + "name": "Teas" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandResponse.json new file mode 100644 index 00000000..5cdad4d1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductCreateBrandResponse.json @@ -0,0 +1,8 @@ +{ + "code": 0, + "data": { + "id": "7082427311584347905" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductGetBrandsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductGetBrandsResponse.json new file mode 100644 index 00000000..59152cb1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Brand/ProductGetBrandsResponse.json @@ -0,0 +1,18 @@ +{ + "code": 0, + "data": { + "brands": [ + { + "authorized_status": "UNAUTHORIEZD", + "brand_status": "AVAILABLE", + "id": "7082427311584347905", + "is_t1_brand": true, + "name": "Teas" + } + ], + "next_page_token": "b2Zmc2V0PTAK", + "total_count": 10000 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From e9feea5fa88d7d07663a931f743860e19bdb28f3 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 11 May 2024 15:23:06 +0800 Subject: [PATCH 05/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 8 + ...ikTokShopClientExecuteProductExtensions.cs | 186 ++++++++++++++++++ .../Category/ProductGetCategoriesRequest.cs | 15 ++ .../Category/ProductGetCategoriesResponse.cs | 64 ++++++ .../ProductGetCategoryAttributesRequest.cs | 22 +++ .../ProductGetCategoryAttributesResponse.cs | 98 +++++++++ .../ProductGetCategoryRulesRequest.cs | 15 ++ .../ProductGetCategoryRulesResponse.cs | 131 ++++++++++++ .../ProductRecommendCategoriesRequest.cs | 44 +++++ .../ProductRecommendCategoriesResponse.cs | 71 +++++++ .../ProductGetGlobalCategoriesRequest.cs | 15 ++ .../ProductGetGlobalCategoriesResponse.cs | 28 +++ ...oductGetGlobalCategoryAttributesRequest.cs | 22 +++ ...ductGetGlobalCategoryAttributesResponse.cs | 28 +++ .../ProductGetGlobalCategoryRulesRequest.cs | 15 ++ .../ProductGetGlobalCategoryRulesResponse.cs | 52 +++++ ...ProductRecommendGlobalCategoriesRequest.cs | 44 +++++ ...roductRecommendGlobalCategoriesResponse.cs | 36 ++++ .../ProductGetCategoriesResponse.json | 16 ++ .../ProductGetCategoryAttributesResponse.json | 23 +++ .../ProductGetCategoryRulesResponse.json | 28 +++ .../ProductRecommendCategoriesRequest.json | 9 + .../ProductRecommendCategoriesResponse.json | 17 ++ .../ProductGetGlobalCategoriesResponse.json | 16 ++ ...ctGetGlobalCategoryAttributesResponse.json | 23 +++ ...ProductGetGlobalCategoryRulesResponse.json | 30 +++ ...oductRecommendGlobalCategoriesRequest.json | 9 + ...ductRecommendGlobalCategoriesResponse.json | 16 ++ 28 files changed, 1081 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoriesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryAttributesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryRulesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoriesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index 0bf67bda..ecac23c4 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -29,6 +29,14 @@ Naming Policies: - Products - Get Brands: `ProductGetBrands` - Create Custom Brands: `ProductCreateBrand` + - Get Categories: `ProductGetCategories` + - Get Category Rules: `ProductGetCategoryRules` + - Get Attributes: `ProductGetCategoryAttributes` + - Recommend Categories: `ProductRecommendCategories` + - Get Global Categories: `ProductGetGlobalCategories` + - Get Global Category Rules: `ProductGetGlobalCategoryRules` + - Get Global Attributes: `ProductGetGlobalCategoryAttributes` + - Recommend Global Categories: `ProductRecommendGlobalCategories` - Orders - Get Order List: `OrderSearchOrders` - Get Order Detail: `OrderGetOrderDetail` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs index 3a721cfc..721c5ca2 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs @@ -60,5 +60,191 @@ public static class TikTokShopClientExecuteProductExtensions return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } #endregion + + #region Category + /// + /// 异步调用 [GET] /product/{version}/categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetCategoriesAsync(this TikTokShopClient client, Models.ProductGetCategoriesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "categories") + .SetQueryParam("locale", request.Locale); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/categories/{category_id}/rules 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetCategoryRulesAsync(this TikTokShopClient client, Models.ProductGetCategoryRulesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "categories", request.CategoryId, "rules"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/categories/{category_id}/attributes 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetCategoryAttributesAsync(this TikTokShopClient client, Models.ProductGetCategoryAttributesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "categories", request.CategoryId, "attributes") + .SetQueryParam("locale", request.Locale); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/categories/recommend 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductRecommendCategoriesAsync(this TikTokShopClient client, Models.ProductRecommendCategoriesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "categories", "recommend"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Global + #region Global/Category + /// + /// 异步调用 [GET] /product/{version}/global_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetGlobalCategoriesAsync(this TikTokShopClient client, Models.ProductGetGlobalCategoriesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "global_categories") + .SetQueryParam("locale", request.Locale); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/categories/{category_id}/global_rules 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetGlobalCategoryRulesAsync(this TikTokShopClient client, Models.ProductGetGlobalCategoryRulesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "categories", request.CategoryId, "global_rules"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/categories/{category_id}/global_attributes 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetGlobalCategoryAttributesAsync(this TikTokShopClient client, Models.ProductGetGlobalCategoryAttributesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "categories", request.CategoryId, "global_attributes") + .SetQueryParam("locale", request.Locale); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/global_categories/recommend 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductRecommendGlobalCategoriesAsync(this TikTokShopClient client, Models.ProductRecommendGlobalCategoriesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "global_categories", "recommend"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesRequest.cs new file mode 100644 index 00000000..63b829b7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories 接口的请求。 + /// + public class ProductGetCategoriesRequest : TikTokShopRequest + { + /// + /// 获取或设置本地化语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesResponse.cs new file mode 100644 index 00000000..4a060bc1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoriesResponse.cs @@ -0,0 +1,64 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories 接口的响应。 + /// + public class ProductGetCategoriesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Category + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CategoryId { get; set; } = default!; + + /// + /// 获取或设置上级分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("parent_id")] + [System.Text.Json.Serialization.JsonPropertyName("parent_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ParentCategoryId { get; set; } = default!; + + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("local_name")] + [System.Text.Json.Serialization.JsonPropertyName("local_name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置是否是子分类。 + /// + [Newtonsoft.Json.JsonProperty("is_leaf")] + [System.Text.Json.Serialization.JsonPropertyName("is_leaf")] + public bool IsLeaf { get; set; } + + /// + /// 获取或设置权限状态列表。 + /// + [Newtonsoft.Json.JsonProperty("permission_statuses")] + [System.Text.Json.Serialization.JsonPropertyName("permission_statuses")] + public string[] PermissionStatusList { get; set; } = default!; + } + } + + /// + /// 获取或设置分类列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public Types.Category[] CategoryList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesRequest.cs new file mode 100644 index 00000000..2080d173 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/attributes 接口的请求。 + /// + public class ProductGetCategoryAttributesRequest : TikTokShopRequest + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置本地化语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesResponse.cs new file mode 100644 index 00000000..74cb82bb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryAttributesResponse.cs @@ -0,0 +1,98 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/attributes 接口的响应。 + /// + public class ProductGetCategoryAttributesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Attribute + { + public static class Types + { + public class AttributeValue + { + /// + /// 获取或设置属性值 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ValueId { get; set; } = default!; + + /// + /// 获取或设置属性值名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + } + } + + /// + /// 获取或设置属性 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string AttributeId { get; set; } = default!; + + /// + /// 获取或设置属性名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置属性类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置是否必须。 + /// + [Newtonsoft.Json.JsonProperty("is_required")] + [System.Text.Json.Serialization.JsonPropertyName("is_required")] + public bool IsRequired { get; set; } + + /// + /// 获取或设置是否允许多选。 + /// + [Newtonsoft.Json.JsonProperty("is_multiple_selection")] + [System.Text.Json.Serialization.JsonPropertyName("is_multiple_selection")] + public bool IsMultipleSelection { get; set; } + + /// + /// 获取或设置是否允许自定义。 + /// + [Newtonsoft.Json.JsonProperty("is_customizable")] + [System.Text.Json.Serialization.JsonPropertyName("is_customizable")] + public bool IsCustomizable { get; set; } + + /// + /// 获取或设置属性值列表。 + /// + [Newtonsoft.Json.JsonProperty("values")] + [System.Text.Json.Serialization.JsonPropertyName("values")] + public Types.AttributeValue[] ValueList { get; set; } = default!; + } + } + + /// + /// 获取或设置属性列表。 + /// + [Newtonsoft.Json.JsonProperty("attributes")] + [System.Text.Json.Serialization.JsonPropertyName("attributes")] + public Types.Attribute[] AttributeList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs new file mode 100644 index 00000000..b53bd153 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/rules 接口的请求。 + /// + public class ProductGetCategoryRulesRequest : TikTokShopRequest + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CategoryId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs new file mode 100644 index 00000000..b3cf9cd3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs @@ -0,0 +1,131 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/rules 接口的响应。 + /// + public class ProductGetCategoryRulesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ProductCertification + { + /// + /// 获取或设置商品认证 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CertificationId { get; set; } = default!; + + /// + /// 获取或设置商品认证名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置示例图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("sample_image_url")] + [System.Text.Json.Serialization.JsonPropertyName("sample_image_url")] + public string? SampleImageUrl { get; set; } + + /// + /// 获取或设置是否必须。 + /// + [Newtonsoft.Json.JsonProperty("is_required")] + [System.Text.Json.Serialization.JsonPropertyName("is_required")] + public bool IsRequired { get; set; } + } + + public class SizeChart + { + /// + /// 获取或设置是否支持。 + /// + [Newtonsoft.Json.JsonProperty("is_supported")] + [System.Text.Json.Serialization.JsonPropertyName("is_supported")] + public bool IsSupported { get; set; } + + /// + /// 获取或设置是否必须。 + /// + [Newtonsoft.Json.JsonProperty("is_required")] + [System.Text.Json.Serialization.JsonPropertyName("is_required")] + public bool IsRequired { get; set; } + } + + public class CashOnDelivery + { + /// + /// 获取或设置是否支持。 + /// + [Newtonsoft.Json.JsonProperty("is_supported")] + [System.Text.Json.Serialization.JsonPropertyName("is_supported")] + public bool IsSupported { get; set; } + } + + public class PackageDimension + { + /// + /// 获取或设置是否必须。 + /// + [Newtonsoft.Json.JsonProperty("is_required")] + [System.Text.Json.Serialization.JsonPropertyName("is_required")] + public bool IsRequired { get; set; } + } + + public class ExtendedProducerResponsibility + { + /// + /// 获取或设置是否必须。 + /// + [Newtonsoft.Json.JsonProperty("is_required")] + [System.Text.Json.Serialization.JsonPropertyName("is_required")] + public bool IsRequired { get; set; } + } + } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("product_certifications")] + [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] + public Types.ProductCertification[] ProductCertificationList { get; set; } = default!; + + /// + /// 获取或设置尺码表信息。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置货到付款信息。 + /// + [Newtonsoft.Json.JsonProperty("cod")] + [System.Text.Json.Serialization.JsonPropertyName("cod")] + public Types.CashOnDelivery? CashOnDelivery { get; set; } + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimension")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimension")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置 EPR 信息。 + /// + [Newtonsoft.Json.JsonProperty("epr")] + [System.Text.Json.Serialization.JsonPropertyName("epr")] + public Types.ExtendedProducerResponsibility? ExtendedProducerResponsibility { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesRequest.cs new file mode 100644 index 00000000..f731e09d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesRequest.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/categories/recommend 接口的请求。 + /// + public class ProductRecommendCategoriesRequest : TikTokShopRequest + { + public static class Types + { + public class Image + { + /// + /// 获取或设置图片 URI。 + /// + [Newtonsoft.Json.JsonProperty("uri")] + [System.Text.Json.Serialization.JsonPropertyName("uri")] + public string Uri { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("product_title")] + [System.Text.Json.Serialization.JsonPropertyName("product_title")] + public string ProductTitle { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public IList? ImageList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesResponse.cs new file mode 100644 index 00000000..5649a777 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductRecommendCategoriesResponse.cs @@ -0,0 +1,71 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/categories/recommend 接口的响应。 + /// + public class ProductRecommendCategoriesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Category + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CategoryId { get; set; } = default!; + + /// + /// 获取或设置分类名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置分类层级。 + /// + [Newtonsoft.Json.JsonProperty("level")] + [System.Text.Json.Serialization.JsonPropertyName("level")] + public int Level { get; set; } + + /// + /// 获取或设置是否是子分类。 + /// + [Newtonsoft.Json.JsonProperty("is_leaf")] + [System.Text.Json.Serialization.JsonPropertyName("is_leaf")] + public bool IsLeaf { get; set; } + + /// + /// 获取或设置权限状态列表。 + /// + [Newtonsoft.Json.JsonProperty("permission_statuses")] + [System.Text.Json.Serialization.JsonPropertyName("permission_statuses")] + public string[] PermissionStatusList { get; set; } = default!; + } + } + + /// + /// 获取或设置推荐分类列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public Types.Category[] CategoryList { get; set; } = default!; + + /// + /// 获取或设置推荐子分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("leaf_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("leaf_category_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string LeafCategoryId { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesRequest.cs new file mode 100644 index 00000000..55a7018c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/global_categories 接口的请求。 + /// + public class ProductGetGlobalCategoriesRequest : TikTokShopRequest + { + /// + /// 获取或设置本地化语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesResponse.cs new file mode 100644 index 00000000..f67bb324 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoriesResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/global_categories 接口的响应。 + /// + public class ProductGetGlobalCategoriesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Category : ProductGetCategoriesResponse.Types.Data.Types.Category + { + } + } + + /// + /// 获取或设置分类列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public Types.Category[] CategoryList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesRequest.cs new file mode 100644 index 00000000..b2e48284 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/global_attributes 接口的请求。 + /// + public class ProductGetGlobalCategoryAttributesRequest : TikTokShopRequest + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置本地化语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.cs new file mode 100644 index 00000000..5b03f07e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/global_attributes 接口的响应。 + /// + public class ProductGetGlobalCategoryAttributesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Attribute : ProductGetCategoryAttributesResponse.Types.Data.Types.Attribute + { + } + } + + /// + /// 获取或设置属性列表。 + /// + [Newtonsoft.Json.JsonProperty("attributes")] + [System.Text.Json.Serialization.JsonPropertyName("attributes")] + public Types.Attribute[] AttributeList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesRequest.cs new file mode 100644 index 00000000..b7296262 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/global_rules 接口的请求。 + /// + public class ProductGetGlobalCategoryRulesRequest : TikTokShopRequest + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CategoryId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs new file mode 100644 index 00000000..c315adc7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs @@ -0,0 +1,52 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/categories/{category_id}/global_rules 接口的响应。 + /// + public class ProductGetGlobalCategoryRulesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ProductCertification : ProductGetCategoryRulesResponse.Types.Data.Types.ProductCertification + { + /// + /// 获取或设置必填的地区编码。 + /// + [Newtonsoft.Json.JsonProperty("required_regions")] + [System.Text.Json.Serialization.JsonPropertyName("required_regions")] + public string[] RequiredRegionCodeList { get; set; } = default!; + + /// + /// 获取或设置选填的地区编码。 + /// + [Newtonsoft.Json.JsonProperty("optional_regions")] + [System.Text.Json.Serialization.JsonPropertyName("optional_regions")] + public string[] OptionalRegionCodeList { get; set; } = default!; + } + + public class SizeChart : ProductGetCategoryRulesResponse.Types.Data.Types.SizeChart + { + } + } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("product_certifications")] + [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] + public Types.ProductCertification[] ProductCertificationList { get; set; } = default!; + + /// + /// 获取或设置尺码表信息。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.cs new file mode 100644 index 00000000..836156e1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_categories/recommend 接口的请求。 + /// + public class ProductRecommendGlobalCategoriesRequest : TikTokShopRequest + { + public static class Types + { + public class Image + { + /// + /// 获取或设置图片 URI。 + /// + [Newtonsoft.Json.JsonProperty("uri")] + [System.Text.Json.Serialization.JsonPropertyName("uri")] + public string Uri { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("product_title")] + [System.Text.Json.Serialization.JsonPropertyName("product_title")] + public string ProductTitle { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public IList? ImageList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.cs new file mode 100644 index 00000000..1a9498d3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_categories/recommend 接口的响应。 + /// + public class ProductRecommendGlobalCategoriesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Category : ProductRecommendCategoriesResponse.Types.Data.Types.Category + { + } + } + + /// + /// 获取或设置推荐分类列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public Types.Category[] CategoryList { get; set; } = default!; + + /// + /// 获取或设置推荐子分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("leaf_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("leaf_category_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string LeafCategoryId { get; set; } = default!; + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoriesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoriesResponse.json new file mode 100644 index 00000000..7a452745 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoriesResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "categories": [ + { + "id": "600002", + "is_leaf": false, + "local_name": "Home Supplies", + "parent_id": "600001", + "permission_statuses": [ "INVITE_ONLY", "NON_MAIN_CATEGORY" ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryAttributesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryAttributesResponse.json new file mode 100644 index 00000000..0aa50158 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryAttributesResponse.json @@ -0,0 +1,23 @@ +{ + "code": 0, + "data": { + "attributes": [ + { + "id": "100392", + "is_customizable": true, + "is_multiple_selection": true, + "is_required": false, + "name": "Occasion", + "type": "PRODUCT_PROPERTY", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryRulesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryRulesResponse.json new file mode 100644 index 00000000..bba5518a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductGetCategoryRulesResponse.json @@ -0,0 +1,28 @@ +{ + "code": 0, + "data": { + "cod": { + "is_supported": true + }, + "epr": { + "is_required": false + }, + "package_dimension": { + "is_required": true + }, + "product_certifications": [ + { + "id": "602362", + "is_required": true, + "name": "SNI Certificate", + "sample_image_url": "https://p-boei18n.byted.org/tos-boei18n-i-jvtte31kaf/80b32f2896829eeb69d4b278c4f3aa75.jpg~tplv-jvtte31kaf-origin-jpeg.jpeg" + } + ], + "size_chart": { + "is_required": true, + "is_supported": true + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesRequest.json new file mode 100644 index 00000000..7de65b39 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesRequest.json @@ -0,0 +1,9 @@ +{ + "description": " ", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "product_title": "Men\\'s Fashion Sports Low Cut Cotton Breathable Ankle Short\n" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesResponse.json new file mode 100644 index 00000000..0fd8bf44 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Category/ProductRecommendCategoriesResponse.json @@ -0,0 +1,17 @@ +{ + "code": 0, + "data": { + "categories": [ + { + "id": "605254", + "is_leaf": true, + "level": 1, + "name": "Teas", + "permission_statuses": [ "INVITE_ONLY" ] + } + ], + "leaf_category_id": "605254" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoriesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoriesResponse.json new file mode 100644 index 00000000..4da3b3c9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoriesResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "categories": [ + { + "id": "600001", + "is_leaf": false, + "local_name": "Home Supplies", + "parent_id": "0", + "permission_statuses": [ "AVAILABLE" ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.json new file mode 100644 index 00000000..7b944ed0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryAttributesResponse.json @@ -0,0 +1,23 @@ +{ + "code": 0, + "data": { + "attributes": [ + { + "id": "100392", + "is_customizable": false, + "is_multiple_selection": false, + "is_required": true, + "name": "Occasion", + "type": "PRODUCT_PROPERTY", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.json new file mode 100644 index 00000000..70ce2396 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.json @@ -0,0 +1,30 @@ +{ + "code": 0, + "data": { + "product_certifications": [ + { + "id": "7267563252536723205", + "is_required": true, + "name": "product_cert_name", + "optional_regions": [ + "US" + ], + "required_regions": [ + "GB", + "MY", + "PH", + "SG", + "TH", + "VN" + ], + "sample_image_url": "https://p-boei18n.byted.org/tos-boei18n-i-jvtte31kaf/80b32f2896829eeb69d4b278c4f3aa75.jpg~tplv-jvtte31kaf-origin-jpeg.jpeg" + } + ], + "size_chart": { + "is_required": true, + "is_supported": true + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.json new file mode 100644 index 00000000..7de65b39 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesRequest.json @@ -0,0 +1,9 @@ +{ + "description": " ", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "product_title": "Men\\'s Fashion Sports Low Cut Cotton Breathable Ankle Short\n" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.json new file mode 100644 index 00000000..606bc362 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/Category/ProductRecommendGlobalCategoriesResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "categories": [ + { + "id": "605254", + "is_leaf": true, + "level": 3, + "name": "Christmas Gifts" + } + ], + "leaf_category_id": "605254" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 42f536599b12fd4481d728afa60a71a2509f3560 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 11 May 2024 15:58:30 +0800 Subject: [PATCH 06/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E5=95=86=E5=93=81=E6=96=87=E4=BB=B6=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 2 + ...ikTokShopClientExecuteProductExtensions.cs | 65 +++++++++++++++++++ .../Upload/ProductUploadFileRequest.cs | 31 +++++++++ .../Upload/ProductUploadFileResponse.cs | 42 ++++++++++++ .../Upload/ProductUploadImageRequest.cs | 38 +++++++++++ .../Upload/ProductUploadImageResponse.cs | 49 ++++++++++++++ .../__Internal/FileHttpContentBuilder.cs | 37 +++++++++++ .../__Internal/FileNameToContentTypeMapper.cs | 42 ++++++++++++ .../Upload/ProductUploadFileResponse.json | 11 ++++ .../Upload/ProductUploadImageResponse.json | 12 ++++ 10 files changed, 329 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileHttpContentBuilder.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileNameToContentTypeMapper.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadFileResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadImageResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index ecac23c4..5bf67e11 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -33,6 +33,8 @@ Naming Policies: - Get Category Rules: `ProductGetCategoryRules` - Get Attributes: `ProductGetCategoryAttributes` - Recommend Categories: `ProductRecommendCategories` + - Upload Product Image: `ProductUploadImage` + - Upload Product File: `ProductUploadFile` - Get Global Categories: `ProductGetGlobalCategories` - Get Global Category Rules: `ProductGetGlobalCategoryRules` - Get Global Attributes: `ProductGetGlobalCategoryAttributes` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs index 721c5ca2..d1531afb 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Net.Http; +using System.Text; using System.Threading; using System.Threading.Tasks; using Flurl.Http; @@ -246,5 +247,69 @@ public static class TikTokShopClientExecuteProductExtensions } #endregion #endregion + + #region Upload + /// + /// 异步调用 [POST] /product/{version}/images/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUploadImageAsync(this TikTokShopClient client, Models.ProductUploadImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ImageFileName is null) + request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.ImageFileContentType is null) + request.ImageFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForImage(request.ImageFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "images", "upload"); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "data"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.UseCase)), "use_case"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/files/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUploadFileAsync(this TikTokShopClient client, Models.ProductUploadFileRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.FileName is null) + request.FileName = Guid.NewGuid().ToString("N").ToLower(); + + if (request.FileContentType is null) + request.FileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForFile(request.FileName); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "files", "upload"); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.FileName, fileBytes: request.FileBytes, fileContentType: request.FileContentType, formDataName: "data"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.FileName)), "name"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs new file mode 100644 index 00000000..37c97602 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileRequest.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/files/upload 接口的请求。 + /// + public class ProductUploadFileRequest : TikTokShopRequest + { + /// + /// 获取或设置文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] FileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileName { get; set; } + + /// + /// 获取或设置文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs new file mode 100644 index 00000000..52ddf36f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadFileResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/files/upload 接口的响应。 + /// + public class ProductUploadFileResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置文件 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string FileId { get; set; } = default!; + + /// + /// 获取或设置文件名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置文件格式。 + /// + [Newtonsoft.Json.JsonProperty("format")] + [System.Text.Json.Serialization.JsonPropertyName("format")] + public string Format { get; set; } = default!; + + /// + /// 获取或设置文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs new file mode 100644 index 00000000..6648f2f9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageRequest.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/images/upload 接口的请求。 + /// + public class ProductUploadImageRequest : TikTokShopRequest + { + /// + /// 获取或设置图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] ImageFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileName { get; set; } + + /// + /// 获取或设置图片文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileContentType { get; set; } + + /// + /// 获取或设置使用场景。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? UseCase { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs new file mode 100644 index 00000000..37cb0a1b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Upload/ProductUploadImageResponse.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/images/upload 接口的响应。 + /// + public class ProductUploadImageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置图片 URI。 + /// + [Newtonsoft.Json.JsonProperty("uri")] + [System.Text.Json.Serialization.JsonPropertyName("uri")] + public string Uri { get; set; } = default!; + + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置图片宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置图片高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + + /// + /// 获取或设置使用场景。 + /// + [Newtonsoft.Json.JsonProperty("use_case")] + [System.Text.Json.Serialization.JsonPropertyName("use_case")] + public string? UseCase { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileHttpContentBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileHttpContentBuilder.cs new file mode 100644 index 00000000..cf6cd3cf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileHttpContentBuilder.cs @@ -0,0 +1,37 @@ +using System; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Web; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Utilities +{ + internal static class FileHttpContentBuilder + { + public static MultipartFormDataContent Build(string fileName, byte[] fileBytes, string? fileContentType, string formDataName) + { + return Build(fileName: fileName, fileBytes: fileBytes, fileContentType: fileContentType, formDataName: formDataName, (_) => { }); + } + + public static MultipartFormDataContent Build(string fileName, byte[] fileBytes, string? fileContentType, string formDataName, Action configureFileHttpContent) + { + if (fileName is null) throw new ArgumentNullException(nameof(fileName)); + if (formDataName is null) throw new ArgumentNullException(nameof(formDataName)); + if (configureFileHttpContent is null) throw new ArgumentNullException(nameof(configureFileHttpContent)); + + fileName = fileName.Replace("\"", ""); + fileBytes = fileBytes ?? Array.Empty(); + fileContentType = string.IsNullOrEmpty(fileContentType) ? "application/octet-stream" : fileContentType; + formDataName = formDataName.Replace("\"", ""); + + ByteArrayContent fileContent = new ByteArrayContent(fileBytes); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(fileContentType); + configureFileHttpContent(fileContent); + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + MultipartFormDataContent httpContent = new MultipartFormDataContent(boundary); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse($"multipart/form-data; boundary={boundary}"); + httpContent.Add(fileContent, $"\"{formDataName}\"", $"\"{HttpUtility.UrlEncode(fileName)}\""); + return httpContent; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileNameToContentTypeMapper.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileNameToContentTypeMapper.cs new file mode 100644 index 00000000..505b4507 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Utilities/__Internal/FileNameToContentTypeMapper.cs @@ -0,0 +1,42 @@ +using System.IO; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Utilities +{ + internal static class FileNameToContentTypeMapper + { + public static string? GetContentTypeForImage(string fileName) + { + string extension = Path.GetExtension(fileName ?? "/")?.ToLower() ?? string.Empty; + switch (extension) + { + case ".jpg": + case ".jpeg": + return "image/jpeg"; + case ".png": + return "image/png"; + } + + return null; + } + + public static string? GetContentTypeForFile(string fileName) + { + string extension = Path.GetExtension(fileName ?? "/")?.ToLower() ?? string.Empty; + switch (extension) + { + case ".jpg": + case ".jpeg": + case ".png": + return GetContentTypeForImage(fileName!); + case ".pdf": + return "application/pdf"; + case ".mp4": + case ".mpeg": + case ".m4v": + return "video/mp4"; + } + + return null; + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadFileResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadFileResponse.json new file mode 100644 index 00000000..e345881f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadFileResponse.json @@ -0,0 +1,11 @@ +{ + "code": 0, + "data": { + "format": "PDF\n", + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w", + "name": "SNI.PDF", + "url": "https://p-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe\n" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadImageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadImageResponse.json new file mode 100644 index 00000000..fa4772a1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Upload/ProductUploadImageResponse.json @@ -0,0 +1,12 @@ +{ + "code": 0, + "data": { + "height": 720, + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "url": "https://p-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe\n", + "use_case": "MAIN_IMAGE", + "width": 720 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From efb0b8f355233a6bd895ce7665d9da7f22b2d1b9 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 11 May 2024 19:48:33 +0800 Subject: [PATCH 07/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E5=95=86=E5=93=81=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/TikTokGlobalShop/Basic_LegacyAPI.md | 2 +- .../TikTokGlobalShop/Basic_ModelDefinition.md | 23 +- .../TikTokShopClientExecuteOrderExtensions.cs | 4 +- ...ikTokShopClientExecuteProductExtensions.cs | 471 ++++++++++ ....cs => OrderBatchGetOrderDetailRequest.cs} | 2 +- ...cs => OrderBatchGetOrderDetailResponse.cs} | 2 +- .../Models/Order/OrderSearchOrdersResponse.cs | 2 +- .../ProductGetCategoryRulesResponse.cs | 4 +- .../ProductGetGlobalCategoryRulesResponse.cs | 2 +- .../ProductCreateGlobalProductRequest.cs | 254 +++++ .../ProductCreateGlobalProductResponse.cs | 64 ++ .../ProductDeleteGlobalProductsRequest.cs | 17 + .../ProductDeleteGlobalProductsResponse.cs | 61 ++ .../ProductGetGlobalProductDetailRequest.cs | 15 + .../ProductGetGlobalProductDetailResponse.cs | 368 ++++++++ .../ProductPublishGlobalProductRequest.cs | 110 +++ .../ProductPublishGlobalProductResponse.cs | 143 +++ .../ProductSearchGlobalProductsRequest.cs | 75 ++ .../ProductSearchGlobalProductsResponse.cs | 104 +++ ...ductUpdateGlobalProductInventoryRequest.cs | 51 ++ ...uctUpdateGlobalProductInventoryResponse.cs | 15 + .../ProductUpdateGlobalProductRequest.cs | 204 +++++ .../ProductUpdateGlobalProductResponse.cs | 39 + .../Product/ProductActivateProductsRequest.cs | 17 + .../ProductActivateProductsResponse.cs | 88 ++ .../Product/ProductCreateProductRequest.cs | 558 +++++++++++ .../Product/ProductCreateProductResponse.cs | 103 +++ .../ProductDeactivateProductsRequest.cs | 9 + .../ProductDeactivateProductsResponse.cs | 15 + .../Product/ProductDeleteProductsRequest.cs | 17 + .../Product/ProductDeleteProductsResponse.cs | 61 ++ .../Product/ProductGetInventoriesRequest.cs | 24 + .../Product/ProductGetInventoriesResponse.cs | 174 ++++ .../ProductGetListingSchemasRequest.cs | 32 + .../ProductGetListingSchemasResponse.cs | 165 ++++ .../Product/ProductGetPrerequisitesRequest.cs | 16 + .../ProductGetPrerequisitesResponse.cs | 48 + .../Product/ProductGetProductDetailRequest.cs | 22 + .../ProductGetProductDetailResponse.cs | 865 ++++++++++++++++++ .../Product/ProductRecoverProductsRequest.cs | 9 + .../Product/ProductRecoverProductsResponse.cs | 15 + .../Product/ProductSearchProductsRequest.cs | 75 ++ .../Product/ProductSearchProductsResponse.cs | 180 ++++ .../ProductUpdateProductInventoryRequest.cs | 51 ++ .../ProductUpdateProductInventoryResponse.cs | 95 ++ .../ProductUpdateProductPartialRequest.cs | 215 +++++ .../ProductUpdateProductPartialResponse.cs | 36 + .../ProductUpdateProductPriceRequest.cs | 51 ++ .../ProductUpdateProductPriceResponse.cs | 15 + .../Product/ProductUpdateProductRequest.cs | 229 +++++ .../Product/ProductUpdateProductResponse.cs | 47 + ... => OrderBatchGetOrderDetailResponse.json} | 0 .../ProductCreateGlobalProductRequest.json | 98 ++ .../ProductCreateGlobalProductResponse.json | 20 + .../ProductDeleteGlobalProductsRequest.json | 6 + .../ProductDeleteGlobalProductsResponse.json | 16 + ...ProductGetGlobalProductDetailResponse.json | 138 +++ .../ProductPublishGlobalProductRequest.json | 20 + .../ProductPublishGlobalProductResponse.json | 38 + .../ProductSearchGlobalProductsRequest.json | 10 + .../ProductSearchGlobalProductsResponse.json | 24 + ...ctUpdateGlobalProductInventoryRequest.json | 13 + .../ProductUpdateGlobalProductRequest.json | 99 ++ .../ProductUpdateGlobalProductResponse.json | 30 + .../ProductActivateProductsRequest.json | 6 + .../ProductActivateProductsResponse.json | 22 + .../Product/ProductCreateProductRequest.json | 110 +++ .../Product/ProductCreateProductResponse.json | 26 + .../ProductDeactivateProductsRequest.json | 5 + .../ProductDeactivateProductsResponse.json | 16 + .../Product/ProductDeleteProductsRequest.json | 6 + .../ProductDeleteProductsResponse.json | 16 + .../Product/ProductGetInventoriesRequest.json | 8 + .../ProductGetInventoriesResponse.json | 44 + .../ProductGetListingSchemasResponse.json | 57 ++ .../ProductGetPrerequisitesResponse.json | 16 + .../ProductGetProductDetailResponse.json | 200 ++++ .../ProductRecoverProductsRequest.json | 5 + .../ProductRecoverProductsResponse.json | 16 + .../Product/ProductSearchProductsRequest.json | 10 + .../ProductSearchProductsResponse.json | 39 + .../ProductUpdateProductInventoryRequest.json | 13 + ...ProductUpdateProductInventoryResponse.json | 23 + .../ProductUpdateProductPartialRequest.json | 100 ++ .../ProductUpdateProductPartialResponse.json | 21 + .../ProductUpdateProductPriceRequest.json | 11 + .../Product/ProductUpdateProductRequest.json | 109 +++ .../Product/ProductUpdateProductResponse.json | 26 + 88 files changed, 6671 insertions(+), 10 deletions(-) rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/{OrderGetOrderDetailRequest.cs => OrderBatchGetOrderDetailRequest.cs} (87%) rename src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/{OrderGetOrderDetailResponse.cs => OrderBatchGetOrderDetailResponse.cs} (87%) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs rename test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/{OrderGetOrderDetailResponse.json => OrderBatchGetOrderDetailResponse.json} (100%) create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductGetGlobalProductDetailResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductInventoryRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetListingSchemasResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetPrerequisitesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetProductDetailResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPriceRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductResponse.json diff --git a/docs/TikTokGlobalShop/Basic_LegacyAPI.md b/docs/TikTokGlobalShop/Basic_LegacyAPI.md index e9866bda..f986a4b8 100644 --- a/docs/TikTokGlobalShop/Basic_LegacyAPI.md +++ b/docs/TikTokGlobalShop/Basic_LegacyAPI.md @@ -4,7 +4,7 @@ Legacy API versions (pre-v202309) will no longer be supported or maintained from New apps should use v202309 exclusively and not legacy versions. -If you are still using the legacy versions API, please follow below: +Since version v3.1.0 in this SDK, We have isolated the legacy versions API. If you are still using them, please follow below: ```csharp using SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.ExtendedSDK.Legacy; diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index 5bf67e11..0b25f70f 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -35,13 +35,34 @@ Naming Policies: - Recommend Categories: `ProductRecommendCategories` - Upload Product Image: `ProductUploadImage` - Upload Product File: `ProductUploadFile` + - Create Product: `ProductCreateProduct` + - Partial Edit Product: `ProductUpdateProductPartial` + - Edit Product: `ProductUpdateProduct` + - Update Inventory: `ProductUpdateProductInventory` + - Update Price: `ProductUpdateProductPrice` + - Activate Products: `ProductActivateProducts` + - Deactivate Products: `ProductDeactivateProducts` + - Delete Products: `ProductDeleteProducts` + - Recover Products: `ProductRecoverProducts` + - Get Product: `ProductGetProductDetail` + - Inventory Search: `ProductGetInventories` - Get Global Categories: `ProductGetGlobalCategories` - Get Global Category Rules: `ProductGetGlobalCategoryRules` - Get Global Attributes: `ProductGetGlobalCategoryAttributes` - Recommend Global Categories: `ProductRecommendGlobalCategories` + - Create Global Product: `ProductCreateGlobalProduct` + - Publish Global Product: `ProductPublishGlobalProduct` + - Update Global Inventory: `ProductUpdateGlobalProductInventory` + - Get Global Product: `ProductGetGlobalProductDetail` + - Edit Global Product: `ProductUpdateGlobalProduct` + - Delete Global Products: `ProductDeleteGlobalProducts` + - Check Listing Prerequisites: `ProductGetPrerequisites` + - Search Global Products: `ProductSearchGlobalProducts` + - Search Products: `ProductSearchProducts` + - Listing Schemas: `ProductGetListingSchemas` - Orders - Get Order List: `OrderSearchOrders` - - Get Order Detail: `OrderGetOrderDetail` + - Get Order Detail: `OrderBatchGetOrderDetail` - Supply Chain - Confirm Package Shipment: `SupplyChainSyncPackages` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs index c21d095d..99caac85 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteOrderExtensions.cs @@ -45,7 +45,7 @@ public static class TikTokShopClientExecuteOrderExtensions /// /// /// - public static async Task ExecuteOrderGetOrderDetailAsync(this TikTokShopClient client, Models.OrderGetOrderDetailRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteOrderBatchGetOrderDetailAsync(this TikTokShopClient client, Models.OrderBatchGetOrderDetailRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -54,7 +54,7 @@ public static class TikTokShopClientExecuteOrderExtensions .CreateFlurlRequest(request, HttpMethod.Get, "order", request.ApiVersion, "orders") .SetQueryParam("ids", request.OrderIdList); - return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs index d1531afb..fd180a77 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs @@ -246,6 +246,162 @@ public static class TikTokShopClientExecuteProductExtensions return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } #endregion + + /// + /// 异步调用 [POST] /product/{version}/global_products 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductCreateGlobalProductAsync(this TikTokShopClient client, Models.ProductCreateGlobalProductRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "global_products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/global_products/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductSearchGlobalProductsAsync(this TikTokShopClient client, Models.ProductSearchGlobalProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "global_products", "search") + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/global_products/{global_product_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetGlobalProductDetailAsync(this TikTokShopClient client, Models.ProductGetGlobalProductDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "global_products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/global_products/{global_product_id}/publish 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductPublishGlobalProductAsync(this TikTokShopClient client, Models.ProductPublishGlobalProductRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "global_products", request.ProductId, "publish"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [PUT] /product/{version}/global_products/{global_product_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUpdateGlobalProductAsync(this TikTokShopClient client, Models.ProductUpdateGlobalProductRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Put, "product", request.ApiVersion, "global_products", request.ProductId); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/global_products/{global_product_id}/inventory/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUpdateGlobalProductInventoryAsync(this TikTokShopClient client, Models.ProductUpdateGlobalProductInventoryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "global_products", request.ProductId, "inventory", "update"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [DELETE] /product/{version}/global_products 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductDeleteGlobalProductsAsync(this TikTokShopClient client, Models.ProductDeleteGlobalProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Delete, "product", request.ApiVersion, "global_products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } #endregion #region Upload @@ -311,5 +467,320 @@ public static class TikTokShopClientExecuteProductExtensions return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); } #endregion + + /// + /// 异步调用 [POST] /product/{version}/products 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductCreateProductAsync(this TikTokShopClient client, Models.ProductCreateProductRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductSearchProductsAsync(this TikTokShopClient client, Models.ProductSearchProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", "search") + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/products/{product_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetProductDetailAsync(this TikTokShopClient client, Models.ProductGetProductDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "products", request.ProductId); + + if (request.IsReturnUnderReviewVersion is not null) + flurlReq.SetQueryParam("return_under_review_version", request.IsReturnUnderReviewVersion.Value ? "true" : "false"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [PUT] /product/{version}/products/{product_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUpdateProductAsync(this TikTokShopClient client, Models.ProductUpdateProductRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Put, "product", request.ApiVersion, "products", request.ProductId); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/{product_id}/partial_edit 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUpdateProductPartialAsync(this TikTokShopClient client, Models.ProductUpdateProductPartialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", request.ProductId, "partial_edit"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/{product_id}/inventory/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUpdateProductInventoryAsync(this TikTokShopClient client, Models.ProductUpdateProductInventoryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", request.ProductId, "inventory", "update"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/{product_id}/prices/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUpdateProductPriceAsync(this TikTokShopClient client, Models.ProductUpdateProductPriceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", request.ProductId, "prices", "update"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/activate 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductActivateProductsAsync(this TikTokShopClient client, Models.ProductActivateProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", "activate"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/deactivate 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductDeactivateProductsAsync(this TikTokShopClient client, Models.ProductDeactivateProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", "deactivate"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [DELETE] /product/{version}/products 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductDeleteProductsAsync(this TikTokShopClient client, Models.ProductDeleteProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Delete, "product", request.ApiVersion, "products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/products/recover 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductRecoverProductsAsync(this TikTokShopClient client, Models.ProductRecoverProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", "recover"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /product/{version}/inventory/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetInventoriesAsync(this TikTokShopClient client, Models.ProductGetInventoriesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "search", "inventory"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/prerequisites 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetPrerequisitesAsync(this TikTokShopClient client, Models.ProductGetPrerequisitesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "prerequisites"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /product/{version}/listing_schemas 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductGetListingSchemasAsync(this TikTokShopClient client, Models.ProductGetListingSchemasRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "product", request.ApiVersion, "listing_schemas") + .SetQueryParam("category_ids", $"[{string.Join(",", request.CategoryIdList)}]") + .SetQueryParam("locale", request.Locale); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderBatchGetOrderDetailRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderBatchGetOrderDetailRequest.cs index f0b0cca3..6b99842f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderBatchGetOrderDetailRequest.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models /// /// 表示 [GET] /order/{version}/orders 接口的请求。 /// - public class OrderGetOrderDetailRequest : TikTokShopRequest + public class OrderBatchGetOrderDetailRequest : TikTokShopRequest { /// /// 获取或设置订单 ID 列表。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderBatchGetOrderDetailResponse.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderBatchGetOrderDetailResponse.cs index f3ba0d0e..e9237591 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderGetOrderDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderBatchGetOrderDetailResponse.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models /// /// 表示 [GET] /order/{version}/orders 接口的响应。 /// - public class OrderGetOrderDetailResponse : TikTokShopResponse + public class OrderBatchGetOrderDetailResponse : TikTokShopResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs index c1f5acbc..b93383da 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs @@ -203,7 +203,7 @@ public class DeliveryPreferences public string FullAddress { get; set; } = default!; /// - /// 获取或设置国家或地区编码。 + /// 获取或设置地区编码。 /// [Newtonsoft.Json.JsonProperty("region_code")] [System.Text.Json.Serialization.JsonPropertyName("region_code")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs index b3cf9cd3..f4ae4b18 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Category/ProductGetCategoryRulesResponse.cs @@ -11,7 +11,7 @@ public class Data { public static class Types { - public class ProductCertification + public class Certification { /// /// 获取或设置商品认证 ID。 @@ -96,7 +96,7 @@ public class ExtendedProducerResponsibility /// [Newtonsoft.Json.JsonProperty("product_certifications")] [System.Text.Json.Serialization.JsonPropertyName("product_certifications")] - public Types.ProductCertification[] ProductCertificationList { get; set; } = default!; + public Types.Certification[] CertificationList { get; set; } = default!; /// /// 获取或设置尺码表信息。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs index c315adc7..3b456aaf 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/Category/ProductGetGlobalCategoryRulesResponse.cs @@ -11,7 +11,7 @@ public class Data { public static class Types { - public class ProductCertification : ProductGetCategoryRulesResponse.Types.Data.Types.ProductCertification + public class ProductCertification : ProductGetCategoryRulesResponse.Types.Data.Types.Certification { /// /// 获取或设置必填的地区编码。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductRequest.cs new file mode 100644 index 00000000..614a3426 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductRequest.cs @@ -0,0 +1,254 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products 接口的请求。 + /// + public class ProductCreateGlobalProductRequest : TikTokShopRequest + { + public static class Types + { + public class Image : ProductCreateProductRequest.Types.Image + { + } + + public class Video : ProductCreateProductRequest.Types.Video + { + } + + public class SKU + { + public static class Types + { + public class SalesAttribute : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image + { + } + } + } + + public class Price : ProductCreateProductRequest.Types.SKU.Types.Price + { + } + + public class Inventory + { + /// + /// 获取或设置全球仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("global_warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("global_warehouse_id")] + public string WarehouseId { get; set; } = string.Empty; + + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + + public class IdentifierCode : ProductCreateProductRequest.Types.SKU.Types.IdentifierCode + { + } + } + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public IList? SalesAttributeList { get; set; } + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public IList? InventoryList { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price Price { get; set; } = new Types.Price(); + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置产品标识码信息。 + /// + [Newtonsoft.Json.JsonProperty("identifier_code")] + [System.Text.Json.Serialization.JsonPropertyName("identifier_code")] + public Types.IdentifierCode? IdentifierCode { get; set; } + + /// + /// 获取或设置全球数量。 + /// + [Newtonsoft.Json.JsonProperty("global_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("global_quantity")] + public int? GlobalQuantity { get; set; } + + /// + /// 获取或设置 SKU 单位数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_unit_count")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("sku_unit_count")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? UnitCount { get; set; } + } + + public class PackageDimension : ProductCreateProductRequest.Types.PackageDimension + { + } + + public class PackageWeight : ProductCreateProductRequest.Types.PackageWeight + { + } + + public class Certification : ProductCreateProductRequest.Types.Certification + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.Certification.Types.Image + { + } + + public class File : ProductCreateProductRequest.Types.Certification.Types.File + { + } + } + } + + public class ProductAttribute : ProductCreateProductRequest.Types.ProductAttribute + { + public static new class Types + { + public class ProductAttributeValue : ProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue + { + } + } + } + + public class SizeChart : ProductCreateProductRequest.Types.SizeChart + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.SizeChart.Types.Image + { + } + + public class Template : ProductCreateProductRequest.Types.SizeChart.Types.Template + { + } + } + } + + public class Manufacturer : ProductCreateProductRequest.Types.Manufacturer + { + } + } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public string? BrandId { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public IList? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public IList? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public IList? ProductAttributeList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductResponse.cs new file mode 100644 index 00000000..1ea078af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductCreateGlobalProductResponse.cs @@ -0,0 +1,64 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products 接口的响应。 + /// + public class ProductCreateGlobalProductResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SKU + { + public static class Types + { + public class SalesAttribute : ProductCreateProductResponse.Types.Data.Types.SKU.Types.SalesAttribute + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("global_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("global_skus")] + [System.Text.Json.Serialization.JsonPropertyName("global_skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsRequest.cs new file mode 100644 index 00000000..c8360901 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /product/{version}/global_products 接口的请求。 + /// + public class ProductDeleteGlobalProductsRequest : TikTokShopRequest + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("global_product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("global_product_ids")] + public IList ProductIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsResponse.cs new file mode 100644 index 00000000..044d1279 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductDeleteGlobalProductsResponse.cs @@ -0,0 +1,61 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /product/{version}/global_products 接口的响应。 + /// + public class ProductDeleteGlobalProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("global_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("global_product_id")] + public string ProductId { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailRequest.cs new file mode 100644 index 00000000..a744d03a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/global_products/{global_product_id} 接口的请求。 + /// + public class ProductGetGlobalProductDetailRequest : TikTokShopRequest + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs new file mode 100644 index 00000000..6046cbc0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs @@ -0,0 +1,368 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/global_products/{global_product_id} 接口的响应。 + /// + public class ProductGetGlobalProductDetailResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Image : ProductGetProductDetailResponse.Types.Data.Types.Image + { + } + + public class Video : ProductGetProductDetailResponse.Types.Data.Types.Video + { + } + + public class Category + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CategoryId { get; set; } = default!; + } + + public class Brand + { + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string BrandId { get; set; } = default!; + } + + public class Product + { + /// + /// 获取或设置地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置产品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + } + + public class SKU + { + public static class Types + { + public class SalesAttribute : ProductGetProductDetailResponse.Types.Data.Types.SKU.Types.SalesAttribute + { + } + + public class Price + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置价格。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal Amount { get; set; } + + /// + /// 获取或设置库存单价。 + /// + [Newtonsoft.Json.JsonProperty("unit_price")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("unit_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal UnitPrice { get; set; } + } + + public class Inventory + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("global_warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("global_warehouse_id")] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + + public class IdentifierCode : ProductGetProductDetailResponse.Types.Data.Types.SKU.Types.IdentifierCode + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public Types.SalesAttribute[]? SalesAttributeList { get; set; } + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public Types.Inventory[]? InventoryList { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price Price { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置产品标识码信息。 + /// + [Newtonsoft.Json.JsonProperty("identifier_code")] + [System.Text.Json.Serialization.JsonPropertyName("identifier_code")] + public Types.IdentifierCode? IdentifierCode { get; set; } + + /// + /// 获取或设置全球数量。 + /// + [Newtonsoft.Json.JsonProperty("global_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("global_quantity")] + public int? GlobalQuantity { get; set; } + + /// + /// 获取或设置 SKU 单位数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_unit_count")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("sku_unit_count")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? UnitCount { get; set; } + } + + public class PackageDimension : ProductGetProductDetailResponse.Types.Data.Types.PackageDimension + { + } + + public class PackageWeight : ProductGetProductDetailResponse.Types.Data.Types.PackageWeight + { + } + + public class Certification : ProductGetProductDetailResponse.Types.Data.Types.Certification + { + } + + public class ProductAttribute : ProductGetProductDetailResponse.Types.Data.Types.ProductAttribute + { + } + + public class SizeChart : ProductGetProductDetailResponse.Types.Data.Types.SizeChart + { + } + + public class Manufacturer : ProductGetProductDetailResponse.Types.Data.Types.Manufacturer + { + /// + /// 获取或设置制造商名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置制造商地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string? Address { get; set; } + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string? PhoneNumber { get; set; } + + /// + /// 获取或设置联系邮箱。 + /// + [Newtonsoft.Json.JsonProperty("email")] + [System.Text.Json.Serialization.JsonPropertyName("email")] + public string? Email { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置分类信息。 + /// + [Newtonsoft.Json.JsonProperty("category")] + [System.Text.Json.Serialization.JsonPropertyName("category")] + public Types.Category Category { get; set; } = default!; + + /// + /// 获取或设置品牌信息。 + /// + [Newtonsoft.Json.JsonProperty("brand")] + [System.Text.Json.Serialization.JsonPropertyName("brand")] + public Types.Brand? Brand { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public Types.Image[]? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public Types.Product[] ProductList { get; set; } = default!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public Types.Certification[]? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public Types.ProductAttribute[]? ProductAttributeList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + + /// + /// 获取或设置全球卖家 ID。 + /// + [Newtonsoft.Json.JsonProperty("global_seller_id")] + [System.Text.Json.Serialization.JsonPropertyName("global_seller_id")] + public string? GlobalSellerId { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductRequest.cs new file mode 100644 index 00000000..4f40951f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductRequest.cs @@ -0,0 +1,110 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products/{global_product_id}/publish 接口的请求。 + /// + public class ProductPublishGlobalProductRequest : TikTokShopRequest + { + public static class Types + { + public class PublishTarget + { + public static class Types + { + public class SKU + { + public static class Types + { + public class Price + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = string.Empty; + + /// + /// 获取或设置价格。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Amount { get; set; } + } + + public class Inventory + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } = string.Empty; + + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + } + + /// + /// 获取或设置关联的 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("related_global_sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("related_global_sku_id")] + public string RelatedSKUId { get; set; } = string.Empty; + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price? Price { get; set; } + + /// + /// 获取或设置库存信息。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public Types.Inventory? Inventory { get; set; } + } + } + + /// + /// 获取或设置地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string RegionCode { get; set; } = string.Empty; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList? SKUList { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置发布目标列表。 + /// + [Newtonsoft.Json.JsonProperty("publish_target")] + [System.Text.Json.Serialization.JsonPropertyName("publish_target")] + public IList? PublishTargetList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductResponse.cs new file mode 100644 index 00000000..ac30745f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductPublishGlobalProductResponse.cs @@ -0,0 +1,143 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products/{global_product_id}/publish 接口的响应。 + /// + public class ProductPublishGlobalProductResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Product + { + public static class Types + { + public class SKU + { + public static class Types + { + public class SalesAttribute : ProductCreateGlobalProductResponse.Types.Data.Types.SKU.Types.SalesAttribute + { + } + } + + /// + /// 获取或设置关联的 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("related_global_sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("related_global_sku_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string RelatedSKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; + } + } + + /// + /// 获取或设置地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置店铺 ID。 + /// + [Newtonsoft.Json.JsonProperty("shop_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_id")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + + public class PublishResult + { + public static class Types + { + public class FailReason + { + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + } + + /// + /// 获取或设置地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置发布结果。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置失败原因列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_reasons")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reasons")] + public Types.FailReason[]? FailReasonList { get; set; } + } + } + + /// + /// 获取或设置产品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public Types.Product[] ProductList { get; set; } = default!; + + /// + /// 获取或设置发布结果列表。 + /// + [Newtonsoft.Json.JsonProperty("publish_result")] + [System.Text.Json.Serialization.JsonPropertyName("publish_result")] + public Types.PublishResult[] PublishResultList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsRequest.cs new file mode 100644 index 00000000..f573d783 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsRequest.cs @@ -0,0 +1,75 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products/search 接口的请求。 + /// + public class ProductSearchGlobalProductsRequest : TikTokShopRequest + { + /// + /// 获取或设置 API 版本号。 + /// 默认值:202312 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override int ApiVersion { get; set; } = 202312; + + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_ge")] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_le")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_le")] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置更新时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_ge")] + public long? UpdateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置更新时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_le")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_le")] + public long? UpdateTimestampLessThan { get; set; } + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string? ProductStatus { get; set; } + + /// + /// 获取或设置卖家 SKU 信息列表。 + /// + [Newtonsoft.Json.JsonProperty("seller_skus")] + [System.Text.Json.Serialization.JsonPropertyName("seller_skus")] + public IList? SellerSKUList { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsResponse.cs new file mode 100644 index 00000000..93e5ebc3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductSearchGlobalProductsResponse.cs @@ -0,0 +1,104 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products/search 接口的响应。 + /// + public class ProductSearchGlobalProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Product + { + public static class Types + { + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + } + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("global_products")] + [System.Text.Json.Serialization.JsonPropertyName("global_products")] + public Types.Product[] ProductList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryRequest.cs new file mode 100644 index 00000000..6e09c60f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryRequest.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products/{global_product_id}/inventory/update 接口的请求。 + /// + public class ProductUpdateGlobalProductInventoryRequest : TikTokShopRequest + { + public static class Types + { + public class SKU + { + public static class Types + { + public class Inventory : ProductCreateGlobalProductRequest.Types.SKU.Types.Inventory + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SKUId { get; set; } = string.Empty; + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public IList InventoryList { get; set; } = new List(); + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("global_skus")] + [System.Text.Json.Serialization.JsonPropertyName("global_skus")] + public IList SKUList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryResponse.cs new file mode 100644 index 00000000..277c9ca0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductInventoryResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/global_products/{global_product_id}/inventory/update 接口的响应。 + /// + public class ProductUpdateGlobalProductInventoryResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductRequest.cs new file mode 100644 index 00000000..0a254285 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductRequest.cs @@ -0,0 +1,204 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /product/{version}/global_products/{global_product_id} 接口的请求。 + /// + public class ProductUpdateGlobalProductRequest : TikTokShopRequest + { + public static class Types + { + public class Image : ProductCreateGlobalProductRequest.Types.Image + { + } + + public class Video : ProductCreateGlobalProductRequest.Types.Video + { + } + + public class SKU : ProductCreateGlobalProductRequest.Types.SKU + { + public static new class Types + { + public class SalesAttribute : ProductCreateGlobalProductRequest.Types.SKU.Types.SalesAttribute + { + public static new class Types + { + public class Image : ProductCreateGlobalProductRequest.Types.SKU.Types.SalesAttribute.Types.Image + { + } + } + } + + public class Price : ProductCreateGlobalProductRequest.Types.SKU.Types.Price + { + } + + public class Inventory : ProductCreateGlobalProductRequest.Types.SKU.Types.Inventory + { + } + + public class IdentifierCode : ProductCreateGlobalProductRequest.Types.SKU.Types.IdentifierCode + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string? SKUId { get; set; } + } + + public class PackageDimension : ProductCreateGlobalProductRequest.Types.PackageDimension + { + } + + public class PackageWeight : ProductCreateGlobalProductRequest.Types.PackageWeight + { + } + + public class Certification : ProductCreateGlobalProductRequest.Types.Certification + { + public static new class Types + { + public class Image : ProductCreateGlobalProductRequest.Types.Certification.Types.Image + { + } + + public class File : ProductCreateGlobalProductRequest.Types.Certification.Types.File + { + } + } + } + + public class ProductAttribute : ProductCreateGlobalProductRequest.Types.ProductAttribute + { + public static new class Types + { + public class ProductAttributeValue : ProductCreateGlobalProductRequest.Types.ProductAttribute.Types.ProductAttributeValue + { + } + } + } + + public class SizeChart : ProductCreateGlobalProductRequest.Types.SizeChart + { + public static new class Types + { + public class Image : ProductCreateGlobalProductRequest.Types.SizeChart.Types.Image + { + } + + public class Template : ProductCreateGlobalProductRequest.Types.SizeChart.Types.Template + { + } + } + } + + public class Manufacturer : ProductCreateGlobalProductRequest.Types.Manufacturer + { + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public string? BrandId { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public IList? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public IList? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public IList? ProductAttributeList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductResponse.cs new file mode 100644 index 00000000..ee5e1367 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductUpdateGlobalProductResponse.cs @@ -0,0 +1,39 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /product/{version}/global_products/{global_product_id} 接口的响应。 + /// + public class ProductUpdateGlobalProductResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SKU : ProductPublishGlobalProductResponse.Types.Data.Types.Product.Types.SKU + { + } + + public class PublishResult : ProductPublishGlobalProductResponse.Types.Data.Types.PublishResult + { + } + } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("global_skus")] + [System.Text.Json.Serialization.JsonPropertyName("global_skus")] + public Types.SKU[] SKUList { get; set; } = default!; + + /// + /// 获取或设置发布结果列表。 + /// + [Newtonsoft.Json.JsonProperty("publish_results")] + [System.Text.Json.Serialization.JsonPropertyName("publish_results")] + public Types.PublishResult[] PublishResultList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs new file mode 100644 index 00000000..e2d1d45b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/activate 接口的请求。 + /// + public class ProductActivateProductsRequest : TikTokShopRequest + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + public IList ProductIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs new file mode 100644 index 00000000..8980bc29 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductActivateProductsResponse.cs @@ -0,0 +1,88 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/activate 接口的响应。 + /// + public class ProductActivateProductsResponse : TikTokShopResponse + { + 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 ExtraError + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("extra_errors")] + [System.Text.Json.Serialization.JsonPropertyName("extra_errors")] + public Types.ExtraError[] ExtraErrorList { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs new file mode 100644 index 00000000..fc43fe1d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductRequest.cs @@ -0,0 +1,558 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products 接口的请求。 + /// + public class ProductCreateProductRequest : TikTokShopRequest + { + public static class Types + { + public class Image + { + /// + /// 获取或设置图片 URI。 + /// + [Newtonsoft.Json.JsonProperty("uri")] + [System.Text.Json.Serialization.JsonPropertyName("uri")] + public string Uri { get; set; } = string.Empty; + } + + public class Video + { + /// + /// 获取或设置文件 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string FileId { get; set; } = string.Empty; + } + + public class SKU + { + public static class Types + { + public class SalesAttribute + { + public static class Types + { + public class Image : ProductCreateProductRequest.Types.Image + { + } + } + + /// + /// 获取或设置属性 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string AttributeId { get; set; } = string.Empty; + + /// + /// 获取或设置属性名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置属性值 ID。 + /// + [Newtonsoft.Json.JsonProperty("value_id")] + [System.Text.Json.Serialization.JsonPropertyName("value_id")] + public string? ValueId { get; set; } + + /// + /// 获取或设置属性值名称。 + /// + [Newtonsoft.Json.JsonProperty("value_name")] + [System.Text.Json.Serialization.JsonPropertyName("value_name")] + public string? ValueName { get; set; } + + /// + /// 获取或设置图片信息。 + /// + [Newtonsoft.Json.JsonProperty("sku_img")] + [System.Text.Json.Serialization.JsonPropertyName("sku_img")] + public Types.Image? Image { get; set; } + } + + public class Price + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = string.Empty; + + /// + /// 获取或设置价格。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Amount { get; set; } + } + + public class Inventory + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } = string.Empty; + + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + + public class IdentifierCode + { + /// + /// 获取或设置标识码类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置标识码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = string.Empty; + } + + public class CombinedSKU + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = string.Empty; + + /// + /// 获取或设置 SKU 数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_count")] + [System.Text.Json.Serialization.JsonPropertyName("sku_count")] + public int SKUCount { get; set; } + } + } + + /// + /// 获取或设置外部 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("external_sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_sku_id")] + public string? ExternalSKUId { get; set; } + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public IList? SalesAttributeList { get; set; } + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public IList? InventoryList { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price Price { get; set; } = new Types.Price(); + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置产品标识码信息。 + /// + [Newtonsoft.Json.JsonProperty("identifier_code")] + [System.Text.Json.Serialization.JsonPropertyName("identifier_code")] + public Types.IdentifierCode? IdentifierCode { get; set; } + + /// + /// 获取或设置组合 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("combined_skus")] + [System.Text.Json.Serialization.JsonPropertyName("combined_skus")] + public IList? CombinedSKUList { get; set; } + + /// + /// 获取或设置 SKU 单位数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_unit_count")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("sku_unit_count")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? UnitCount { get; set; } + } + + public class PackageDimension + { + /// + /// 获取或设置长度。 + /// + [Newtonsoft.Json.JsonProperty("length")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("length")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Length { get; set; } + + /// + /// 获取或设置宽度。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("width")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Width { get; set; } + + /// + /// 获取或设置高度。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("height")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Height { get; set; } + + /// + /// 获取或设置尺寸单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = string.Empty; + } + + public class PackageWeight + { + /// + /// 获取或设置重量。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("value")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Value { get; set; } + + /// + /// 获取或设置重量单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = string.Empty; + } + + public class Certification + { + public static class Types + { + public class Image : ProductCreateProductRequest.Types.Image + { + } + + public class File + { + /// + /// 获取或设置文件 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string FileId { get; set; } = string.Empty; + + /// + /// 获取或设置文件名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置文件格式。 + /// + [Newtonsoft.Json.JsonProperty("format")] + [System.Text.Json.Serialization.JsonPropertyName("format")] + public string? Format { get; set; } + } + } + + /// + /// 获取或设置商品认证 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string CertificationId { get; set; } = string.Empty; + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public IList? ImageList { get; set; } + + /// + /// 获取或设置文件列表。 + /// + [Newtonsoft.Json.JsonProperty("files")] + [System.Text.Json.Serialization.JsonPropertyName("files")] + public IList? FileList { get; set; } + } + + public class ProductAttribute + { + public static class Types + { + public class ProductAttributeValue + { + /// + /// 获取或设置属性值 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string? ValueId { get; set; } + + /// + /// 获取或设置属性值名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + } + } + + /// + /// 获取或设置属性 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string AttributeId { get; set; } = string.Empty; + + /// + /// 获取或设置属性值列表。 + /// + [Newtonsoft.Json.JsonProperty("values")] + [System.Text.Json.Serialization.JsonPropertyName("values")] + public IList ValueList { get; set; } = new List(); + } + + public class SizeChart + { + public static class Types + { + public class Image : ProductCreateProductRequest.Types.Image + { + } + + public class Template + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string TemplateId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置图片信息。 + /// + [Newtonsoft.Json.JsonProperty("image")] + [System.Text.Json.Serialization.JsonPropertyName("image")] + public Types.Image? Image { get; set; } + + /// + /// 获取或设置模板信息。 + /// + [Newtonsoft.Json.JsonProperty("template")] + [System.Text.Json.Serialization.JsonPropertyName("template")] + public Types.Template? Template { get; set; } + } + + public class Manufacturer + { + /// + /// 获取或设置制造商名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置制造商地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string? Address { get; set; } + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string? PhoneNumber { get; set; } + + /// + /// 获取或设置联系邮箱。 + /// + [Newtonsoft.Json.JsonProperty("email")] + [System.Text.Json.Serialization.JsonPropertyName("email")] + public string? Email { get; set; } + } + } + + /// + /// 获取或设置保存模式。 + /// + [Newtonsoft.Json.JsonProperty("save_mode")] + [System.Text.Json.Serialization.JsonPropertyName("save_mode")] + public string? SaveMode { get; set; } + + /// + /// 获取或设置外部商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("external_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_product_id")] + public string? ExternalProductId { get; set; } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public string? BrandId { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public IList? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + + /// + /// 获取或设置组合商品主商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("primary_combined_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("primary_combined_product_id")] + public string? PrimaryCombinedProductId { get; set; } + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public IList? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public IList? ProductAttributeList { get; set; } + + /// + /// 获取或设置是否允许货到付款。 + /// + [Newtonsoft.Json.JsonProperty("is_cod_allowed")] + [System.Text.Json.Serialization.JsonPropertyName("is_cod_allowed")] + public bool IsCashOnDeliveryAllowed { get; set; } + + /// + /// 获取或设置配送方式 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_ids")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_ids")] + public IList? DeliveryOptionIdList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs new file mode 100644 index 00000000..bfee0540 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductResponse.cs @@ -0,0 +1,103 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products 接口的响应。 + /// + public class ProductCreateProductResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SKU + { + public static class Types + { + public class SalesAttribute + { + /// + /// 获取或设置属性 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string AttributeId { get; set; } = default!; + + /// + /// 获取或设置属性值 ID。 + /// + [Newtonsoft.Json.JsonProperty("value_id")] + [System.Text.Json.Serialization.JsonPropertyName("value_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ValueId { get; set; } = default!; + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置外部 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("external_sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_sku_id")] + public string? ExternalSKUId { get; set; } + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public Types.SalesAttribute[] SalesAttributeList { get; set; } = default!; + } + + public class Warning + { + /// + /// 获取或设置警告信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + } + + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + + /// + /// 获取或设置警告列表。 + /// + [Newtonsoft.Json.JsonProperty("warnings")] + [System.Text.Json.Serialization.JsonPropertyName("warnings")] + public Types.Warning[]? WarningList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs new file mode 100644 index 00000000..bb0efe04 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/deactivate 接口的请求。 + /// + public class ProductDeactivateProductsRequest : ProductActivateProductsRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs new file mode 100644 index 00000000..b8d078d1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeactivateProductsResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/deactivate 接口的响应。 + /// + public class ProductDeactivateProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data : ProductActivateProductsResponse.Types.Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs new file mode 100644 index 00000000..4ccb9d96 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /product/{version}/products 接口的请求。 + /// + public class ProductDeleteProductsRequest : TikTokShopRequest + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + public IList ProductIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs new file mode 100644 index 00000000..a97c589e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductDeleteProductsResponse.cs @@ -0,0 +1,61 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /product/{version}/products 接口的响应。 + /// + public class ProductDeleteProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public string ProductId { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesRequest.cs new file mode 100644 index 00000000..c0d8b51e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesRequest.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/inventory/search 接口的请求。 + /// + public class ProductGetInventoriesRequest : TikTokShopRequest + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + public IList? ProductIdList { get; set; } + + /// + /// 获取或设置 SKU ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("sku_ids")] + [System.Text.Json.Serialization.JsonPropertyName("sku_ids")] + public IList? SKUIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesResponse.cs new file mode 100644 index 00000000..d60544d1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetInventoriesResponse.cs @@ -0,0 +1,174 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/inventory/search 接口的响应。 + /// + public class ProductGetInventoriesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ProductInventory + { + public static class Types + { + public class SKU + { + public static class Types + { + public class Inventory + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置可用库存。 + /// + [Newtonsoft.Json.JsonProperty("available_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("available_quantity")] + public int AvailableQuantity { get; set; } + + /// + /// 获取或设置已提交库存。 + /// + [Newtonsoft.Json.JsonProperty("committed_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("committed_quantity")] + public int CommittedQuantity { get; set; } + } + + public class InventoryDistribution + { + public static class Types + { + public class InShopInventory + { + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + + public class CampaignInventory : InShopInventory + { + /// + /// 获取或设置活动名称。 + /// + [Newtonsoft.Json.JsonProperty("campaign_name")] + [System.Text.Json.Serialization.JsonPropertyName("campaign_name")] + public string CampaignName { get; set; } = default!; + } + + public class CreatorInventory : InShopInventory + { + /// + /// 获取或设置创建者名称。 + /// + [Newtonsoft.Json.JsonProperty("creator_name")] + [System.Text.Json.Serialization.JsonPropertyName("creator_name")] + public string CreatorName { get; set; } = default!; + } + } + + /// + /// 获取或设置活动库存列表。 + /// + [Newtonsoft.Json.JsonProperty("campaign_inventory")] + [System.Text.Json.Serialization.JsonPropertyName("campaign_inventory")] + public Types.CampaignInventory[]? CampaignInventoryList { get; set; } + + /// + /// 获取或设置创建者库存列表。 + /// + [Newtonsoft.Json.JsonProperty("creator_inventory")] + [System.Text.Json.Serialization.JsonPropertyName("creator_inventory")] + public Types.CreatorInventory[]? CreatorInventoryList { get; set; } + + /// + /// 获取或设置在店库存列表。 + /// + [Newtonsoft.Json.JsonProperty("in_shop_inventory")] + [System.Text.Json.Serialization.JsonPropertyName("in_shop_inventory")] + public Types.InShopInventory? InShopInventory { get; set; } + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_inventory")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_inventory")] + public Types.Inventory[] InventoryList { get; set; } = default!; + + /// + /// 获取或设置总可用库存。 + /// + [Newtonsoft.Json.JsonProperty("total_available_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("total_available_quantity")] + public int TotalAvailableQuantity { get; set; } + + /// + /// 获取或设置总已提交库存。 + /// + [Newtonsoft.Json.JsonProperty("total_committed_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("total_committed_quantity")] + public int TotalCommittedQuantity { get; set; } + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置总可用库存分布信息。 + /// + [Newtonsoft.Json.JsonProperty("total_available_inventory_distribution")] + [System.Text.Json.Serialization.JsonPropertyName("total_available_inventory_distribution")] + public Types.InventoryDistribution? TotalAvailableInventoryDistribution { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + } + + /// + /// 获取或设置商品库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public Types.ProductInventory[] ProductInventoryList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasRequest.cs new file mode 100644 index 00000000..66bb51c8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasRequest.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/listing_schemas 接口的请求。 + /// + public class ProductGetListingSchemasRequest : TikTokShopRequest + { + /// + /// 获取或设置 API 版本号。 + /// 默认值:202401 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override int ApiVersion { get; set; } = 202401; + + /// + /// 获取或设置分类 ID 列表。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public IList CategoryIdList { get; set; } = new List(); + + /// + /// 获取或设置本地化语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasResponse.cs new file mode 100644 index 00000000..851d2659 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetListingSchemasResponse.cs @@ -0,0 +1,165 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/listing_schemas 接口的响应。 + /// + public class ProductGetListingSchemasResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ListingSchema + { + public static class Types + { + public class Field + { + public static class Types + { + public class Rule + { + /// + /// 获取或设置规则类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置规则值。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public string Value { get; set; } = default!; + } + + public class Option + { + /// + /// 获取或设置选项 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string OptionId { get; set; } = default!; + + /// + /// 获取或设置选项名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + } + } + + /// + /// 获取或设置字段 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string FieldId { get; set; } = default!; + + /// + /// 获取或设置字段名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置规则列表。 + /// + [Newtonsoft.Json.JsonProperty("rules")] + [System.Text.Json.Serialization.JsonPropertyName("rules")] + public Types.Rule[]? RuleList { get; set; } + + /// + /// 获取或设置选项列表。 + /// + [Newtonsoft.Json.JsonProperty("options")] + [System.Text.Json.Serialization.JsonPropertyName("options")] + public Types.Option[]? OptionList { get; set; } + + /// + /// 获取或设置子字段列表。 + /// + [Newtonsoft.Json.JsonProperty("complex_values")] + [System.Text.Json.Serialization.JsonPropertyName("complex_values")] + public Field[]? SubFieldList { get; set; } + } + } + + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CategoryId { get; set; } = default!; + + /// + /// 获取或设置字段列表。 + /// + [Newtonsoft.Json.JsonProperty("fileds")] + [System.Text.Json.Serialization.JsonPropertyName("fileds")] + public Types.Field[] FieldList { get; set; } = default!; + } + + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CategoryId { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置上架模式列表。 + /// + [Newtonsoft.Json.JsonProperty("listing_schemas")] + [System.Text.Json.Serialization.JsonPropertyName("listing_schemas")] + public Types.ListingSchema[] ListingSchemaList { get; set; } = default!; + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesRequest.cs new file mode 100644 index 00000000..f856d386 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesRequest.cs @@ -0,0 +1,16 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/prerequisites 接口的请求。 + /// + public class ProductGetPrerequisitesRequest : TikTokShopRequest + { + /// + /// 获取或设置 API 版本号。 + /// 默认值:202312 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override int ApiVersion { get; set; } = 202312; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesResponse.cs new file mode 100644 index 00000000..9c6402ba --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetPrerequisitesResponse.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/prerequisites 接口的响应。 + /// + public class ProductGetPrerequisitesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class CheckResult + { + /// + /// 获取或设置检查项。 + /// + [Newtonsoft.Json.JsonProperty("check_item")] + [System.Text.Json.Serialization.JsonPropertyName("check_item")] + public string CheckItem { get; set; } = default!; + + /// + /// 获取或设置是否失败。 + /// + [Newtonsoft.Json.JsonProperty("is_failed")] + [System.Text.Json.Serialization.JsonPropertyName("is_failed")] + public bool IsFailed { get; set; } + + /// + /// 获取或设置失败原因列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_reasons")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reasons")] + public string[]? ReasonList { get; set; } + } + } + + /// + /// 获取或设置检查结果列表。 + /// + [Newtonsoft.Json.JsonProperty("check_results")] + [System.Text.Json.Serialization.JsonPropertyName("check_results")] + public Types.CheckResult[] CheckResultList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs new file mode 100644 index 00000000..5f10fc07 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/products/{product_id} 接口的请求。 + /// + public class ProductGetProductDetailRequest : TikTokShopRequest + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置是否返回正在审核中的版本。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public bool? IsReturnUnderReviewVersion { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs new file mode 100644 index 00000000..b53fa811 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs @@ -0,0 +1,865 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /product/{version}/products/{product_id} 接口的响应。 + /// + public class ProductGetProductDetailResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Image + { + /// + /// 获取或设置图片 URI。 + /// + [Newtonsoft.Json.JsonProperty("uri")] + [System.Text.Json.Serialization.JsonPropertyName("uri")] + public string Uri { get; set; } = default!; + + /// + /// 获取或设置图片 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("urls")] + [System.Text.Json.Serialization.JsonPropertyName("urls")] + public string[] UrlList { get; set; } = default!; + + /// + /// 获取或设置缩略图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("thumb_urls")] + [System.Text.Json.Serialization.JsonPropertyName("thumb_urls")] + public string[] ThumbUrlList { get; set; } = default!; + + /// + /// 获取或设置图片宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置图片高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + } + + public class Video + { + /// + /// 获取或设置文件 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string FileId { get; set; } = default!; + + /// + /// 获取或设置文件格式。 + /// + [Newtonsoft.Json.JsonProperty("format")] + [System.Text.Json.Serialization.JsonPropertyName("format")] + public string Format { get; set; } = default!; + + /// + /// 获取或设置文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置封面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("cover_url")] + [System.Text.Json.Serialization.JsonPropertyName("cover_url")] + public string CoverUrl { get; set; } = default!; + + /// + /// 获取或设置视频宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置视频高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + + /// + /// 获取或设置文件大小(单位:字节)。 + /// + [Newtonsoft.Json.JsonProperty("size")] + [System.Text.Json.Serialization.JsonPropertyName("size")] + public int Size { get; set; } + } + + public class Category + { + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CategoryId { get; set; } = default!; + + /// + /// 获取或设置上级分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("parent_id")] + [System.Text.Json.Serialization.JsonPropertyName("parent_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ParentCategoryId { get; set; } = default!; + + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("local_name")] + [System.Text.Json.Serialization.JsonPropertyName("local_name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置是否是子分类。 + /// + [Newtonsoft.Json.JsonProperty("is_leaf")] + [System.Text.Json.Serialization.JsonPropertyName("is_leaf")] + public bool IsLeaf { get; set; } + } + + public class Brand + { + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string BrandId { get; set; } = default!; + + /// + /// 获取或设置品牌名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + } + + public class SKU + { + public static class Types + { + public class SalesAttribute + { + public static class Types + { + public class Image : ProductGetProductDetailResponse.Types.Data.Types.Image + { + } + } + + /// + /// 获取或设置属性 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string AttributeId { get; set; } = default!; + + /// + /// 获取或设置属性名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置属性值 ID。 + /// + [Newtonsoft.Json.JsonProperty("value_id")] + [System.Text.Json.Serialization.JsonPropertyName("value_id")] + public string? ValueId { get; set; } + + /// + /// 获取或设置属性值名称。 + /// + [Newtonsoft.Json.JsonProperty("value_name")] + [System.Text.Json.Serialization.JsonPropertyName("value_name")] + public string? ValueName { get; set; } + + /// + /// 获取或设置图片信息。 + /// + [Newtonsoft.Json.JsonProperty("sku_img")] + [System.Text.Json.Serialization.JsonPropertyName("sku_img")] + public Types.Image? Image { get; set; } + } + + public class Price + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置售价。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalePrice { get; set; } + + /// + /// 获取或设置不含税价格。 + /// + [Newtonsoft.Json.JsonProperty("tax_exclusive_price")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("tax_exclusive_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TaxExclusivePrice { get; set; } + + /// + /// 获取或设置库存单价。 + /// + [Newtonsoft.Json.JsonProperty("unit_price")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("unit_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal UnitPrice { get; set; } + } + + public class Inventory + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + + public class IdentifierCode + { + /// + /// 获取或设置标识码类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置标识码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = default!; + } + + public class CombinedSKU + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU 数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_count")] + [System.Text.Json.Serialization.JsonPropertyName("sku_count")] + public int SKUCount { get; set; } + } + + public class GlobalListingPolicy + { + public static class Types + { + public class ReplicateSource + { + /// + /// 获取或设置店铺 ID。 + /// + [Newtonsoft.Json.JsonProperty("shop_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_id")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = default!; + } + } + + /// + /// 获取或设置是否价格同步。 + /// + [Newtonsoft.Json.JsonProperty("price_sync")] + [System.Text.Json.Serialization.JsonPropertyName("price_sync")] + public bool IsPriceSync { get; set; } + + /// + /// 获取或设置库存类型。 + /// + [Newtonsoft.Json.JsonProperty("inventory_type")] + [System.Text.Json.Serialization.JsonPropertyName("inventory_type")] + public string InventoryType { get; set; } = default!; + + /// + /// 获取或设置副本源信息。 + /// + [Newtonsoft.Json.JsonProperty("replicate_source")] + [System.Text.Json.Serialization.JsonPropertyName("replicate_source")] + public Types.ReplicateSource? ReplicateSource { get; set; } + } + } + + /// + /// 获取或设置外部 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("external_sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_sku_id")] + public string? ExternalSKUId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置销售属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("sales_attributes")] + public Types.SalesAttribute[]? SalesAttributeList { get; set; } + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public Types.Inventory[]? InventoryList { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price Price { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置产品标识码信息。 + /// + [Newtonsoft.Json.JsonProperty("identifier_code")] + [System.Text.Json.Serialization.JsonPropertyName("identifier_code")] + public Types.IdentifierCode? IdentifierCode { get; set; } + + /// + /// 获取或设置组合 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("combined_skus")] + [System.Text.Json.Serialization.JsonPropertyName("combined_skus")] + public Types.CombinedSKU[]? CombinedSKUList { get; set; } + + /// + /// 获取或设置 SKU 单位数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_unit_count")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("sku_unit_count")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? UnitCount { get; set; } + + /// + /// 获取或设置全球商品上架策略信息。 + /// + [Newtonsoft.Json.JsonProperty("global_listing_policy")] + [System.Text.Json.Serialization.JsonPropertyName("global_listing_policy")] + public Types.GlobalListingPolicy? GlobalListingPolicy { get; set; } + } + + public class PackageDimension + { + /// + /// 获取或设置长度。 + /// + [Newtonsoft.Json.JsonProperty("length")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("length")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Length { get; set; } + + /// + /// 获取或设置宽度。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("width")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Width { get; set; } + + /// + /// 获取或设置高度。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("height")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Height { get; set; } + + /// + /// 获取或设置尺寸单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = default!; + } + + public class PackageWeight + { + /// + /// 获取或设置重量。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("value")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal Value { get; set; } + + /// + /// 获取或设置重量单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = default!; + } + + public class Certification + { + public static class Types + { + public class Image : ProductGetProductDetailResponse.Types.Data.Types.Image + { + } + + public class File + { + /// + /// 获取或设置文件 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string FileId { get; set; } = default!; + + /// + /// 获取或设置文件名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置文件格式。 + /// + [Newtonsoft.Json.JsonProperty("format")] + [System.Text.Json.Serialization.JsonPropertyName("format")] + public string Format { get; set; } = default!; + + /// + /// 获取或设置文件 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("urls")] + [System.Text.Json.Serialization.JsonPropertyName("urls")] + public string[] UrlList { get; set; } = default!; + } + } + + /// + /// 获取或设置商品认证 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string CertificationId { get; set; } = default!; + + /// + /// 获取或设置商品认证名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public Types.Image[]? ImageList { get; set; } + + /// + /// 获取或设置文件列表。 + /// + [Newtonsoft.Json.JsonProperty("files")] + [System.Text.Json.Serialization.JsonPropertyName("files")] + public Types.File[]? FileList { get; set; } + } + + public class ProductAttribute + { + public static class Types + { + public class ProductAttributeValue + { + /// + /// 获取或设置属性值 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string ValueId { get; set; } = default!; + + /// + /// 获取或设置属性值名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + } + } + + /// + /// 获取或设置属性 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string AttributeId { get; set; } = default!; + + /// + /// 获取或设置属性名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置属性值列表。 + /// + [Newtonsoft.Json.JsonProperty("values")] + [System.Text.Json.Serialization.JsonPropertyName("values")] + public Types.ProductAttributeValue[] ValueList { get; set; } = default!; + } + + public class SizeChart + { + public static class Types + { + public class Image : ProductGetProductDetailResponse.Types.Data.Types.Image + { + } + + public class Template + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string TemplateId { get; set; } = default!; + } + } + + /// + /// 获取或设置图片信息。 + /// + [Newtonsoft.Json.JsonProperty("image")] + [System.Text.Json.Serialization.JsonPropertyName("image")] + public Types.Image? Image { get; set; } + + /// + /// 获取或设置模板信息。 + /// + [Newtonsoft.Json.JsonProperty("template")] + [System.Text.Json.Serialization.JsonPropertyName("template")] + public Types.Template? Template { get; set; } + } + + public class DeliveryOption + { + /// + /// 获取或设置配送方式 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string DeliveryOptionId { get; set; } = default!; + + /// + /// 获取或设置配送方式名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置是否可用。 + /// + [Newtonsoft.Json.JsonProperty("is_available")] + [System.Text.Json.Serialization.JsonPropertyName("is_available")] + public bool IsAvailable { get; set; } + } + + public class Manufacturer + { + /// + /// 获取或设置制造商名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置制造商地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string? Address { get; set; } + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string? PhoneNumber { get; set; } + + /// + /// 获取或设置联系邮箱。 + /// + [Newtonsoft.Json.JsonProperty("email")] + [System.Text.Json.Serialization.JsonPropertyName("email")] + public string? Email { get; set; } + } + + public class AuditFailedReason + { + /// + /// 获取或设置位置。 + /// + [Newtonsoft.Json.JsonProperty("position")] + [System.Text.Json.Serialization.JsonPropertyName("position")] + public string Position { get; set; } = default!; + + /// + /// 获取或设置拒绝原因列表。 + /// + [Newtonsoft.Json.JsonProperty("reasons")] + [System.Text.Json.Serialization.JsonPropertyName("reasons")] + public string[] ReasonList { get; set; } = default!; + + /// + /// 获取或设置修改建议列表。 + /// + [Newtonsoft.Json.JsonProperty("suggestions")] + [System.Text.Json.Serialization.JsonPropertyName("suggestions")] + public string[] SuggestionList { get; set; } = default!; + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置外部商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("external_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_product_id")] + public string? ExternalProductId { get; set; } + + /// + /// 获取或设置商品类型列表。 + /// + [Newtonsoft.Json.JsonProperty("product_types")] + [System.Text.Json.Serialization.JsonPropertyName("product_types")] + public string? ProductTypeList { get; set; } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置分类列表。 + /// + [Newtonsoft.Json.JsonProperty("category_chains")] + [System.Text.Json.Serialization.JsonPropertyName("category_chains")] + public Types.Category[] CategoryList { get; set; } = default!; + + /// + /// 获取或设置品牌信息。 + /// + [Newtonsoft.Json.JsonProperty("brand")] + [System.Text.Json.Serialization.JsonPropertyName("brand")] + public Types.Brand? Brand { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public Types.Image[]? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public Types.Certification[]? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public Types.ProductAttribute[]? ProductAttributeList { get; set; } + + /// + /// 获取或设置是否允许货到付款。 + /// + [Newtonsoft.Json.JsonProperty("is_cod_allowed")] + [System.Text.Json.Serialization.JsonPropertyName("is_cod_allowed")] + public bool IsCashOnDeliveryAllowed { get; set; } + + /// + /// 获取或设置配送方式列表。 + /// + [Newtonsoft.Json.JsonProperty("delivery_options")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_options")] + public Types.DeliveryOption[]? DeliveryOptionIdList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + + /// + /// 获取或设置审核失败原因列表。 + /// + [Newtonsoft.Json.JsonProperty("audit_failed_reasons")] + [System.Text.Json.Serialization.JsonPropertyName("audit_failed_reasons")] + public Types.AuditFailedReason[]? AuditFailedReasonList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs new file mode 100644 index 00000000..464ad514 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/recover 接口的请求。 + /// + public class ProductRecoverProductsRequest : ProductDeleteProductsRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs new file mode 100644 index 00000000..8becbf4f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductRecoverProductsResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/recover 接口的响应。 + /// + public class ProductRecoverProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data : ProductDeleteProductsResponse.Types.Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs new file mode 100644 index 00000000..1b9db9db --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsRequest.cs @@ -0,0 +1,75 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/search 接口的请求。 + /// + public class ProductSearchProductsRequest : TikTokShopRequest + { + /// + /// 获取或设置 API 版本号。 + /// 默认值:202312 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override int ApiVersion { get; set; } = 202312; + + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_ge")] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_le")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_le")] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置更新时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_ge")] + public long? UpdateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置更新时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_le")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_le")] + public long? UpdateTimestampLessThan { get; set; } + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string? ProductStatus { get; set; } + + /// + /// 获取或设置卖家 SKU 信息列表。 + /// + [Newtonsoft.Json.JsonProperty("seller_skus")] + [System.Text.Json.Serialization.JsonPropertyName("seller_skus")] + public IList? SellerSKUList { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs new file mode 100644 index 00000000..7cb9187e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductSearchProductsResponse.cs @@ -0,0 +1,180 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/search 接口的响应。 + /// + public class ProductSearchProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Product + { + public static class Types + { + public class SKU + { + public static class Types + { + public class Price + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置售价。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalePrice { get; set; } + + /// + /// 获取或设置不含税价格。 + /// + [Newtonsoft.Json.JsonProperty("tax_exclusive_price")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("tax_exclusive_price")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TaxExclusivePrice { get; set; } + } + + public class Inventory + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置库存数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public Types.Inventory[]? InventoryList { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price Price { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + + /// + /// 获取或设置同步失败原因。 + /// + [Newtonsoft.Json.JsonProperty("product_sync_fail_reasons")] + [System.Text.Json.Serialization.JsonPropertyName("product_sync_fail_reasons")] + public string? SyncFailReason { get; set; } + + /// + /// 获取或设置销售地区编码列表。 + /// + [Newtonsoft.Json.JsonProperty("sales_regions")] + [System.Text.Json.Serialization.JsonPropertyName("sales_regions")] + public string[]? SalesRegionCodeList { get; set; } + } + } + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public Types.Product[] ProductList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryRequest.cs new file mode 100644 index 00000000..4ff9c5af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryRequest.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/{product_id}/inventory/update 接口的请求。 + /// + public class ProductUpdateProductInventoryRequest : TikTokShopRequest + { + public static class Types + { + public class SKU + { + public static class Types + { + public class Inventory : ProductCreateProductRequest.Types.SKU.Types.Inventory + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SKUId { get; set; } = string.Empty; + + /// + /// 获取或设置库存列表。 + /// + [Newtonsoft.Json.JsonProperty("inventory")] + [System.Text.Json.Serialization.JsonPropertyName("inventory")] + public IList InventoryList { get; set; } = new List(); + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryResponse.cs new file mode 100644 index 00000000..43a38f38 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductInventoryResponse.cs @@ -0,0 +1,95 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/{product_id}/inventory/update 接口的响应。 + /// + public class ProductUpdateProductInventoryResponse : TikTokShopResponse + { + 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 ExtraError + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("warehouse_id")] + [System.Text.Json.Serialization.JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("extra_errors")] + [System.Text.Json.Serialization.JsonPropertyName("extra_errors")] + public Types.ExtraError[] ExtraErrorList { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialRequest.cs new file mode 100644 index 00000000..2a955cd2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialRequest.cs @@ -0,0 +1,215 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/{product_id}/partial_edit 接口的请求。 + /// + public class ProductUpdateProductPartialRequest : TikTokShopRequest + { + public static class Types + { + public class Image : ProductUpdateProductRequest.Types.Image + { + } + + public class Video : ProductUpdateProductRequest.Types.Video + { + } + + public class SKU : ProductUpdateProductRequest.Types.SKU + { + public static new class Types + { + public class SalesAttribute : ProductUpdateProductRequest.Types.SKU.Types.SalesAttribute + { + public static new class Types + { + public class Image : ProductUpdateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image + { + } + } + } + + public class Price : ProductUpdateProductRequest.Types.SKU.Types.Price + { + } + + public class Inventory : ProductUpdateProductRequest.Types.SKU.Types.Inventory + { + } + + public class IdentifierCode : ProductUpdateProductRequest.Types.SKU.Types.IdentifierCode + { + } + + public class CombinedSKU : ProductUpdateProductRequest.Types.SKU.Types.CombinedSKU + { + } + } + } + + public class PackageDimension : ProductUpdateProductRequest.Types.PackageDimension + { + } + + public class PackageWeight : ProductUpdateProductRequest.Types.PackageWeight + { + } + + public class Certification : ProductUpdateProductRequest.Types.Certification + { + public static new class Types + { + public class Image : ProductUpdateProductRequest.Types.Certification.Types.Image + { + } + + public class File : ProductUpdateProductRequest.Types.Certification.Types.File + { + } + } + } + + public class ProductAttribute : ProductUpdateProductRequest.Types.ProductAttribute + { + public static new class Types + { + public class ProductAttributeValue : ProductUpdateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue + { + } + } + } + + public class SizeChart : ProductUpdateProductRequest.Types.SizeChart + { + public static new class Types + { + public class Image : ProductUpdateProductRequest.Types.SizeChart.Types.Image + { + } + + public class Template : ProductUpdateProductRequest.Types.SizeChart.Types.Template + { + } + } + } + + public class Manufacturer : ProductUpdateProductRequest.Types.Manufacturer + { + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置外部商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("external_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_product_id")] + public string? ExternalProductId { get; set; } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public string? BrandId { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public IList? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public IList? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public IList? ProductAttributeList { get; set; } + + /// + /// 获取或设置是否允许货到付款。 + /// + [Newtonsoft.Json.JsonProperty("is_cod_allowed")] + [System.Text.Json.Serialization.JsonPropertyName("is_cod_allowed")] + public bool IsCashOnDeliveryAllowed { get; set; } + + /// + /// 获取或设置配送方式 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_ids")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_ids")] + public IList? DeliveryOptionIdList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialResponse.cs new file mode 100644 index 00000000..0fff3ff9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPartialResponse.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/{product_id}/partial_edit 接口的响应。 + /// + public class ProductUpdateProductPartialResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SKU : ProductUpdateProductResponse.Types.Data.Types.SKU + { + } + } + + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs new file mode 100644 index 00000000..068320b6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceRequest.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/{product_id}/prices/update 接口的请求。 + /// + public class ProductUpdateProductPriceRequest : TikTokShopRequest + { + public static class Types + { + public class SKU + { + public static class Types + { + public class Price : ProductCreateProductRequest.Types.SKU.Types.Price + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SKUId { get; set; } = string.Empty; + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public Types.Price Price { get; set; } = new Types.Price(); + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs new file mode 100644 index 00000000..6004bbdd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductPriceResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/{product_id}/prices/update 接口的响应。 + /// + public class ProductUpdateProductPriceResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs new file mode 100644 index 00000000..c73b8943 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductRequest.cs @@ -0,0 +1,229 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /product/{version}/products/{product_id} 接口的请求。 + /// + public class ProductUpdateProductRequest : TikTokShopRequest + { + public static class Types + { + public class Image : ProductCreateProductRequest.Types.Image + { + } + + public class Video : ProductCreateProductRequest.Types.Video + { + } + + public class SKU : ProductCreateProductRequest.Types.SKU + { + public static new class Types + { + public class SalesAttribute : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image + { + } + } + } + + public class Price : ProductCreateProductRequest.Types.SKU.Types.Price + { + } + + public class Inventory : ProductCreateProductRequest.Types.SKU.Types.Inventory + { + } + + public class IdentifierCode : ProductCreateProductRequest.Types.SKU.Types.IdentifierCode + { + } + + public class CombinedSKU : ProductCreateProductRequest.Types.SKU.Types.CombinedSKU + { + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string? SKUId { get; set; } + } + + public class PackageDimension : ProductCreateProductRequest.Types.PackageDimension + { + } + + public class PackageWeight : ProductCreateProductRequest.Types.PackageWeight + { + } + + public class Certification : ProductCreateProductRequest.Types.Certification + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.Certification.Types.Image + { + } + + public class File : ProductCreateProductRequest.Types.Certification.Types.File + { + } + } + } + + public class ProductAttribute : ProductCreateProductRequest.Types.ProductAttribute + { + public static new class Types + { + public class ProductAttributeValue : ProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue + { + } + } + } + + public class SizeChart : ProductCreateProductRequest.Types.SizeChart + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.SizeChart.Types.Image + { + } + + public class Template : ProductCreateProductRequest.Types.SizeChart.Types.Template + { + } + } + } + + public class Manufacturer : ProductCreateProductRequest.Types.Manufacturer + { + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置外部商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("external_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_product_id")] + public string? ExternalProductId { get; set; } = string.Empty; + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public string? BrandId { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public IList? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public IList? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public IList? ProductAttributeList { get; set; } + + /// + /// 获取或设置是否允许货到付款。 + /// + [Newtonsoft.Json.JsonProperty("is_cod_allowed")] + [System.Text.Json.Serialization.JsonPropertyName("is_cod_allowed")] + public bool IsCashOnDeliveryAllowed { get; set; } + + /// + /// 获取或设置配送方式 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_ids")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_ids")] + public IList? DeliveryOptionIdList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs new file mode 100644 index 00000000..a74083e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductUpdateProductResponse.cs @@ -0,0 +1,47 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /product/{version}/products/{product_id} 接口的响应。 + /// + public class ProductUpdateProductResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SKU : ProductCreateProductResponse.Types.Data.Types.SKU + { + } + + public class Warning : ProductCreateProductResponse.Types.Data.Types.Warning + { + } + } + + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + + /// + /// 获取或设置警告列表。 + /// + [Newtonsoft.Json.JsonProperty("warnings")] + [System.Text.Json.Serialization.JsonPropertyName("warnings")] + public Types.Warning[]? WarningList { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderGetOrderDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderBatchGetOrderDetailResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderGetOrderDetailResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderBatchGetOrderDetailResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductRequest.json new file mode 100644 index 00000000..1a57ece9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductRequest.json @@ -0,0 +1,98 @@ +{ + "brand_id": "7082427311584347905", + "category_id": "600001", + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "name": "SNI.PDF" + } + ], + "id": "7182427311584347905", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ] + } + ], + "description": " ", + "main_images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name", + "phone_number": "+4412345678" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.31" + }, + "product_attributes": [ + { + "id": "100392", + "values": [ + { + "id": "1001533", + "name": "Steel" + } + ] + } + ], + "size_chart": { + "image": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "global_quantity": 999, + "identifier_code": { + "code": "10000000000000", + "type": "GTIN" + }, + "inventory": [ + { + "global_warehouse_id": "7068517275539719942", + "quantity": 999 + } + ], + "price": { + "amount": "999", + "currency": "USD" + }, + "sales_attributes": [ + { + "id": "100089", + "name": "Color", + "sku_img": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe\n" + }, + "value_id": "1729592969712207000\n", + "value_name": "Red" + } + ], + "seller_sku": "XL-COLOR-RED-001", + "sku_unit_count": "1" + } + ], + "title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks\n", + "video": { + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductResponse.json new file mode 100644 index 00000000..5ac94129 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductCreateGlobalProductResponse.json @@ -0,0 +1,20 @@ +{ + "code": 0, + "data": { + "global_product_id": "1729592969712207008", + "global_skus": [ + { + "id": "1729592969712207012", + "sales_attributes": [ + { + "id": "100000", + "value_id": "1729592969712207123" + } + ], + "seller_sku": "Color-Red-XM001" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsRequest.json new file mode 100644 index 00000000..f454355d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsRequest.json @@ -0,0 +1,6 @@ +{ + "global_product_ids": [ + "1729715829872102020", + "1729715829872036484" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsResponse.json new file mode 100644 index 00000000..bcf0fee4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductDeleteGlobalProductsResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052003, + "detail": { + "global_product_id": "1729715829872102020" + }, + "message": "The current product status can not be actiavted" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductGetGlobalProductDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductGetGlobalProductDetailResponse.json new file mode 100644 index 00000000..129562b5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductGetGlobalProductDetailResponse.json @@ -0,0 +1,138 @@ +{ + "code": 0, + "data": { + "brand": { + "id": "7082427311584347905" + }, + "category": { + "id": "600002" + }, + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "name": "SNI.PDF", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ] + } + ], + "id": "7267563252536723205", + "images": [ + { + "height": 600, + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "width": 600 + } + ], + "title": "SNI Certificate" + } + ], + "create_time": 1694522875, + "description": " ", + "global_seller_id": "7494083603082020484", + "id": "1729592969712207008", + "main_images": [ + { + "height": 600, + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "width": 600 + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com\n", + "name": "Sample Manufacturer Name", + "phone_number": "+4412345678" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.32" + }, + "product_attributes": [ + { + "id": "100392", + "name": "Occasion", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "products": [ + { + "id": "1729592969712207922", + "region": "GB" + } + ], + "size_chart": { + "image": { + "height": 600, + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "width": 600 + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "global_quantity": 100, + "id": "1729592969712207234", + "identifier_code": { + "code": "10000000000010", + "type": "GTIN" + }, + "inventory": [ + { + "global_warehouse_id": "6966568648651605766", + "quantity": 100 + } + ], + "price": { + "amount": "1.01", + "currency": "USD", + "unit_price": "1.00" + }, + "sales_attributes": [ + { + "id": "100000", + "name": "Color", + "sku_img": { + "height": 600, + "thumb_urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "width": 600 + }, + "value_id": "7267563252536723205", + "value_name": "Red\n" + } + ], + "seller_sku": "Color-Red-XM001", + "sku_unit_count": "100.00" + } + ], + "title": "Short Boat Invisible Socks", + "update_time": 1694522875, + "video": { + "id": "v09ea0g40000cj91373c77u3mid3g1s0" + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductRequest.json new file mode 100644 index 00000000..cb003207 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductRequest.json @@ -0,0 +1,20 @@ +{ + "publish_target": [ + { + "region": "MY", + "skus": [ + { + "inventory": { + "quantity": 999, + "warehouse_id": "7068517275539719942" + }, + "price": { + "amount": "10.01", + "currency": "MYR" + }, + "related_global_sku_id": "1729592969712207400" + } + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductResponse.json new file mode 100644 index 00000000..4fbc64fd --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductPublishGlobalProductResponse.json @@ -0,0 +1,38 @@ +{ + "code": 0, + "data": { + "products": [ + { + "id": "1929592969712207410", + "region": "MY", + "shop_id": "7494083603082020484", + "skus": [ + { + "id": "1729592969712207400", + "related_global_sku_id": "1729696746528737924", + "sales_attributes": [ + { + "id": "100001", + "value_id": "7272008676829824800" + } + ], + "seller_sku": "XL-COLOR-001" + } + ] + } + ], + "publish_result": [ + { + "fail_reasons": [ + { + "message": "The current product status can not be actiavted" + } + ], + "region": "MY", + "status": "SUCCESS" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsRequest.json new file mode 100644 index 00000000..95c16273 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsRequest.json @@ -0,0 +1,10 @@ +{ + "create_time_ge": 1694576429, + "create_time_le": 1694576429, + "seller_skus": [ + "Color-Red-001" + ], + "status": "PUBLISHED", + "update_time_ge": 1694576429, + "update_time_le": 1694576429 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsResponse.json new file mode 100644 index 00000000..fb6e4139 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductSearchGlobalProductsResponse.json @@ -0,0 +1,24 @@ +{ + "code": 0, + "data": { + "global_products": [ + { + "create_time": 1694576429, + "id": "1729592969712207008", + "skus": [ + { + "id": "1729592969712207012", + "seller_sku": "Color-Red-XM001" + } + ], + "status": "PUBLISHED", + "title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks", + "update_time": 1694576429 + } + ], + "next_page_token": "b2Zmc2V0PTAK", + "total_count": 100 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductInventoryRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductInventoryRequest.json new file mode 100644 index 00000000..aff92963 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductInventoryRequest.json @@ -0,0 +1,13 @@ +{ + "global_skus": [ + { + "id": "1729592969712207013", + "inventory": [ + { + "global_warehouse_id": "7068517275539719942", + "quantity": 999 + } + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductRequest.json new file mode 100644 index 00000000..f4a3fe9d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductRequest.json @@ -0,0 +1,99 @@ +{ + "brand_id": "7082427311584347905", + "category_id": "600001", + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "name": "SNI.PDF" + } + ], + "id": "7182427311584347905", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ] + } + ], + "description": " ", + "main_images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name", + "phone_number": "+4412345678\n" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.99" + }, + "product_attributes": [ + { + "id": "100392", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "size_chart": { + "image": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "global_quantity": 999, + "id": "1782427311584347905", + "identifier_code": { + "code": "10000000000000", + "type": "GTIN" + }, + "inventory": [ + { + "global_warehouse_id": "7068517275539719942", + "quantity": 999 + } + ], + "price": { + "amount": "1.32", + "currency": "USD" + }, + "sales_attributes": [ + { + "id": "100089", + "name": "Specification", + "sku_img": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "value_id": "1729592969712207000", + "value_name": "XL" + } + ], + "seller_sku": "Color-Red-XM01", + "sku_unit_count": "1" + } + ], + "title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks", + "video": { + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductResponse.json new file mode 100644 index 00000000..2aa6c51c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/Global/ProductUpdateGlobalProductResponse.json @@ -0,0 +1,30 @@ +{ + "code": 0, + "data": { + "global_skus": [ + { + "id": "1729592969712207012", + "sales_attributes": [ + { + "id": "100000", + "value_id": "1729592969712207123" + } + ], + "seller_sku": "Color-Red-XM01" + } + ], + "publish_results": [ + { + "fail_reasons": [ + { + "message": "The current product status can not be actiavted" + } + ], + "region": "MY", + "status": "SUCCESS" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsRequest.json new file mode 100644 index 00000000..3cf29fd2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsRequest.json @@ -0,0 +1,6 @@ +{ + "product_ids": [ + "1729592969712207008", + "1729592969712207021" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsResponse.json new file mode 100644 index 00000000..09a74a12 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductActivateProductsResponse.json @@ -0,0 +1,22 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052990, + "detail": { + "extra_errors": [ + { + "code": 12052003, + "message": "The current product status can not be actiavted" + } + ], + "product_id": "1729382588639839583" + }, + "message": "Batch activate business error." + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductRequest.json new file mode 100644 index 00000000..47602a18 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductRequest.json @@ -0,0 +1,110 @@ +{ + "brand_id": "7082427311584347905", + "category_id": "600001", + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "name": "brand_cert.PDF" + } + ], + "id": "7182427311584347905", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ] + } + ], + "delivery_option_ids": [ "1729592969712203232" ], + "description": " ", + "external_product_id": "172959296971220002", + "is_cod_allowed": false, + "main_images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name\n", + "phone_number": "4412345678" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.32" + }, + "primary_combined_product_id": "1729582718312380123", + "product_attributes": [ + { + "id": "100392", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "save_mode": "LISTING", + "size_chart": { + "image": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "combined_skus": [ + { + "product_id": "1729582718312380123", + "sku_count": 1, + "sku_id": "2729382476852921560" + } + ], + "external_sku_id": "1729592969712207012", + "identifier_code": { + "code": "10000000000000", + "type": "GTIN" + }, + "inventory": [ + { + "quantity": 999, + "warehouse_id": "7068517275539719942" + } + ], + "price": { + "amount": "1.21", + "currency": "USD" + }, + "sales_attributes": [ + { + "id": "100089", + "name": "Color", + "sku_img": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "value_id": "1729592969712207000", + "value_name": "Red" + } + ], + "seller_sku": "Color-Red-XM001", + "sku_unit_count": "100.00" + } + ], + "title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks", + "video": { + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductResponse.json new file mode 100644 index 00000000..a2aaa578 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductResponse.json @@ -0,0 +1,26 @@ +{ + "code": 0, + "data": { + "product_id": "1729592969712207008", + "skus": [ + { + "external_sku_id": "1729592969712207234", + "id": "1729592969712207012", + "sales_attributes": [ + { + "id": "100000", + "value_id": "1729592969712207123" + } + ], + "seller_sku": "Color-Red-XM001" + } + ], + "warnings": [ + { + "message": "The [brand_id]:123 field is incorrect and has been automatically cleared by the system. Reason: [Brand does not exist]. You can edit it later." + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsRequest.json new file mode 100644 index 00000000..cde2879e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsRequest.json @@ -0,0 +1,5 @@ +{ + "product_ids": [ + "1729592969712207008" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsResponse.json new file mode 100644 index 00000000..c44ae5d2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeactivateProductsResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052003, + "detail": { + "product_id": "1729382588639839583" + }, + "message": "The current product status can not be deactiate" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsRequest.json new file mode 100644 index 00000000..c629b5ec --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsRequest.json @@ -0,0 +1,6 @@ +{ + "product_ids": [ + "1749456684124612452", + "1742456684124612451" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsResponse.json new file mode 100644 index 00000000..169c17f1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductDeleteProductsResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052003, + "detail": { + "product_id": "1729382588639839583" + }, + "message": "The current product status can not be actiavted" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesRequest.json new file mode 100644 index 00000000..4baa611d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesRequest.json @@ -0,0 +1,8 @@ +{ + "product_ids": [ + "1729592969712207008" + ], + "sku_ids": [ + "1729388324987897824" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesResponse.json new file mode 100644 index 00000000..729309d5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetInventoriesResponse.json @@ -0,0 +1,44 @@ +{ + "code": 0, + "data": { + "inventory": [ + { + "product_id": "1729592969712207008", + "skus": [ + { + "id": "1729388324987897824", + "seller_sku": "Color-Red-XM01", + "total_available_inventory_distribution": { + "campaign_inventory": [ + { + "campaign_name": "Big Sale", + "quantity": 30 + } + ], + "creator_inventory": [ + { + "creator_name": "py001", + "quantity": 20 + } + ], + "in_shop_inventory": { + "quantity": 50 + } + }, + "total_available_quantity": 100, + "total_committed_quantity": 10, + "warehouse_inventory": [ + { + "available_quantity": 100, + "committed_quantity": 10, + "warehouse_id": "7054915283043174149" + } + ] + } + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetListingSchemasResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetListingSchemasResponse.json new file mode 100644 index 00000000..418f28d0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetListingSchemasResponse.json @@ -0,0 +1,57 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052024, + "detail": { + "category_id": 60002 + }, + "message": "Category is not final category" + } + ], + "listing_schemas": [ + { + "category_id": 60001, + "fileds": [ + { + "complex_values": [ + { + "id": "100329", + "name": "Occasion", + "options": [ + { + "id": "1001533", + "name": "Birthday" + } + ], + "rules": [ + { + "type": "MULTIINPUT", + "value": "true" + } + ] + } + ], + "id": "product_attributes", + "name": "product_attributes", + "options": [ + { + "id": " ", + "name": " " + } + ], + "rules": [ + { + "type": "REQUIRED", + "value": "true" + } + ] + } + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetPrerequisitesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetPrerequisitesResponse.json new file mode 100644 index 00000000..8ef64c51 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetPrerequisitesResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "check_results": [ + { + "check_item": "RETURN_WAREHOUSE", + "fail_reasons": [ + "Couldn't publish this product as you haven't set the return warehouse for your shop. Add the return warehouse information on TikTok Shop Seller Center first and try again." + ], + "is_failed": true + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetProductDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetProductDetailResponse.json new file mode 100644 index 00000000..65588754 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductGetProductDetailResponse.json @@ -0,0 +1,200 @@ +{ + "code": 0, + "data": { + "audit_failed_reasons": [ + { + "position": "product", + "reasons": [ + "violate listing rules" + ], + "suggestions": [ + "The product violates TikTok Shopping listing rules, please check and resubmit." + ] + } + ], + "brand": { + "id": "7082427311584347905", + "name": "brand xxx aaa" + }, + "category_chains": [ + { + "id": "853000", + "is_leaf": true, + "local_name": "Botol & Stoples Penyimpanan", + "parent_id": "851848" + } + ], + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "name": "CERT_X2.PDF", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ] + } + ], + "id": "602362", + "images": [ + { + "height": 600, + "thumb_urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "width": 600 + } + ], + "title": "SNI Certificate" + } + ], + "create_time": 1234567890, + "delivery_options": [ + { + "id": "1729592969712203232", + "is_available": true, + "name": "\"\"" + } + ], + "description": "

Please compare above detailed size with your measurement before purchase.

\n
    \n
  • M-Size
  • \n
  • XL-Size
  • \n
\n\n", + "external_product_id": "172959296971220002", + "id": "1729592969712207008", + "is_cod_allowed": true, + "main_images": [ + { + "height": 600, + "thumb_urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "width": 600 + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name", + "phone_number": "12345678" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.32" + }, + "product_attributes": [ + { + "id": "100392", + "name": "Occasion", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "product_types": "COMBINED_PRODUCT", + "size_chart": { + "image": { + "height": 600, + "thumb_urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "width": 600 + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "combined_skus": [ + { + "product_id": "1729582718312380123", + "sku_count": 1, + "sku_id": "1729582718312380123" + } + ], + "external_sku_id": "1729592969712207234", + "global_listing_policy": { + "inventory_type": "SHARED", + "price_sync": true, + "replicate_source": { + "product_id": "1729592969712203232", + "shop_id": "7295929697122032321", + "sku_id": "1729592969712203232" + } + }, + "id": "10001", + "identifier_code": { + "code": "10000000000010", + "type": "GTIN" + }, + "inventory": [ + { + "quantity": 999, + "warehouse_id": "6966568648651605766" + } + ], + "price": { + "currency": "USD", + "sale_price": "117.5", + "tax_exclusive_price": "110", + "unit_price": "1" + }, + "sales_attributes": [ + { + "id": "100000", + "name": "Color", + "sku_img": { + "height": 100, + "thumb_urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "urls": [ + "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036" + ], + "width": 100 + }, + "value_id": "100000", + "value_name": "Red" + } + ], + "seller_sku": "sku name", + "sku_unit_count": "1.00" + } + ], + "status": "SELLER_DEACTIVATED", + "title": "Short Boat Invisible Socks", + "update_time": 1234567899, + "video": { + "cover_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/6c8519a3663a4d728c4e3c131dc914b4~tplv-o3syd03w52-resize-jpeg:300:300.jpeg?from=522366036", + "format": "MP4", + "height": 480, + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "size": 1000, + "url": "https://v16m-default.akamaized.net/bbae7099581b26cd340beaa7821b2d8c/64de6020/video/tos/alisg/tos-alisg-v-f466fc-sg/oMne9QuzIBN3fIDN7bFCCMbBKuGigg12ghDC8k/?a=0&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=2212&bt=1106&cs=0&ds=3&ft=dl9~j-Inz7TKnfsfiyq8Z&mime_type=video_mp4&qs=13&rc=anR4Ojk6ZmYzbTMzODRmNEBpanR4Ojk6ZmYzbTMzODRmNEBsYWFwcjRva2NgLS1kLy1zYSNsYWFwcjRva2NgLS1kLy1zcw%3D%3D&l=202308171159498F7B108584E58B010932&btag=e00048000", + "width": 1280 + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsRequest.json new file mode 100644 index 00000000..cde2879e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsRequest.json @@ -0,0 +1,5 @@ +{ + "product_ids": [ + "1729592969712207008" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsResponse.json new file mode 100644 index 00000000..169c17f1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductRecoverProductsResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052003, + "detail": { + "product_id": "1729382588639839583" + }, + "message": "The current product status can not be actiavted" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsRequest.json new file mode 100644 index 00000000..01b06f7f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsRequest.json @@ -0,0 +1,10 @@ +{ + "create_time_ge": 1694309208, + "create_time_le": 1694319208, + "seller_skus": [ + "Color-Red-XM001" + ], + "status": "ALL", + "update_time_ge": 1694319208, + "update_time_le": 1694319208 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsResponse.json new file mode 100644 index 00000000..b2d84f71 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductSearchProductsResponse.json @@ -0,0 +1,39 @@ +{ + "code": 0, + "data": { + "next_page_token": "b2Zmc2V0PTAK", + "products": [ + { + "create_time": 1234567890, + "id": "1729592969712207008", + "product_sync_fail_reasons": "The required qualification is missed.", + "sales_regions": [ + "US" + ], + "skus": [ + { + "id": "1729592969712207012", + "inventory": [ + { + "quantity": 999, + "warehouse_id": "7068517275539719942" + } + ], + "price": { + "currency": "USD", + "sale_price": "121.11", + "tax_exclusive_price": "111.01" + }, + "seller_sku": "Color-Red-XM01" + } + ], + "status": "ACTIVATE", + "title": "Short Boat Invisible Socks", + "update_time": 1234567800 + } + ], + "total_count": 200 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryRequest.json new file mode 100644 index 00000000..fdb65ca9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryRequest.json @@ -0,0 +1,13 @@ +{ + "skus": [ + { + "id": "1729592969712207013", + "inventory": [ + { + "quantity": 999, + "warehouse_id": "7068517275539719942" + } + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryResponse.json new file mode 100644 index 00000000..5325952e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductInventoryResponse.json @@ -0,0 +1,23 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 12052990, + "detail": { + "extra_errors": [ + { + "code": 12052003, + "message": "The current product status can not be actiavted", + "warehouse_id": "7068517275539719942" + } + ], + "sku_id": "1729592969712207013" + }, + "message": "batch update inventory error" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialRequest.json new file mode 100644 index 00000000..423d17aa --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialRequest.json @@ -0,0 +1,100 @@ +{ + "brand_id": "7082427311584347905", + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", + "name": "SNI Certificate" + } + ], + "id": "7182427311584347905", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ] + } + ], + "description": " ", + "external_product_id": "172959296971220002", + "is_cod_allowed": false, + "main_images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name", + "phone_number": "4412345678" + }, + "package_dimensions": { + "height": "12", + "length": "10", + "unit": "CENTIMETER", + "width": "11" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.32" + }, + "product_attributes": [ + { + "id": "100392", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "size_chart": { + "image": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "external_sku_id": "1729592969712207012", + "id": "1729592969712207012", + "identifier_code": { + "code": "12345678901234", + "type": "GTIN" + }, + "inventory": [ + { + "quantity": 999, + "warehouse_id": "7068517275539719942" + } + ], + "price": { + "amount": "100.00", + "currency": "USD" + }, + "sales_attributes": [ + { + "id": "100089", + "name": "Specification", + "sku_img": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "value_id": "1729592969712207000", + "value_name": "XL" + } + ], + "seller_sku": "seller sku xxaa", + "sku_unit_count": "100.00" + } + ], + "title": "Title-xxaa", + "video": { + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialResponse.json new file mode 100644 index 00000000..681c093a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPartialResponse.json @@ -0,0 +1,21 @@ +{ + "code": 0, + "data": { + "product_id": "1729592969712207008", + "skus": [ + { + "external_sku_id": "1729592969712207012", + "id": "1729592969712207012", + "sales_attributes": [ + { + "id": "100000", + "value_id": "1729592969712207123" + } + ], + "seller_sku": "seller sku xxaa" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPriceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPriceRequest.json new file mode 100644 index 00000000..c7f78846 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductPriceRequest.json @@ -0,0 +1,11 @@ +{ + "skus": [ + { + "id": "1729592969712207013", + "price": { + "amount": "1.32", + "currency": "USD" + } + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductRequest.json new file mode 100644 index 00000000..4cf7de2a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductRequest.json @@ -0,0 +1,109 @@ +{ + "brand_id": "7082427311584347905", + "category_id": "600001", + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w", + "name": "SNI Certificate" + } + ], + "id": "7182427311584347905", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ] + } + ], + "delivery_option_ids": [ "1729592969712203232" ], + "description": " ", + "external_product_id": "172959296971220002", + "is_cod_allowed": false, + "main_images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name", + "phone_number": "4412345678" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.32" + }, + "product_attributes": [ + { + "id": "100392", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "size_chart": { + "image": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "combined_skus": [ + { + "product_id": "1729582718312380123", + "sku_count": 2, + "sku_id": "2729382476852921560" + } + ], + "external_sku_id": "1729592969712207012", + "id": "1729592969712207000", + "identifier_code": { + "code": "12345678901234", + "type": "GTIN" + }, + "inventory": [ + { + "quantity": 999, + "warehouse_id": "7068517275539719942" + } + ], + "price": { + "amount": "1.21", + "currency": "USD" + }, + "sales_attributes": [ + { + "id": "100089", + "name": "Specification", + "sku_img": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "value_id": "1729592969712401100", + "value_name": "XL" + } + ], + "seller_sku": "Color-Red-XM001", + "sku_unit_count": "100.00" + } + ], + "title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks\n", + "video": { + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductResponse.json new file mode 100644 index 00000000..a2aaa578 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductUpdateProductResponse.json @@ -0,0 +1,26 @@ +{ + "code": 0, + "data": { + "product_id": "1729592969712207008", + "skus": [ + { + "external_sku_id": "1729592969712207234", + "id": "1729592969712207012", + "sales_attributes": [ + { + "id": "100000", + "value_id": "1729592969712207123" + } + ], + "seller_sku": "Color-Red-XM001" + } + ], + "warnings": [ + { + "message": "The [brand_id]:123 field is incorrect and has been automatically cleared by the system. Reason: [Brand does not exist]. You can edit it later." + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 28ffa987d4f6972c0a714a02c8c9a0f7b7283b0a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 13 May 2024 13:50:49 +0800 Subject: [PATCH 08/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E7=89=A9=E6=B5=81=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 5 + ...TokShopClientExecuteLogisticsExtensions.cs | 99 ++++++++++++ ...tDeliveryOptionShippingProvidersRequest.cs | 15 ++ ...DeliveryOptionShippingProvidersResponse.cs | 42 +++++ .../LogisticsGetGlobalWarehousesRequest.cs | 9 ++ .../LogisticsGetGlobalWarehousesResponse.cs | 49 ++++++ ...sticsGetWarehouseDeliveryOptionsRequest.cs | 15 ++ ...ticsGetWarehouseDeliveryOptionsResponse.cs | 128 +++++++++++++++ .../LogisticsGetWarehousesRequest.cs | 9 ++ .../LogisticsGetWarehousesResponse.cs | 153 ++++++++++++++++++ ...liveryOptionShippingProvidersResponse.json | 13 ++ .../LogisticsGetGlobalWarehousesResponse.json | 14 ++ ...csGetWarehouseDeliveryOptionsResponse.json | 26 +++ .../LogisticsGetWarehousesResponse.json | 29 ++++ 14 files changed, 606 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetGlobalWarehousesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehousesResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index 0b25f70f..6ec03a50 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -63,6 +63,11 @@ Naming Policies: - Orders - Get Order List: `OrderSearchOrders` - Get Order Detail: `OrderBatchGetOrderDetail` +- Logistics + - Get Warehouse Delivery Options: `LogisticsGetWarehouseDeliveryOptions` + - Get Warehouse List: `LogisticsGetWarehouses` + - Get Shipping Providers: `LogisticsGetDeliveryOptionShippingProviders` + - Get Global Seller Warehouse: `LogisticsGetGlobalWarehouses` - Supply Chain - Confirm Package Shipment: `SupplyChainSyncPackages` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs new file mode 100644 index 00000000..abb600a7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteLogisticsExtensions.cs @@ -0,0 +1,99 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteLogisticsExtensions + { + /// + /// 异步调用 [GET] /logistics/{version}/warehouses 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteLogisticsGetWarehousesAsync(this TikTokShopClient client, Models.LogisticsGetWarehousesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "logistics", request.ApiVersion, "warehouses"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /logistics/{version}/global_warehouses 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteLogisticsGetGlobalWarehousesAsync(this TikTokShopClient client, Models.LogisticsGetGlobalWarehousesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "logistics", request.ApiVersion, "global_warehouses"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /logistics/{version}/warehouses/{warehouse_id}/delivery_options 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteLogisticsGetWarehouseDeliveryOptionsAsync(this TikTokShopClient client, Models.LogisticsGetWarehouseDeliveryOptionsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "logistics", request.ApiVersion, "warehouses", request.WarehouseId, "delivery_options"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /logistics/{version}/delivery_options/{delivery_option_id}/shipping_providers 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteLogisticsGetDeliveryOptionShippingProvidersAsync(this TikTokShopClient client, Models.LogisticsGetDeliveryOptionShippingProvidersRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "logistics", request.ApiVersion, "delivery_options", request.DeliveryOptionId, "shipping_providers"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersRequest.cs new file mode 100644 index 00000000..9ac4d026 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/delivery_options/{delivery_option_id}/shipping_providers 接口的请求。 + /// + public class LogisticsGetDeliveryOptionShippingProvidersRequest : TikTokShopRequest + { + /// + /// 获取或设置配送方式 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string DeliveryOptionId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.cs new file mode 100644 index 00000000..c11a4e69 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/delivery_options/{delivery_option_id}/shipping_providers 接口的响应。 + /// + public class LogisticsGetDeliveryOptionShippingProvidersResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ShippingProvider + { + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ShippingProviderId { get; set; } = default!; + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + } + } + + /// + /// 获取或设置运输服务商列表。 + /// + [Newtonsoft.Json.JsonProperty("shipping_providers")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_providers")] + public Types.ShippingProvider[] ShippingProviderList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesRequest.cs new file mode 100644 index 00000000..fb48ddd4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/global_warehouses 接口的请求。 + /// + public class LogisticsGetGlobalWarehousesRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesResponse.cs new file mode 100644 index 00000000..1c6f0893 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetGlobalWarehousesResponse.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/global_warehouses 接口的响应。 + /// + public class LogisticsGetGlobalWarehousesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Warehouse + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置仓库名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置所有权类型。 + /// + [Newtonsoft.Json.JsonProperty("ownership")] + [System.Text.Json.Serialization.JsonPropertyName("ownership")] + public string Ownership { get; set; } = default!; + } + } + + /// + /// 获取或设置仓库列表。 + /// + [Newtonsoft.Json.JsonProperty("global_warehouses")] + [System.Text.Json.Serialization.JsonPropertyName("global_warehouses")] + public Types.Warehouse[] WarehouseList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsRequest.cs new file mode 100644 index 00000000..babaa4b4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/warehouses/{warehouse_id}/delivery_options 接口的请求。 + /// + public class LogisticsGetWarehouseDeliveryOptionsRequest : TikTokShopRequest + { + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string WarehouseId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.cs new file mode 100644 index 00000000..e8c57593 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.cs @@ -0,0 +1,128 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/warehouses/{warehouse_id}/delivery_options 接口的响应。 + /// + public class LogisticsGetWarehouseDeliveryOptionsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class DeliveryOption + { + public static class Types + { + public class DimensionLimit + { + /// + /// 获取或设置最大长度。 + /// + [Newtonsoft.Json.JsonProperty("max_length")] + [System.Text.Json.Serialization.JsonPropertyName("max_length")] + public int MaxLength { get; set; } + + /// + /// 获取或设置最大宽度。 + /// + [Newtonsoft.Json.JsonProperty("max_width")] + [System.Text.Json.Serialization.JsonPropertyName("max_width")] + public int MaxWidth { get; set; } + + /// + /// 获取或设置最大高度。 + /// + [Newtonsoft.Json.JsonProperty("max_height")] + [System.Text.Json.Serialization.JsonPropertyName("max_height")] + public int MaxHeight { get; set; } + + /// + /// 获取或设置尺寸单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = default!; + } + + public class WeightLimit + { + /// + /// 获取或设置最小重量。 + /// + [Newtonsoft.Json.JsonProperty("min_weight")] + [System.Text.Json.Serialization.JsonPropertyName("min_weight")] + public int MinWeight { get; set; } + + /// + /// 获取或设置最大重量。 + /// + [Newtonsoft.Json.JsonProperty("max_weight")] + [System.Text.Json.Serialization.JsonPropertyName("max_weight")] + public int MaxWeight { get; set; } + + /// + /// 获取或设置重量单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = default!; + } + } + + /// + /// 获取或设置配送方式 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string DeliveryOptionId { get; set; } = default!; + + /// + /// 获取或设置配送方式名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置尺寸限制。 + /// + [Newtonsoft.Json.JsonProperty("dimension_limit")] + [System.Text.Json.Serialization.JsonPropertyName("dimension_limit")] + public Types.DimensionLimit DimensionLimit { get; set; } = default!; + + /// + /// 获取或设置重量限制。 + /// + [Newtonsoft.Json.JsonProperty("weight_limit")] + [System.Text.Json.Serialization.JsonPropertyName("weight_limit")] + public Types.WeightLimit WeightLimit { get; set; } = default!; + } + } + + /// + /// 获取或设置配送方式列表。 + /// + [Newtonsoft.Json.JsonProperty("delivery_options")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_options")] + public Types.DeliveryOption[] DeliveryOptionList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesRequest.cs new file mode 100644 index 00000000..e47b488e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/warehouses 接口的请求。 + /// + public class LogisticsGetWarehousesRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesResponse.cs new file mode 100644 index 00000000..e85428ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Logistics/LogisticsGetWarehousesResponse.cs @@ -0,0 +1,153 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /logistics/{version}/warehouses 接口的响应。 + /// + public class LogisticsGetWarehousesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Warehouse + { + public static class Types + { + public class Address + { + /// + /// 获取或设置完整地址。 + /// + [Newtonsoft.Json.JsonProperty("full_address")] + [System.Text.Json.Serialization.JsonPropertyName("full_address")] + public string FullAddress { get; set; } = default!; + + /// + /// 获取或设置地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region_code")] + [System.Text.Json.Serialization.JsonPropertyName("region_code")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置地区。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string Region { get; set; } = default!; + + /// + /// 获取或设置州/省。 + /// + [Newtonsoft.Json.JsonProperty("state")] + [System.Text.Json.Serialization.JsonPropertyName("state")] + public string State { get; set; } = default!; + + /// + /// 获取或设置市。 + /// + [Newtonsoft.Json.JsonProperty("city")] + [System.Text.Json.Serialization.JsonPropertyName("city")] + public string City { get; set; } = default!; + + /// + /// 获取或设置县。 + /// + [Newtonsoft.Json.JsonProperty("distict")] + [System.Text.Json.Serialization.JsonPropertyName("distict")] + public string District { get; set; } = default!; + + /// + /// 获取或设置镇。 + /// + [Newtonsoft.Json.JsonProperty("town")] + [System.Text.Json.Serialization.JsonPropertyName("town")] + public string Town { get; set; } = default!; + + /// + /// 获取或设置电话号码。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string PhoneNumber { get; set; } = default!; + + /// + /// 获取或设置联系人姓名。 + /// + [Newtonsoft.Json.JsonProperty("contact_person")] + [System.Text.Json.Serialization.JsonPropertyName("contact_person")] + public string ContactName { get; set; } = default!; + + /// + /// 获取或设置邮编。 + /// + [Newtonsoft.Json.JsonProperty("postal_code")] + [System.Text.Json.Serialization.JsonPropertyName("postal_code")] + public string PostalCode { get; set; } = default!; + } + } + + /// + /// 获取或设置仓库 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string WarehouseId { get; set; } = default!; + + /// + /// 获取或设置仓库名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置仓库类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置仓库子类型。 + /// + [Newtonsoft.Json.JsonProperty("sub_type")] + [System.Text.Json.Serialization.JsonPropertyName("sub_type")] + public string SubType { get; set; } = default!; + + /// + /// 获取或设置有效状态。 + /// + [Newtonsoft.Json.JsonProperty("effect_status")] + [System.Text.Json.Serialization.JsonPropertyName("effect_status")] + public string EffectStatus { get; set; } = default!; + + /// + /// 获取或设置是否默认。 + /// + [Newtonsoft.Json.JsonProperty("is_default")] + [System.Text.Json.Serialization.JsonPropertyName("is_default")] + public bool IsDefault { get; set; } + + /// + /// 获取或设置地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public Types.Address Address { get; set; } = default!; + } + } + + /// + /// 获取或设置仓库列表。 + /// + [Newtonsoft.Json.JsonProperty("warehouses")] + [System.Text.Json.Serialization.JsonPropertyName("warehouses")] + public Types.Warehouse[] WarehouseList { get; set; } = default!; + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.json new file mode 100644 index 00000000..8b2be4fd --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetDeliveryOptionShippingProvidersResponse.json @@ -0,0 +1,13 @@ +{ + "code": 0, + "data": { + "shipping_providers": [ + { + "id": "7117858858072016686", + "name": "USPS" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetGlobalWarehousesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetGlobalWarehousesResponse.json new file mode 100644 index 00000000..d5539141 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetGlobalWarehousesResponse.json @@ -0,0 +1,14 @@ +{ + "code": 0, + "data": { + "global_warehouses": [ + { + "id": "7000714532876273411", + "name": "Guangzhou", + "ownership": "SELLER" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.json new file mode 100644 index 00000000..38078557 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehouseDeliveryOptionsResponse.json @@ -0,0 +1,26 @@ +{ + "code": 0, + "data": { + "delivery_options": [ + { + "description": "LSV-TTS-STD S", + "dimension_limit": { + "max_height": 100, + "max_length": 100, + "max_width": 100, + "unit": "INCH" + }, + "id": "6955034615128000261", + "name": "LSV-TTS-STD", + "type": "STANDARD", + "weight_limit": { + "max_weight": 100, + "min_weight": 100, + "unit": "GRAM" + } + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehousesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehousesResponse.json new file mode 100644 index 00000000..560c87ae --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Logistics/LogisticsGetWarehousesResponse.json @@ -0,0 +1,29 @@ +{ + "code": 0, + "data": { + "warehouses": [ + { + "address": { + "city": "GuanZhou", + "contact_person": "Lee", + "distict": "HuaDu", + "full_address": "South Sea 11 floor", + "phone_number": "188****2234", + "postal_code": "510000", + "region": "China", + "region_code": "CN", + "state": "GuangDong", + "town": "town" + }, + "effect_status": "ENABLED", + "id": "7000714532876273410", + "is_default": true, + "name": "Guangzhou", + "sub_type": "DOMESTIC_WAREHOUSE", + "type": "SALES_WAREHOUSE" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From c11dc68c483d4173ce345645397c59d6668da4d4 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 13 May 2024 14:48:36 +0800 Subject: [PATCH 09/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BF=83=E9=94=80=E6=B4=BB=E5=8A=A8=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 18 ++ ...TokShopClientExecutePromotionExtensions.cs | 165 ++++++++++++++++++ .../ProductGetGlobalProductDetailResponse.cs | 2 +- .../ProductGetProductDetailResponse.cs | 10 +- .../PromotionCreateActivityRequest.cs | 43 +++++ .../PromotionCreateActivityResponse.cs | 43 +++++ .../PromotionDeactivateActivityRequest.cs | 15 ++ .../PromotionDeactivateActivityResponse.cs | 43 +++++ .../PromotionDeleteActivityProductsRequest.cs | 31 ++++ ...PromotionDeleteActivityProductsResponse.cs | 36 ++++ .../PromotionGetActivityDetailRequest.cs | 15 ++ .../PromotionGetActivityDetailResponse.cs | 139 +++++++++++++++ .../PromotionSearchActivitiesRequest.cs | 37 ++++ .../PromotionSearchActivitiesResponse.cs | 105 +++++++++++ .../PromotionUpdateActivityProductsRequest.cs | 118 +++++++++++++ ...PromotionUpdateActivityProductsResponse.cs | 50 ++++++ .../PromotionUpdateActivityRequest.cs | 36 ++++ .../PromotionUpdateActivityResponse.cs | 36 ++++ .../PromotionCreateActivityRequest.json | 7 + .../PromotionCreateActivityResponse.json | 11 ++ .../PromotionDeactivateActivityResponse.json | 11 ++ ...romotionDeleteActivityProductsRequest.json | 8 + ...omotionDeleteActivityProductsResponse.json | 10 ++ .../PromotionGetActivityDetailResponse.json | 40 +++++ .../PromotionSearchActivitiesRequest.json | 6 + .../PromotionSearchActivitiesResponse.json | 22 +++ ...romotionUpdateActivityProductsRequest.json | 21 +++ ...omotionUpdateActivityProductsResponse.json | 12 ++ .../PromotionUpdateActivityRequest.json | 5 + .../PromotionUpdateActivityResponse.json | 10 ++ 30 files changed, 1099 insertions(+), 6 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeactivateActivityResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionGetActivityDetailResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index 6ec03a50..c549703e 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -10,6 +10,8 @@ Naming Policies: ### APIs +Notes: The following catalog is consistent with the catalog structure of [TikTokShop Partner Center API Reference](https://partner.tiktokshop.com/docv2/page/6507ead7b99d5302be949ba9?external_id=6507ead7b99d5302be949ba9). +
[View Details] @@ -63,11 +65,27 @@ Naming Policies: - Orders - Get Order List: `OrderSearchOrders` - Get Order Detail: `OrderBatchGetOrderDetail` +- Fulfillment + - *Pending ...* +- Return and Refund + - *Pending ...* - Logistics - Get Warehouse Delivery Options: `LogisticsGetWarehouseDeliveryOptions` - Get Warehouse List: `LogisticsGetWarehouses` - Get Shipping Providers: `LogisticsGetDeliveryOptionShippingProviders` - Get Global Seller Warehouse: `LogisticsGetGlobalWarehouses` +- Promotion + - Create Activity: `PromotionCreateActivity` + - Update Activity Product: `PromotionUpdateActivityProducts` + - Remove Activity Product: `PromotionDeleteActivityProducts` + - Search Activities: `PromotionSearchActivities` + - Get Activity: `PromotionGetActivityDetail` + - Update Activity: `PromotionUpdateActivity` + - Deactivate Activity: `PromotionDeactivateActivity` +- Finance + - *Pending ...* +- Customer Service + - *Pending ...* - Supply Chain - Confirm Package Shipment: `SupplyChainSyncPackages` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs new file mode 100644 index 00000000..b491d747 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecutePromotionExtensions.cs @@ -0,0 +1,165 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecutePromotionExtensions + { + /// + /// 异步调用 [POST] /promotion/{version}/activities 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionCreateActivityAsync(this TikTokShopClient client, Models.PromotionCreateActivityRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "promotion", request.ApiVersion, "activities"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /promotion/{version}/activities/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionSearchActivitiesAsync(this TikTokShopClient client, Models.PromotionSearchActivitiesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "promotion", request.ApiVersion, "activities", "search"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /promotion/{version}/activities/{activity_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionGetActivityDetailAsync(this TikTokShopClient client, Models.PromotionGetActivityDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "promotion", request.ApiVersion, "activities", request.ActivityId); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [PUT] /promotion/{version}/activities/{activity_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionUpdateActivityAsync(this TikTokShopClient client, Models.PromotionUpdateActivityRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Put, "promotion", request.ApiVersion, "activities", request.ActivityId); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /promotion/{version}/activities/{activity_id}/deactivate 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionDeactivateActivityAsync(this TikTokShopClient client, Models.PromotionDeactivateActivityRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "promotion", request.ApiVersion, "activities", request.ActivityId, "deactivate"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [PUT] /promotion/{version}/activities/{activity_id}/products 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionUpdateActivityProductsAsync(this TikTokShopClient client, Models.PromotionUpdateActivityProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Put, "promotion", request.ApiVersion, "activities", request.ActivityId, "products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [DELETE] /promotion/{version}/activities/{activity_id}/products 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecutePromotionDeleteActivityProductsAsync(this TikTokShopClient client, Models.PromotionDeleteActivityProductsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Delete, "promotion", request.ApiVersion, "activities", request.ActivityId, "products"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs index 6046cbc0..d7463feb 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/Global/ProductGetGlobalProductDetailResponse.cs @@ -173,7 +173,7 @@ public class IdentifierCode : ProductGetProductDetailResponse.Types.Data.Types.S [Newtonsoft.Json.JsonProperty("sku_unit_count")] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] [System.Text.Json.Serialization.JsonPropertyName("sku_unit_count")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public decimal? UnitCount { get; set; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs index b53fa811..bb3ea152 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductGetProductDetailResponse.cs @@ -411,7 +411,7 @@ public class ReplicateSource [Newtonsoft.Json.JsonProperty("sku_unit_count")] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] [System.Text.Json.Serialization.JsonPropertyName("sku_unit_count")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public decimal? UnitCount { get; set; } /// @@ -430,7 +430,7 @@ public class PackageDimension [Newtonsoft.Json.JsonProperty("length")] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] [System.Text.Json.Serialization.JsonPropertyName("length")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public decimal Length { get; set; } /// @@ -439,7 +439,7 @@ public class PackageDimension [Newtonsoft.Json.JsonProperty("width")] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] [System.Text.Json.Serialization.JsonPropertyName("width")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public decimal Width { get; set; } /// @@ -448,7 +448,7 @@ public class PackageDimension [Newtonsoft.Json.JsonProperty("height")] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] [System.Text.Json.Serialization.JsonPropertyName("height")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public decimal Height { get; set; } /// @@ -467,7 +467,7 @@ public class PackageWeight [Newtonsoft.Json.JsonProperty("value")] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] [System.Text.Json.Serialization.JsonPropertyName("value")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public decimal Value { get; set; } /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs new file mode 100644 index 00000000..14119230 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityRequest.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /promotion/{version}/activities 接口的请求。 + /// + public class PromotionCreateActivityRequest : TikTokShopRequest + { + /// + /// 获取或设置活动类型。 + /// + [Newtonsoft.Json.JsonProperty("activity_type")] + [System.Text.Json.Serialization.JsonPropertyName("activity_type")] + public string ActivityType { get; set; } = string.Empty; + + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("product_level")] + [System.Text.Json.Serialization.JsonPropertyName("product_level")] + public string ProductLevel { get; set; } = string.Empty; + + /// + /// 获取或设置活动开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long BeginTimestamp { get; set; } + + /// + /// 获取或设置活动结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs new file mode 100644 index 00000000..bad1dcaa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionCreateActivityResponse.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /promotion/{version}/activities 接口的响应。 + /// + public class PromotionCreateActivityResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ActivityId { get; set; } = default!; + + /// + /// 获取或设置活动状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs new file mode 100644 index 00000000..b2350e4b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /promotion/{version}/activities/{activity_id}/deactivate 接口的请求。 + /// + public class PromotionDeactivateActivityRequest : TikTokShopRequest + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ActivityId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs new file mode 100644 index 00000000..75951421 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeactivateActivityResponse.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /promotion/{version}/activities/{activity_id}/deactivate 接口的响应。 + /// + public class PromotionDeactivateActivityResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ActivityId { get; set; } = default!; + + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置活动状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsRequest.cs new file mode 100644 index 00000000..5cf9bcd7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsRequest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /promotion/{version}/activities/{activity_id}/products 接口的请求。 + /// + public class PromotionDeleteActivityProductsRequest : TikTokShopRequest + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ActivityId { get; set; } = string.Empty; + + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + public IList? ProductIdList { get; set; } + + /// + /// 获取或设置 SKU ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("sku_ids")] + [System.Text.Json.Serialization.JsonPropertyName("sku_ids")] + public IList? SKUIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsResponse.cs new file mode 100644 index 00000000..bdc4b0fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionDeleteActivityProductsResponse.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [DELETE] /promotion/{version}/activities/{activity_id}/products 接口的响应。 + /// + public class PromotionDeleteActivityProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ActivityId { get; set; } = default!; + + /// + /// 获取或设置活动状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs new file mode 100644 index 00000000..c891738f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /promotion/{version}/activities/{activity_id} 接口的请求。 + /// + public class PromotionGetActivityDetailRequest : TikTokShopRequest + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ActivityId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs new file mode 100644 index 00000000..c6774132 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionGetActivityDetailResponse.cs @@ -0,0 +1,139 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /promotion/{version}/activities/{activity_id} 接口的响应。 + /// + public class PromotionGetActivityDetailResponse : TikTokShopResponse + { + public static class Types + { + public class Data : PromotionSearchActivitiesResponse.Types.Data.Types.Activity + { + public static class Types + { + public class Product + { + public static class Types + { + public class Price + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置价格。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public decimal Amount { get; set; } + } + + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_limit")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_limit")] + public int QuantityLimit { get; set; } + + /// + /// 获取或设置单个用户数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_per_user")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_per_user")] + public int QuantityPerUser { get; set; } + + /// + /// 获取或设置活动折扣(单位:百分数)。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + + /// + /// 获取或设置活动价信息。 + /// + [Newtonsoft.Json.JsonProperty("activity_price")] + [System.Text.Json.Serialization.JsonPropertyName("activity_price")] + public Types.Price? Price { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_limit")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_limit")] + public int QuantityLimit { get; set; } + + /// + /// 获取或设置单个用户数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_per_user")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_per_user")] + public int QuantityPerUser { get; set; } + + /// + /// 获取或设置活动折扣(单位:百分数)。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + + /// + /// 获取或设置活动价信息。 + /// + [Newtonsoft.Json.JsonProperty("activity_price")] + [System.Text.Json.Serialization.JsonPropertyName("activity_price")] + public Types.Price? Price { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + } + + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public override string ActivityId { get; set; } = default!; + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public Types.Product[] ProductList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs new file mode 100644 index 00000000..90f09882 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesRequest.cs @@ -0,0 +1,37 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /promotion/{version}/activities/search 接口的请求。 + /// + public class PromotionSearchActivitiesRequest : TikTokShopRequest + { + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("activity_title")] + [System.Text.Json.Serialization.JsonPropertyName("activity_title")] + public string? ActivityTitle { get; set; } + + /// + /// 获取或设置活动状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string? ActivityStatus { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("page_token")] + [System.Text.Json.Serialization.JsonPropertyName("page_token")] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs new file mode 100644 index 00000000..80a45c84 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionSearchActivitiesResponse.cs @@ -0,0 +1,105 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /promotion/{version}/activities/search 接口的响应。 + /// + public class PromotionSearchActivitiesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Activity + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public virtual string ActivityId { get; set; } = default!; + + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置活动状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置活动类型。 + /// + [Newtonsoft.Json.JsonProperty("activity_type")] + [System.Text.Json.Serialization.JsonPropertyName("activity_type")] + public string ActivityType { get; set; } = default!; + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("product_level")] + [System.Text.Json.Serialization.JsonPropertyName("product_level")] + public string ProductLevel { get; set; } = default!; + + /// + /// 获取或设置活动开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long BeginTimestamp { get; set; } + + /// + /// 获取或设置活动结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } + } + + /// + /// 获取或设置活动列表。 + /// + [Newtonsoft.Json.JsonProperty("activities")] + [System.Text.Json.Serialization.JsonPropertyName("activities")] + public Types.Activity[] ActivityList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsRequest.cs new file mode 100644 index 00000000..b65f2507 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsRequest.cs @@ -0,0 +1,118 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /promotion/{version}/activities/{activity_id}/products 接口的请求。 + /// + public class PromotionUpdateActivityProductsRequest : TikTokShopRequest + { + public static class Types + { + public class Product + { + public static class Types + { + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_limit")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_limit")] + public int QuantityLimit { get; set; } + + /// + /// 获取或设置单个用户数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_per_user")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_per_user")] + public int QuantityPerUser { get; set; } + + /// + /// 获取或设置活动折扣(单位:百分数)。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + + /// + /// 获取或设置活动价。 + /// + [Newtonsoft.Json.JsonProperty("activity_price_amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("activity_price_amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? PriceAmount { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string ProductId { get; set; } = string.Empty; + + /// + /// 获取或设置数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_limit")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_limit")] + public int QuantityLimit { get; set; } + + /// + /// 获取或设置单个用户数量限制。 + /// + [Newtonsoft.Json.JsonProperty("quantity_per_user")] + [System.Text.Json.Serialization.JsonPropertyName("quantity_per_user")] + public int QuantityPerUser { get; set; } + + /// + /// 获取或设置活动折扣(单位:百分数)。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + + /// + /// 获取或设置活动价。 + /// + [Newtonsoft.Json.JsonProperty("activity_price_amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("activity_price_amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? PriceAmount { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + } + } + + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + public string ActivityId { get; set; } = string.Empty; + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public IList ProductList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsResponse.cs new file mode 100644 index 00000000..0a1b403f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityProductsResponse.cs @@ -0,0 +1,50 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /promotion/{version}/activities/{activity_id}/products 接口的响应。 + /// + public class PromotionUpdateActivityProductsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ActivityId { get; set; } = default!; + + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置活动状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int ProductCount { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs new file mode 100644 index 00000000..17e2c614 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityRequest.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /promotion/{version}/activities/{activity_id} 接口的请求。 + /// + public class PromotionUpdateActivityRequest : TikTokShopRequest + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ActivityId { get; set; } = string.Empty; + + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置活动开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long BeginTimestamp { get; set; } + + /// + /// 获取或设置活动结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs new file mode 100644 index 00000000..6b4c90e7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Promotion/PromotionUpdateActivityResponse.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /promotion/{version}/activities/{activity_id} 接口的响应。 + /// + public class PromotionUpdateActivityResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("activity_id")] + [System.Text.Json.Serialization.JsonPropertyName("activity_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ActivityId { get; set; } = default!; + + /// + /// 获取或设置活动标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityRequest.json new file mode 100644 index 00000000..7f72d059 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityRequest.json @@ -0,0 +1,7 @@ +{ + "activity_type": "FIXED_PRICE", + "begin_time": 1661756811, + "end_time": 1661856811, + "product_level": "PRODUCT", + "title": "DiscountEvent0829" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityResponse.json new file mode 100644 index 00000000..614b0ab3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionCreateActivityResponse.json @@ -0,0 +1,11 @@ +{ + "code": 0, + "data": { + "activity_id": "7136104329798256386", + "create_time": 1661756811, + "status": "ONGOING", + "update_time": 1661756811 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeactivateActivityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeactivateActivityResponse.json new file mode 100644 index 00000000..4f7642a2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeactivateActivityResponse.json @@ -0,0 +1,11 @@ +{ + "code": 0, + "data": { + "activity_id": "7136104329798256386", + "status": "ONGOING", + "title": "FlashSale 20230707", + "update_time": 1661756811 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsRequest.json new file mode 100644 index 00000000..7c31c211 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsRequest.json @@ -0,0 +1,8 @@ +{ + "product_ids": [ + "7493989962827597361" + ], + "sku_ids": [ + "7135657830438176513" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsResponse.json new file mode 100644 index 00000000..cd6a87da --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionDeleteActivityProductsResponse.json @@ -0,0 +1,10 @@ +{ + "code": 0, + "data": { + "activity_id": "7136104329798256386", + "status": "ONGOING", + "update_time": 1661765135 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionGetActivityDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionGetActivityDetailResponse.json new file mode 100644 index 00000000..ad03f5c8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionGetActivityDetailResponse.json @@ -0,0 +1,40 @@ +{ + "code": 0, + "data": { + "activity_id": "7136104329798256386", + "activity_type": "FIXED_PRICE", + "begin_time": 1661756811, + "create_time": 1661750811, + "end_time": 1661856811, + "product_level": "PRODUCT", + "products": [ + { + "activity_price": { + "amount": "70500", + "currency": "IDR" + }, + "discount": "10", + "id": "7136011254174631686", + "quantity_limit": -1, + "quantity_per_user": -1, + "skus": [ + { + "activity_price": { + "amount": "70500", + "currency": "IDR" + }, + "discount": "10", + "id": "7136382541418366725", + "quantity_limit": -1, + "quantity_per_user": -1 + } + ] + } + ], + "status": "ONGOING", + "title": "FlashSale 20230707", + "update_time": 1661750811 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesRequest.json new file mode 100644 index 00000000..d1330929 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesRequest.json @@ -0,0 +1,6 @@ +{ + "activity_title": "Discount", + "page_size": 20, + "page_token": "21", + "status": "ONGOING" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesResponse.json new file mode 100644 index 00000000..47e2c0c2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionSearchActivitiesResponse.json @@ -0,0 +1,22 @@ +{ + "code": 0, + "data": { + "activities": [ + { + "activity_type": "FIXED_PRICE", + "begin_time": 1661756811, + "create_time": 1661756811, + "end_time": 1661756811, + "id": "7136104329798256386", + "product_level": "PRODUCT", + "status": "ONGOING", + "title": "FlashSale 20230707", + "update_time": 1661756811 + } + ], + "next_page_token": "123", + "total_count": 120 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsRequest.json new file mode 100644 index 00000000..0b665d78 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsRequest.json @@ -0,0 +1,21 @@ +{ + "activity_id": "7136104288010372865", + "products": [ + { + "activity_price_amount": "4.5", + "discount": "10", + "id": "7135427619356477189", + "quantity_limit": -1, + "quantity_per_user": -1, + "skus": [ + { + "activity_price_amount": "6.5", + "discount": "10", + "id": "7125688837187176194", + "quantity_limit": -1, + "quantity_per_user": 10 + } + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsResponse.json new file mode 100644 index 00000000..0c4a12f9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityProductsResponse.json @@ -0,0 +1,12 @@ +{ + "code": 0, + "data": { + "activity_id": "7136104329798256386", + "status": "DRAFT", + "title": "DiscountPromotion", + "total_count": 1, + "update_time": 1661756811 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityRequest.json new file mode 100644 index 00000000..b331b676 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityRequest.json @@ -0,0 +1,5 @@ +{ + "begin_time": 1661756811, + "end_time": 1662756811, + "title": "BlackFridayDiscount" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityResponse.json new file mode 100644 index 00000000..0a31beb5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Promotion/PromotionUpdateActivityResponse.json @@ -0,0 +1,10 @@ +{ + "code": 0, + "data": { + "activity_id": "7136104329798256386", + "title": "BlackFridayDiscount", + "update_time": 1661756811 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 7ae9bcb6dda37e4b46ad4668a1dba05bd5c2c255 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 13 May 2024 16:25:32 +0800 Subject: [PATCH 10/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E8=B4=A2=E5=8A=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 6 +- .../FinanceSearchSettlementsResponse.cs | 8 +- ...ikTokShopClientExecuteFinanceExtensions.cs | 145 ++++ ...nceGetOrderStatementTransactionsRequest.cs | 15 + ...ceGetOrderStatementTransactionsResponse.cs | 704 ++++++++++++++++++ .../Finance/FinanceGetPaymentsRequest.cs | 51 ++ .../Finance/FinanceGetPaymentsResponse.cs | 129 ++++ .../FinanceGetStatementTransactionsRequest.cs | 53 ++ ...FinanceGetStatementTransactionsResponse.cs | 436 +++++++++++ .../Finance/FinanceGetStatementsRequest.cs | 58 ++ .../Finance/FinanceGetStatementsResponse.cs | 103 +++ .../Finance/FinanceGetWithdrawalsRequest.cs | 46 ++ .../Finance/FinanceGetWithdrawalsResponse.cs | 86 +++ ...GetOrderStatementTransactionsResponse.json | 99 +++ .../_/Finance/FinanceGetPaymentsResponse.json | 34 + ...nanceGetStatementTransactionsResponse.json | 63 ++ .../Finance/FinanceGetStatementsResponse.json | 21 + .../FinanceGetWithdrawalsResponse.json | 19 + 18 files changed, 2071 insertions(+), 5 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetOrderStatementTransactionsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetPaymentsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementTransactionsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetWithdrawalsResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index c549703e..fc6a6095 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -83,7 +83,11 @@ Notes: The following catalog is consistent with the catalog structure of [TikTok - Update Activity: `PromotionUpdateActivity` - Deactivate Activity: `PromotionDeactivateActivity` - Finance - - *Pending ...* + - Get Order Statement Transactions: `FinanceGetOrderStatementTransactions` + - Get Statement Transactions: `FinanceGetStatementTransactions` + - Get Withdrawals: `FinanceGetWithdrawals` + - Get Statements: `FinanceGetStatements` + - Get Payments: `FinanceGetPayments` - Customer Service - *Pending ...* - Supply Chain diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/Finance/FinanceSearchSettlementsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/Finance/FinanceSearchSettlementsResponse.cs index 4cfd4bbc..77cad776 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/Finance/FinanceSearchSettlementsResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/Finance/FinanceSearchSettlementsResponse.cs @@ -161,7 +161,7 @@ public class SettlementInfo public decimal SellerReasonFundDeductionAmount { get; set; } /// - /// 获取或设置运费调整金额。 + /// 获取或设置运费违约金额。 /// [Newtonsoft.Json.JsonProperty("shipping_fee_adjustment")] [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_adjustment")] @@ -169,7 +169,7 @@ public class SettlementInfo public decimal ShippingFeeAdjustmentAmount { get; set; } /// - /// 获取或设置促销调整金额。 + /// 获取或设置促销违约金额。 /// [Newtonsoft.Json.JsonProperty("promotion_adjustment")] [System.Text.Json.Serialization.JsonPropertyName("promotion_adjustment")] @@ -177,7 +177,7 @@ public class SettlementInfo public decimal PromotionAdjustmentAmount { get; set; } /// - /// 获取或设置其他调整金额。 + /// 获取或设置其他违约金额。 /// [Newtonsoft.Json.JsonProperty("other_adjustment")] [System.Text.Json.Serialization.JsonPropertyName("other_adjustment")] @@ -250,7 +250,7 @@ public class SettlementInfo public string OrderId { get; set; } = default!; /// - /// 获取或设置调整 ID。 + /// 获取或设置违约 ID。 /// [Newtonsoft.Json.JsonProperty("adjustment_id")] [System.Text.Json.Serialization.JsonPropertyName("adjustment_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs new file mode 100644 index 00000000..4dd873fb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFinanceExtensions.cs @@ -0,0 +1,145 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteFinanceExtensions + { + /// + /// 异步调用 [GET] /finance/{version}/orders/{order_id}/statement_transactions 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFinanceGetOrderStatementTransactionsAsync(this TikTokShopClient client, Models.FinanceGetOrderStatementTransactionsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "finance", request.ApiVersion, "orders", request.OrderId, "statement_transactions"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /finance/{version}/statements/{statement_id}/statement_transactions 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFinanceGetStatementTransactionsAsync(this TikTokShopClient client, Models.FinanceGetStatementTransactionsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "finance", request.ApiVersion, "statements", request.StatementId, "statement_transactions") + .SetQueryParam("sort_field", request.SortField) + .SetQueryParam("sort_order", request.SortOrder) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /finance/{version}/statements 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFinanceGetStatementsAsync(this TikTokShopClient client, Models.FinanceGetStatementsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "finance", request.ApiVersion, "statements") + .SetQueryParam("statement_time_ge", request.SettlementTimestampGreaterThan) + .SetQueryParam("statement_time_lt", request.SettlementTimestampLessThan) + .SetQueryParam("payment_status", request.PaymentStatus) + .SetQueryParam("sort_field", request.SortField) + .SetQueryParam("sort_order", request.SortOrder) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /finance/{version}/payments 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFinanceGetPaymentsAsync(this TikTokShopClient client, Models.FinanceGetPaymentsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "finance", request.ApiVersion, "payments") + .SetQueryParam("create_time_ge", request.CreateTimestampGreaterThan) + .SetQueryParam("create_time_lt", request.CreateTimestampLessThan) + .SetQueryParam("sort_field", request.SortField) + .SetQueryParam("sort_order", request.SortOrder) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /finance/{version}/withdrawals 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFinanceGetWithdrawalsAsync(this TikTokShopClient client, Models.FinanceGetWithdrawalsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "finance", request.ApiVersion, "withdrawals") + .SetQueryParam("create_time_ge", request.CreateTimestampGreaterThan) + .SetQueryParam("create_time_lt", request.CreateTimestampLessThan) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + if (request.TypeList is not null) + flurlReq.SetQueryParam("types", string.Join(",", request.TypeList)); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsRequest.cs new file mode 100644 index 00000000..8f8c4fec --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/orders/{order_id}/statement_transactions 接口的请求。 + /// + public class FinanceGetOrderStatementTransactionsRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsResponse.cs new file mode 100644 index 00000000..7f002624 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetOrderStatementTransactionsResponse.cs @@ -0,0 +1,704 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/orders/{order_id}/statement_transactions 接口的响应。 + /// + public class FinanceGetOrderStatementTransactionsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Transaction + { + public static class Types + { + public class SKUTransaction + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU 名称。 + /// + [Newtonsoft.Json.JsonProperty("sku_name")] + [System.Text.Json.Serialization.JsonPropertyName("sku_name")] + public string SKUName { get; set; } = default!; + + /// + /// 获取或设置产品名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = default!; + + /// + /// 获取或设置数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置结算金额。 + /// + [Newtonsoft.Json.JsonProperty("settlement_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SettlementAmount { get; set; } + + /// + /// 获取或设置收入金额。 + /// + [Newtonsoft.Json.JsonProperty("revenue_amount")] + [System.Text.Json.Serialization.JsonPropertyName("revenue_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RevenueAmount { get; set; } + + /// + /// 获取或设置费用金额。 + /// + [Newtonsoft.Json.JsonProperty("fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal FeeAmount { get; set; } + + /// + /// 获取或设置违约金额。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AdjustmentAmount { get; set; } + + /// + /// 获取或设置买家支付金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerPaymentAmount { get; set; } + + /// + /// 获取或设置卖家折扣后小计金额。 + /// + [Newtonsoft.Json.JsonProperty("after_seller_discounts_subtotal_amount")] + [System.Text.Json.Serialization.JsonPropertyName("after_seller_discounts_subtotal_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AfterSellerDiscountsSubtotalAmount { get; set; } + + /// + /// 获取或设置增值税金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxAmount { get; set; } + + /// + /// 获取或设置增值税支付金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxPaymentAmount { get; set; } + + /// + /// 获取或设置增值税退款金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxRefundAmount { get; set; } + + /// + /// 获取或设置平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscountAmount { get; set; } + + /// + /// 获取或设置平台优惠退款金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscountRefundAmount { get; set; } + + /// + /// 获取或设置买家订单退款金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_order_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_order_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerOrderRefundAmount { get; set; } + + /// + /// 获取或设置买家退款金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerRefundAmount { get; set; } + + /// + /// 获取或设置平台退款补贴金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_refund_subsidy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_refund_subsidy_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformRefundSubsidyAmount { get; set; } + + /// + /// 获取或设置运输费金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeAmount { get; set; } + + /// + /// 获取或设置运输费补贴金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_subsidy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_subsidy_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeSubsidyAmount { get; set; } + + /// + /// 获取或设置买家运输金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerShippingFeeAmount { get; set; } + + /// + /// 获取或设置平台运输费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_shipping_fee_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_shipping_fee_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformShippingFeeDiscountAmount { get; set; } + + /// + /// 获取或设置运输费实际金额。 + /// + [Newtonsoft.Json.JsonProperty("actual_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("actual_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ActualShippingFeeAmount { get; set; } + + /// + /// 获取或设置退单运输费实际金额。 + /// + [Newtonsoft.Json.JsonProperty("actual_return_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("actual_return_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ActualReturnShippingFeeAmount { get; set; } + + /// + /// 获取或设置零售配送费金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeeAmount { get; set; } + + /// + /// 获取或设置零售配送费支付金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeePaymentAmount { get; set; } + + /// + /// 获取或设置零售配送费退款金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeeRefundAmount { get; set; } + + /// + /// 获取或设置平台佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformCommissionAmount { get; set; } + + /// + /// 获取或设置附属机构佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliateCommissionAmount { get; set; } + + /// + /// 获取或设置附属合作伙伴佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_partner_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_partner_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliatePartnerCommissionAmount { get; set; } + + /// + /// 获取或设置附属机构佣金税前金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_commission_before_pit")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission_before_pit")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliateCommissionAmountBeforePit { get; set; } + + /// + /// 获取或设置个人所得税金额。 + /// + [Newtonsoft.Json.JsonProperty("pit_amount")] + [System.Text.Json.Serialization.JsonPropertyName("pit_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PitAmount { get; set; } + + /// + /// 获取或设置交易费金额。 + /// + [Newtonsoft.Json.JsonProperty("transaction_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("transaction_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TransactionFeeAmount { get; set; } + + /// + /// 获取或设置转介费金额。 + /// + [Newtonsoft.Json.JsonProperty("referral_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("referral_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ReferralFeeAmount { get; set; } + + /// + /// 获取或设置退款管理费金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_administration_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_administration_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundAdministrationFeeAmount { get; set; } + + /// + /// 获取或设置 TikTok 运费费金额。 + /// + [Newtonsoft.Json.JsonProperty("fbm_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fbm_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingCostAmount { get; set; } + + /// + /// 获取或设置 TikTok 平台运费金额。 + /// + [Newtonsoft.Json.JsonProperty("fbt_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fbt_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformShippingCostAmount { get; set; } + + /// + /// 获取或设置 TikTok 运费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingCostDiscountAmount { get; set; } + + /// + /// 获取或设置 TikTok 退货运费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundShippingCostDiscountAmount { get; set; } + + /// + /// 获取或设置签字确认费用金额。 + /// + [Newtonsoft.Json.JsonProperty("signature_confirmation_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("signature_confirmation_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SignatureConfirmationFeeAmount { get; set; } + } + } + + /// + /// 获取或设置交易 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string TransactionId { get; set; } = default!; + + /// + /// 获取或设置交易状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置结算单 ID。 + /// + [Newtonsoft.Json.JsonProperty("statement_id")] + [System.Text.Json.Serialization.JsonPropertyName("statement_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string StatementId { get; set; } = default!; + + /// + /// 获取或设置结算时间戳。 + /// + [Newtonsoft.Json.JsonProperty("statement_time")] + [System.Text.Json.Serialization.JsonPropertyName("statement_time")] + public long StatementTimestamp { get; set; } + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置结算金额。 + /// + [Newtonsoft.Json.JsonProperty("settlement_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SettlementAmount { get; set; } + + /// + /// 获取或设置收入金额。 + /// + [Newtonsoft.Json.JsonProperty("revenue_amount")] + [System.Text.Json.Serialization.JsonPropertyName("revenue_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RevenueAmount { get; set; } + + /// + /// 获取或设置费用金额。 + /// + [Newtonsoft.Json.JsonProperty("fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal FeeAmount { get; set; } + + /// + /// 获取或设置违约金额。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AdjustmentAmount { get; set; } + + /// + /// 获取或设置买家支付金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerPaymentAmount { get; set; } + + /// + /// 获取或设置卖家折扣后小计金额。 + /// + [Newtonsoft.Json.JsonProperty("after_seller_discounts_subtotal_amount")] + [System.Text.Json.Serialization.JsonPropertyName("after_seller_discounts_subtotal_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AfterSellerDiscountsSubtotalAmount { get; set; } + + /// + /// 获取或设置增值税金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxAmount { get; set; } + + /// + /// 获取或设置增值税支付金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxPaymentAmount { get; set; } + + /// + /// 获取或设置增值税退款金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxRefundAmount { get; set; } + + /// + /// 获取或设置平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscountAmount { get; set; } + + /// + /// 获取或设置平台优惠退款金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscountRefundAmount { get; set; } + + /// + /// 获取或设置买家订单退款金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_order_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_order_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerOrderRefundAmount { get; set; } + + /// + /// 获取或设置买家退款金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerRefundAmount { get; set; } + + /// + /// 获取或设置平台退款补贴金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_refund_subsidy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_refund_subsidy_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformRefundSubsidyAmount { get; set; } + + /// + /// 获取或设置运输费金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeAmount { get; set; } + + /// + /// 获取或设置运输费补贴金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_subsidy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_subsidy_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeSubsidyAmount { get; set; } + + /// + /// 获取或设置买家运输金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerShippingFeeAmount { get; set; } + + /// + /// 获取或设置平台运输费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_shipping_fee_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_shipping_fee_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformShippingFeeDiscountAmount { get; set; } + + /// + /// 获取或设置运输费实际金额。 + /// + [Newtonsoft.Json.JsonProperty("actual_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("actual_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ActualShippingFeeAmount { get; set; } + + /// + /// 获取或设置退单运输费实际金额。 + /// + [Newtonsoft.Json.JsonProperty("actual_return_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("actual_return_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ActualReturnShippingFeeAmount { get; set; } + + /// + /// 获取或设置零售配送费金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeeAmount { get; set; } + + /// + /// 获取或设置零售配送费支付金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeePaymentAmount { get; set; } + + /// + /// 获取或设置零售配送费退款金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeeRefundAmount { get; set; } + + /// + /// 获取或设置平台佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformCommissionAmount { get; set; } + + /// + /// 获取或设置附属机构佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliateCommissionAmount { get; set; } + + /// + /// 获取或设置附属合作伙伴佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_partner_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_partner_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliatePartnerCommissionAmount { get; set; } + + /// + /// 获取或设置附属机构佣金税前金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_commission_before_pit")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission_before_pit")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliateCommissionAmountBeforePit { get; set; } + + /// + /// 获取或设置个人所得税金额。 + /// + [Newtonsoft.Json.JsonProperty("pit_amount")] + [System.Text.Json.Serialization.JsonPropertyName("pit_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PitAmount { get; set; } + + /// + /// 获取或设置交易费金额。 + /// + [Newtonsoft.Json.JsonProperty("transaction_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("transaction_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TransactionFeeAmount { get; set; } + + /// + /// 获取或设置转介费金额。 + /// + [Newtonsoft.Json.JsonProperty("referral_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("referral_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ReferralFeeAmount { get; set; } + + /// + /// 获取或设置退款管理费金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_administration_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_administration_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundAdministrationFeeAmount { get; set; } + + /// + /// 获取或设置 TikTok 运费费金额。 + /// + [Newtonsoft.Json.JsonProperty("fbm_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fbm_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingCostAmount { get; set; } + + /// + /// 获取或设置 TikTok 平台运费金额。 + /// + [Newtonsoft.Json.JsonProperty("fbt_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fbt_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformShippingCostAmount { get; set; } + + /// + /// 获取或设置 TikTok 运费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingCostDiscountAmount { get; set; } + + /// + /// 获取或设置 TikTok 退货运费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundShippingCostDiscountAmount { get; set; } + + /// + /// 获取或设置签字确认费用金额。 + /// + [Newtonsoft.Json.JsonProperty("signature_confirmation_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("signature_confirmation_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SignatureConfirmationFeeAmount { get; set; } + + /// + /// 获取或设置 SKU 交易列表。 + /// + [Newtonsoft.Json.JsonProperty("sku_statement_transactions")] + [System.Text.Json.Serialization.JsonPropertyName("sku_statement_transactions")] + public Types.SKUTransaction[] SKUTransactionList { get; set; } = default!; + } + } + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置订单创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("order_create_time")] + [System.Text.Json.Serialization.JsonPropertyName("order_create_time")] + public long OrderCreateTimestamp { get; set; } + + /// + /// 获取或设置交易列表。 + /// + [Newtonsoft.Json.JsonProperty("statement_transactions")] + [System.Text.Json.Serialization.JsonPropertyName("statement_transactions")] + public Types.Transaction[] TransactionList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsRequest.cs new file mode 100644 index 00000000..9ad93fb1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsRequest.cs @@ -0,0 +1,51 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/payments 接口的请求。 + /// + public class FinanceGetPaymentsRequest : TikTokShopRequest + { + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置排序字段。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortField { get; set; } + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortOrder { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页游标。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsResponse.cs new file mode 100644 index 00000000..1ba78f6c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetPaymentsResponse.cs @@ -0,0 +1,129 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/payments 接口的响应。 + /// + public class FinanceGetPaymentsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Payment + { + public static class Types + { + public class Amount + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置金额。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("value")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal? Value { get; set; } + } + } + + /// + /// 获取或设置付款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string PaymentId { get; set; } = default!; + + /// + /// 获取或设置付款单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置支付时间戳。 + /// + [Newtonsoft.Json.JsonProperty("paid_time")] + [System.Text.Json.Serialization.JsonPropertyName("paid_time")] + public long? PaidTimestamp { get; set; } + + /// + /// 获取或设置付款金额信息。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + public Types.Amount Amount { get; set; } = default!; + + /// + /// 获取或设置结算金额信息。 + /// + [Newtonsoft.Json.JsonProperty("settlement_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] + public Types.Amount? SettlementAmount { get; set; } + + /// + /// 获取或设置保留金额信息。 + /// + [Newtonsoft.Json.JsonProperty("reserve_amount")] + [System.Text.Json.Serialization.JsonPropertyName("reserve_amount")] + public Types.Amount? ReserveAmount { get; set; } + + /// + /// 获取或设置兑换前金额信息。 + /// + [Newtonsoft.Json.JsonProperty("payment_amount_before_exchange")] + [System.Text.Json.Serialization.JsonPropertyName("payment_amount_before_exchange")] + public Types.Amount? PaymentAmountBeforeExchange { get; set; } + + /// + /// 获取或设置汇率。 + /// + [Newtonsoft.Json.JsonProperty("exchange_rate")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("exchange_rate")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal? ExchangeRate { get; set; } + + /// + /// 获取或设置银行账号。 + /// + [Newtonsoft.Json.JsonProperty("bank_account")] + [System.Text.Json.Serialization.JsonPropertyName("bank_account")] + public string? BankAccount { get; set; } + } + } + + /// + /// 获取或设置付款单列表。 + /// + [Newtonsoft.Json.JsonProperty("payments")] + [System.Text.Json.Serialization.JsonPropertyName("payments")] + public Types.Payment[] PaymentList { get; set; } = default!; + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsRequest.cs new file mode 100644 index 00000000..86ab1224 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsRequest.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/statements/{statement_id}/statement_transactions 接口的请求。 + /// + public class FinanceGetStatementTransactionsRequest : TikTokShopRequest + { + /// + /// 获取或设置结算单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string StatementId { get; set; } = string.Empty; + + /// + /// 获取或设置付款单状态。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PaymentStatus { get; set; } + + /// + /// 获取或设置排序字段。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortField { get; set; } + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortOrder { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页游标。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsResponse.cs new file mode 100644 index 00000000..e6dc949f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementTransactionsResponse.cs @@ -0,0 +1,436 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/statements/{statement_id}/statement_transactions 接口的响应。 + /// + public class FinanceGetStatementTransactionsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Transaction + { + /// + /// 获取或设置交易 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string TransactionId { get; set; } = default!; + + /// + /// 获取或设置交易类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [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; } + + /// + /// 获取或设置违约 ID。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_id")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? AdjustmentId { get; set; } + + /// + /// 获取或设置违约订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_order_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? AdjustmentOrderId { get; set; } + + /// + /// 获取或设置订单创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("order_create_time")] + [System.Text.Json.Serialization.JsonPropertyName("order_create_time")] + public long OrderCreateTimestamp { get; set; } + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置结算金额。 + /// + [Newtonsoft.Json.JsonProperty("settlement_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SettlementAmount { get; set; } + + /// + /// 获取或设置收入金额。 + /// + [Newtonsoft.Json.JsonProperty("revenue_amount")] + [System.Text.Json.Serialization.JsonPropertyName("revenue_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RevenueAmount { get; set; } + + /// + /// 获取或设置费用金额。 + /// + [Newtonsoft.Json.JsonProperty("fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal FeeAmount { get; set; } + + /// + /// 获取或设置违约金额。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AdjustmentAmount { get; set; } + + /// + /// 获取或设置买家支付金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerPaymentAmount { get; set; } + + /// + /// 获取或设置卖家折扣后小计金额。 + /// + [Newtonsoft.Json.JsonProperty("after_seller_discounts_subtotal_amount")] + [System.Text.Json.Serialization.JsonPropertyName("after_seller_discounts_subtotal_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AfterSellerDiscountsSubtotalAmount { get; set; } + + /// + /// 获取或设置增值税金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxAmount { get; set; } + + /// + /// 获取或设置增值税支付金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxPaymentAmount { get; set; } + + /// + /// 获取或设置增值税退款金额。 + /// + [Newtonsoft.Json.JsonProperty("sales_tax_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("sales_tax_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SalesTaxRefundAmount { get; set; } + + /// + /// 获取或设置平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscountAmount { get; set; } + + /// + /// 获取或设置平台优惠退款金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_discount_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_discount_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformDiscountRefundAmount { get; set; } + + /// + /// 获取或设置买家订单退款金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_order_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_order_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerOrderRefundAmount { get; set; } + + /// + /// 获取或设置买家退款金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerRefundAmount { get; set; } + + /// + /// 获取或设置平台退款补贴金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_refund_subsidy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_refund_subsidy_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformRefundSubsidyAmount { get; set; } + + /// + /// 获取或设置运输费金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeAmount { get; set; } + + /// + /// 获取或设置运输费补贴金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_subsidy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_subsidy_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeSubsidyAmount { get; set; } + + /// + /// 获取或设置买家运输金额。 + /// + [Newtonsoft.Json.JsonProperty("customer_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("customer_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal CustomerShippingFeeAmount { get; set; } + + /// + /// 获取或设置平台运输费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_shipping_fee_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_shipping_fee_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformShippingFeeDiscountAmount { get; set; } + + /// + /// 获取或设置运输费实际金额。 + /// + [Newtonsoft.Json.JsonProperty("actual_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("actual_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ActualShippingFeeAmount { get; set; } + + /// + /// 获取或设置退单运输费实际金额。 + /// + [Newtonsoft.Json.JsonProperty("actual_return_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("actual_return_shipping_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ActualReturnShippingFeeAmount { get; set; } + + /// + /// 获取或设置零售配送费金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeeAmount { get; set; } + + /// + /// 获取或设置零售配送费支付金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_payment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_payment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeePaymentAmount { get; set; } + + /// + /// 获取或设置零售配送费退款金额。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee_refund_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFeeRefundAmount { get; set; } + + /// + /// 获取或设置平台佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformCommissionAmount { get; set; } + + /// + /// 获取或设置附属机构佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliateCommissionAmount { get; set; } + + /// + /// 获取或设置附属合作伙伴佣金金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_partner_commission_amount")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_partner_commission_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliatePartnerCommissionAmount { get; set; } + + /// + /// 获取或设置附属机构佣金税前金额。 + /// + [Newtonsoft.Json.JsonProperty("affiliate_commission_before_pit")] + [System.Text.Json.Serialization.JsonPropertyName("affiliate_commission_before_pit")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AffiliateCommissionAmountBeforePit { get; set; } + + /// + /// 获取或设置个人所得税金额。 + /// + [Newtonsoft.Json.JsonProperty("pit_amount")] + [System.Text.Json.Serialization.JsonPropertyName("pit_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PitAmount { get; set; } + + /// + /// 获取或设置交易费金额。 + /// + [Newtonsoft.Json.JsonProperty("transaction_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("transaction_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal TransactionFeeAmount { get; set; } + + /// + /// 获取或设置转介费金额。 + /// + [Newtonsoft.Json.JsonProperty("referral_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("referral_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ReferralFeeAmount { get; set; } + + /// + /// 获取或设置退款管理费金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_administration_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_administration_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundAdministrationFeeAmount { get; set; } + + /// + /// 获取或设置 TikTok 运费费金额。 + /// + [Newtonsoft.Json.JsonProperty("fbm_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fbm_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingCostAmount { get; set; } + + /// + /// 获取或设置 TikTok 平台运费金额。 + /// + [Newtonsoft.Json.JsonProperty("fbt_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fbt_shipping_cost_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformShippingCostAmount { get; set; } + + /// + /// 获取或设置 TikTok 运费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingCostDiscountAmount { get; set; } + + /// + /// 获取或设置 TikTok 退货运费优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_shipping_cost_discount_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundShippingCostDiscountAmount { get; set; } + + /// + /// 获取或设置签字确认费用金额。 + /// + [Newtonsoft.Json.JsonProperty("signature_confirmation_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("signature_confirmation_fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SignatureConfirmationFeeAmount { get; set; } + } + } + + /// + /// 获取或设置结算单 ID。 + /// + [Newtonsoft.Json.JsonProperty("statement_id")] + [System.Text.Json.Serialization.JsonPropertyName("statement_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string StatementId { get; set; } = default!; + + /// + /// 获取或设置结算时间戳。 + /// + [Newtonsoft.Json.JsonProperty("statement_time")] + [System.Text.Json.Serialization.JsonPropertyName("statement_time")] + public long StatementTimestamp { get; set; } + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置结算金额。 + /// + [Newtonsoft.Json.JsonProperty("settlement_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SettlementAmount { get; set; } + + /// + /// 获取或设置收入金额。 + /// + [Newtonsoft.Json.JsonProperty("revenue_amount")] + [System.Text.Json.Serialization.JsonPropertyName("revenue_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RevenueAmount { get; set; } + + /// + /// 获取或设置费用金额。 + /// + [Newtonsoft.Json.JsonProperty("fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal FeeAmount { get; set; } + + /// + /// 获取或设置违约金额。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AdjustmentAmount { get; set; } + + /// + /// 获取或设置交易列表。 + /// + [Newtonsoft.Json.JsonProperty("statement_transactions")] + [System.Text.Json.Serialization.JsonPropertyName("statement_transactions")] + public Types.Transaction[] TransactionList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsRequest.cs new file mode 100644 index 00000000..9819325d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsRequest.cs @@ -0,0 +1,58 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/statements 接口的请求。 + /// + public class FinanceGetStatementsRequest : TikTokShopRequest + { + /// + /// 获取或设置结算时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long? SettlementTimestampGreaterThan { get; set; } + + /// + /// 获取或设置结算时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long? SettlementTimestampLessThan { get; set; } + + /// + /// 获取或设置付款单状态。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PaymentStatus { get; set; } + + /// + /// 获取或设置排序字段。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortField { get; set; } + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortOrder { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页游标。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsResponse.cs new file mode 100644 index 00000000..576a7c88 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetStatementsResponse.cs @@ -0,0 +1,103 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/statements 接口的响应。 + /// + public class FinanceGetStatementsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Statement + { + /// + /// 获取或设置结算单 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string StatementId { get; set; } = default!; + + /// + /// 获取或设置结算时间戳。 + /// + [Newtonsoft.Json.JsonProperty("statement_time")] + [System.Text.Json.Serialization.JsonPropertyName("statement_time")] + public long StatementTimestamp { get; set; } + + /// + /// 获取或设置付款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("payment_id")] + [System.Text.Json.Serialization.JsonPropertyName("payment_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string PaymentId { get; set; } = default!; + + /// + /// 获取或设置付款单状态。 + /// + [Newtonsoft.Json.JsonProperty("payment_status")] + [System.Text.Json.Serialization.JsonPropertyName("payment_status")] + public string PaymentStatus { get; set; } = default!; + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置结算金额。 + /// + [Newtonsoft.Json.JsonProperty("settlement_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settlement_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SettlementAmount { get; set; } + + /// + /// 获取或设置收入金额。 + /// + [Newtonsoft.Json.JsonProperty("revenue_amount")] + [System.Text.Json.Serialization.JsonPropertyName("revenue_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RevenueAmount { get; set; } + + /// + /// 获取或设置费用金额。 + /// + [Newtonsoft.Json.JsonProperty("fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("fee_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal FeeAmount { get; set; } + + /// + /// 获取或设置违约金额。 + /// + [Newtonsoft.Json.JsonProperty("adjustment_amount")] + [System.Text.Json.Serialization.JsonPropertyName("adjustment_amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal AdjustmentAmount { get; set; } + } + } + + /// + /// 获取或设置结算单列表。 + /// + [Newtonsoft.Json.JsonProperty("statements")] + [System.Text.Json.Serialization.JsonPropertyName("statements")] + public Types.Statement[] StatementList { get; set; } = default!; + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsRequest.cs new file mode 100644 index 00000000..53bc54c6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsRequest.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/withdrawals 接口的请求。 + /// + public class FinanceGetWithdrawalsRequest : TikTokShopRequest + { + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置提现类型列表。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public IList? TypeList { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页游标。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsResponse.cs new file mode 100644 index 00000000..0b632e33 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Finance/FinanceGetWithdrawalsResponse.cs @@ -0,0 +1,86 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /finance/{version}/withdrawals 接口的响应。 + /// + public class FinanceGetWithdrawalsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Withdrawal + { + /// + /// 获取或设置提现 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string WithdrawalId { get; set; } = default!; + + /// + /// 获取或设置提现类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置提现状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置金额。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal? Amount { get; set; } + } + } + + /// + /// 获取或设置提现列表。 + /// + [Newtonsoft.Json.JsonProperty("withdrawals")] + [System.Text.Json.Serialization.JsonPropertyName("withdrawals")] + public Types.Withdrawal[] WithdrawalList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetOrderStatementTransactionsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetOrderStatementTransactionsResponse.json new file mode 100644 index 00000000..64f1efea --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetOrderStatementTransactionsResponse.json @@ -0,0 +1,99 @@ +{ + "code": 0, + "data": { + "order_create_time": 1685548800, + "order_id": "5793990727963214852", + "statement_transactions": [ + { + "actual_return_shipping_fee_amount": "0", + "actual_shipping_fee_amount": "-50", + "adjustment_amount": "170", + "affiliate_commission_amount": "-6", + "affiliate_commission_before_pit": "-7", + "affiliate_partner_commission_amount": "0", + "after_seller_discounts_subtotal_amount": "180", + "currency": "USD", + "customer_order_refund_amount": "0", + "customer_payment_amount": "180", + "customer_refund_amount": "0", + "customer_shipping_fee_amount": "10", + "fbm_shipping_cost_amount": "0", + "fbt_shipping_cost_amount": "-10", + "fee_amount": "-30", + "id": "1636700041413599290", + "pit_amount": "1", + "platform_commission_amount": "0", + "platform_discount_amount": "20", + "platform_discount_refund_amount": "0", + "platform_refund_subsidy_amount": "0", + "platform_shipping_fee_discount_amount": "40", + "referral_fee_amount": "-2", + "refund_administration_fee_amount": "0", + "refund_shipping_cost_discount_amount": "0", + "retail_delivery_fee_amount": "-10", + "retail_delivery_fee_payment_amount": "-20", + "retail_delivery_fee_refund_amount": "10", + "revenue_amount": "200", + "sales_tax_amount": "-10", + "sales_tax_payment_amount": "10", + "sales_tax_refund_amount": "0", + "settlement_amount": "130", + "shipping_cost_discount_amount": "40", + "shipping_fee_amount": "-10", + "shipping_fee_subsidy_amount": "0", + "signature_confirmation_fee_amount": "0", + "sku_statement_transactions": [ + { + "actual_return_shipping_fee_amount": "0", + "actual_shipping_fee_amount": "-20", + "adjustment_amount": "85", + "affiliate_commission_amount": "-3", + "affiliate_commission_before_pit": "-4", + "affiliate_partner_commission_amount": "0", + "after_seller_discounts_subtotal_amount": "90", + "currency": "USD", + "customer_order_refund_amount": "0", + "customer_payment_amount": "90", + "customer_refund_amount": "0", + "customer_shipping_fee_amount": "5", + "fbm_shipping_cost_amount": "0", + "fbt_shipping_cost_amount": "-5", + "fee_amount": "-15", + "pit_amount": "1", + "platform_commission_amount": "0", + "platform_discount_amount": "10", + "platform_discount_refund_amount": "0", + "platform_refund_subsidy_amount": "0", + "platform_shipping_fee_discount_amount": "15", + "product_name": "iPhone 14 Pro Max", + "quantity": 3, + "referral_fee_amount": "-1", + "refund_administration_fee_amount": "0", + "refund_shipping_cost_discount_amount": "0", + "retail_delivery_fee_amount": "-10", + "retail_delivery_fee_payment_amount": "-20", + "retail_delivery_fee_refund_amount": "10", + "revenue_amount": "90", + "sales_tax_amount": "-5", + "sales_tax_payment_amount": "5", + "sales_tax_refund_amount": "0", + "settlement_amount": "170", + "shipping_cost_discount_amount": "15", + "shipping_fee_amount": "-5", + "shipping_fee_subsidy_amount": "0", + "signature_confirmation_fee_amount": "0", + "sku_id": "1729383353063867953", + "sku_name": "Black 256G ", + "transaction_fee_amount": "-1" + } + ], + "statement_id": "7238804564097517339", + "statement_time": 1685548800, + "status": "SETTLED", + "transaction_fee_amount": "-2" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetPaymentsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetPaymentsResponse.json new file mode 100644 index 00000000..558690f7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetPaymentsResponse.json @@ -0,0 +1,34 @@ +{ + "code": 0, + "data": { + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA+7D1ud64MPNz5OaT", + "payments": [ + { + "amount": { + "currency": "GBP", + "value": "100" + }, + "bank_account": "***********1234", + "create_time": 1636105796, + "exchange_rate": "1.000000", + "id": "3458767051733897992", + "paid_time": 1685548800, + "payment_amount_before_exchange": { + "currency": "GBP", + "value": "100" + }, + "reserve_amount": { + "currency": "GBP", + "value": "-30" + }, + "settlement_amount": { + "currency": "GBP", + "value": "130" + }, + "status": "PAID" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementTransactionsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementTransactionsResponse.json new file mode 100644 index 00000000..1bc9f35b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementTransactionsResponse.json @@ -0,0 +1,63 @@ +{ + "code": 0, + "data": { + "adjustment_amount": "-70", + "currency": "GBP", + "fee_amount": "-30", + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA+7D1ud64MPNz5OaT", + "revenue_amount": "200", + "settlement_amount": "130", + "statement_id": "7238804564097517339", + "statement_time": 1685548800, + "statement_transactions": [ + { + "actual_return_shipping_fee_amount": "0", + "actual_shipping_fee_amount": "-50", + "adjustment_amount": "170", + "adjustment_id": "7238804564097517332", + "adjustment_order_id": "576463220456522968", + "affiliate_commission_amount": "-6", + "affiliate_commission_before_pit": "-7", + "affiliate_partner_commission_amount": "0", + "after_seller_discounts_subtotal_amount": "180", + "currency": "USD", + "customer_order_refund_amount": "0", + "customer_payment_amount": "180", + "customer_refund_amount": "0", + "customer_shipping_fee_amount": "10", + "fbm_shipping_cost_amount": "0", + "fbt_shipping_cost_amount": "-10", + "fee_amount": "-30", + "id": "1636700041413599290", + "order_create_time": 1685548800, + "order_id": "576463220456522968", + "pit_amount": "1", + "platform_commission_amount": "0", + "platform_discount_amount": "10", + "platform_discount_refund_amount": "20", + "platform_refund_subsidy_amount": "0", + "platform_shipping_fee_discount_amount": "40", + "referral_fee_amount": "-2", + "refund_administration_fee_amount": "0", + "refund_shipping_cost_discount_amount": "0", + "retail_delivery_fee_amount": "-10", + "retail_delivery_fee_payment_amount": "-20", + "retail_delivery_fee_refund_amount": "10", + "revenue_amount": "200", + "sales_tax_amount": "-10", + "sales_tax_payment_amount": "10", + "sales_tax_refund_amount": "0", + "settlement_amount": "130", + "shipping_cost_discount_amount": "40", + "shipping_fee_amount": "-10", + "shipping_fee_subsidy_amount": "0", + "signature_confirmation_fee_amount": "0", + "transaction_fee_amount": "-2", + "type": "ORDER" + } + ], + "total_count": 2 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementsResponse.json new file mode 100644 index 00000000..7598532a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetStatementsResponse.json @@ -0,0 +1,21 @@ +{ + "code": 0, + "data": { + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA+7D1ud64MPNz5OaT", + "statements": [ + { + "adjustment_amount": "-70", + "currency": "GBP", + "fee_amount": "-30", + "id": "7238804564097517339", + "payment_id": "3459275187040258849", + "payment_status": "PAID", + "revenue_amount": "200", + "settlement_amount": "100", + "statement_time": 1685548800 + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetWithdrawalsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetWithdrawalsResponse.json new file mode 100644 index 00000000..becdb97c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Finance/FinanceGetWithdrawalsResponse.json @@ -0,0 +1,19 @@ +{ + "code": 0, + "data": { + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA+7D1ud64MPNz5OaT", + "total_count": 1, + "withdrawals": [ + { + "amount": "100", + "create_time": 1623812664, + "currency": "IDR", + "id": "EFASDFSAFDA23432DFAFDSA", + "status": "PROCESSING", + "type": "WITHDRAW" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 20bd10493b58dd606eea7e8955c6f42a61823bff Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 13 May 2024 17:29:39 +0800 Subject: [PATCH 11/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E5=AE=A2=E6=9C=8D=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 9 +- ...pClientExecuteCustomerServiceExtensions.cs | 205 ++++++++++++++++++ ...ikTokShopClientExecuteProductExtensions.cs | 2 - .../CustomerServiceGetAgentSettingsRequest.cs | 9 + ...CustomerServiceGetAgentSettingsResponse.cs | 21 ++ ...stomerServiceUpdateAgentSettingsRequest.cs | 15 ++ ...tomerServiceUpdateAgentSettingsResponse.cs | 15 ++ ...ServiceCreateConversationMessageRequest.cs | 29 +++ ...erviceCreateConversationMessageResponse.cs | 22 ++ ...ustomerServiceCreateConversationRequest.cs | 15 ++ ...stomerServiceCreateConversationResponse.cs | 22 ++ ...erServiceGetConversationMessagesRequest.cs | 51 +++++ ...rServiceGetConversationMessagesResponse.cs | 42 ++++ .../CustomerServiceGetConversationsRequest.cs | 30 +++ ...CustomerServiceGetConversationsResponse.cs | 171 +++++++++++++++ ...erServiceReadConversationMessageRequest.cs | 15 ++ ...rServiceReadConversationMessageResponse.cs | 15 ++ .../CustomerServiceUploadImageRequest.cs | 31 +++ .../CustomerServiceUploadImageResponse.cs | 35 +++ ...stomerServiceGetAgentSettingsResponse.json | 8 + ...omerServiceUpdateAgentSettingsRequest.json | 3 + ...rviceCreateConversationMessageRequest.json | 4 + ...viceCreateConversationMessageResponse.json | 8 + ...tomerServiceCreateConversationRequest.json | 3 + ...omerServiceCreateConversationResponse.json | 8 + ...erviceGetConversationMessagesResponse.json | 24 ++ ...stomerServiceGetConversationsResponse.json | 39 ++++ .../CustomerServiceUploadImageResponse.json | 10 + 28 files changed, 858 insertions(+), 3 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteCustomerServiceExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationMessagesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceUploadImageResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index fc6a6095..9fda78d4 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -89,7 +89,14 @@ Notes: The following catalog is consistent with the catalog structure of [TikTok - Get Statements: `FinanceGetStatements` - Get Payments: `FinanceGetPayments` - Customer Service - - *Pending ...* + - Get Conversation Messages: `CustomerServiceGetConversationMessages` + - Get Conversations: `CustomerServiceGetConversations` + - Send Message: `CustomerServiceCreateConversationMessage` + - Get Agent Settings: `CustomerServiceGetAgentSettings` + - Update Agent Settings: `CustomerServiceUpdateAgentSettings` + - Upload Buyer Messages Image: `CustomerServiceUploadImage` + - Read Message: `CustomerServiceReadConversationMessage` + - Create Conversation: `CustomerServiceCreateConversation` - Supply Chain - Confirm Package Shipment: `SupplyChainSyncPackages` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteCustomerServiceExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteCustomerServiceExtensions.cs new file mode 100644 index 00000000..b613cf1c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteCustomerServiceExtensions.cs @@ -0,0 +1,205 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteCustomerServiceExtensions + { + #region Agents + /// + /// 异步调用 [GET] /customer_service/{version}/agents/settings 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceGetAgentSettingsAsync(this TikTokShopClient client, Models.CustomerServiceGetAgentSettingsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "customer_service", request.ApiVersion, "agents", "settings"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [PUT] /customer_service/{version}/agents/settings 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceUpdateAgentSettingsAsync(this TikTokShopClient client, Models.CustomerServiceUpdateAgentSettingsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Put, "customer_service", request.ApiVersion, "agents", "settings"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + /// + /// 异步调用 [POST] /customer_service/{version}/conversations 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceCreateConversationAsync(this TikTokShopClient client, Models.CustomerServiceCreateConversationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "customer_service", request.ApiVersion, "conversations"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /customer_service/{version}/conversations 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceGetConversationsAsync(this TikTokShopClient client, Models.CustomerServiceGetConversationsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "customer_service", request.ApiVersion, "conversations") + .SetQueryParam("locale", request.Locale) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /customer_service/{version}/conversations/{conversation_id}/messages 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceCreateConversationMessageAsync(this TikTokShopClient client, Models.CustomerServiceCreateConversationMessageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "customer_service", request.ApiVersion, "conversations", request.ConversationId, "messages"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /customer_service/{version}/conversations/{conversation_id}/messages 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceGetConversationMessagesAsync(this TikTokShopClient client, Models.CustomerServiceGetConversationMessagesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "customer_service", request.ApiVersion, "conversations", request.ConversationId, "messages") + .SetQueryParam("locale", request.Locale) + .SetQueryParam("sort_field", request.SortField) + .SetQueryParam("sort_order", request.SortOrder) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /customer_service/{version}/images/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceUploadImageAsync(this TikTokShopClient client, Models.CustomerServiceUploadImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ImageFileName is null) + request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.ImageFileContentType is null) + request.ImageFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForImage(request.ImageFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "customer_service", request.ApiVersion, "images", "upload"); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "data"); + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /customer_service/{version}/conversations/{conversation_id}/messages/read 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCustomerServiceReadConversationMessageAsync(this TikTokShopClient client, Models.CustomerServiceReadConversationMessageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "customer_service", request.ApiVersion, "conversations", request.ConversationId, "messages", "read"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs index fd180a77..daa25f6f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs @@ -432,7 +432,6 @@ public static class TikTokShopClientExecuteProductExtensions using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "data"); httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.UseCase)), "use_case"); - return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); } @@ -463,7 +462,6 @@ public static class TikTokShopClientExecuteProductExtensions using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.FileName, fileBytes: request.FileBytes, fileContentType: request.FileContentType, formDataName: "data"); httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.FileName)), "name"); - return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); } #endregion diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsRequest.cs new file mode 100644 index 00000000..b6e8f6aa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /customer_service/{version}/agents/settings 接口的请求。 + /// + public class CustomerServiceGetAgentSettingsRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.cs new file mode 100644 index 00000000..50d78fc4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.cs @@ -0,0 +1,21 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /customer_service/{version}/agents/settings 接口的响应。 + /// + public class CustomerServiceGetAgentSettingsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置是否可接收会话。 + /// + [Newtonsoft.Json.JsonProperty("can_accept_chat")] + [System.Text.Json.Serialization.JsonPropertyName("can_accept_chat")] + public bool CanAcceptChat { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.cs new file mode 100644 index 00000000..28adac05 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /customer_service/{version}/agents/settings 接口的请求。 + /// + public class CustomerServiceUpdateAgentSettingsRequest : TikTokShopRequest + { + /// + /// 获取或设置是否可接收会话。 + /// + [Newtonsoft.Json.JsonProperty("can_accept_chat")] + [System.Text.Json.Serialization.JsonPropertyName("can_accept_chat")] + public bool CanAcceptChat { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsResponse.cs new file mode 100644 index 00000000..cfaf0630 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/Agents/CustomerServiceUpdateAgentSettingsResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [PUT] /customer_service/{version}/agents/settings 接口的响应。 + /// + public class CustomerServiceUpdateAgentSettingsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageRequest.cs new file mode 100644 index 00000000..44f6dba9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/conversations/{conversation_id}/messages 接口的请求。 + /// + public class CustomerServiceCreateConversationMessageRequest : TikTokShopRequest + { + /// + /// 获取或设置会话 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ConversationId { get; set; } = string.Empty; + + /// + /// 获取或设置消息类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置消息内容 JSON 字符串。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string ContentJson { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageResponse.cs new file mode 100644 index 00000000..358c6cf4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationMessageResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/conversations/{conversation_id}/messages 接口的响应。 + /// + public class CustomerServiceCreateConversationMessageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置消息 ID。 + /// + [Newtonsoft.Json.JsonProperty("message_id")] + [System.Text.Json.Serialization.JsonPropertyName("message_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string MessageId { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationRequest.cs new file mode 100644 index 00000000..5e66345d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/conversations 接口的请求。 + /// + public class CustomerServiceCreateConversationRequest : TikTokShopRequest + { + /// + /// 获取或设置买家用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("buyer_user_id")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_user_id")] + public string BuyerUserId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationResponse.cs new file mode 100644 index 00000000..958413bd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceCreateConversationResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/conversations 接口的响应。 + /// + public class CustomerServiceCreateConversationResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置会话 ID。 + /// + [Newtonsoft.Json.JsonProperty("conversation_id")] + [System.Text.Json.Serialization.JsonPropertyName("conversation_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ConversationId { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesRequest.cs new file mode 100644 index 00000000..d95c4987 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesRequest.cs @@ -0,0 +1,51 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /customer_service/{version}/conversations/{conversation_id}/messages 接口的请求。 + /// + public class CustomerServiceGetConversationMessagesRequest : TikTokShopRequest + { + /// + /// 获取或设置会话 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ConversationId { get; set; } = string.Empty; + + /// + /// 获取或设置语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + + /// + /// 获取或设置排序字段。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortField { get; set; } + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortOrder { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesResponse.cs new file mode 100644 index 00000000..21e7927c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationMessagesResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /customer_service/{version}/conversations/{conversation_id}/messages 接口的响应。 + /// + public class CustomerServiceGetConversationMessagesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Message : CustomerServiceGetConversationsResponse.Types.Data.Types.Conversation.Types.Message + { + } + } + + /// + /// 获取或设置消息列表。 + /// + [Newtonsoft.Json.JsonProperty("messages")] + [System.Text.Json.Serialization.JsonPropertyName("messages")] + public Types.Message[] MessageList { get; set; } = default!; + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// 获取或设置不支持的消息提示。 + /// + [Newtonsoft.Json.JsonProperty("unsupported_msg_tips")] + [System.Text.Json.Serialization.JsonPropertyName("unsupported_msg_tips")] + public string? UnsupportedMessageTips { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsRequest.cs new file mode 100644 index 00000000..836b9b1f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsRequest.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /customer_service/{version}/conversations 接口的请求。 + /// + public class CustomerServiceGetConversationsRequest : TikTokShopRequest + { + /// + /// 获取或设置语种。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Locale { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsResponse.cs new file mode 100644 index 00000000..0ef20fff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceGetConversationsResponse.cs @@ -0,0 +1,171 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /customer_service/{version}/conversations 接口的响应。 + /// + public class CustomerServiceGetConversationsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Conversation + { + public static class Types + { + public class Participant + { + /// + /// 获取或设置用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("user_id")] + [System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// 获取或设置 IM 用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("im_user_id")] + [System.Text.Json.Serialization.JsonPropertyName("im_user_id")] + public string? IMUserId { get; set; } + + /// + /// 获取或设置头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("avatar")] + [System.Text.Json.Serialization.JsonPropertyName("avatar")] + public string AvatarUrl { get; set; } = default!; + + /// + /// 获取或设置角色。 + /// + [Newtonsoft.Json.JsonProperty("role")] + [System.Text.Json.Serialization.JsonPropertyName("role")] + public string Role { get; set; } = default!; + + /// + /// 获取或设置昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string Nickname { get; set; } = default!; + } + + public class Message + { + /// + /// 获取或设置消息 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string MessageId { get; set; } = default!; + + /// + /// 获取或设置消息类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置消息内容 JSON 字符串。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string ContentJson { get; set; } = default!; + + /// + /// 获取或设置发送者信息。 + /// + [Newtonsoft.Json.JsonProperty("sender")] + [System.Text.Json.Serialization.JsonPropertyName("sender")] + public Types.Participant Sender { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置是否可见。 + /// + [Newtonsoft.Json.JsonProperty("is_visible")] + [System.Text.Json.Serialization.JsonPropertyName("is_visible")] + public bool IsVisible { get; set; } + } + } + + /// + /// 获取或设置会话 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ConversationId { get; set; } = default!; + + /// + /// 获取或设置参与者数量。 + /// + [Newtonsoft.Json.JsonProperty("participant_count")] + [System.Text.Json.Serialization.JsonPropertyName("participant_count")] + public int ParticipantCount { get; set; } + + /// + /// 获取或设置未读消息数量。 + /// + [Newtonsoft.Json.JsonProperty("unread_count")] + [System.Text.Json.Serialization.JsonPropertyName("unread_count")] + public int UnreadMessageCount { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置是否可发送消息。 + /// + [Newtonsoft.Json.JsonProperty("can_send_message")] + [System.Text.Json.Serialization.JsonPropertyName("can_send_message")] + public bool CanSendMessage { get; set; } + + /// + /// 获取或设置参与者列表。 + /// + [Newtonsoft.Json.JsonProperty("participants")] + [System.Text.Json.Serialization.JsonPropertyName("participants")] + public Types.Participant[] ParticipantList { get; set; } = default!; + + /// + /// 获取或设置最新消息信息。 + /// + [Newtonsoft.Json.JsonProperty("latest_message")] + [System.Text.Json.Serialization.JsonPropertyName("latest_message")] + public Types.Message? LatestMessage { get; set; } + } + } + + /// + /// 获取或设置会话列表。 + /// + [Newtonsoft.Json.JsonProperty("conversations")] + [System.Text.Json.Serialization.JsonPropertyName("conversations")] + public Types.Conversation[] ConversationList { get; set; } = default!; + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageRequest.cs new file mode 100644 index 00000000..9b0baf33 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/conversations/{conversation_id}/messages/read 接口的请求。 + /// + public class CustomerServiceReadConversationMessageRequest : TikTokShopRequest + { + /// + /// 获取或设置会话 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ConversationId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageResponse.cs new file mode 100644 index 00000000..7c78bf1d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceReadConversationMessageResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/conversations/{conversation_id}/messages/read 接口的响应。 + /// + public class CustomerServiceReadConversationMessageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageRequest.cs new file mode 100644 index 00000000..0f98082e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageRequest.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/images/upload 接口的请求。 + /// + public class CustomerServiceUploadImageRequest : TikTokShopRequest + { + /// + /// 获取或设置图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] ImageFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileName { get; set; } + + /// + /// 获取或设置图片文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageResponse.cs new file mode 100644 index 00000000..5931587d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/CustomerService/CustomerServiceUploadImageResponse.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /customer_service/{version}/images/upload 接口的响应。 + /// + public class CustomerServiceUploadImageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置图片宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置图片高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.json new file mode 100644 index 00000000..c053d6d3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceGetAgentSettingsResponse.json @@ -0,0 +1,8 @@ +{ + "code": 0, + "data": { + "can_accept_chat": true + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.json new file mode 100644 index 00000000..fd0504da --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/Agents/CustomerServiceUpdateAgentSettingsRequest.json @@ -0,0 +1,3 @@ +{ + "can_accept_chat": true +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageRequest.json new file mode 100644 index 00000000..d3ddaf05 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageRequest.json @@ -0,0 +1,4 @@ +{ + "content": "{\"content\": \"test\"}", + "type": "TEXT" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageResponse.json new file mode 100644 index 00000000..e3418552 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationMessageResponse.json @@ -0,0 +1,8 @@ +{ + "code": 0, + "data": { + "message_id": "7494560109732334261" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationRequest.json new file mode 100644 index 00000000..a0f066b0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationRequest.json @@ -0,0 +1,3 @@ +{ + "buyer_user_id": "7494560109732338459" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationResponse.json new file mode 100644 index 00000000..be3a79a5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceCreateConversationResponse.json @@ -0,0 +1,8 @@ +{ + "code": 0, + "data": { + "conversation_id": "7106888323922608389" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationMessagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationMessagesResponse.json new file mode 100644 index 00000000..acaca49b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationMessagesResponse.json @@ -0,0 +1,24 @@ +{ + "code": 0, + "data": { + "messages": [ + { + "content": "{\"content\": \"simple text message\"}", + "create_time": 1691411573, + "id": "7494560109732334263", + "is_visible": true, + "sender": { + "avatar": "https://p16-oec-ttp.tiktokcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/566c497faaaf4491a84d3ce55d9cb095~tplv-omjb5zjo8w-origin-image.image?", + "im_user_id": "7494560109732334261", + "nickname": "Albert", + "role": "BUYER" + }, + "type": "TEXT" + } + ], + "next_page_token": "162312320", + "unsupported_msg_tips": "Please check this message in Seller Center.\n" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationsResponse.json new file mode 100644 index 00000000..01bd8ec2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceGetConversationsResponse.json @@ -0,0 +1,39 @@ +{ + "code": 0, + "data": { + "conversations": [ + { + "can_send_message": true, + "create_time": 1691411573, + "id": "7494560109732334261", + "latest_message": { + "content": "{\"content\": \"simple text message\"}", + "create_time": 1691411573, + "id": "7494560109732334263", + "is_visible": true, + "sender": { + "avatar": "https://p16-oec-ttp.tiktokcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/566c497faaaf4491a84d3ce55d9cb095~tplv-omjb5zjo8w-origin-image.image?", + "im_user_id": "7494560109732334261", + "nickname": "Albert", + "role": "BUYER" + }, + "type": "TEXT" + }, + "participant_count": 3, + "participants": [ + { + "avatar": "https://p16-oec-ttp.tiktokcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/566c497faaaf4491a84d3ce55d9cb095~tplv-omjb5zjo8w-origin-image.image?", + "im_user_id": "7494560109732334261", + "nickname": "Albert", + "role": "BUYER", + "user_id": "7494560109732334262" + } + ], + "unread_count": 0 + } + ], + "next_page_token": "1612353423" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceUploadImageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceUploadImageResponse.json new file mode 100644 index 00000000..02f9f668 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/CustomerService/CustomerServiceUploadImageResponse.json @@ -0,0 +1,10 @@ +{ + "code": 0, + "data": { + "height": 720, + "url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/2ca53c34ad8443e6b39f4e0153d3aed4~tplv-o3syd03w52-origin-image.image?from=1320446476", + "width": 1280 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 620183d16ffefe2913dcde4d11bb065ed06a7101 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 14 May 2024 13:04:22 +0800 Subject: [PATCH 12/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E9=80=80=E8=B4=A7=E9=80=80=E6=AC=BE=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 18 +- .../TikTokShopClientExecuteAuthExtensions.cs | 9 +- ...ikTokShopClientExecuteProductExtensions.cs | 22 ++ ...ShopClientExecuteReturnRefundExtensions.cs | 287 ++++++++++++++ ...ProductCreateProductListingCheckRequest.cs | 222 +++++++++++ ...roductCreateProductListingCheckResponse.cs | 52 +++ .../ReturnRefundApproveCancellationRequest.cs | 15 + ...ReturnRefundApproveCancellationResponse.cs | 15 + .../ReturnRefundCreateCancellationRequest.cs | 58 +++ .../ReturnRefundCreateCancellationResponse.cs | 29 ++ .../ReturnRefundRejectCancellationRequest.cs | 72 ++++ .../ReturnRefundRejectCancellationResponse.cs | 15 + .../ReturnRefundSearchCancellationsRequest.cs | 95 +++++ ...ReturnRefundSearchCancellationsResponse.cs | 285 ++++++++++++++ ...fundGetOrderAftersaleEligibilityRequest.cs | 15 + ...undGetOrderAftersaleEligibilityResponse.cs | 82 ++++ .../ReturnRefundCalculateRefundRequest.cs | 66 ++++ .../ReturnRefundCalculateRefundResponse.cs | 28 ++ .../ReturnRefundGetRejectReasonsRequest.cs | 9 + .../ReturnRefundGetRejectReasonsResponse.cs | 41 ++ .../ReturnRefundApproveReturnRequest.cs | 29 ++ .../ReturnRefundApproveReturnResponse.cs | 15 + .../ReturnRefundCreateReturnRequest.cs | 82 ++++ .../ReturnRefundCreateReturnResponse.cs | 29 ++ .../ReturnRefundGetReturnRecordsRequest.cs | 15 + .../ReturnRefundGetReturnRecordsResponse.cs | 128 +++++++ .../ReturnRefundRejectReturnRequest.cs | 52 +++ .../ReturnRefundRejectReturnResponse.cs | 15 + .../ReturnRefundSearchReturnsRequest.cs | 102 +++++ .../ReturnRefundSearchReturnsResponse.cs | 359 ++++++++++++++++++ ...oductCreateProductListingCheckRequest.json | 109 ++++++ ...ductCreateProductListingCheckResponse.json | 16 + ...ReturnRefundCreateCancellationRequest.json | 13 + ...eturnRefundCreateCancellationResponse.json | 9 + ...ReturnRefundRejectCancellationRequest.json | 11 + ...eturnRefundSearchCancellationsRequest.json | 12 + ...turnRefundSearchCancellationsResponse.json | 59 +++ ...dGetOrderAftersaleEligibilityResponse.json | 23 ++ .../ReturnRefundCalculateRefundRequest.json | 16 + .../ReturnRefundCalculateRefundResponse.json | 15 + .../ReturnRefundGetRejectReasonsResponse.json | 13 + .../ReturnRefundApproveReturnRequest.json | 4 + .../ReturnRefundCreateReturnRequest.json | 18 + .../ReturnRefundCreateReturnResponse.json | 9 + .../ReturnRefundGetReturnRecordsResponse.json | 33 ++ .../ReturnRefundRejectReturnRequest.json | 13 + .../ReturnRefundSearchReturnsRequest.json | 13 + .../ReturnRefundSearchReturnsResponse.json | 85 +++++ 48 files changed, 2724 insertions(+), 8 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReturnRefundExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/ReturnRefundGetRejectReasonsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index 9fda78d4..d17d0b22 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -10,7 +10,7 @@ Naming Policies: ### APIs -Notes: The following catalog is consistent with the catalog structure of [TikTokShop Partner Center API Reference](https://partner.tiktokshop.com/docv2/page/6507ead7b99d5302be949ba9?external_id=6507ead7b99d5302be949ba9). +Notes: The following catalog is consistent with the catalog structure of [TikTokShop Partner Center API Reference](https://partner.tiktokshop.com/docv2/page/6632a7434585a502e1cb5591).
@@ -58,6 +58,7 @@ Notes: The following catalog is consistent with the catalog structure of [TikTok - Get Global Product: `ProductGetGlobalProductDetail` - Edit Global Product: `ProductUpdateGlobalProduct` - Delete Global Products: `ProductDeleteGlobalProducts` + - Check Product Listing: `ProductCreateProductListingCheck` - Check Listing Prerequisites: `ProductGetPrerequisites` - Search Global Products: `ProductSearchGlobalProducts` - Search Products: `ProductSearchProducts` @@ -66,9 +67,20 @@ Notes: The following catalog is consistent with the catalog structure of [TikTok - Get Order List: `OrderSearchOrders` - Get Order Detail: `OrderBatchGetOrderDetail` - Fulfillment - - *Pending ...* + - _Pending ..._ - Return and Refund - - *Pending ...* + - Search Cancellations: `ReturnRefundSearchCancellations` + - Approve Cancellation: `ReturnRefundApproveCancellation` + - Reject Cancellation: `ReturnRefundRejectCancellation` + - Search Returns: `ReturnRefundSearchReturns` + - Approve Return: `ReturnRefundApproveReturn` + - Reject Return: `ReturnRefundRejectReturn` + - Get Aftersale Eligibility: `ReturnRefundGetOrderAftersaleEligibility` + - Get Reject Reasons: `ReturnRefundGetRejectReasons` + - Calculate Refund: `ReturnRefundCalculateRefund` + - Get Return Records: `ReturnRefundGetReturnRecords` + - Cancel Order: `ReturnRefundCreateCancellation` + - Create Return: `ReturnRefundCreateReturn` - Logistics - Get Warehouse Delivery Options: `LogisticsGetWarehouseDeliveryOptions` - Get Warehouse List: `LogisticsGetWarehouses` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs index a580b071..042d450e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs @@ -13,7 +13,7 @@ public static class TikTokShopClientExecuteAuthExtensions /// 异步调用 [GET] /token/get 接口。 /// /// REF:
- /// + /// ///
///
/// @@ -32,7 +32,7 @@ public static class TikTokShopClientExecuteAuthExtensions .SetQueryParam("app_secret", client.Credentials.AppSecret) .SetQueryParam("grant_type", request.GrantType) .SetQueryParam("auth_code", request.AuthorizedCode) - .RemoveQueryParams("access_token", "timestamp", "shop_id", "shop_cipher", "version"); + .RemoveQueryParams("access_token", "timestamp", "shop_cipher"); return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } @@ -41,8 +41,7 @@ public static class TikTokShopClientExecuteAuthExtensions /// 异步调用 [GET] /token/refresh 接口。 /// /// REF:
- ///
- /// + /// ///
///
/// @@ -61,7 +60,7 @@ public static class TikTokShopClientExecuteAuthExtensions .SetQueryParam("app_secret", client.Credentials.AppSecret) .SetQueryParam("grant_type", request.GrantType) .SetQueryParam("refresh_token", request.RefreshToken) - .RemoveQueryParams("access_token", "timestamp", "shop_id", "shop_cipher", "version"); + .RemoveQueryParams("access_token", "timestamp", "shop_cipher"); return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs index daa25f6f..9b6d8ac7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs @@ -488,6 +488,28 @@ public static class TikTokShopClientExecuteProductExtensions return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } + /// + /// 异步调用 [POST] /product/{version}/products/listing_check 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductCreateProductListingCheckAsync(this TikTokShopClient client, Models.ProductCreateProductListingCheckRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", "listing_check"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + /// /// 异步调用 [POST] /product/{version}/products/search 接口。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReturnRefundExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReturnRefundExtensions.cs new file mode 100644 index 00000000..bd0a3804 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteReturnRefundExtensions.cs @@ -0,0 +1,287 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteReturnRefundExtensions + { + /// + /// 异步调用 [GET] /return_refund/{version}/reject_reasons 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundGetRejectReasonsAsync(this TikTokShopClient client, Models.ReturnRefundGetRejectReasonsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "return_refund", request.ApiVersion, "reject_reasons"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Cancellations + /// + /// 异步调用 [POST] /return_refund/{version}/cancellations 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundCreateCancellationAsync(this TikTokShopClient client, Models.ReturnRefundCreateCancellationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "cancellations"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /return_refund/{version}/cancellations/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundSearchCancellationsAsync(this TikTokShopClient client, Models.ReturnRefundSearchCancellationsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "cancellations", "search") + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /return_refund/{version}/cancellations/{cancel_id}/approve 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundApproveCancellationAsync(this TikTokShopClient client, Models.ReturnRefundApproveCancellationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "cancellations", request.CancelId, "approve"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /return_refund/{version}/cancellations/{cancel_id}/reject 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundRejectCancellationAsync(this TikTokShopClient client, Models.ReturnRefundRejectCancellationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "cancellations", request.CancelId, "reject"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Orders + /// + /// 异步调用 [GET] /return_refund/{version}/orders/{order_id}/aftersale_eligibility 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundGetOrderAftersaleEligibilityAsync(this TikTokShopClient client, Models.ReturnRefundGetOrderAftersaleEligibilityRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "return_refund", request.ApiVersion, "orders", request.OrderId, "aftersale_eligibility"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Refunds + /// + /// 异步调用 [POST] /return_refund/{version}/refunds/calculate 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundCalculateRefundAsync(this TikTokShopClient client, Models.ReturnRefundCalculateRefundRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "refunds", "calculate"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Returns + /// + /// 异步调用 [POST] /return_refund/{version}/returns 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundCreateReturnAsync(this TikTokShopClient client, Models.ReturnRefundCreateReturnRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "returns"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /return_refund/{version}/returns/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundSearchReturnsAsync(this TikTokShopClient client, Models.ReturnRefundSearchReturnsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "returns", "search") + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /return_refund/{version}/returns/{return_id}/approve 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundApproveReturnAsync(this TikTokShopClient client, Models.ReturnRefundApproveReturnRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "returns", request.ReturnId, "approve"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /return_refund/{version}/returns/{return_id}/reject 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundRejectReturnAsync(this TikTokShopClient client, Models.ReturnRefundRejectReturnRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "return_refund", request.ApiVersion, "returns", request.ReturnId, "reject"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /return_refund/{version}/returns/{return_id}/records 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteReturnRefundGetReturnRecordsAsync(this TikTokShopClient client, Models.ReturnRefundGetReturnRecordsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "return_refund", request.ApiVersion, "returns", request.ReturnId, "records"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckRequest.cs new file mode 100644 index 00000000..fb83e728 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckRequest.cs @@ -0,0 +1,222 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/listing_check 接口的请求。 + /// + public class ProductCreateProductListingCheckRequest : TikTokShopRequest + { + public static class Types + { + public class Image : ProductCreateProductRequest.Types.Image + { + } + + public class Video : ProductCreateProductRequest.Types.Video + { + } + + public class SKU : ProductCreateProductRequest.Types.SKU + { + public static new class Types + { + public class SalesAttribute : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.SKU.Types.SalesAttribute.Types.Image + { + } + } + } + + public class Price : ProductCreateProductRequest.Types.SKU.Types.Price + { + } + + public class Inventory : ProductCreateProductRequest.Types.SKU.Types.Inventory + { + } + + public class IdentifierCode : ProductCreateProductRequest.Types.SKU.Types.IdentifierCode + { + } + + public class CombinedSKU : ProductCreateProductRequest.Types.SKU.Types.CombinedSKU + { + } + } + } + + public class PackageDimension : ProductCreateProductRequest.Types.PackageDimension + { + } + + public class PackageWeight : ProductCreateProductRequest.Types.PackageWeight + { + } + + public class Certification : ProductCreateProductRequest.Types.Certification + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.Certification.Types.Image + { + } + + public class File : ProductCreateProductRequest.Types.Certification.Types.File + { + } + } + } + + public class ProductAttribute : ProductCreateProductRequest.Types.ProductAttribute + { + public static new class Types + { + public class ProductAttributeValue : ProductCreateProductRequest.Types.ProductAttribute.Types.ProductAttributeValue + { + } + } + } + + public class SizeChart : ProductCreateProductRequest.Types.SizeChart + { + public static new class Types + { + public class Image : ProductCreateProductRequest.Types.SizeChart.Types.Image + { + } + + public class Template : ProductCreateProductRequest.Types.SizeChart.Types.Template + { + } + } + } + + public class Manufacturer : ProductCreateProductRequest.Types.Manufacturer + { + } + } + + /// + /// 获取或设置外部商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("external_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("external_product_id")] + public string? ExternalProductId { get; set; } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryId { get; set; } = string.Empty; + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public string? BrandId { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("main_images")] + [System.Text.Json.Serialization.JsonPropertyName("main_images")] + public IList? MainImageList { get; set; } + + /// + /// 获取或设置视频信息。 + /// + [Newtonsoft.Json.JsonProperty("video")] + [System.Text.Json.Serialization.JsonPropertyName("video")] + public Types.Video? Video { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + + /// + /// 获取或设置组合商品主商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("primary_combined_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("primary_combined_product_id")] + public string? PrimaryCombinedProductId { get; set; } + + /// + /// 获取或设置包装尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("package_dimensions")] + [System.Text.Json.Serialization.JsonPropertyName("package_dimensions")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包装重量信息。 + /// + [Newtonsoft.Json.JsonProperty("package_weight")] + [System.Text.Json.Serialization.JsonPropertyName("package_weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置尺码表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart? SizeChart { get; set; } + + /// + /// 获取或设置商品认证列表。 + /// + [Newtonsoft.Json.JsonProperty("certifications")] + [System.Text.Json.Serialization.JsonPropertyName("certifications")] + public IList? CertificationList { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("product_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("product_attributes")] + public IList? ProductAttributeList { get; set; } + + /// + /// 获取或设置是否允许货到付款。 + /// + [Newtonsoft.Json.JsonProperty("is_cod_allowed")] + [System.Text.Json.Serialization.JsonPropertyName("is_cod_allowed")] + public bool IsCashOnDeliveryAllowed { get; set; } + + /// + /// 获取或设置配送方式 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_ids")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_ids")] + public IList? DeliveryOptionIdList { get; set; } + + /// + /// 获取或设置制造商信息。 + /// + [Newtonsoft.Json.JsonProperty("manufacturer")] + [System.Text.Json.Serialization.JsonPropertyName("manufacturer")] + public Types.Manufacturer? Manufacturer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckResponse.cs new file mode 100644 index 00000000..27d1113f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Product/ProductCreateProductListingCheckResponse.cs @@ -0,0 +1,52 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /product/{version}/products/listing_check 接口的响应。 + /// + public class ProductCreateProductListingCheckResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class FailReason + { + /// + /// 获取或设置失败原因。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + + public class Warning : ProductCreateProductResponse.Types.Data.Types.Warning + { + } + } + + /// + /// 获取或设置检查结果。 + /// + [Newtonsoft.Json.JsonProperty("check_result")] + [System.Text.Json.Serialization.JsonPropertyName("check_result")] + public string CheckResult { get; set; } = default!; + + /// + /// 获取或设置失败原因列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_reasons")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reasons")] + public Types.FailReason[]? FailReasonList { get; set; } = default!; + + /// + /// 获取或设置警告信息。 + /// + [Newtonsoft.Json.JsonProperty("warnings")] + [System.Text.Json.Serialization.JsonPropertyName("warnings")] + public Types.Warning? Warning { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationRequest.cs new file mode 100644 index 00000000..e3ce86a7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations/{cancel_id}/approve 接口的请求。 + /// + public class ReturnRefundApproveCancellationRequest : TikTokShopRequest + { + /// + /// 获取或设置取消 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CancelId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationResponse.cs new file mode 100644 index 00000000..7a24bace --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundApproveCancellationResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations/{cancel_id}/approve 接口的响应。 + /// + public class ReturnRefundApproveCancellationResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.cs new file mode 100644 index 00000000..b0c510fd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations 接口的请求。 + /// + public class ReturnRefundCreateCancellationRequest : TikTokShopRequest + { + public static class Types + { + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = string.Empty; + + /// + /// 获取或设置数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList? SKUList { get; set; } + + /// + /// 获取或设置取消原因。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] + public string CancelReason { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.cs new file mode 100644 index 00000000..15d5e454 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations 接口的响应。 + /// + public class ReturnRefundCreateCancellationResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置取消 ID。 + /// + [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!; + + /// + /// 获取或设置取消状态。 + /// + [Newtonsoft.Json.JsonProperty("cancel_status")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_status")] + public string CancelStatus { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.cs new file mode 100644 index 00000000..db5099fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.cs @@ -0,0 +1,72 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations/{cancel_id}/reject 接口的请求。 + /// + public class ReturnRefundRejectCancellationRequest : TikTokShopRequest + { + public static class Types + { + public class Image + { + /// + /// 获取或设置图片 URI。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string Uri { get; set; } = string.Empty; + + /// + /// 获取或设置图片 MIME 类型。 + /// + [Newtonsoft.Json.JsonProperty("mime_type")] + [System.Text.Json.Serialization.JsonPropertyName("mime_type")] + public string? MimeType { get; set; } + + /// + /// 获取或设置图片宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int? Width { get; set; } + + /// + /// 获取或设置图片高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int? Height { get; set; } + } + } + + /// + /// 获取或设置取消 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CancelId { get; set; } = string.Empty; + + /// + /// 获取或设置拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string RejectReason { get; set; } = string.Empty; + + /// + /// 获取或设置评论内容。 + /// + [Newtonsoft.Json.JsonProperty("comment")] + [System.Text.Json.Serialization.JsonPropertyName("comment")] + public string? Comment { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public IList? ImageList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationResponse.cs new file mode 100644 index 00000000..e284b44d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundRejectCancellationResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations/{cancel_id}/reject 接口的响应。 + /// + public class ReturnRefundRejectCancellationResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs new file mode 100644 index 00000000..700ddfea --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs @@ -0,0 +1,95 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations/search 接口的请求。 + /// + public class ReturnRefundSearchCancellationsRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_ids")] + public IList? OrderIdList { get; set; } + + /// + /// 获取或设置买家用户 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_user_ids")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_user_ids")] + public IList? BuyerUserIdList { get; set; } + + /// + /// 获取或设置取消 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("cancel_ids")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_ids")] + public IList? CancelIdList { get; set; } + + /// + /// 获取或设置取消类型列表。 + /// + [Newtonsoft.Json.JsonProperty("cancel_types")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_types")] + public IList? CancelTypeList { get; set; } + + /// + /// 获取或设置取消状态列表。 + /// + [Newtonsoft.Json.JsonProperty("cancel_status")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_status")] + public IList? CancelStatusList { get; set; } + + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_ge")] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_lt")] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置更新时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_ge")] + public long? UpdateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置更新时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_lt")] + public long? UpdateTimestampLessThan { get; set; } + + /// + /// 获取或设置语种。 + /// + [Newtonsoft.Json.JsonProperty("locale")] + [System.Text.Json.Serialization.JsonPropertyName("locale")] + public string? Locale { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs new file mode 100644 index 00000000..e0ab077d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs @@ -0,0 +1,285 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/cancellations/search 接口的响应。 + /// + public class ReturnRefundSearchCancellationsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Cancellation + { + public static class Types + { + public class RefundAmount + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置退款总金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_total")] + [System.Text.Json.Serialization.JsonPropertyName("refund_total")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundTotal { get; set; } + + /// + /// 获取或设置退款小计金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_subtotal")] + [System.Text.Json.Serialization.JsonPropertyName("refund_subtotal")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundSubtotal { get; set; } + + /// + /// 获取或设置退款运费金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_shipping_fee")] + [System.Text.Json.Serialization.JsonPropertyName("refund_shipping_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundShippingFee { get; set; } + + /// + /// 获取或设置退税金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_tax")] + [System.Text.Json.Serialization.JsonPropertyName("refund_tax")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RefundTax { get; set; } + + /// + /// 获取或设置零售配送费。 + /// + [Newtonsoft.Json.JsonProperty("retail_delivery_fee")] + [System.Text.Json.Serialization.JsonPropertyName("retail_delivery_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal RetailDeliveryFee { get; set; } + } + + public class SellerActionResponse + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("action")] + [System.Text.Json.Serialization.JsonPropertyName("action")] + public string Action { get; set; } = default!; + + /// + /// 获取或设置截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("deadline")] + [System.Text.Json.Serialization.JsonPropertyName("deadline")] + public long DeadlineTimestamp { get; set; } + } + + public class CancelLineItem + { + public static class Types + { + public class Image + { + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置图片宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置图片高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + } + } + + /// + /// 获取或设置取消订单行 ID。 + /// + [Newtonsoft.Json.JsonProperty("cancel_line_item_id")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_line_item_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CancelLineItemId { get; set; } = default!; + + /// + /// 获取或设置订单行 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? OrderlLineItemId { get; set; } + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = default!; + + /// + /// 获取或设置商品图片信息。 + /// + [Newtonsoft.Json.JsonProperty("product_image")] + [System.Text.Json.Serialization.JsonPropertyName("product_image")] + public Types.Image? ProductImage { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU 名称。 + /// + [Newtonsoft.Json.JsonProperty("sku_name")] + [System.Text.Json.Serialization.JsonPropertyName("sku_name")] + public string SKUName { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置退款金额信息。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public RefundAmount RefundAmount { get; set; } = default!; + } + } + + /// + /// 获取或设置取消 ID。 + /// + [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!; + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置取消类型。 + /// + [Newtonsoft.Json.JsonProperty("cancel_type")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置取消状态。 + /// + [Newtonsoft.Json.JsonProperty("cancel_status")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置取消原因。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] + public string CancelReason { get; set; } = default!; + + /// + /// 获取或设置取消原因文本。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason_text")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason_text")] + public string CancelReasonText { get; set; } = default!; + + /// + /// 获取或设置取消发起人。 + /// + [Newtonsoft.Json.JsonProperty("role")] + [System.Text.Json.Serialization.JsonPropertyName("role")] + public string CancelUser { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置退款金额信息。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public Types.RefundAmount RefundAmount { get; set; } = default!; + + /// + /// 获取或设置卖家后续操作列表。 + /// + [Newtonsoft.Json.JsonProperty("seller_next_action_response")] + [System.Text.Json.Serialization.JsonPropertyName("seller_next_action_response")] + public Types.SellerActionResponse[]? SellerNextActionResponseList { get; set; } + + /// + /// 获取或设置取消订单行列表。 + /// + [Newtonsoft.Json.JsonProperty("cancel_line_items")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_line_items")] + public Types.CancelLineItem[]? CancelLineItemList { get; set; } + } + } + + /// + /// 获取或设置取消列表。 + /// + [Newtonsoft.Json.JsonProperty("cancellations")] + [System.Text.Json.Serialization.JsonPropertyName("cancellations")] + public Types.Cancellation[] CancellationList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityRequest.cs new file mode 100644 index 00000000..d35942d0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /return_refund/{version}/orders/{order_id}/aftersale_eligibility 接口的请求。 + /// + public class ReturnRefundGetOrderAftersaleEligibilityRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.cs new file mode 100644 index 00000000..bb5df84d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.cs @@ -0,0 +1,82 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /return_refund/{version}/orders/{order_id}/aftersale_eligibility 接口的响应。 + /// + public class ReturnRefundGetOrderAftersaleEligibilityResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SKUEligibility + { + public static class Types + { + public class LineItemEligibility + { + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_items_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_items_ids")] + public string[] OrderLineItemIdList { get; set; } = default!; + + /// + /// 获取或设置是否有资格。 + /// + [Newtonsoft.Json.JsonProperty("eligible")] + [System.Text.Json.Serialization.JsonPropertyName("eligible")] + public bool IsEligible { get; set; } + + /// + /// 获取或设置无资格原因代码。 + /// + [Newtonsoft.Json.JsonProperty("ineligible_code")] + [System.Text.Json.Serialization.JsonPropertyName("ineligible_code")] + public int? IneligibleCode { get; set; } + + /// + /// 获取或设置无资格原因。 + /// + [Newtonsoft.Json.JsonProperty("ineligible_reason")] + [System.Text.Json.Serialization.JsonPropertyName("ineligible_reason")] + public string? IneligibleReason { get; set; } + + /// + /// 获取或设置申请类型。 + /// + [Newtonsoft.Json.JsonProperty("request_type")] + [System.Text.Json.Serialization.JsonPropertyName("request_type")] + public string? RequestType { get; set; } + } + } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置资格列表。 + /// + [Newtonsoft.Json.JsonProperty("line_item_eligibility")] + [System.Text.Json.Serialization.JsonPropertyName("line_item_eligibility")] + public Types.LineItemEligibility[] LineItemEligibilityList { get; set; } = default!; + } + } + + /// + /// 获取或设置资格列表。 + /// + [Newtonsoft.Json.JsonProperty("sku_eligibility")] + [System.Text.Json.Serialization.JsonPropertyName("sku_eligibility")] + public Types.SKUEligibility[] SKUEligibilityList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.cs new file mode 100644 index 00000000..89a5e111 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.cs @@ -0,0 +1,66 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/refunds/calculate 接口的请求。 + /// + public class ReturnRefundCalculateRefundRequest : TikTokShopRequest + { + public static class Types + { + public class SKU : ReturnRefundCreateReturnRequest.Types.SKU + { + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList? SKUList { get; set; } + + /// + /// 获取或设置申请原因。 + /// + [Newtonsoft.Json.JsonProperty("reason_name")] + [System.Text.Json.Serialization.JsonPropertyName("reason_name")] + public string RequestReason { get; set; } = string.Empty; + + /// + /// 获取或设置申请类型。 + /// + [Newtonsoft.Json.JsonProperty("request_type")] + [System.Text.Json.Serialization.JsonPropertyName("request_type")] + public string RequestType { get; set; } = string.Empty; + + /// + /// 获取或设置运输类型。 + /// + [Newtonsoft.Json.JsonProperty("shipment_type")] + [System.Text.Json.Serialization.JsonPropertyName("shipment_type")] + public string? ShipmentType { get; set; } + + /// + /// 获取或设置交接方式。 + /// + [Newtonsoft.Json.JsonProperty("handover_method")] + [System.Text.Json.Serialization.JsonPropertyName("handover_method")] + public string? HandoverMethod { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.cs new file mode 100644 index 00000000..37b43e92 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/refunds/calculate 接口的响应。 + /// + public class ReturnRefundCalculateRefundResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class RefundAmount : ReturnRefundSearchReturnsResponse.Types.Data.Types.Return.Types.RefundAmount + { + } + } + + /// + /// 获取或设置退款金额信息。 + /// + [Newtonsoft.Json.JsonProperty("order_refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("order_refund_amount")] + public Types.RefundAmount RefundAmount { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsRequest.cs new file mode 100644 index 00000000..4bb09db8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /return_refund/{version}/reject_reasons 接口的请求。 + /// + public class ReturnRefundGetRejectReasonsRequest : TikTokShopRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsResponse.cs new file mode 100644 index 00000000..be465d48 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/ReturnRefundGetRejectReasonsResponse.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /return_refund/{version}/reject_reasons 接口的响应。 + /// + public class ReturnRefundGetRejectReasonsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Reason + { + /// + /// 获取或设置取消原因。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置取消原因文本。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string Text { get; set; } = default!; + } + } + + /// + /// 获取或设置原因列表。 + /// + [Newtonsoft.Json.JsonProperty("reasons")] + [System.Text.Json.Serialization.JsonPropertyName("reasons")] + public Types.Reason[] ReasonList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.cs new file mode 100644 index 00000000..8bf185f8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns/{return_id}/approve 接口的请求。 + /// + public class ReturnRefundApproveReturnRequest : TikTokShopRequest + { + /// + /// 获取或设置退货 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ReturnId { get; set; } = string.Empty; + + /// + /// 获取或设置决定。 + /// + [Newtonsoft.Json.JsonProperty("decision")] + [System.Text.Json.Serialization.JsonPropertyName("decision")] + public string Decision { get; set; } = string.Empty; + + /// + /// 获取或设置买家是否保留货物。 + /// + [Newtonsoft.Json.JsonProperty("buyer_keep_item")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_keep_item")] + public bool? IsBuyerKeepItem { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnResponse.cs new file mode 100644 index 00000000..4c00f1e8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundApproveReturnResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns/{return_id}/approve 接口的响应。 + /// + public class ReturnRefundApproveReturnResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.cs new file mode 100644 index 00000000..eaf81d6f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.cs @@ -0,0 +1,82 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns 接口的请求。 + /// + public class ReturnRefundCreateReturnRequest : TikTokShopRequest + { + public static class Types + { + public class SKU : ReturnRefundCreateCancellationRequest.Types.SKU + { + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList? SKUList { get; set; } + + /// + /// 获取或设置退货原因。 + /// + [Newtonsoft.Json.JsonProperty("return_reason")] + [System.Text.Json.Serialization.JsonPropertyName("return_reason")] + public string ReturnReason { get; set; } = string.Empty; + + /// + /// 获取或设置退货类型。 + /// + [Newtonsoft.Json.JsonProperty("return_type")] + [System.Text.Json.Serialization.JsonPropertyName("return_type")] + public string ReturnType { get; set; } = string.Empty; + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string? Currency { get; set; } + + /// + /// 获取或设置退款金额。 + /// + [Newtonsoft.Json.JsonProperty("refund_total")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))] + [System.Text.Json.Serialization.JsonPropertyName("refund_total")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)] + public decimal? RefundTotal { get; set; } + + /// + /// 获取或设置运输类型。 + /// + [Newtonsoft.Json.JsonProperty("shipment_type")] + [System.Text.Json.Serialization.JsonPropertyName("shipment_type")] + public string? ShipmentType { get; set; } + + /// + /// 获取或设置交接方式。 + /// + [Newtonsoft.Json.JsonProperty("handover_method")] + [System.Text.Json.Serialization.JsonPropertyName("handover_method")] + public string? HandoverMethod { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.cs new file mode 100644 index 00000000..0ee535f5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns 接口的响应。 + /// + public class ReturnRefundCreateReturnResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置退货 ID。 + /// + [Newtonsoft.Json.JsonProperty("return_id")] + [System.Text.Json.Serialization.JsonPropertyName("return_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ReturnId { get; set; } = default!; + + /// + /// 获取或设置退货状态。 + /// + [Newtonsoft.Json.JsonProperty("return_status")] + [System.Text.Json.Serialization.JsonPropertyName("return_status")] + public string ReturnStatus { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsRequest.cs new file mode 100644 index 00000000..ea908388 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /return_refund/{version}/returns/{return_id}/records 接口的请求。 + /// + public class ReturnRefundGetReturnRecordsRequest : TikTokShopRequest + { + /// + /// 获取或设置退货 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ReturnId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.cs new file mode 100644 index 00000000..d5d34ecf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.cs @@ -0,0 +1,128 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /return_refund/{version}/returns/{return_id}/records 接口的响应。 + /// + public class ReturnRefundGetReturnRecordsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Record + { + public static class Types + { + public class Image : ReturnRefundSearchReturnsResponse.Types.Data.Types.Return.Types.ReturnLineItem.Types.Image + { + } + + public class Video + { + /// + /// 获取或设置视频 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置封面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("cover")] + [System.Text.Json.Serialization.JsonPropertyName("cover")] + public string CoverUrl { get; set; } = default!; + + /// + /// 获取或设置视频宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置视频高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + + /// + /// 获取或设置视频时长(单位:毫秒)。 + /// + [Newtonsoft.Json.JsonProperty("duration_millis")] + [System.Text.Json.Serialization.JsonPropertyName("duration_millis")] + public int Duration { get; set; } + } + } + + /// + /// 获取或设置记录类型。 + /// + [Newtonsoft.Json.JsonProperty("event")] + [System.Text.Json.Serialization.JsonPropertyName("event")] + public string Event { get; set; } = default!; + + /// + /// 获取或设置发起角色。 + /// + [Newtonsoft.Json.JsonProperty("role")] + [System.Text.Json.Serialization.JsonPropertyName("role")] + public string Role { get; set; } = default!; + + /// + /// 获取或设置描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置原因文本。 + /// + [Newtonsoft.Json.JsonProperty("reason_text")] + [System.Text.Json.Serialization.JsonPropertyName("reason_text")] + public string ReasonText { get; set; } = default!; + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("note")] + [System.Text.Json.Serialization.JsonPropertyName("note")] + public string? Notes { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public Types.Image[]? ImageList { get; set; } + + /// + /// 获取或设置视频列表。 + /// + [Newtonsoft.Json.JsonProperty("videos")] + [System.Text.Json.Serialization.JsonPropertyName("videos")] + public Types.Video[]? VideoList { get; set; } + } + } + + /// + /// 获取或设置记录列表。 + /// + [Newtonsoft.Json.JsonProperty("records")] + [System.Text.Json.Serialization.JsonPropertyName("records")] + public Types.Record[] RecordList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.cs new file mode 100644 index 00000000..077bde02 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns/{return_id}/reject 接口的请求。 + /// + public class ReturnRefundRejectReturnRequest : TikTokShopRequest + { + public static class Types + { + public class Image : ReturnRefundRejectCancellationRequest.Types.Image + { + } + } + + /// + /// 获取或设置退货 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ReturnId { get; set; } = string.Empty; + + /// + /// 获取或设置决定。 + /// + [Newtonsoft.Json.JsonProperty("decision")] + [System.Text.Json.Serialization.JsonPropertyName("decision")] + public string Decision { get; set; } = string.Empty; + + /// + /// 获取或设置拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string RejectReason { get; set; } = string.Empty; + + /// + /// 获取或设置评论内容。 + /// + [Newtonsoft.Json.JsonProperty("comment")] + [System.Text.Json.Serialization.JsonPropertyName("comment")] + public string? Comment { get; set; } + + /// + /// 获取或设置图片列表。 + /// + [Newtonsoft.Json.JsonProperty("images")] + [System.Text.Json.Serialization.JsonPropertyName("images")] + public IList? ImageList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnResponse.cs new file mode 100644 index 00000000..4bb489fb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundRejectReturnResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns/{return_id}/reject 接口的响应。 + /// + public class ReturnRefundRejectReturnResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs new file mode 100644 index 00000000..af16233a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs @@ -0,0 +1,102 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns/search 接口的请求。 + /// + public class ReturnRefundSearchReturnsRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_ids")] + public IList? OrderIdList { get; set; } + + /// + /// 获取或设置买家用户 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_user_ids")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_user_ids")] + public IList? BuyerUserIdList { get; set; } + + /// + /// 获取或设置退货 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("return_ids")] + [System.Text.Json.Serialization.JsonPropertyName("return_ids")] + public IList? ReturnIdList { get; set; } + + /// + /// 获取或设置退货类型列表。 + /// + [Newtonsoft.Json.JsonProperty("return_types")] + [System.Text.Json.Serialization.JsonPropertyName("return_types")] + public IList? ReturnTypeList { get; set; } + + /// + /// 获取或设置退货状态列表。 + /// + [Newtonsoft.Json.JsonProperty("return_status")] + [System.Text.Json.Serialization.JsonPropertyName("return_status")] + public IList? ReturnStatusList { get; set; } + + /// + /// 获取或设置仲裁状态列表。 + /// + [Newtonsoft.Json.JsonProperty("arbitration_status")] + [System.Text.Json.Serialization.JsonPropertyName("arbitration_status")] + public IList? ArbitrationStatusList { get; set; } + + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_ge")] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_lt")] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置更新时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_ge")] + public long? UpdateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置更新时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_lt")] + public long? UpdateTimestampLessThan { get; set; } + + /// + /// 获取或设置语种。 + /// + [Newtonsoft.Json.JsonProperty("locale")] + [System.Text.Json.Serialization.JsonPropertyName("locale")] + public string? Locale { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs new file mode 100644 index 00000000..ca5a2fc2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs @@ -0,0 +1,359 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /return_refund/{version}/returns/search 接口的响应。 + /// + public class ReturnRefundSearchReturnsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Return + { + public static class Types + { + public class RefundAmount : ReturnRefundSearchCancellationsResponse.Types.Data.Types.Cancellation.Types.RefundAmount + { + } + + public class DiscountAmount + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置商品平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("product_platform_discount")] + [System.Text.Json.Serialization.JsonPropertyName("product_platform_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ProductPlatformDiscount { get; set; } + + /// + /// 获取或设置商品卖家优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("product_seller_discount")] + [System.Text.Json.Serialization.JsonPropertyName("product_seller_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ProductSellerDiscount { get; set; } + + /// + /// 获取或设置运输费用平台优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_platform_discount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_platform_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeePlatformDiscount { get; set; } + + /// + /// 获取或设置运输费用卖家优惠金额。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_seller_discount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_seller_discount")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal ShippingFeeSellerDiscount { get; set; } + } + + public class ShippingFeeAmount + { + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置平台承担的退款运费金额。 + /// + [Newtonsoft.Json.JsonProperty("platform_paid_return_shipping_fee")] + [System.Text.Json.Serialization.JsonPropertyName("platform_paid_return_shipping_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal PlatformPaidReturnShippingFee { get; set; } + + /// + /// 获取或设置卖家承担的退款运费金额。 + /// + [Newtonsoft.Json.JsonProperty("seller_paid_return_shipping_fee")] + [System.Text.Json.Serialization.JsonPropertyName("seller_paid_return_shipping_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal SellerPaidReturnShippingFee { get; set; } + + /// + /// 获取或设置买家承担的退款运费金额。 + /// + [Newtonsoft.Json.JsonProperty("buyer_paid_return_shipping_fee")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_paid_return_shipping_fee")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))] + public decimal BuyerPaidReturnShippingFee { get; set; } + } + + public class SellerActionResponse : ReturnRefundSearchCancellationsResponse.Types.Data.Types.Cancellation.Types.SellerActionResponse + { + } + + public class ReturnLineItem + { + public static class Types + { + public class Image : ReturnRefundSearchCancellationsResponse.Types.Data.Types.Cancellation.Types.CancelLineItem.Types.Image + { + } + } + + /// + /// 获取或设置退货订单行 ID。 + /// + [Newtonsoft.Json.JsonProperty("return_line_item_id")] + [System.Text.Json.Serialization.JsonPropertyName("return_line_item_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ReturnLineItemId { get; set; } = default!; + + /// + /// 获取或设置订单行 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? OrderlLineItemId { get; set; } + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = default!; + + /// + /// 获取或设置商品图片信息。 + /// + [Newtonsoft.Json.JsonProperty("product_image")] + [System.Text.Json.Serialization.JsonPropertyName("product_image")] + public Types.Image? ProductImage { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU 名称。 + /// + [Newtonsoft.Json.JsonProperty("sku_name")] + [System.Text.Json.Serialization.JsonPropertyName("sku_name")] + public string SKUName { get; set; } = default!; + + /// + /// 获取或设置卖家 SKU 信息。 + /// + [Newtonsoft.Json.JsonProperty("seller_sku")] + [System.Text.Json.Serialization.JsonPropertyName("seller_sku")] + public string? SellerSKU { get; set; } + + /// + /// 获取或设置退款金额信息。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public RefundAmount RefundAmount { get; set; } = default!; + } + } + + /// + /// 获取或设置退货 ID。 + /// + [Newtonsoft.Json.JsonProperty("return_id")] + [System.Text.Json.Serialization.JsonPropertyName("return_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ReturnId { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置退货类型。 + /// + [Newtonsoft.Json.JsonProperty("return_type")] + [System.Text.Json.Serialization.JsonPropertyName("return_type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置退货状态。 + /// + [Newtonsoft.Json.JsonProperty("return_status")] + [System.Text.Json.Serialization.JsonPropertyName("return_status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置退货原因。 + /// + [Newtonsoft.Json.JsonProperty("return_reason")] + [System.Text.Json.Serialization.JsonPropertyName("return_reason")] + public string ReturnReason { get; set; } = default!; + + /// + /// 获取或设置退货原因文本。 + /// + [Newtonsoft.Json.JsonProperty("return_reason_text")] + [System.Text.Json.Serialization.JsonPropertyName("return_reason_text")] + public string ReturnReasonText { get; set; } = default!; + + /// + /// 获取或设置仲裁状态。 + /// + [Newtonsoft.Json.JsonProperty("arbitration_status")] + [System.Text.Json.Serialization.JsonPropertyName("arbitration_status")] + public string ArbitrationStatus { get; set; } = default!; + + /// + /// 获取或设置退货发起人。 + /// + [Newtonsoft.Json.JsonProperty("role")] + [System.Text.Json.Serialization.JsonPropertyName("role")] + public string ReturnUser { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置运输类型。 + /// + [Newtonsoft.Json.JsonProperty("shipment_type")] + [System.Text.Json.Serialization.JsonPropertyName("shipment_type")] + public string ShipmentType { get; set; } = default!; + + /// + /// 获取或设置交接方式。 + /// + [Newtonsoft.Json.JsonProperty("handover_method")] + [System.Text.Json.Serialization.JsonPropertyName("handover_method")] + public string HandoverMethod { get; set; } = default!; + + /// + /// 获取或设置退货物流单号。 + /// + [Newtonsoft.Json.JsonProperty("return_tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("return_tracking_number")] + public string? ReturnTrackingNumber { get; set; } + + /// + /// 获取或设置退货运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("return_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("return_provider_id")] + public string? ReturnProviderId { get; set; } + + /// + /// 获取或设置退货运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("return_provider_name")] + [System.Text.Json.Serialization.JsonPropertyName("return_provider_name")] + public string? ReturnProviderName { get; set; } + + /// + /// 获取或设置前退货 ID。 + /// + [Newtonsoft.Json.JsonProperty("pre_return_id")] + [System.Text.Json.Serialization.JsonPropertyName("pre_return_id")] + public string? PreviousReturnId { get; set; } + + /// + /// 获取或设置后退货 ID。 + /// + [Newtonsoft.Json.JsonProperty("next_return_id")] + [System.Text.Json.Serialization.JsonPropertyName("next_return_id")] + public string? NextReturnId { get; set; } + + /// + /// 获取或设置买家是否可保留货物。 + /// + [Newtonsoft.Json.JsonProperty("can_buyer_keep_item")] + [System.Text.Json.Serialization.JsonPropertyName("can_buyer_keep_item")] + public bool CanBuyerKeepItem { get; set; } + + /// + /// 获取或设置退款金额信息。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public Types.RefundAmount RefundAmount { get; set; } = default!; + + /// + /// 获取或设置优惠金额信息列表。 + /// + [Newtonsoft.Json.JsonProperty("discount_amount")] + [System.Text.Json.Serialization.JsonPropertyName("discount_amount")] + public Types.DiscountAmount[]? DiscountAmountList { get; set; } + + /// + /// 获取或设置运费金额信息列表。 + /// + [Newtonsoft.Json.JsonProperty("shipping_fee_amount")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_fee_amount")] + public Types.ShippingFeeAmount[]? ShippingFeeAmountList { get; set; } + + /// + /// 获取或设置卖家后续操作列表。 + /// + [Newtonsoft.Json.JsonProperty("seller_next_action_response")] + [System.Text.Json.Serialization.JsonPropertyName("seller_next_action_response")] + public Types.SellerActionResponse[]? SellerNextActionResponseList { get; set; } + + /// + /// 获取或设置退货订单行列表。 + /// + [Newtonsoft.Json.JsonProperty("return_line_items")] + [System.Text.Json.Serialization.JsonPropertyName("return_line_items")] + public Types.ReturnLineItem[]? ReturnLineItemList { get; set; } + } + } + + /// + /// 获取或设置退货列表。 + /// + [Newtonsoft.Json.JsonProperty("return_orders")] + [System.Text.Json.Serialization.JsonPropertyName("return_orders")] + public Types.Return[] ReturnList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckRequest.json new file mode 100644 index 00000000..88969584 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckRequest.json @@ -0,0 +1,109 @@ +{ + "brand_id": "7082427311584347905", + "category_id": "600001", + "certifications": [ + { + "files": [ + { + "format": "PDF", + "id": "v09ea0g40000cj91373c77u3mid3g1s0", + "name": "SNI.PDF" + } + ], + "id": "7182427311584347905", + "images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe\n" + } + ] + } + ], + "delivery_option_ids": [ "1729592969712203232" ], + "description": "

Please compare above detailed size with your measurement before purchase.

\n
    \n
  • M-Size
  • \n
  • XL-Size
  • \n
\n\n", + "external_product_id": "172959296971220002", + "is_cod_allowed": false, + "main_images": [ + { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + } + ], + "manufacturer": { + "address": "123W 106th St, New York, NY, USA, 10025", + "email": "samplemanufacturer101@outlook.com", + "name": "Sample Manufacturer Name", + "phone_number": "123-1234567" + }, + "package_dimensions": { + "height": "10", + "length": "10", + "unit": "CENTIMETER", + "width": "10" + }, + "package_weight": { + "unit": "KILOGRAM", + "value": "1.32" + }, + "primary_combined_product_id": "1729582718312380123", + "product_attributes": [ + { + "id": "100392", + "values": [ + { + "id": "1001533", + "name": "Birthday" + } + ] + } + ], + "size_chart": { + "image": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "template": { + "id": "7267563252536723205" + } + }, + "skus": [ + { + "combined_skus": [ + { + "product_id": "1729582718312380123", + "sku_count": 11, + "sku_id": "1729582718312380123" + } + ], + "external_sku_id": "1729592969712207012", + "identifier_code": { + "code": "10000000000000", + "type": "GTIN" + }, + "inventory": [ + { + "quantity": 999, + "warehouse_id": "7068517275539719942" + } + ], + "price": { + "amount": "1.23", + "currency": "USD" + }, + "sales_attributes": [ + { + "id": "100089", + "name": "Specification", + "sku_img": { + "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe" + }, + "value_id": "1729592969712207000", + "value_name": "XL" + } + ], + "seller_sku": "Color-Red-XM01", + "sku_unit_count": "100.00" + } + ], + "title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks", + "video": { + "id": "v09e40f40000cfu0ovhc77ub7fl97k4w" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckResponse.json new file mode 100644 index 00000000..11617fa0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Product/ProductCreateProductListingCheckResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "check_result": "FAILED", + "fail_reasons": [ + { + "message": "Product title invalid" + } + ], + "warnings": { + "message": "Your product will not be sent for review. " + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.json new file mode 100644 index 00000000..2aa36a3a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationRequest.json @@ -0,0 +1,13 @@ +{ + "cancel_reason": "ecom_order_delivered_refund_and_return_reason_wrong_product_seller", + "order_id": "577087614418520388", + "order_line_item_ids": [ + "577087614418716996" + ], + "skus": [ + { + "quantity": 1, + "sku_id": "1729386416015578024" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.json new file mode 100644 index 00000000..8f33abe4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundCreateCancellationResponse.json @@ -0,0 +1,9 @@ +{ + "code": 0, + "data": { + "cancel_id": "4035319218955782461", + "cancel_status": "CANCELLATION_REQUEST_SUCCESS" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.json new file mode 100644 index 00000000..7d7f7dd5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundRejectCancellationRequest.json @@ -0,0 +1,11 @@ +{ + "comment": "I have packed the products before cancellation request", + "images": [ + { + "height": 200, + "image_id": "tos-maliva-i-o3syd03w52-us/57a1c8908fe74572861ea5e50887d8d1", + "width": 200 + } + ], + "reject_reason": "seller_reject_apply_product_has_been_packed" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.json new file mode 100644 index 00000000..80413bf1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.json @@ -0,0 +1,12 @@ +{ + "buyer_user_ids": ["7494845267308415300"], + "cancel_ids": [ "577087614418520388" ], + "cancel_status": [ "CANCELLATION_REQUEST_PENDING" ], + "cancel_types": [ "CANCEL" ], + "create_time_ge": 1690340825, + "create_time_lt": 1690340825, + "locale": "en-US", + "order_ids": [ "577087614418520388" ], + "update_time_ge": 1690340825, + "update_time_lt": 1690340825 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.json new file mode 100644 index 00000000..54c34ed1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.json @@ -0,0 +1,59 @@ +{ + "code": 0, + "data": { + "cancellations": [ + { + "cancel_id": "4035318504086604100", + "cancel_line_items": [ + { + "cancel_line_item_id": "4035227913481196964", + "order_line_item_id": "576468844534141348", + "product_image": { + "height": 200, + "url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/004797ebfd8c4d3da2df1cc4bfdb0614~tplv-o3syd03w52-origin-jpeg.jpeg?from=4246405447", + "width": 200 + }, + "product_name": "bundle No Heel Flat Heel Summer Winter Round Toe", + "refund_amount": { + "currency": "USD", + "refund_shipping_fee": "5", + "refund_subtotal": "1", + "refund_tax": "3", + "refund_total": "1.23", + "retail_delivery_fee": "0.1" + }, + "seller_sku": "YYAPC23078TRT30", + "sku_id": "2729382476852921560", + "sku_name": "1#, Standard" + } + ], + "cancel_reason": "ecom_order_to_ship_canceled_reason_created_by_mistakes", + "cancel_reason_text": "Order created by mistake", + "cancel_status": "CANCELLATION_REQUEST_PENDING", + "cancel_type": "REQUEST_CANCEL_REFUND", + "create_time": 1690451136, + "order_id": "577087614418520388", + "refund_amount": { + "currency": "USD", + "refund_shipping_fee": "0.2", + "refund_subtotal": "1", + "refund_tax": "0.03", + "refund_total": "1.23", + "retail_delivery_fee": "0.1" + }, + "role": "BUYER", + "seller_next_action_response": [ + { + "action": "SELLER_RESPOND_CANCEL", + "deadline": 1690554680 + } + ], + "update_time": 1690451136 + } + ], + "next_page_token": "aDU2dHIzMlFhME5CUzJKUDhDdVJhTDM1WmJkeFVTVW9LTkRaSnNaZCtuWjJXVU5CSDhlaA==", + "total_count": 100 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.json new file mode 100644 index 00000000..5f5f6f1f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Orders/ReturnRefundGetOrderAftersaleEligibilityResponse.json @@ -0,0 +1,23 @@ +{ + "code": 0, + "data": { + "sku_eligibility": [ + { + "line_item_eligibility": [ + { + "eligible": true, + "ineligible_code": 25001001, + "ineligible_reason": "invalid order status", + "order_line_items_ids": [ + "576469648086306000" + ], + "request_type": "REFUND" + } + ], + "sku_id": "1729385144994206632" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.json new file mode 100644 index 00000000..c904de4b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundRequest.json @@ -0,0 +1,16 @@ +{ + "handover_method": "DROP_OFF", + "order_id": "576469648086175911", + "order_line_item_ids": [ + "576469648086306986" + ], + "reason_name": "ecom_order_delivered_refund_reason_missing_product_seller", + "request_type": "REFUND", + "shipment_type": "PLATFORM", + "skus": [ + { + "quantity": 1, + "sku_id": "1729386416015578024" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.json new file mode 100644 index 00000000..c277f56b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Refunds/ReturnRefundCalculateRefundResponse.json @@ -0,0 +1,15 @@ +{ + "code": 0, + "data": { + "order_refund_amount": { + "currency": "USD", + "refund_shipping_fee": "0.2", + "refund_subtotal": "1", + "refund_tax": "0.03", + "refund_total": "1.23", + "retail_delivery_fee": "0.1" + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/ReturnRefundGetRejectReasonsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/ReturnRefundGetRejectReasonsResponse.json new file mode 100644 index 00000000..17d3c535 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/ReturnRefundGetRejectReasonsResponse.json @@ -0,0 +1,13 @@ +{ + "code": 0, + "data": { + "reasons": [ + { + "name": "seller_reject_apply_you_have_reached_an_agreement_with_the_buyer", + "text": "You have reached an agreement with the buyer" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.json new file mode 100644 index 00000000..83852c77 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundApproveReturnRequest.json @@ -0,0 +1,4 @@ +{ + "buyer_keep_item": true, + "decision": "APPROVE_REFUND" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.json new file mode 100644 index 00000000..09e14b24 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnRequest.json @@ -0,0 +1,18 @@ +{ + "currency": "USD", + "handover_method": "DROP_OFF", + "order_id": "576473917261320779", + "order_line_item_ids": [ + "455764739172614518516" + ], + "refund_total": "10.5", + "return_reason": "ecom_order_delivered_refund_reason_missing_product_seller", + "return_type": "REFUND", + "shipment_type": "PLATFORM", + "skus": [ + { + "quantity": 1, + "sku_id": "1729386416015578024" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.json new file mode 100644 index 00000000..a7b0d4e7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundCreateReturnResponse.json @@ -0,0 +1,9 @@ +{ + "code": 0, + "data": { + "return_id": "4035319218955782461", + "return_status": "RETURN_OR_REFUND_REQUEST_PENDING" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.json new file mode 100644 index 00000000..6f695125 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundGetReturnRecordsResponse.json @@ -0,0 +1,33 @@ +{ + "code": 0, + "data": { + "records": [ + { + "create_time": 1690532213, + "description": "Customer submitted a return request", + "event": "ORDER_RETURN", + "images": [ + { + "height": 200, + "url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/004797ebfd8c4d3da2df1cc4bfdb0614~tplv-o3syd03w52-origin-jpeg.jpeg?from=4246405447", + "width": 200 + } + ], + "note": "Reach an agreement with the buyer", + "reason_text": "Wrong product was sent", + "role": "Buyer", + "videos": [ + { + "cover": "https://p16-oec-va.ibyteimg.com/musically-maliva-obj/998d0381960bda1ef272f4a7724cf5ed~tplv-o3syd03w52-origin-jpeg.jpeg?from=4246405489", + "duration_millis": 3000, + "height": 200, + "url": "https://v16m-default.akamaized.net/1e26046c3df91cd008d2ababba9445e2/65005d33/video/tos/maliva/tos-maliva-v-d8ca36-us/oQVCbIQemDpQxI9lHsg9IXQAb7mwgBabababab", + "width": 200 + } + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.json new file mode 100644 index 00000000..7ee21641 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundRejectReturnRequest.json @@ -0,0 +1,13 @@ +{ + "comment": "I have reached an agreement with the buyer", + "decision": "REJECT_RECEIVED_PACKAGE", + "images": [ + { + "height": 200, + "image_id": "tos-maliva-i-o3syd03w52-us/57a1c8908fe74572861ea5e50887d8d1", + "mime_type": "image/png", + "width": 200 + } + ], + "reject_reason": "seller_reject_apply_package_has_not_exceeded_estimated_delivery_time" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.json new file mode 100644 index 00000000..542377c8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.json @@ -0,0 +1,13 @@ +{ + "arbitration_status": [ "IN_PROGRESS" ], + "buyer_user_ids": [ "7493996903972308733" ], + "create_time_ge": 1690340825, + "create_time_lt": 1690340825, + "locale": "en-US", + "order_ids": [ "577686530908261117" ], + "return_ids": [ "4035318504086604100" ], + "return_status": [ "RETURN_OR_REFUND_REQUEST_PENDING" ], + "return_types": [ "REFUND" ], + "update_time_ge": 1690340825, + "update_time_lt": 1690340825 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.json new file mode 100644 index 00000000..3d6bbe9f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.json @@ -0,0 +1,85 @@ +{ + "code": 0, + "data": { + "next_page_token": "aDU2dHIzMlFhME5CUzJKUDhDdVJhTDM1WmJkeFVTVW9LTkRaSnNaZCtuWjJXVU5CSDhlaA==", + "return_orders": [ + { + "arbitration_status": "IN_PROGRESS", + "can_buyer_keep_item": true, + "create_time": 1690451136, + "discount_amount": [ + { + "currency": "USD", + "product_platform_discount": "0.1", + "product_seller_discount": "0.1", + "shipping_fee_platform_discount": "0.1", + "shipping_fee_seller_discount": "0.1" + } + ], + "handover_method": "DROP_OFF", + "next_return_id": "4035310341095393463", + "order_id": "577686530908261117", + "pre_return_id": "4035310341095393452", + "refund_amount": { + "currency": "USD", + "refund_shipping_fee": "0.2", + "refund_subtotal": "1", + "refund_tax": "0.03", + "refund_total": "1.23", + "retail_delivery_fee": "0.1" + }, + "return_id": "4035318504086604100", + "return_line_items": [ + { + "order_line_item_id": "576473917261451851", + "product_image": { + "height": 200, + "url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/004797ebfd8c4d3da2df1cc4bfdb0614~tplv-o3syd03w52-origin-jpeg.jpeg?from=4246405447", + "width": 200 + }, + "product_name": "(SP) [PROMO BUNDLING] NICE Tissue Facial 180s x 5 pcs", + "refund_amount": { + "currency": "USD", + "refund_shipping_fee": "0.2", + "refund_subtotal": "1", + "refund_tax": "0.03", + "refund_total": "1.23", + "retail_delivery_fee": "0.1" + }, + "return_line_item_id": "4035227657962164811", + "seller_sku": "PUTIH 1 TALI", + "sku_id": "2729382476852921560", + "sku_name": "1#, Standard" + } + ], + "return_provider_id": "TH27014E9R5Q4G", + "return_provider_name": "J&T Express", + "return_reason": "ecom_order_to_ship_canceled_reason_created_by_mistakes", + "return_reason_text": "Order created by mistake", + "return_status": "RETURN_OR_REFUND_REQUEST_PENDING", + "return_tracking_number": "213456789098765433456", + "return_type": "REFUND", + "role": "BUYER", + "seller_next_action_response": [ + { + "action": "SELLER_RESPOND_REFUND", + "deadline": 1690554680 + } + ], + "shipment_type": "PLATFORM", + "shipping_fee_amount": [ + { + "buyer_paid_return_shipping_fee": "0.1", + "currency": "USD", + "platform_paid_return_shipping_fee": "0.1", + "seller_paid_return_shipping_fee": "0.1" + } + ], + "update_time": 1690453136 + } + ], + "total_count": 100 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From 9694364acf32930b9ed45c4969ac5fa27cd1b000 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 14 May 2024 15:29:57 +0800 Subject: [PATCH 13/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?Webhook=20=E7=9B=B8=E5=85=B3=E4=BA=8B=E4=BB=B6=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=8F=8A=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Events/CancellationStatusChangeEvent.cs | 55 +++++++++++++++ .../Events/OrderStatusChangeEvent.cs | 47 +++++++++++++ .../Events/PackageUpdateEvent.cs | 67 ++++++++++++++++++ .../Events/ProductCreationEvent.cs | 40 +++++++++++ .../Events/ProductInformationChangeEvent.cs | 40 +++++++++++ .../Events/ProductStatusChangeEvent.cs | 47 +++++++++++++ .../Events/RecipientAddressUpdateEvent.cs | 33 +++++++++ .../Events/ReturnStatusChangeEvent.cs | 69 +++++++++++++++++++ .../Events/SellerDeauthorizationEvent.cs | 25 +++++++ .../UpcomingAuthorizationExpirationEvent.cs | 33 +++++++++ .../TikTokShopClientEventExtensions.cs | 41 +++++++++++ .../Models/Order/OrderSearchOrdersResponse.cs | 4 +- ...ReturnRefundSearchCancellationsResponse.cs | 2 +- .../ReturnRefundSearchReturnsResponse.cs | 2 +- .../TikTokShopEvent.cs | 55 +++++++++++++++ .../_/CancellationStatusChangeEvent.json | 12 ++++ .../_/OrderStatusChangeEvent.json | 11 +++ .../EventSamples/_/PackageUpdateEvent.json | 19 +++++ .../EventSamples/_/ProductCreationEvent.json | 11 +++ .../_/ProductInformationChangeEvent.json | 16 +++++ .../_/ProductStatusChangeEvent.json | 11 +++ .../_/RecipientAddressUpdateEvent.json | 9 +++ .../_/ReturnStatusChangeEvent.json | 14 ++++ .../_/SellerDeauthorizationEvent.json | 8 +++ .../UpcomingAuthorizationExpirationEvent.json | 9 +++ .../IMPORTANT_CodeAnalyzeTests.cs | 12 +++- 26 files changed, 685 insertions(+), 7 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/CancellationStatusChangeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/OrderStatusChangeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/PackageUpdateEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductCreationEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductInformationChangeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductStatusChangeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/RecipientAddressUpdateEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ReturnStatusChangeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/SellerDeauthorizationEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/UpcomingAuthorizationExpirationEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientEventExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEvent.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/CancellationStatusChangeEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/OrderStatusChangeEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/PackageUpdateEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductCreationEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductInformationChangeEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductStatusChangeEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/RecipientAddressUpdateEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ReturnStatusChangeEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/SellerDeauthorizationEvent.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/UpcomingAuthorizationExpirationEvent.json diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/CancellationStatusChangeEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/CancellationStatusChangeEvent.cs new file mode 100644 index 00000000..6c10bb5d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/CancellationStatusChangeEvent.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 CANCELLATION_STATUS_CHANGE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class CancellationStatusChangeEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置取消 ID。 + /// + [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!; + + /// + /// 获取或设置取消发起人。 + /// + [Newtonsoft.Json.JsonProperty("cancellations_role")] + [System.Text.Json.Serialization.JsonPropertyName("cancellations_role")] + public string CancelRole { get; set; } = default!; + + /// + /// 获取或设置取消状态。 + /// + [Newtonsoft.Json.JsonProperty("cancel_status")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_status")] + public string CancelStatus { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/OrderStatusChangeEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/OrderStatusChangeEvent.cs new file mode 100644 index 00000000..1e4853b9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/OrderStatusChangeEvent.cs @@ -0,0 +1,47 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 ORDER_STATUS_CHANGE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class OrderStatusChangeEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public string OrderStatus { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置是否是延期订单。 + /// + [Newtonsoft.Json.JsonProperty("is_on_hold_order")] + [System.Text.Json.Serialization.JsonPropertyName("is_on_hold_order")] + public bool? IsOnHoldOrder { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/PackageUpdateEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/PackageUpdateEvent.cs new file mode 100644 index 00000000..f814d681 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/PackageUpdateEvent.cs @@ -0,0 +1,67 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 PACKAGE_UPDATE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class PackageUpdateEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + public static class Types + { + public class Package + { + /// + /// 获取或设置包裹 ID。 + /// + [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; } + + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] + public string[]? OrderIdList { get; set; } + } + } + + /// + /// 获取或设置事件类型。 + /// + [Newtonsoft.Json.JsonProperty("sc_type")] + [System.Text.Json.Serialization.JsonPropertyName("sc_type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置角色类型。 + /// + [Newtonsoft.Json.JsonProperty("role_type")] + [System.Text.Json.Serialization.JsonPropertyName("role_type")] + public string RoleType { get; set; } = default!; + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("package_list")] + [System.Text.Json.Serialization.JsonPropertyName("package_list")] + public Types.Package[] PackageList { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductCreationEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductCreationEvent.cs new file mode 100644 index 00000000..3e3bca13 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductCreationEvent.cs @@ -0,0 +1,40 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 PRODUCT_CREATION 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ProductCreationEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置商品类型列表。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public string[] ProductTypeList { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductInformationChangeEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductInformationChangeEvent.cs new file mode 100644 index 00000000..ff406709 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductInformationChangeEvent.cs @@ -0,0 +1,40 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 PRODUCT_INFORMATION_CHANGE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ProductInformationChangeEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置修改过的字段列表。 + /// + [Newtonsoft.Json.JsonProperty("changed_fields")] + [System.Text.Json.Serialization.JsonPropertyName("changed_fields")] + public string[] ChangedFieldList { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductStatusChangeEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductStatusChangeEvent.cs new file mode 100644 index 00000000..6c05aa1c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductStatusChangeEvent.cs @@ -0,0 +1,47 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 PRODUCT_STATUS_CHANGE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ProductStatusChangeEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置商品 ID。 + /// + [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!; + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string ProductStatus { get; set; } = default!; + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("suspended_reason")] + [System.Text.Json.Serialization.JsonPropertyName("suspended_reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/RecipientAddressUpdateEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/RecipientAddressUpdateEvent.cs new file mode 100644 index 00000000..ce188072 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/RecipientAddressUpdateEvent.cs @@ -0,0 +1,33 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 RECIPIENT_ADDRESS_UPDATE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class RecipientAddressUpdateEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ReturnStatusChangeEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ReturnStatusChangeEvent.cs new file mode 100644 index 00000000..81f10c52 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ReturnStatusChangeEvent.cs @@ -0,0 +1,69 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 RETURN_STATUS_CHANGE 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ReturnStatusChangeEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置退货 ID。 + /// + [Newtonsoft.Json.JsonProperty("return_id")] + [System.Text.Json.Serialization.JsonPropertyName("return_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string ReturnId { get; set; } = default!; + + /// + /// 获取或设置退货发起人。 + /// + [Newtonsoft.Json.JsonProperty("return_role")] + [System.Text.Json.Serialization.JsonPropertyName("return_role")] + public string ReturnRole { get; set; } = default!; + + /// + /// 获取或设置退货类型。 + /// + [Newtonsoft.Json.JsonProperty("return_type")] + [System.Text.Json.Serialization.JsonPropertyName("return_type")] + public string ReturnType { get; set; } = default!; + + /// + /// 获取或设置退货状态。 + /// + [Newtonsoft.Json.JsonProperty("return_status")] + [System.Text.Json.Serialization.JsonPropertyName("return_status")] + public string ReturnStatus { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/SellerDeauthorizationEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/SellerDeauthorizationEvent.cs new file mode 100644 index 00000000..c49e7313 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/SellerDeauthorizationEvent.cs @@ -0,0 +1,25 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 SELLER_DEAUTHORIZATION 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class SellerDeauthorizationEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置通知消息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/UpcomingAuthorizationExpirationEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/UpcomingAuthorizationExpirationEvent.cs new file mode 100644 index 00000000..48cf19c3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/UpcomingAuthorizationExpirationEvent.cs @@ -0,0 +1,33 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events +{ + /// + /// 表示 UPCOMING_AUTHORIZATION_EXPIRATION 事件。 + /// + /// REF:
+ /// + ///
+ ///
+ public class UpcomingAuthorizationExpirationEvent : TikTokShopEvent + { + public static class Types + { + public class Data + { + /// + /// 获取或设置通知消息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expiration_time")] + [System.Text.Json.Serialization.JsonPropertyName("expiration_time")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ExpireTimestamp { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientEventExtensions.cs new file mode 100644 index 00000000..2c9281d4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientEventExtensions.cs @@ -0,0 +1,41 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientEventExtensions + { + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + public static TikTokShopEvent DeserializeEvent(this TikTokShopClient client, string webhookJson) + { + return DeserializeEvent(client, webhookJson); + } + + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + /// + public static TEvent DeserializeEvent(this TikTokShopClient client, string webhookJson) + where TEvent : TikTokShopEvent, new() + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (webhookJson is null) throw new ArgumentNullException(webhookJson); + + try + { + return client.JsonSerializer.Deserialize(webhookJson)!; + } + catch (Exception ex) + { + throw new TikTokShopException("Failed to deserialize event data. Please see the inner exception for more details.", ex); + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs index b93383da..7d188af8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs @@ -444,7 +444,7 @@ public class ItemTax ///
[Newtonsoft.Json.JsonProperty("cancel_user")] [System.Text.Json.Serialization.JsonPropertyName("cancel_user")] - public string? CancelUser { get; set; } + public string? CancelRole { get; set; } /// /// 获取或设置取消原因。 @@ -787,7 +787,7 @@ public class CombinedListingSKU : LineItem /// [Newtonsoft.Json.JsonProperty("cancellation_initiator")] [System.Text.Json.Serialization.JsonPropertyName("cancellation_initiator")] - public string? CancelUser { get; set; } + public string? CancelRole { get; set; } /// /// 获取或设置取消订单原因。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs index e0ab077d..6f684de0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsResponse.cs @@ -220,7 +220,7 @@ public class Image /// [Newtonsoft.Json.JsonProperty("role")] [System.Text.Json.Serialization.JsonPropertyName("role")] - public string CancelUser { get; set; } = default!; + public string CancelRole { get; set; } = default!; /// /// 获取或设置创建时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs index ca5a2fc2..60023da2 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsResponse.cs @@ -224,7 +224,7 @@ public class Image : ReturnRefundSearchCancellationsResponse.Types.Data.Types.Ca /// [Newtonsoft.Json.JsonProperty("role")] [System.Text.Json.Serialization.JsonPropertyName("role")] - public string ReturnUser { get; set; } = default!; + public string ReturnRole { get; set; } = default!; /// /// 获取或设置创建时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEvent.cs new file mode 100644 index 00000000..68f8ea1d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopEvent.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + /// + /// 表示 TikTok Shop API Webhook 事件的基类。 + /// + [Newtonsoft.Json.JsonObject] + public class TikTokShopEvent : ICommonWebhookEvent + { + /// + /// 获取或设置事件类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public virtual int Type { get; set; } + + /// + /// 获取或设置店铺 ID。 + /// + [Newtonsoft.Json.JsonProperty("shop_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public virtual string ShopId { get; set; } = default!; + + /// + /// 获取或设置事件时间戳。 + /// + [Newtonsoft.Json.JsonProperty("timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("timestamp")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public virtual long Timestamp { get; set; } + + /// + /// 获取或设置通知 ID。 + /// + [Newtonsoft.Json.JsonProperty("tts_notification_id")] + [System.Text.Json.Serialization.JsonPropertyName("tts_notification_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public virtual string? NotificationId { get; set; } + } + + /// + /// 表示 TikTok Shop API Webhook 事件的泛型基类。 + /// + [Newtonsoft.Json.JsonObject] + public class TikTokShopEvent : TikTokShopEvent, ICommonWebhookEvent + { + /// + /// 获取或设置事件携带数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public TData Data { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/CancellationStatusChangeEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/CancellationStatusChangeEvent.json new file mode 100644 index 00000000..c9c61c58 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/CancellationStatusChangeEvent.json @@ -0,0 +1,12 @@ +{ + "type": 11, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "order_id": "576486316948490001", + "cancellations_role": "BUYER", + "cancel_status": "CANCELLATION_REQUEST_PENDING", + "cancel_id": "4035318504086604100", + "create_time": 1627587600 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/OrderStatusChangeEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/OrderStatusChangeEvent.json new file mode 100644 index 00000000..0bf47f15 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/OrderStatusChangeEvent.json @@ -0,0 +1,11 @@ +{ + "type": 1, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "order_id": "576486316948490001", + "order_status": "UNPAID", + "is_on_hold_order": false, + "update_time": 1644412885 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/PackageUpdateEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/PackageUpdateEvent.json new file mode 100644 index 00000000..91438d65 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/PackageUpdateEvent.json @@ -0,0 +1,19 @@ +{ + "type": 4, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "sc_type": "COMBINE", + "role_type": "ROLE_USER", + "package_list": [ + { + "package_id": "123456", + "order_id_list": [ + "152523", + "532123" + ] + } + ], + "update_time": 1644412885 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductCreationEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductCreationEvent.json new file mode 100644 index 00000000..552d0c5d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductCreationEvent.json @@ -0,0 +1,11 @@ +{ + "type": 16, + "tts_notification_id": "7327112393057371910", + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "product_id": "576486316948490000", + "product_type": [ "GPR_PRODUCT" ], + "update_time": 1644412885 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductInformationChangeEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductInformationChangeEvent.json new file mode 100644 index 00000000..22f7c6aa --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductInformationChangeEvent.json @@ -0,0 +1,16 @@ +{ + "type": 15, + "tts_notification_id": "7327112393057371910", + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "product_id": "123456789", + "changed_fields": [ + "title", + "description", + "main_images", + "product_attributes" + ], + "update_time": 1627587600 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductStatusChangeEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductStatusChangeEvent.json new file mode 100644 index 00000000..0ca04dd6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ProductStatusChangeEvent.json @@ -0,0 +1,11 @@ +{ + "type": 5, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "product_id": 576486316948490000, + "status": "PRODUCT_FIRST_PASS_REVIEW", + "suspended_reason": "", + "update_time": 1644412885 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/RecipientAddressUpdateEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/RecipientAddressUpdateEvent.json new file mode 100644 index 00000000..25488ea8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/RecipientAddressUpdateEvent.json @@ -0,0 +1,9 @@ +{ + "type": 3, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "order_id": "576486316948490001", + "update_time": 1644412885 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ReturnStatusChangeEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ReturnStatusChangeEvent.json new file mode 100644 index 00000000..66088b01 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/ReturnStatusChangeEvent.json @@ -0,0 +1,14 @@ +{ + "type": 12, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "order_id": "576486316948490001", + "return_role": "BUYER", + "return_type": "REFUND", + "return_status": "RETURN_OR_REFUND_REQUEST_PENDING", + "return_id": "576486316948490001", + "create_time": 1627587600, + "update_time": 1644412885 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/SellerDeauthorizationEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/SellerDeauthorizationEvent.json new file mode 100644 index 00000000..a4c4ada3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/SellerDeauthorizationEvent.json @@ -0,0 +1,8 @@ +{ + "type": 6, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "message": "Shop_id {xxx} is deauthorized from your APP by merchant." + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/UpcomingAuthorizationExpirationEvent.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/UpcomingAuthorizationExpirationEvent.json new file mode 100644 index 00000000..36e6f112 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/EventSamples/_/UpcomingAuthorizationExpirationEvent.json @@ -0,0 +1,9 @@ +{ + "type": 7, + "shop_id": "7494049642642441621", + "timestamp": 1644412885, + "data": { + "message": "Authorization of shop_id {xxx} is expirating in {x} days. Please direct the merchant to re-authorize.", + "expiration_time": "1627587506" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs index 208df410..702284d4 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/IMPORTANT_CodeAnalyzeTests.cs @@ -33,10 +33,12 @@ private void CodeAnalyze_BaseSDK() SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events", IgnoreExecutingExtensionTypes = static type => type.Namespace!.Contains(".ExtendedSDK."), ThrowOnNotFoundRequestModelTypes = true, ThrowOnNotFoundResponseModelTypes = true, - ThrowOnNotFoundExecutingExtensionTypes = true + ThrowOnNotFoundExecutingExtensionTypes = true, + ThrowOnNotFoundWebhookEventTypes = true }; new TypeDeclarationAnalyzer(options).AssertNoIssues(); })); @@ -51,16 +53,19 @@ private void CodeAnalyze_BaseSDK() SdkAssembly = Assembly.GetAssembly(typeof(TikTokShopClient))!, SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events", ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/"), ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/"), ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/_/", ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/_/", - ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/_/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/_/", ThrowOnNotFoundRequestModelClassCodeFiles = true, ThrowOnNotFoundResponseModelClassCodeFiles = true, ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundWebhookEventClassCodeFiles = true, ThrowOnNotFoundRequestModelSerializationSampleFiles = true, - ThrowOnNotFoundResponseModelSerializationSampleFiles = true + ThrowOnNotFoundResponseModelSerializationSampleFiles = true, + ThrowOnNotFoundWebhookEventSerializationSampleFiles = true }; new SourceFileAnalyzer(options).AssertNoIssues(); })); @@ -100,6 +105,7 @@ private void CodeAnalyze_ExtendedSDK_Legacy() ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/"), ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/Legacy/", ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/Legacy/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/Legacy/", ThrowOnNotFoundRequestModelClassCodeFiles = true, ThrowOnNotFoundResponseModelClassCodeFiles = true, ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, From 12382848ccd57ec2b1eac18444a3d86848b5eef6 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Wed, 15 May 2024 09:52:11 +0800 Subject: [PATCH 14/15] =?UTF-8?q?feat(tiktokshop):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=89=88=E5=B1=A5=E7=BA=A6=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TikTokGlobalShop/Basic_ModelDefinition.md | 21 +- ...yChainSyncPackageFulfillmentDataRequest.cs | 2 +- ...kShopClientExecuteFulfillmentExtensions.cs | 479 ++++++++++++++++++ ...lfillmentGetOrderSplitAttributesRequest.cs | 15 + ...fillmentGetOrderSplitAttributesResponse.cs | 49 ++ .../FulfillmentGetOrderTrackingRequest.cs | 15 + .../FulfillmentGetOrderTrackingResponse.cs | 41 ++ ...lmentSearchOrderShippingServicesRequest.cs | 49 ++ ...mentSearchOrderShippingServicesResponse.cs | 130 +++++ .../Orders/FulfillmentSplitOrderRequest.cs | 44 ++ .../Orders/FulfillmentSplitOrderResponse.cs | 42 ++ .../FulfillmentUpdateOrderPackagesRequest.cs | 38 ++ .../FulfillmentUpdateOrderPackagesResponse.cs | 57 +++ ...lfillmentUpdateOrderShippingInfoRequest.cs | 29 ++ ...fillmentUpdateOrderShippingInfoResponse.cs | 15 + .../FulfillmentCombinePackageRequest.cs | 37 ++ .../FulfillmentCombinePackageResponse.cs | 86 ++++ ...fillmentSearchCombinablePackagesRequest.cs | 22 + ...illmentSearchCombinablePackagesResponse.cs | 56 ++ .../FulfillmentUncombinePackageRequest.cs | 17 + .../FulfillmentUncombinePackageResponse.cs | 28 + .../FulfillmentBatchShipPackagesRequest.cs | 62 +++ .../FulfillmentBatchShipPackagesResponse.cs | 61 +++ ...atchUpdatePackagesDeliveryStatusRequest.cs | 58 +++ ...tchUpdatePackagesDeliveryStatusResponse.cs | 61 +++ .../FulfillmentCreatePackageRequest.cs | 56 ++ .../FulfillmentCreatePackageResponse.cs | 138 +++++ .../FulfillmentGetPackageDetailRequest.cs | 15 + .../FulfillmentGetPackageDetailResponse.cs | 324 ++++++++++++ ...lmentGetPackageHandoverTimeSlotsRequest.cs | 15 + ...mentGetPackageHandoverTimeSlotsResponse.cs | 76 +++ ...lmentGetPackageShippingDocumentsRequest.cs | 15 + ...mentGetPackageShippingDocumentsResponse.cs | 21 + .../FulfillmentSearchPackagesRequest.cs | 57 +++ .../FulfillmentSearchPackagesResponse.cs | 112 ++++ .../Packages/FulfillmentShipPackageRequest.cs | 73 +++ .../FulfillmentShipPackageResponse.cs | 15 + ...illmentUpdatePackageShippingInfoRequest.cs | 29 ++ ...llmentUpdatePackageShippingInfoResponse.cs | 15 + .../Upload/FulfillmentUploadFileRequest.cs | 31 ++ .../Upload/FulfillmentUploadFileResponse.cs | 28 + .../Upload/FulfillmentUploadImageRequest.cs | 38 ++ .../Upload/FulfillmentUploadImageResponse.cs | 35 ++ .../ReturnRefundSearchCancellationsRequest.cs | 3 +- .../ReturnRefundSearchReturnsRequest.cs | 3 +- ...llmentGetOrderSplitAttributesResponse.json | 14 + .../FulfillmentGetOrderTrackingResponse.json | 13 + ...entSearchOrderShippingServicesRequest.json | 15 + ...ntSearchOrderShippingServicesResponse.json | 34 ++ .../Orders/FulfillmentSplitOrderRequest.json | 11 + .../Orders/FulfillmentSplitOrderResponse.json | 13 + ...FulfillmentUpdateOrderPackagesRequest.json | 7 + ...ulfillmentUpdateOrderPackagesResponse.json | 15 + ...illmentUpdateOrderShippingInfoRequest.json | 4 + .../FulfillmentCombinePackageRequest.json | 11 + .../FulfillmentCombinePackageResponse.json | 25 + ...lmentSearchCombinablePackagesResponse.json | 18 + .../FulfillmentUncombinePackageRequest.json | 5 + .../FulfillmentUncombinePackageResponse.json | 16 + .../FulfillmentBatchShipPackagesRequest.json | 16 + .../FulfillmentBatchShipPackagesResponse.json | 16 + ...chUpdatePackagesDeliveryStatusRequest.json | 11 + ...hUpdatePackagesDeliveryStatusResponse.json | 16 + .../FulfillmentCreatePackageRequest.json | 17 + .../FulfillmentCreatePackageResponse.json | 33 ++ .../FulfillmentGetPackageDetailResponse.json | 75 +++ ...ntGetPackageHandoverTimeSlotsResponse.json | 18 + ...ntGetPackageShippingDocumentsResponse.json | 8 + .../FulfillmentSearchPackagesRequest.json | 7 + .../FulfillmentSearchPackagesResponse.json | 36 ++ .../FulfillmentShipPackageRequest.json | 11 + ...lmentUpdatePackageShippingInfoRequest.json | 4 + .../Upload/FulfillmentUploadFileResponse.json | 9 + .../FulfillmentUploadImageResponse.json | 10 + 74 files changed, 3095 insertions(+), 6 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentShipPackageRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadFileResponse.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadImageResponse.json diff --git a/docs/TikTokGlobalShop/Basic_ModelDefinition.md b/docs/TikTokGlobalShop/Basic_ModelDefinition.md index d17d0b22..f2a1b933 100644 --- a/docs/TikTokGlobalShop/Basic_ModelDefinition.md +++ b/docs/TikTokGlobalShop/Basic_ModelDefinition.md @@ -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` diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs index 4480b151..70e611ae 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/ExtendedSDK/Legacy/Models/SupplyChain/SupplyChainSyncPackageFulfillmentDataRequest.cs @@ -162,7 +162,7 @@ public class SKU /// [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; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs new file mode 100644 index 00000000..8ec1ac11 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteFulfillmentExtensions.cs @@ -0,0 +1,479 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop +{ + public static class TikTokShopClientExecuteFulfillmentExtensions + { + #region Orders + /// + /// 异步调用 [GET] /fulfillment/{version}/orders/split_attributes 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentGetOrderSplitAttributesAsync(this TikTokShopClient client, Models.FulfillmentGetOrderSplitAttributesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", request.ApiVersion, "orders", "split_attributes"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /fulfillment/{version}/orders/{order_id}/tracking 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentGetOrderTrackingAsync(this TikTokShopClient client, Models.FulfillmentGetOrderTrackingRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", request.ApiVersion, "orders", request.OrderId, "tracking"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/orders/{order_id}/shipping_services/query 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentSearchOrderShippingServicesAsync(this TikTokShopClient client, Models.FulfillmentSearchOrderShippingServicesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "orders", request.OrderId, "shipping_services", "query"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/orders/{order_id}/split 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentSplitOrderAsync(this TikTokShopClient client, Models.FulfillmentSplitOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "orders", request.OrderId, "split"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/orders/{order_id}/packages 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentUpdateOrderPackagesAsync(this TikTokShopClient client, Models.FulfillmentUpdateOrderPackagesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "orders", request.OrderId, "packages"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/orders/{order_id}/shipping_info/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentUpdateOrderShippingInfoAsync(this TikTokShopClient client, Models.FulfillmentUpdateOrderShippingInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "orders", request.OrderId, "shipping_info", "update"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Packages + /// + /// 异步调用 [POST] /fulfillment/{version}/packages 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentCreatePackageAsync(this TikTokShopClient client, Models.FulfillmentCreatePackageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentSearchPackagesAsync(this TikTokShopClient client, Models.FulfillmentSearchPackagesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", "search") + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /fulfillment/{version}/packages/{package_id} 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentGetPackageDetailAsync(this TikTokShopClient client, Models.FulfillmentGetPackageDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", request.ApiVersion, "packages", request.PackageId); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /fulfillment/{version}/packages/{package_id}/shipping_documents 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentGetPackageShippingDocumentsAsync(this TikTokShopClient client, Models.FulfillmentGetPackageShippingDocumentsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", request.ApiVersion, "packages", request.PackageId, "shipping_documents"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /fulfillment/{version}/packages/{package_id}/handover_time_slots 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentGetPackageHandoverTimeSlotsAsync(this TikTokShopClient client, Models.FulfillmentGetPackageHandoverTimeSlotsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", request.ApiVersion, "packages", request.PackageId, "handover_time_slots"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/{package_id}/shipping_info/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentUpdatePackageShippingInfoAsync(this TikTokShopClient client, Models.FulfillmentUpdatePackageShippingInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", request.PackageId, "shipping_info", "update"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/{package_id}/ship 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentShipPackageAsync(this TikTokShopClient client, Models.FulfillmentShipPackageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", request.PackageId, "ship"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/ship 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentBatchShipPackagesAsync(this TikTokShopClient client, Models.FulfillmentBatchShipPackagesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", "ship"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/deliver 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentBatchUpdatePackagesDeliveryStatusAsync(this TikTokShopClient client, Models.FulfillmentBatchUpdatePackagesDeliveryStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", "deliver"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Package/Combine + /// + /// 异步调用 [GET] /fulfillment/{version}/combinable_packages/search 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentSearchCombinablePackagesAsync(this TikTokShopClient client, Models.FulfillmentSearchCombinablePackagesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "fulfillment", request.ApiVersion, "combinable_packages", "search") + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("page_token", request.PageToken); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/combine 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentCombinePackageAsync(this TikTokShopClient client, Models.FulfillmentCombinePackageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", "combine"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/packages/uncombine 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentUncombinePackageAsync(this TikTokShopClient client, Models.FulfillmentUncombinePackageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "packages", "uncombine"); + + return await client.SendFlurlRequesAsJsontAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion + + #region Upload + /// + /// 异步调用 [POST] /fulfillment/{version}/images/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentUploadImageAsync(this TikTokShopClient client, Models.FulfillmentUploadImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ImageFileName is null) + request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.ImageFileContentType is null) + request.ImageFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForImage(request.ImageFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "images", "upload"); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "data"); + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /fulfillment/{version}/files/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteFulfillmentUploadFileAsync(this TikTokShopClient client, Models.FulfillmentUploadFileRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.FileName is null) + request.FileName = Guid.NewGuid().ToString("N").ToLower() + ".pdf"; + + if (request.FileContentType is null) + request.FileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForFile(request.FileName) ?? "application/pdf"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "fulfillment", request.ApiVersion, "files", "upload"); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.FileName, fileBytes: request.FileBytes, fileContentType: request.FileContentType, formDataName: "data"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.FileName)), "name"); + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesRequest.cs new file mode 100644 index 00000000..13170b07 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/orders/split_attributes 接口的请求。 + /// + public class FulfillmentGetOrderSplitAttributesRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.cs new file mode 100644 index 00000000..6177fbcc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/orders/split_attributes 接口的响应。 + /// + public class FulfillmentGetOrderSplitAttributesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SplitAttribute + { + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置是否可分单。 + /// + [Newtonsoft.Json.JsonProperty("can_split")] + [System.Text.Json.Serialization.JsonPropertyName("can_split")] + public bool CanSplit { get; set; } + + /// + /// 获取或设置原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? Reason { get; set; } + } + } + + /// + /// 获取或设置拆分属性列表。 + /// + [Newtonsoft.Json.JsonProperty("split_attributes")] + [System.Text.Json.Serialization.JsonPropertyName("split_attributes")] + public Types.SplitAttribute[] SplitAttributeList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingRequest.cs new file mode 100644 index 00000000..e7c839b9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/orders/{order_id}/tracking 接口的请求。 + /// + public class FulfillmentGetOrderTrackingRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.cs new file mode 100644 index 00000000..c4a12e34 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/orders/{order_id}/tracking 接口的响应。 + /// + public class FulfillmentGetOrderTrackingResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Tracking + { + /// + /// 获取或设置描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置更新时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_millis")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_millis")] + public long UpdateTimeMilliseconds { get; set; } + } + } + + /// + /// 获取或设置物流轨迹列表。 + /// + [Newtonsoft.Json.JsonProperty("tracking")] + [System.Text.Json.Serialization.JsonPropertyName("tracking")] + public Types.Tracking[] TrackingList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.cs new file mode 100644 index 00000000..c86aacce --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/shipping_services/query 接口的请求。 + /// + public class FulfillmentSearchOrderShippingServicesRequest : TikTokShopRequest + { + public static class Types + { + public class PackageDimension : FulfillmentCreatePackageRequest.Types.PackageDimension + { + } + + public class PackageWeight : FulfillmentCreatePackageRequest.Types.PackageWeight + { + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置包裹尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("dimension")] + [System.Text.Json.Serialization.JsonPropertyName("dimension")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包裹重量信息。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + public Types.PackageWeight? PackageWeight { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.cs new file mode 100644 index 00000000..ad531ce7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.cs @@ -0,0 +1,130 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/shipping_services/query 接口的响应。 + /// + public class FulfillmentSearchOrderShippingServicesResponse : TikTokShopResponse + { + 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 + { + /// + /// 获取或设置运输服务 ID。 + /// + [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!; + + /// + /// 获取或设置运输服务名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置价格。 + /// + [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; } + + /// + /// 获取或设置最小运输天数。 + /// + [Newtonsoft.Json.JsonProperty("earliest_delivery_days")] + [System.Text.Json.Serialization.JsonPropertyName("earliest_delivery_days")] + public int EarliestDeliveryDays { get; set; } + + /// + /// 获取或设置最大运输天数。 + /// + [Newtonsoft.Json.JsonProperty("latest_delivery_days")] + [System.Text.Json.Serialization.JsonPropertyName("latest_delivery_days")] + public int LatestDeliveryDays { get; set; } + + /// + /// 获取或设置是否为默认服务。 + /// + [Newtonsoft.Json.JsonProperty("is_default")] + [System.Text.Json.Serialization.JsonPropertyName("is_default")] + public bool IsDefault { get; set; } + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string? ShippingProviderId { get; set; } + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_name")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] + public string? ShippingProviderName { get; set; } + } + } + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_id")] + public string[]? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置包裹尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("dimension")] + [System.Text.Json.Serialization.JsonPropertyName("dimension")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包裹重量信息。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置运输服务列表。 + /// + [Newtonsoft.Json.JsonProperty("shipping_services")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_services")] + public Types.ShippingService[] ShippingServiceList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderRequest.cs new file mode 100644 index 00000000..d172ce64 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderRequest.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/split 接口的请求。 + /// + public class FulfillmentSplitOrderRequest : TikTokShopRequest + { + public static class Types + { + public class SplittableGroup + { + /// + /// 获取或设置分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string SplittableGroupId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList OrderLineItemIdList { get; set; } = new List(); + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置分组列表。 + /// + [Newtonsoft.Json.JsonProperty("splittable_groups")] + [System.Text.Json.Serialization.JsonPropertyName("splittable_groups")] + public IList SplittableGroupList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderResponse.cs new file mode 100644 index 00000000..e128fee2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentSplitOrderResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/split 接口的响应。 + /// + public class FulfillmentSplitOrderResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Package + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string PackageId { get; set; } = default!; + + /// + /// 获取或设置分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("splittable_group_id")] + [System.Text.Json.Serialization.JsonPropertyName("splittable_group_id")] + public string SplittableGroupId { get; set; } = default!; + } + } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public Types.Package[] PackageList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.cs new file mode 100644 index 00000000..de66041a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/packages 接口的请求。 + /// + public class FulfillmentUpdateOrderPackagesRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string TrackingNumber { get; set; } = string.Empty; + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string ShippingProviderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.cs new file mode 100644 index 00000000..3fd52f67 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.cs @@ -0,0 +1,57 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/packages 接口的响应。 + /// + public class FulfillmentUpdateOrderPackagesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Warning + { + /// + /// 获取或设置警告信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + } + } + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public string[]? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置包裹 ID。 + /// + [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; } = default!; + + /// + /// 获取或设置警告信息。 + /// + [Newtonsoft.Json.JsonProperty("warning")] + [System.Text.Json.Serialization.JsonPropertyName("warning")] + public Types.Warning? Warning { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.cs new file mode 100644 index 00000000..1a28c1b9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/shipping_info/update 接口的请求。 + /// + public class FulfillmentUpdateOrderShippingInfoRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string TrackingNumber { get; set; } = string.Empty; + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string ShippingProviderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoResponse.cs new file mode 100644 index 00000000..0e2b85a4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/orders/{order_id}/shipping_info/update 接口的响应。 + /// + public class FulfillmentUpdateOrderShippingInfoResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.cs new file mode 100644 index 00000000..07ea235c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/combine 接口的请求。 + /// + public class FulfillmentCombinePackageRequest : TikTokShopRequest + { + public static class Types + { + public class CombinablePackage + { + /// + /// 获取或设置可合并的包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string CombinablePackageId { get; set; } = string.Empty; + + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_ids")] + public IList? OrderIdList { get; set; } + } + } + + /// + /// 获取或设置可合并的包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("combinable_packages")] + [System.Text.Json.Serialization.JsonPropertyName("combinable_packages")] + public IList CombinablePackageList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.cs new file mode 100644 index 00000000..c3fddb4c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.cs @@ -0,0 +1,86 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/combine 接口的响应。 + /// + public class FulfillmentCombinePackageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Package + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string PackageId { get; set; } = default!; + + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_ids")] + public string[]? OrderIdList { get; set; } + } + + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置可合并的包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("package_id")] + [System.Text.Json.Serialization.JsonPropertyName("package_id")] + public string CombinablePackageId { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public Types.Package[] PackageList { get; set; } = default!; + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesRequest.cs new file mode 100644 index 00000000..cdfdfe82 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/combinable_packages/search 接口的请求。 + /// + public class FulfillmentSearchCombinablePackagesRequest : TikTokShopRequest + { + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? PageSize { get; set; } + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.cs new file mode 100644 index 00000000..fda7a378 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.cs @@ -0,0 +1,56 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/combinable_packages/search 接口的响应。 + /// + public class FulfillmentSearchCombinablePackagesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class CombinablePackage + { + /// + /// 获取或设置可合并的包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string CombinablePackageId { get; set; } = default!; + + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_ids")] + public string[] OrderIdList { get; set; } = default!; + } + } + + /// + /// 获取或设置可合并的包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("combinable_packages")] + [System.Text.Json.Serialization.JsonPropertyName("combinable_packages")] + public Types.CombinablePackage[] CombinablePackageList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.cs new file mode 100644 index 00000000..ccee79d8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/uncombine 接口的请求。 + /// + public class FulfillmentUncombinePackageRequest : TikTokShopRequest + { + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_ids")] + public IList? OrderIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.cs new file mode 100644 index 00000000..9e8e515b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/uncombine 接口的响应。 + /// + public class FulfillmentUncombinePackageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Package : FulfillmentCombinePackageResponse.Types.Data.Types.Package + { + } + } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public Types.Package[] PackageList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.cs new file mode 100644 index 00000000..13ec4fdc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.cs @@ -0,0 +1,62 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/ship 接口的请求。 + /// + public class FulfillmentBatchShipPackagesRequest : TikTokShopRequest + { + public static class Types + { + public class Package + { + public static class Types + { + public class TimeSlot : FulfillmentShipPackageRequest.Types.TimeSlot + { + } + + public class Shipment : FulfillmentShipPackageRequest.Types.Shipment + { + } + } + + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string PackageId { get; set; } = string.Empty; + + /// + /// 获取或设置交接方式。 + /// + [Newtonsoft.Json.JsonProperty("handover_method")] + [System.Text.Json.Serialization.JsonPropertyName("handover_method")] + public string? HandoverMethod { get; set; } + + /// + /// 获取或设置取件时间段信息。 + /// + [Newtonsoft.Json.JsonProperty("pickup_slot")] + [System.Text.Json.Serialization.JsonPropertyName("pickup_slot")] + public Types.TimeSlot? PickupTimeSlot { get; set; } + + /// + /// 获取或设置自行运输信息。 + /// + [Newtonsoft.Json.JsonProperty("self_shipment")] + [System.Text.Json.Serialization.JsonPropertyName("self_shipment")] + public Types.Shipment? Shipment { get; set; } + } + } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public IList PackageList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.cs new file mode 100644 index 00000000..11d625a6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.cs @@ -0,0 +1,61 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/ship 接口的响应。 + /// + public class FulfillmentBatchShipPackagesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("package_id")] + [System.Text.Json.Serialization.JsonPropertyName("package_id")] + public string PackageId { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.cs new file mode 100644 index 00000000..79fb7ed6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/deliver 接口的请求。 + /// + public class FulfillmentBatchUpdatePackagesDeliveryStatusRequest : TikTokShopRequest + { + public static class Types + { + public class Package + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string PackageId { get; set; } = string.Empty; + + /// + /// 获取或设置配送类型。 + /// + [Newtonsoft.Json.JsonProperty("delivery_type")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_type")] + public string DeliveryType { get; set; } = string.Empty; + + /// + /// 获取或设置失败原因。 + /// + [Newtonsoft.Json.JsonProperty("fail_delivery_reason")] + [System.Text.Json.Serialization.JsonPropertyName("fail_delivery_reason")] + public string? FailReason { get; set; } + + /// + /// 获取或设置文件类型。 + /// + [Newtonsoft.Json.JsonProperty("file_type")] + [System.Text.Json.Serialization.JsonPropertyName("file_type")] + public string? FileType { get; set; } + + /// + /// 获取或设置文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("file_url")] + [System.Text.Json.Serialization.JsonPropertyName("file_url")] + public string? FileUrl { get; set; } + } + } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public IList PackageList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.cs new file mode 100644 index 00000000..1d708580 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.cs @@ -0,0 +1,61 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/deliver 接口的响应。 + /// + public class FulfillmentBatchUpdatePackagesDeliveryStatusResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Error + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("package_id")] + [System.Text.Json.Serialization.JsonPropertyName("package_id")] + public string PackageId { get; set; } = default!; + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public int Code { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string Message { get; set; } = default!; + + /// + /// 获取或设置详细信息。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public Types.Detail Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置错误列表。 + /// + [Newtonsoft.Json.JsonProperty("errors")] + [System.Text.Json.Serialization.JsonPropertyName("errors")] + public Types.Error[]? ErrorList { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageRequest.cs new file mode 100644 index 00000000..69eba2fe --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageRequest.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages 接口的请求。 + /// + public class FulfillmentCreatePackageRequest : TikTokShopRequest + { + public static class Types + { + public class PackageDimension : ProductCreateProductRequest.Types.PackageDimension + { + } + + public class PackageWeight : ProductCreateProductRequest.Types.PackageWeight + { + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public IList? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置运输服务 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_service_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_service_id")] + public string? ShippingServiceId { get; set; } + + /// + /// 获取或设置包裹尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("dimension")] + [System.Text.Json.Serialization.JsonPropertyName("dimension")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包裹重量信息。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + public Types.PackageWeight? PackageWeight { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageResponse.cs new file mode 100644 index 00000000..26f682b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentCreatePackageResponse.cs @@ -0,0 +1,138 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages 接口的响应。 + /// + public class FulfillmentCreatePackageResponse : TikTokShopResponse + { + 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 + { + /// + /// 获取或设置运输服务 ID。 + /// + [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!; + + /// + /// 获取或设置运输服务名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置币种。 + /// + [Newtonsoft.Json.JsonProperty("currency")] + [System.Text.Json.Serialization.JsonPropertyName("currency")] + public string Currency { get; set; } = default!; + + /// + /// 获取或设置价格。 + /// + [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; } + + /// + /// 获取或设置最小运输天数。 + /// + [Newtonsoft.Json.JsonProperty("earliest_delivery_days")] + [System.Text.Json.Serialization.JsonPropertyName("earliest_delivery_days")] + public int EarliestDeliveryDays { get; set; } + + /// + /// 获取或设置最大运输天数。 + /// + [Newtonsoft.Json.JsonProperty("latest_delivery_days")] + [System.Text.Json.Serialization.JsonPropertyName("latest_delivery_days")] + public int LatestDeliveryDays { get; set; } + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string? ShippingProviderId { get; set; } + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_name")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] + public string? ShippingProviderName { get; set; } + } + } + + /// + /// 获取或设置包裹 ID。 + /// + [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; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public string[]? OrderLineItemIdList { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置运输服务信息。 + /// + [Newtonsoft.Json.JsonProperty("shipping_service_info")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_service_info")] + public Types.ShippingService? ShippingService { get; set; } + + /// + /// 获取或设置包裹尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("dimension")] + [System.Text.Json.Serialization.JsonPropertyName("dimension")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包裹重量信息。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + public Types.PackageWeight? PackageWeight { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailRequest.cs new file mode 100644 index 00000000..d8a33a82 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/packages/{package_id} 接口的请求。 + /// + public class FulfillmentGetPackageDetailRequest : TikTokShopRequest + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PackageId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.cs new file mode 100644 index 00000000..e521b36c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.cs @@ -0,0 +1,324 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/packages/{package_id} 接口的响应。 + /// + public class FulfillmentGetPackageDetailResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class PackageDimension : ProductGetProductDetailResponse.Types.Data.Types.PackageDimension + { + } + + public class PackageWeight : ProductGetProductDetailResponse.Types.Data.Types.PackageWeight + { + } + + public class Order + { + public static class Types + { + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string SKUId { get; set; } = default!; + + /// + /// 获取或设置 SKU 名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("image_url")] + [System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string ImageUrl { get; set; } = default!; + + /// + /// 获取或设置数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + + public class TimeSlot + { + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } + + public class Address + { + /// + /// 获取或设置完整地址。 + /// + [Newtonsoft.Json.JsonProperty("full_address")] + [System.Text.Json.Serialization.JsonPropertyName("full_address")] + public string FullAddress { get; set; } = default!; + + /// + /// 获取或设置地区编码。 + /// + [Newtonsoft.Json.JsonProperty("region_code")] + [System.Text.Json.Serialization.JsonPropertyName("region_code")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置电话号码。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string PhoneNumber { get; set; } = default!; + + /// + /// 获取或设置联系人姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string ContactName { get; set; } = default!; + + /// + /// 获取或设置邮编。 + /// + [Newtonsoft.Json.JsonProperty("postal_code")] + [System.Text.Json.Serialization.JsonPropertyName("postal_code")] + public string PostalCode { get; set; } = default!; + + /// + /// 获取或设置详细地址。 + /// + [Newtonsoft.Json.JsonProperty("address_detail")] + [System.Text.Json.Serialization.JsonPropertyName("address_detail")] + public string AddressDetail { get; set; } = default!; + + /// + /// 获取或设置地址行 1。 + /// + [Newtonsoft.Json.JsonProperty("address_line1")] + [System.Text.Json.Serialization.JsonPropertyName("address_line1")] + public string? AddressLine1 { get; set; } + + /// + /// 获取或设置地址行 2。 + /// + [Newtonsoft.Json.JsonProperty("address_line2")] + [System.Text.Json.Serialization.JsonPropertyName("address_line2")] + public string? AddressLine2 { get; set; } + + /// + /// 获取或设置地址行 3。 + /// + [Newtonsoft.Json.JsonProperty("address_line3")] + [System.Text.Json.Serialization.JsonPropertyName("address_line3")] + public string? AddressLine3 { get; set; } + + /// + /// 获取或设置地址行 4。 + /// + [Newtonsoft.Json.JsonProperty("address_line4")] + [System.Text.Json.Serialization.JsonPropertyName("address_line4")] + public string? AddressLine4 { get; set; } + } + } + + /// + /// 获取或设置包裹 ID。 + /// + [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; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [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!; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public string[]? OrderLineItemIdList { get; set; } = default!; + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("orders")] + [System.Text.Json.Serialization.JsonPropertyName("orders")] + public Types.Order[]? OrderList { get; set; } + + /// + /// 获取或设置包裹。 + /// + [Newtonsoft.Json.JsonProperty("package_status")] + [System.Text.Json.Serialization.JsonPropertyName("package_status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置分合单标记。 + /// + [Newtonsoft.Json.JsonProperty("split_and_combine_tag")] + [System.Text.Json.Serialization.JsonPropertyName("split_and_combine_tag")] + public string SplitAndCombineTag { get; set; } = default!; + + /// + /// 获取或设置备注标记。 + /// + [Newtonsoft.Json.JsonProperty("note_tag")] + [System.Text.Json.Serialization.JsonPropertyName("note_tag")] + public string NoteTag { get; set; } = default!; + + /// + /// 获取或设置是否包含多个 SKU。 + /// + [Newtonsoft.Json.JsonProperty("has_multi_skus")] + [System.Text.Json.Serialization.JsonPropertyName("has_multi_skus")] + public bool HasMultipleSKU { get; set; } + + /// + /// 获取或设置运输类型。 + /// + [Newtonsoft.Json.JsonProperty("shipping_type")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_type")] + public string ShippingType { get; set; } = default!; + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string? ShippingProviderId { get; set; } + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_name")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] + public string? ShippingProviderName { get; set; } + + /// + /// 获取或设置配送方式 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_id")] + public string? DeliveryOptionId { get; set; } + + /// + /// 获取或设置配送方式名称。 + /// + [Newtonsoft.Json.JsonProperty("delivery_option_name")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_option_name")] + public string? DeliveryOptionName { get; set; } + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string? TrackingNumber { get; set; } + + /// + /// 获取或设置交接方式。 + /// + [Newtonsoft.Json.JsonProperty("handover_method")] + [System.Text.Json.Serialization.JsonPropertyName("handover_method")] + public string? HandoverNethod { get; set; } + + /// + /// 获取或设置包裹尺寸信息。 + /// + [Newtonsoft.Json.JsonProperty("dimension")] + [System.Text.Json.Serialization.JsonPropertyName("dimension")] + public Types.PackageDimension? PackageDimension { get; set; } + + /// + /// 获取或设置包裹重量信息。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + public Types.PackageWeight? PackageWeight { get; set; } + + /// + /// 获取或设置取件时间段信息。 + /// + [Newtonsoft.Json.JsonProperty("pickup_slot")] + [System.Text.Json.Serialization.JsonPropertyName("pickup_slot")] + public Types.TimeSlot? PickupTimeSlot { get; set; } + + /// + /// 获取或设置寄件人地址信息。 + /// + [Newtonsoft.Json.JsonProperty("sender_address")] + [System.Text.Json.Serialization.JsonPropertyName("sender_address")] + public Types.Address? SenderAddress { get; set; } + + /// + /// 获取或设置收件人地址信息。 + /// + [Newtonsoft.Json.JsonProperty("recipient_address")] + [System.Text.Json.Serialization.JsonPropertyName("recipient_address")] + public Types.Address? RecipientAddress { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsRequest.cs new file mode 100644 index 00000000..1c29ad5a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/packages/{package_id}/handover_time_slots 接口的请求。 + /// + public class FulfillmentGetPackageHandoverTimeSlotsRequest : TikTokShopRequest + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PackageId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.cs new file mode 100644 index 00000000..19abaf36 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.cs @@ -0,0 +1,76 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/packages/{package_id}/handover_time_slots 接口的响应。 + /// + public class FulfillmentGetPackageHandoverTimeSlotsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TimeSlot + { + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置是否可用。 + /// + [Newtonsoft.Json.JsonProperty("avaliable")] + [System.Text.Json.Serialization.JsonPropertyName("avaliable")] + public bool IsAvaliable { get; set; } + } + } + + /// + /// 获取或设置是否可上门取件。 + /// + [Newtonsoft.Json.JsonProperty("can_pickup")] + [System.Text.Json.Serialization.JsonPropertyName("can_pickup")] + public bool CanPickup { get; set; } + + /// + /// 获取或设置是否可门店寄送。 + /// + [Newtonsoft.Json.JsonProperty("can_drop_off")] + [System.Text.Json.Serialization.JsonPropertyName("can_drop_off")] + public bool CanDropOff { get; set; } + + /// + /// 获取或设置是否可货车取件。 + /// + [Newtonsoft.Json.JsonProperty("can_van_collection")] + [System.Text.Json.Serialization.JsonPropertyName("can_van_collection")] + public bool CanVanCollection { get; set; } + + /// + /// 获取或设置寄送门店定位 URL。 + /// + [Newtonsoft.Json.JsonProperty("drop_off_point_url")] + [System.Text.Json.Serialization.JsonPropertyName("drop_off_point_url")] + public string? DropOffPointUrl { get; set; } + + /// + /// 获取或设置时间段列表。 + /// + [Newtonsoft.Json.JsonProperty("pickup_slots")] + [System.Text.Json.Serialization.JsonPropertyName("pickup_slots")] + public Types.TimeSlot[] TimeSlotList { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsRequest.cs new file mode 100644 index 00000000..b7ab5867 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/packages/{package_id}/shipping_documents 接口的请求。 + /// + public class FulfillmentGetPackageShippingDocumentsRequest : TikTokShopRequest + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PackageId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.cs new file mode 100644 index 00000000..1f01ff20 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.cs @@ -0,0 +1,21 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [GET] /fulfillment/{version}/packages/{package_id}/shipping_documents 接口的响应。 + /// + public class FulfillmentGetPackageShippingDocumentsResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("doc_url")] + [System.Text.Json.Serialization.JsonPropertyName("doc_url")] + public string DocumentUrl { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesRequest.cs new file mode 100644 index 00000000..6330f411 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesRequest.cs @@ -0,0 +1,57 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/search 接口的请求。 + /// + public class FulfillmentSearchPackagesRequest : TikTokShopRequest + { + /// + /// 获取或设置创建时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_ge")] + public long? CreateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置创建时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_lt")] + public long? CreateTimestampLessThan { get; set; } + + /// + /// 获取或设置更新时间范围起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_ge")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_ge")] + public long? UpdateTimestampGreaterThan { get; set; } + + /// + /// 获取或设置更新时间范围截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time_lt")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_lt")] + public long? UpdateTimestampLessThan { get; set; } + + /// + /// 获取或设置包裹状态。 + /// + [Newtonsoft.Json.JsonProperty("package_status")] + [System.Text.Json.Serialization.JsonPropertyName("package_status")] + public string? PackageStatus { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? PageSize { get; set; } + + /// + /// 获取或设置分页令牌。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? PageToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesResponse.cs new file mode 100644 index 00000000..e35674bc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentSearchPackagesResponse.cs @@ -0,0 +1,112 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/search 接口的响应。 + /// + public class FulfillmentSearchPackagesResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Package + { + public static class Types + { + public class Order : FulfillmentGetPackageDetailResponse.Types.Data.Types.Order + { + } + } + + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string PackageId { get; set; } = default!; + + /// + /// 获取或设置订单行 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_line_item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")] + public string[]? OrderLineItemIdList { get; set; } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("orders")] + [System.Text.Json.Serialization.JsonPropertyName("orders")] + public Types.Order[]? OrderList { get; set; } + + /// + /// 获取或设置包裹状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string? TrackingNumber { get; set; } + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string? ShippingProviderId { get; set; } + + /// + /// 获取或设置运输服务商名称。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_name")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")] + public string? ShippingProviderName { get; set; } + } + } + + /// + /// 获取或设置包裹列表。 + /// + [Newtonsoft.Json.JsonProperty("packages")] + [System.Text.Json.Serialization.JsonPropertyName("packages")] + public Types.Package[] PackageList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置下一页分页令牌。 + /// + [Newtonsoft.Json.JsonProperty("next_page_token")] + [System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageRequest.cs new file mode 100644 index 00000000..0c7f0edf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageRequest.cs @@ -0,0 +1,73 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/{package_id}/ship 接口的请求。 + /// + public class FulfillmentShipPackageRequest : TikTokShopRequest + { + public static class Types + { + public class TimeSlot + { + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long? StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long? EndTimestamp { get; set; } + } + + public class Shipment + { + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string TrackingNumber { get; set; } = string.Empty; + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string ShippingProviderId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PackageId { get; set; } = string.Empty; + + /// + /// 获取或设置交接方式。 + /// + [Newtonsoft.Json.JsonProperty("handover_method")] + [System.Text.Json.Serialization.JsonPropertyName("handover_method")] + public string? HandoverMethod { get; set; } + + /// + /// 获取或设置取件时间段信息。 + /// + [Newtonsoft.Json.JsonProperty("pickup_slot")] + [System.Text.Json.Serialization.JsonPropertyName("pickup_slot")] + public Types.TimeSlot? PickupTimeSlot { get; set; } + + /// + /// 获取或设置自行运输信息。 + /// + [Newtonsoft.Json.JsonProperty("self_shipment")] + [System.Text.Json.Serialization.JsonPropertyName("self_shipment")] + public Types.Shipment? Shipment { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageResponse.cs new file mode 100644 index 00000000..1df51e6c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentShipPackageResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/{package_id}/ship 接口的响应。 + /// + public class FulfillmentShipPackageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.cs new file mode 100644 index 00000000..7fecc689 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/{package_id}/shipping_info/update 接口的请求。 + /// + public class FulfillmentUpdatePackageShippingInfoRequest : TikTokShopRequest + { + /// + /// 获取或设置包裹 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PackageId { get; set; } = string.Empty; + + /// + /// 获取或设置物流单号。 + /// + [Newtonsoft.Json.JsonProperty("tracking_number")] + [System.Text.Json.Serialization.JsonPropertyName("tracking_number")] + public string TrackingNumber { get; set; } = string.Empty; + + /// + /// 获取或设置运输服务商 ID。 + /// + [Newtonsoft.Json.JsonProperty("shipping_provider_id")] + [System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")] + public string ShippingProviderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoResponse.cs new file mode 100644 index 00000000..04aa9ee1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/packages/{package_id}/shipping_info/update 接口的响应。 + /// + public class FulfillmentUpdatePackageShippingInfoResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs new file mode 100644 index 00000000..e211ba05 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileRequest.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/files/upload 接口的请求。 + /// + public class FulfillmentUploadFileRequest : TikTokShopRequest + { + /// + /// 获取或设置文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] FileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileName { get; set; } + + /// + /// 获取或设置文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs new file mode 100644 index 00000000..3612dadb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadFileResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/files/upload 接口的响应。 + /// + public class FulfillmentUploadFileResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置文件名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs new file mode 100644 index 00000000..73c549d3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageRequest.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/images/upload 接口的请求。 + /// + public class FulfillmentUploadImageRequest : TikTokShopRequest + { + /// + /// 获取或设置图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] ImageFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileName { get; set; } + + /// + /// 获取或设置图片文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileContentType { get; set; } + + /// + /// 获取或设置使用场景。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? UseCase { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs new file mode 100644 index 00000000..4e33d676 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Fulfillment/Upload/FulfillmentUploadImageResponse.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models +{ + /// + /// 表示 [POST] /fulfillment/{version}/images/upload 接口的响应。 + /// + public class FulfillmentUploadImageResponse : TikTokShopResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置图片宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int Width { get; set; } + + /// + /// 获取或设置图片高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("height")] + [System.Text.Json.Serialization.JsonPropertyName("height")] + public int Height { get; set; } + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs index 700ddfea..5ab1530f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Cancellations/ReturnRefundSearchCancellationsRequest.cs @@ -79,11 +79,10 @@ public class ReturnRefundSearchCancellationsRequest : TikTokShopRequest /// /// 获取或设置分页每页数量。 - /// 默认值:10 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int PageSize { get; set; } = 10; + public int? PageSize { get; set; } /// /// 获取或设置分页令牌。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs index af16233a..be8ac005 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/ReturnRefund/Returns/ReturnRefundSearchReturnsRequest.cs @@ -86,11 +86,10 @@ public class ReturnRefundSearchReturnsRequest : TikTokShopRequest /// /// 获取或设置分页每页数量。 - /// 默认值:10 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int PageSize { get; set; } = 10; + public int? PageSize { get; set; } /// /// 获取或设置分页令牌。 diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.json new file mode 100644 index 00000000..40dcc14e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderSplitAttributesResponse.json @@ -0,0 +1,14 @@ +{ + "code": 0, + "data": { + "split_attributes": [ + { + "can_split": false, + "order_id": "556643423444", + "reason": "Order has been canceled" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.json new file mode 100644 index 00000000..61a15fa0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentGetOrderTrackingResponse.json @@ -0,0 +1,13 @@ +{ + "code": 0, + "data": { + "tracking": [ + { + "description": "Your package was delivered!\n", + "update_time_millis": 1694685539000 + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.json new file mode 100644 index 00000000..5912fb55 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesRequest.json @@ -0,0 +1,15 @@ +{ + "dimension": { + "height": "0.5", + "length": "0.3", + "unit": "INCH", + "width": "0.2" + }, + "order_line_item_ids": [ + "32132124331234" + ], + "weight": { + "unit": "GRAM", + "value": "0.4" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.json new file mode 100644 index 00000000..52e3414d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSearchOrderShippingServicesResponse.json @@ -0,0 +1,34 @@ +{ + "code": 0, + "data": { + "dimension": { + "height": "0.04", + "length": "0.3", + "unit": "INCH", + "width": "0.2" + }, + "order_id": "28823355942588", + "order_line_id": [ + "32132124331234" + ], + "shipping_services": [ + { + "currency": "USD", + "earliest_delivery_days": 3, + "id": "288233559123860015", + "is_default": false, + "latest_delivery_days": 5, + "name": "UPS-first class", + "price": "5", + "shipping_provider_id": "288233559123860012", + "shipping_provider_name": "UPS" + } + ], + "weight": { + "unit": "GRAM", + "value": "1.2" + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderRequest.json new file mode 100644 index 00000000..6343aa69 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderRequest.json @@ -0,0 +1,11 @@ +{ + "splittable_groups": [ + { + "id": "123", + "order_line_item_ids": [ + "57646237751283022", + "576462377512830223" + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderResponse.json new file mode 100644 index 00000000..36ede6b7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentSplitOrderResponse.json @@ -0,0 +1,13 @@ +{ + "code": 0, + "data": { + "packages": [ + { + "id": "223362377512830222", + "splittable_group_id": "123" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.json new file mode 100644 index 00000000..5b4cdd97 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesRequest.json @@ -0,0 +1,7 @@ +{ + "order_line_item_ids": [ + "2321312321311" + ], + "shipping_provider_id": "12312312321323432", + "tracking_number": "6617675021119438849" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.json new file mode 100644 index 00000000..33020beb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderPackagesResponse.json @@ -0,0 +1,15 @@ +{ + "code": 0, + "data": { + "order_id": "32131324123321", + "order_line_item_ids": [ + "31322412312312" + ], + "package_id": "32141235124234", + "warning": { + "message": "match more than one provider" + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.json new file mode 100644 index 00000000..b1aa3016 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Orders/FulfillmentUpdateOrderShippingInfoRequest.json @@ -0,0 +1,4 @@ +{ + "shipping_provider_id": "6965352555291346690", + "tracking_number": "576460868968549926" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.json new file mode 100644 index 00000000..348a1939 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageRequest.json @@ -0,0 +1,11 @@ +{ + "combinable_packages": [ + { + "id": "12321313133", + "order_ids": [ + "1233213123123", + "32132131231" + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.json new file mode 100644 index 00000000..31cf522c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentCombinePackageResponse.json @@ -0,0 +1,25 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 10007014, + "detail": { + "package_id": "1231231231231313123132" + }, + "message": "fulfillment not allow combine package" + } + ], + "packages": [ + { + "id": "413234134123412", + "order_ids": [ + "1233213123123", + "32132131231" + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.json new file mode 100644 index 00000000..64526ee3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentSearchCombinablePackagesResponse.json @@ -0,0 +1,18 @@ +{ + "code": 0, + "data": { + "combinable_packages": [ + { + "id": "57466538837665", + "order_ids": [ + "57466538837665", + "57466538837666" + ] + } + ], + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA", + "total_count": 10 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.json new file mode 100644 index 00000000..975e49dc --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageRequest.json @@ -0,0 +1,5 @@ +{ + "order_ids": [ + "11132131131" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.json new file mode 100644 index 00000000..984ff9af --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/Combine/FulfillmentUncombinePackageResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "packages": [ + { + "id": "123456", + "order_ids": [ + "576462377512830168", + "576462377512830168" + ] + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.json new file mode 100644 index 00000000..497ceb98 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesRequest.json @@ -0,0 +1,16 @@ +{ + "packages": [ + { + "handover_method": "PICKUP", + "id": "12321312312431", + "pickup_slot": { + "end_time": 1623812664, + "start_time": 1623812664 + }, + "self_shipment": { + "shipping_provider_id": "6617675021119438849", + "tracking_number": "JX12345" + } + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.json new file mode 100644 index 00000000..3632834f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchShipPackagesResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 10007014, + "detail": { + "package_id": "123123123123131" + }, + "message": "package in freeze status" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.json new file mode 100644 index 00000000..9dfdc361 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusRequest.json @@ -0,0 +1,11 @@ +{ + "packages": [ + { + "delivery_type": "DELIVERY_SUCCESS", + "fail_delivery_reason": "INVALID_ADDRESS", + "file_type": "IMG", + "file_url": "https://tiktok.shopcenter.cn/file/CWvBsBZ9mhbMiHtmbZecKshon6f?table=tblTW", + "id": "11529598723402" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.json new file mode 100644 index 00000000..f6d62fa0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentBatchUpdatePackagesDeliveryStatusResponse.json @@ -0,0 +1,16 @@ +{ + "code": 0, + "data": { + "errors": [ + { + "code": 10007014, + "detail": { + "package_id": "1231231231231" + }, + "message": "order not in sof service" + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageRequest.json new file mode 100644 index 00000000..0816c7c1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageRequest.json @@ -0,0 +1,17 @@ +{ + "dimension": { + "height": "0.03", + "length": "1.2", + "unit": "CM", + "width": "0.2" + }, + "order_id": "2882335594258860015", + "order_line_item_ids": [ + "32132124331234" + ], + "shipping_service_id": "288233559123860015", + "weight": { + "unit": "GRAM", + "value": "1.2" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageResponse.json new file mode 100644 index 00000000..a18bfd29 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentCreatePackageResponse.json @@ -0,0 +1,33 @@ +{ + "code": 0, + "data": { + "create_time": 1623812664, + "dimension": { + "height": "0.03", + "length": "1.2", + "unit": "CM", + "width": "0.2" + }, + "order_id": "2882335594258860015", + "order_line_item_ids": [ + "32132124331234" + ], + "package_id": "2882335594258860015", + "shipping_service_info": { + "currency": "dollar", + "earliest_delivery_days": 3, + "id": "288233559123860015", + "latest_delivery_days": 5, + "name": "UPS-first class", + "price": "10", + "shipping_provider_id": "2882322591238", + "shipping_provider_name": "UPS" + }, + "weight": { + "unit": "GRAM", + "value": "1.2" + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.json new file mode 100644 index 00000000..c0d3cd8c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageDetailResponse.json @@ -0,0 +1,75 @@ +{ + "code": 0, + "data": { + "create_time": 1635338186, + "delivery_option_id": "7091146663229654785", + "delivery_option_name": "Shipped from seller\n", + "dimension": { + "height": "0.03", + "length": "1.2", + "unit": "CM", + "width": "0.2" + }, + "handover_method": "PICKUP", + "has_multi_skus": true, + "note_tag": "BUYER_UNNOTED", + "order_line_item_ids": [ + "1729382476852921560" + ], + "orders": [ + { + "id": "54335448533296", + "skus": [ + { + "id": "2729382476852921560", + "image_url": "https://p19-oec-sg.ibyteimg.com/tos-maliva-i-o3syd03w52-us/12345670c", + "name": "white,128g", + "quantity": 5 + } + ] + } + ], + "package_id": "5433567853345", + "package_status": "PROCESSING", + "pickup_slot": { + "end_time": 1635338186, + "start_time": 1635338186 + }, + "recipient_address": { + "address_detail": "Unit one building 8\n", + "address_line1": "TikTok 5800 bristol Pkwy\n", + "address_line2": "Suite 100\n", + "address_line3": "\"\"", + "address_line4": "\"\"", + "full_address": "1*** Coleman Ave San Jose, CA 95110\n", + "name": "Zay", + "phone_number": "(+1)213-***-1234\n", + "postal_code": "95110\n", + "region_code": "US" + }, + "sender_address": { + "address_detail": "Unit one building 8", + "address_line1": "TikTok 5800 bristol Pkwy", + "address_line2": "Suite 100", + "address_line3": "\"\"", + "address_line4": "\"\"", + "full_address": "1*** Coleman Ave San Jose, CA 95110", + "name": "Zay", + "phone_number": "(+1)213-***-1234\n", + "postal_code": "95110", + "region_code": "US" + }, + "shipping_provider_id": "6617675021119438849", + "shipping_provider_name": "TT Virtual express", + "shipping_type": "TIKTOK", + "split_and_combine_tag": "SPLIT", + "tracking_number": "6617675021119438849", + "update_time": 1635338186, + "weight": { + "unit": "GRAM", + "value": "1.2" + } + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.json new file mode 100644 index 00000000..c3dfb985 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageHandoverTimeSlotsResponse.json @@ -0,0 +1,18 @@ +{ + "code": 0, + "data": { + "can_drop_off": true, + "can_pickup": true, + "can_van_collection": true, + "drop_off_point_url": "true", + "pickup_slots": [ + { + "avaliable": true, + "end_time": 1623812664, + "start_time": 1623812664 + } + ] + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.json new file mode 100644 index 00000000..a1628648 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentGetPackageShippingDocumentsResponse.json @@ -0,0 +1,8 @@ +{ + "code": 0, + "data": { + "doc_url": "https://magelng.bytedance.net2/wsos_v2/oec_fulfillment_doc_tts/object/wsos641232" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesRequest.json new file mode 100644 index 00000000..955d123f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesRequest.json @@ -0,0 +1,7 @@ +{ + "create_time_ge": 1623812664, + "create_time_lt": 1623812664, + "package_status": "PROCESSING", + "update_time_ge": 1623812664, + "update_time_lt": 1623812664 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesResponse.json new file mode 100644 index 00000000..b86bc396 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentSearchPackagesResponse.json @@ -0,0 +1,36 @@ +{ + "code": 0, + "data": { + "next_page_token": "6AsPQsUMvH3RkchNUPPh22NROHkE0D8pmq/N5M1kHYcZmtRyv9aVrNv65W7Q6tFA", + "packages": [ + { + "create_time": 1635338186, + "id": "577828281214600000", + "order_line_item_ids": [ + "1729382476852921560" + ], + "orders": [ + { + "id": "577828281214600000", + "skus": [ + { + "id": "577828281214883345", + "image_url": "https://p19-oec-sg.ibyteimg.com/tos-maliva-i-o3syd03w52-us/12345670", + "name": "white,128g", + "quantity": 5 + } + ] + } + ], + "shipping_provider_id": "6617675021119438849", + "shipping_provider_name": "TT Virtual express", + "status": "PROCESSING", + "tracking_number": "6617675021119438849", + "update_time": 1635338186 + } + ], + "total_count": 221 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentShipPackageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentShipPackageRequest.json new file mode 100644 index 00000000..29e1e40c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentShipPackageRequest.json @@ -0,0 +1,11 @@ +{ + "handover_method": "PICKUP", + "pickup_slot": { + "end_time": 1623812664, + "start_time": 1623812664 + }, + "self_shipment": { + "shipping_provider_id": "6617675021119438849", + "tracking_number": "JX12345" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.json new file mode 100644 index 00000000..b1aa3016 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Packages/FulfillmentUpdatePackageShippingInfoRequest.json @@ -0,0 +1,4 @@ +{ + "shipping_provider_id": "6965352555291346690", + "tracking_number": "576460868968549926" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadFileResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadFileResponse.json new file mode 100644 index 00000000..6e5cc0eb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadFileResponse.json @@ -0,0 +1,9 @@ +{ + "code": 0, + "data": { + "name": "attachment_file.pdf", + "url": "https://maellane.bytedance.net/wsos_v2/oec_fulfillment_doc_tts/o" + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadImageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadImageResponse.json new file mode 100644 index 00000000..2eca1332 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Fulfillment/Upload/FulfillmentUploadImageResponse.json @@ -0,0 +1,10 @@ +{ + "code": 0, + "data": { + "height": 256, + "url": "https://p-pbe38.byted.org/tos-ppdi18n-i-0euhj0x6u9/0a119a90d90b41e3838608bc384", + "width": 256 + }, + "message": "Success", + "request_id": "202203070749000101890810281E8C70B7" +} From ef19c19e6d12433ddb865db74cd0db0061c5f3cc Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Wed, 15 May 2024 11:10:46 +0800 Subject: [PATCH 15/15] feat(tiktokshop): bump version to v3.1.0 --- CHANGELOG.md | 8 ++++++++ ...SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.csproj | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9f6145a..11d6aeda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -323,6 +323,14 @@ [展开查看] +- Release 3.1.0 (2024-05-15) + + - **新增**:接入新版本 API(即 v202309 API)。 + + - **新增**:新增反序列化 Webhook 事件相关的工具方法。 + + - **变更**:独立化旧版本 API。 + - Release 3.0.0 (2024-03-04) - **新增**:新增获取商品库存列表接口。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.csproj b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.csproj index e174211f..195f85d4 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.csproj +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.csproj @@ -14,7 +14,7 @@ MIT https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance Flurl.Http ByteDance TikTok TikTokShop TikTokShopPartner TikTokShopOpenPlatform TikTokShopOpenAPI TTS TTSPartner TTSOpenPlatform TTSOpenAPI 字节 字节跳动 抖音国际版 抖音国际版电商 抖音跨境电商 抖音跨境电商开放平台 - 3.0.0 + 3.1.0 基于 Flurl.Http 的 TikTok Shop Open Platform API 客户端。 The TikTok Shop Open Platform API SDK for .NET. (Offical Website: https://partner.tiktokshop.com/)