From 01a16b442603f32f1ec7a0141eb090b4492c3875 Mon Sep 17 00:00:00 2001 From: Watson Zuo Date: Thu, 17 Apr 2025 13:57:46 +0800 Subject: [PATCH] support 2025-04 version --- README.md | 19 +- src/.DS_Store | Bin 6148 -> 0 bytes src/AfterShipTracking/.DS_Store | Bin 6148 -> 0 bytes src/AfterShipTracking/AfterShipTracking.sln | 40 +- .../AfterShipTracking.csproj | 8 +- .../AfterShipTracking/AftershipClient.cs | 8 +- .../AfterShipTracking/Exception/ErrorCode.cs | 2 +- ...itionalFieldsV1.cs => AdditionalFields.cs} | 22 +- .../AfterShipTracking/Models/Checkpoint.cs | 98 ++-- .../AfterShipTracking/Models/Courier.cs | 62 ++- .../Models/CourierConnection.cs | 46 ++ ...nectionResponseForGetCourierConnections.cs | 76 +++ ...ourierResponseV1.cs => CourierResponse.cs} | 22 +- .../Models/CreateTrackingRequest.cs | 201 ++++--- .../Models/CreateTrackingResponse.cs | 285 +++++----- .../Models/CredentialField.cs | 36 ++ .../DeleteCourierConnectionsByIdResponse.cs | 46 ++ .../Models/DeleteTrackingByIdResponse.cs | 285 +++++----- .../Models/DetectCourierRequest.cs | 56 +- .../Models/DetectCourierResponse.cs | 8 +- .../Models/EstimatedDeliveryDateRequest.cs | 102 ++-- .../Models/EstimatedDeliveryDateResponse.cs | 124 ++--- .../GetCourierConnectionsByIdResponse.cs | 46 ++ .../Models/GetCourierConnectionsResponse.cs | 91 +++ ...iersResponse.cs => GetCouriersResponse.cs} | 10 +- .../Models/GetTrackingByIdResponse.cs | 285 +++++----- .../Models/GetTrackingsResponse.cs | 42 +- .../Models/GetUserCouriersResponse.cs | 31 -- .../MarkTrackingCompletedByIdRequest.cs | 11 +- .../MarkTrackingCompletedByIdResponse.cs | 285 +++++----- .../Models/{MetaV1.cs => Meta.cs} | 16 +- .../Models/PostCourierConnectionsRequest.cs | 31 ++ .../Models/PostCourierConnectionsResponse.cs | 46 ++ .../Models/PredictBatchRequest.cs | 6 +- .../Models/PredictBatchResponse.cs | 6 +- .../Models/PredictRequest.cs | 102 ++-- .../Models/PredictResponse.cs | 78 +-- .../PutCourierConnectionsByIdRequest.cs | 26 + .../PutCourierConnectionsByIdResponse.cs | 46 ++ .../Models/RetrackTrackingByIdResponse.cs | 285 +++++----- .../Models/{SlugGroupV1.cs => SlugGroup.cs} | 2 +- .../Models/{TagV1.cs => Tag.cs} | 2 +- .../AfterShipTracking/Models/Tracking.cs | 517 +++++++++--------- ...ckingResponseV1.cs => TrackingResponse.cs} | 10 +- ....cs => TrackingResponseForGetTrackings.cs} | 40 +- .../Models/UpdateTrackingByIdRequest.cs | 166 +++--- .../Models/UpdateTrackingByIdResponse.cs | 285 +++++----- .../Properties/AssemblyInfo.cs | 2 +- .../Public/AfterShipConfiguration.cs | 18 +- .../Public/Base/BaseResourceService.cs | 2 +- .../AfterShipTracking/Public/Base/Meta.cs | 26 - .../Public/SystemNetHttpClient.cs | 11 +- .../RestAPI/Courier/CourierOption.cs | 24 +- .../RestAPI/Courier/CourierService.cs | 22 +- .../CourierConnectionOption.cs | 100 ++++ .../CourierConnectionService.cs | 93 ++++ .../EstimatedDeliveryDateOption.cs | 20 +- .../EstimatedDeliveryDateService.cs | 12 +- .../RestAPI/Tracking/TrackingOption.cs | 108 ++-- .../RestAPI/Tracking/TrackingService.cs | 66 +-- 60 files changed, 2509 insertions(+), 2006 deletions(-) delete mode 100644 src/.DS_Store delete mode 100644 src/AfterShipTracking/.DS_Store rename src/AfterShipTracking/AfterShipTracking/Models/{AdditionalFieldsV1.cs => AdditionalFields.cs} (60%) create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/CourierConnection.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/CourierConnectionResponseForGetCourierConnections.cs rename src/AfterShipTracking/AfterShipTracking/Models/{CourierResponseV1.cs => CourierResponse.cs} (61%) create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/CredentialField.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/DeleteCourierConnectionsByIdResponse.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsByIdResponse.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsResponse.cs rename src/AfterShipTracking/AfterShipTracking/Models/{GetAllCouriersResponse.cs => GetCouriersResponse.cs} (75%) delete mode 100644 src/AfterShipTracking/AfterShipTracking/Models/GetUserCouriersResponse.cs rename src/AfterShipTracking/AfterShipTracking/Models/{MetaV1.cs => Meta.cs} (65%) create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsRequest.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsResponse.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdRequest.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdResponse.cs rename src/AfterShipTracking/AfterShipTracking/Models/{SlugGroupV1.cs => SlugGroup.cs} (98%) rename src/AfterShipTracking/AfterShipTracking/Models/{TagV1.cs => Tag.cs} (97%) rename src/AfterShipTracking/AfterShipTracking/Models/{TrackingResponseV1.cs => TrackingResponse.cs} (79%) rename src/AfterShipTracking/AfterShipTracking/Models/{TrackingResponseGetMultipleV1.cs => TrackingResponseForGetTrackings.cs} (52%) delete mode 100644 src/AfterShipTracking/AfterShipTracking/Public/Base/Meta.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionOption.cs create mode 100644 src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionService.cs diff --git a/README.md b/README.md index 41c686d..eaf0ddb 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ If you need support using AfterShip products, please contact support@aftership.c - [Endpoints](#endpoints) - [/trackings](#trackings) - [/couriers](#couriers) + - [/courier-connections](#courier-connections) - [/estimated-delivery-date](#estimated-delivery-date) - [Help](#help) - [License](#license) @@ -41,6 +42,7 @@ Each SDK version is designed to work with a specific API version. Please refer t | SDK Version | Supported API Version | Branch | | ----------- | --------------------- | ---------------------------------------------------------- | +| 11.x.x | 2025-04 | https://github.com/AfterShip/tracking-sdk-net/tree/2025-04 | | 10.x.x | 2025-01 | https://github.com/AfterShip/tracking-sdk-net/tree/2025-01 | | 9.x.x | 2024-10 | https://github.com/AfterShip/tracking-sdk-net/tree/2024-10 | | 8.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-net/tree/2024-07 | @@ -130,7 +132,7 @@ class Program ## Rate Limiter -See the [Rate Limit](https://www.aftership.com/docs/tracking/2025-01/quickstart/rate-limit) to understand the AfterShip rate limit policy. +See the [Rate Limit](https://www.aftership.com/docs/tracking/2025-04/quickstart/rate-limit) to understand the AfterShip rate limit policy. ## Error Handling @@ -178,6 +180,7 @@ The AfterShip instance has the following properties which are exactly the same a - courier - Get a list of our supported couriers. - tracking - Create trackings, update trackings, and get tracking results. +- courier-connection - Create courier connections, update courier connections, and get courier connections results. - estimated-delivery-date - Get estimated delivery date for your order. @@ -216,7 +219,7 @@ if (resp != null) ```csharp GetTrackingsOptions options = new GetTrackingsOptions(); options.Keyword = "test"; -GetTrackingsResponseTrackingListData trackingsData = client.Tracking.GetTrackings(options); +GetTrackingsResponse trackingsData = client.Tracking.GetTrackings(options); if (trackingsData != null && trackingsData.Trackings != null) { for (int i = 0; i < trackingsData.Trackings.Length; i++) @@ -274,16 +277,8 @@ Console.WriteLine(tracking.TrackingNumber); **GET** /couriers ```csharp -GetUserCouriersOptions options = new GetUserCouriersOptions(); -GetUserCouriersResponse resp = client.Courier.GetUserCouriers(options); -Console.WriteLine(resp.Total); -``` - -**GET** /couriers/all - -```csharp -GetAllCouriersOptions options = new GetAllCouriersOptions(); -GetAllCouriersResponse resp = client.Courier.GetAllCouriers(options); +GetCouriersOptions options = new GetCouriersOptions(); +GetCouriersResponse resp = client.Courier.GetCouriers(options); Console.WriteLine(resp.Total); ``` diff --git a/src/.DS_Store b/src/.DS_Store deleted file mode 100644 index 74e59f666bfacc6269e27b65c8bb455d4a69e674..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T32orif5ML2nCQ3%2zK#7nID0!H+pQj?}?FlI}V+CwSit}o<^_&m<+ zZbhkrCoM7qv)^`hW`Dj7I~@QJ?LpWCr~!b3N?595^M%kj>6DbLWe!p3Ia2W84kGBo z>6AAcW|0B9yJa|l8_1ytAMY;(AG&alx0%3gFwFWvtOE3Y3HouA<&DOxD9x4U7b;H0 zS#++vJ2mujKObamKfRz|r%J`ar0)l3QE%9(tsJT(_oJkj>VPQhq08lYl!R*7R)ZwW zbgX9voT^jp)YeC%R&%>9o6X&wab1q~T8+Bg-r60HtIq1i=Ke|NK7L5lli^q3r>JGg z;slom;|+#kI(iB)oo-jjtV3oPq6rnY#1JMN?b72#|1I|6i6&~?{hXH?& zJFM`^)3$h8zppm;yWPgqWl}&2NC7Dz1*E_M3RE$jo*i(8s8T=*9H#>QeQ0#YuCPyx zPX~u+0f-ZZ!#Iy#g4jGj>)|36Qdk+;pO-uk}|LPocmp2pBQw;gHF`Xfa@ZY0{^YR57~|w1poj5 diff --git a/src/AfterShipTracking/AfterShipTracking.sln b/src/AfterShipTracking/AfterShipTracking.sln index e407a72..57fd907 100644 --- a/src/AfterShipTracking/AfterShipTracking.sln +++ b/src/AfterShipTracking/AfterShipTracking.sln @@ -6,24 +6,24 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AfterShipTracking", "AfterShipTracking\AfterShipTracking.csproj", "{D3099A91-E005-4291-88AD-D7A3B85DDC1D}" EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Release|Any CPU.Build.0 = Release|Any CPU - {D2C22390-8325-4493-B940-F89BD8BA19EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2C22390-8325-4493-B940-F89BD8BA19EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2C22390-8325-4493-B940-F89BD8BA19EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2C22390-8325-4493-B940-F89BD8BA19EA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5C216FDA-5980-4A44-A348-7C9B82282CE4} - EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3099A91-E005-4291-88AD-D7A3B85DDC1D}.Release|Any CPU.Build.0 = Release|Any CPU + {D2C22390-8325-4493-B940-F89BD8BA19EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2C22390-8325-4493-B940-F89BD8BA19EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2C22390-8325-4493-B940-F89BD8BA19EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2C22390-8325-4493-B940-F89BD8BA19EA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5C216FDA-5980-4A44-A348-7C9B82282CE4} + EndGlobalSection EndGlobal diff --git a/src/AfterShipTracking/AfterShipTracking/AfterShipTracking.csproj b/src/AfterShipTracking/AfterShipTracking/AfterShipTracking.csproj index cc1f4a9..d766969 100644 --- a/src/AfterShipTracking/AfterShipTracking/AfterShipTracking.csproj +++ b/src/AfterShipTracking/AfterShipTracking/AfterShipTracking.csproj @@ -10,7 +10,7 @@ Copyright © AfterShip AfterShipTracking en-US - 10.0.0 + 11.0.0 AfterShip @@ -30,9 +30,9 @@ - - - + + + diff --git a/src/AfterShipTracking/AfterShipTracking/AftershipClient.cs b/src/AfterShipTracking/AfterShipTracking/AftershipClient.cs index 1ade2e0..7d5e696 100644 --- a/src/AfterShipTracking/AfterShipTracking/AftershipClient.cs +++ b/src/AfterShipTracking/AfterShipTracking/AftershipClient.cs @@ -67,6 +67,7 @@ public class AfterShipClient public TrackingService Tracking { get; set; } public CourierService Courier { get; set; } public EstimatedDeliveryDateService EstimatedDeliveryDate { get; set; } + public CourierConnectionService CourierConnection { get; set; } public AfterShipClient( string domain = null, string apiKey = null, @@ -81,8 +82,8 @@ public AfterShipClient( { Domain = domain ?? AfterShipConfiguration.Domain; ApiBase = Domain; - MaxRetry = maxRetry == 0 ? AfterShipConfiguration.MaxRetry : maxRetry; - Timeout = timeout == 0 ? AfterShipConfiguration.Timeout : timeout; + MaxRetry = maxRetry ==0 ? AfterShipConfiguration.MaxRetry:maxRetry; + Timeout = timeout ==0? AfterShipConfiguration.Timeout: timeout; UserAgent = userAgent ?? AfterShipConfiguration.UserAgent; Proxy = proxy ?? AfterShipConfiguration.Proxy; ApiKey = apiKey ?? AfterShipConfiguration.ApiKey; @@ -93,11 +94,12 @@ public AfterShipClient( Authenticator authenticator = new Authenticator(ApiKey, ApiSecret, AuthenticationType); - HttpClient = httpClient ?? new SystemNetHttpClient(this.ApiBase, authenticator, this.MaxRetry, this.Timeout, this.UserAgent, this.Proxy); + HttpClient = httpClient ?? new SystemNetHttpClient(this.ApiBase, authenticator, this.MaxRetry, this.Timeout, this.UserAgent,this.Proxy); Tracking = new TrackingService(HttpClient); Courier = new CourierService(HttpClient); EstimatedDeliveryDate = new EstimatedDeliveryDateService(HttpClient); + CourierConnection = new CourierConnectionService(HttpClient); } private void CheckConfig() diff --git a/src/AfterShipTracking/AfterShipTracking/Exception/ErrorCode.cs b/src/AfterShipTracking/AfterShipTracking/Exception/ErrorCode.cs index 77e798e..51a65b1 100644 --- a/src/AfterShipTracking/AfterShipTracking/Exception/ErrorCode.cs +++ b/src/AfterShipTracking/AfterShipTracking/Exception/ErrorCode.cs @@ -99,7 +99,7 @@ public class ErrorCode { INTERNAL_ERROR, "Something went wrong on AfterShip's end."}, }; - public static AfterShipError GenAPIError(int statusCode, int metaCode, string responseBody = null, string message = null, object responseHeader = null) + public static AfterShipError GenAPIError(int statusCode, int metaCode, string responseBody = null, string message = null, object responseHeader= null) { string errorCode = LocateErrorCode(metaCode); return GenError(errorCode, statusCode, metaCode, responseBody, message, responseHeader); diff --git a/src/AfterShipTracking/AfterShipTracking/Models/AdditionalFieldsV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/AdditionalFields.cs similarity index 60% rename from src/AfterShipTracking/AfterShipTracking/Models/AdditionalFieldsV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/AdditionalFields.cs index 4c9ba59..6655305 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/AdditionalFieldsV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/AdditionalFields.cs @@ -12,21 +12,21 @@ namespace AfterShipTracking /// All available additional fields /// [JsonConverter(typeof(StringEnumConverter))] - public enum AdditionalFieldsV1 + public enum AdditionalFields { [EnumMember(Value = "tracking_account_number")] TrackingAccountNumber, - [EnumMember(Value = "tracking_postal_code")] - TrackingPostalCode, - [EnumMember(Value = "tracking_ship_date")] - TrackingShipDate, + [EnumMember(Value = "destination_postal_code")] + DestinationPostalCode, + [EnumMember(Value = "destination_state")] + DestinationState, [EnumMember(Value = "tracking_key")] TrackingKey, - [EnumMember(Value = "tracking_origin_country_region")] - TrackingOriginCountryRegion, - [EnumMember(Value = "tracking_destination_country_region")] - TrackingDestinationCountryRegion, - [EnumMember(Value = "tracking_state")] - TrackingState, + [EnumMember(Value = "origin_country_region")] + OriginCountryRegion, + [EnumMember(Value = "destination_country_region")] + DestinationCountryRegion, + [EnumMember(Value = "tracking_ship_date")] + TrackingShipDate, } } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/Checkpoint.cs b/src/AfterShipTracking/AfterShipTracking/Models/Checkpoint.cs index 9c139c7..ce7cf9d 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/Checkpoint.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/Checkpoint.cs @@ -11,113 +11,113 @@ namespace AfterShipTracking /// /// Object describes checkpoint information. /// - public class Checkpoint + public class Checkpoint { /// /// CreatedAt The date and time of the checkpoint event was added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// - [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] - public string? CreatedAt { get; set; } + [JsonProperty("created_at",NullValueHandling = NullValueHandling.Ignore)] + public string? CreatedAt { get; set; } /// /// Slug The unique code of courier for this checkpoint. Get courier slug /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// /// CheckpointTime The date and time of the checkpoint event, provided by the carrier. It uses the timezone of the checkpoint. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("checkpoint_time", NullValueHandling = NullValueHandling.Ignore)] - public string? CheckpointTime { get; set; } + [JsonProperty("checkpoint_time",NullValueHandling = NullValueHandling.Ignore)] + public string? CheckpointTime { get; set; } /// /// Location Location info provided by carrier /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public string? Location { get; set; } + [JsonProperty("location",NullValueHandling = NullValueHandling.Ignore)] + public string? Location { get; set; } /// /// City City info provided by carrier /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// State State info provided by carrier /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// Zip Postal code info provided by carrier /// - [JsonProperty("zip", NullValueHandling = NullValueHandling.Ignore)] - public string? Zip { get; set; } + [JsonProperty("zip",NullValueHandling = NullValueHandling.Ignore)] + public string? Zip { get; set; } /// /// Coordinate The latitude and longitude coordinates indicate the precise location of the shipments that are currently in transit. /// - [JsonProperty("coordinate", NullValueHandling = NullValueHandling.Ignore)] - public CoordinateCheckpoint? Coordinate { get; set; } + [JsonProperty("coordinate",NullValueHandling = NullValueHandling.Ignore)] + public CoordinateCheckpoint? Coordinate { get; set; } /// /// CountryRegion Country/Region ISO Alpha-3 (three letters) of the checkpoint /// - [JsonProperty("country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? CountryRegion { get; set; } + [JsonProperty("country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? CountryRegion { get; set; } /// /// CountryRegionName Country/Region name of the checkpoint, may also contain other location info. /// - [JsonProperty("country_region_name", NullValueHandling = NullValueHandling.Ignore)] - public string? CountryRegionName { get; set; } + [JsonProperty("country_region_name",NullValueHandling = NullValueHandling.Ignore)] + public string? CountryRegionName { get; set; } /// /// Message Checkpoint message /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string? Message { get; set; } + [JsonProperty("message",NullValueHandling = NullValueHandling.Ignore)] + public string? Message { get; set; } /// /// Tag Current status of tracking. ( /// - [JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)] - public TagV1? Tag { get; set; } + [JsonProperty("tag",NullValueHandling = NullValueHandling.Ignore)] + public Tag? Tag { get; set; } /// /// Subtag Current subtag of checkpoint. ( /// - [JsonProperty("subtag", NullValueHandling = NullValueHandling.Ignore)] - public string? Subtag { get; set; } + [JsonProperty("subtag",NullValueHandling = NullValueHandling.Ignore)] + public string? Subtag { get; set; } /// /// SubtagMessage Normalized checkpoint message. ( /// - [JsonProperty("subtag_message", NullValueHandling = NullValueHandling.Ignore)] - public string? SubtagMessage { get; set; } + [JsonProperty("subtag_message",NullValueHandling = NullValueHandling.Ignore)] + public string? SubtagMessage { get; set; } /// /// RawTag Checkpoint raw status provided by courier /// - [JsonProperty("raw_tag", NullValueHandling = NullValueHandling.Ignore)] - public string? RawTag { get; set; } + [JsonProperty("raw_tag",NullValueHandling = NullValueHandling.Ignore)] + public string? RawTag { get; set; } /// /// Events The array provides details about specific event(s) that occurred to a shipment, such as "returned_to_sender". You can find the full list of events and reasons - The events' value for the same checkpoint message is subject to change as we consistently strive to enhance the performance of this feature. /// - [JsonProperty("events", NullValueHandling = NullValueHandling.Ignore)] - public EventsCheckpoint?[] Events { get; set; } + [JsonProperty("events",NullValueHandling = NullValueHandling.Ignore)] + public EventsCheckpoint? [] Events { get; set; } /// /// Source The source of the checkpoint, which can either be from the carrier or when the user marks the tracking as completed. /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public string? Source { get; set; } + [JsonProperty("source",NullValueHandling = NullValueHandling.Ignore)] + public string? Source { get; set; } public Checkpoint() { } } - + /// /// /// - public class CoordinateCheckpoint + public class CoordinateCheckpoint { /// /// Latitude Represents the latitude. /// - [JsonProperty("latitude", NullValueHandling = NullValueHandling.Ignore)] - public double? Latitude { get; set; } + [JsonProperty("latitude",NullValueHandling = NullValueHandling.Ignore)] + public double? Latitude { get; set; } /// /// Longitude Represents the longitude. /// - [JsonProperty("longitude", NullValueHandling = NullValueHandling.Ignore)] - public double? Longitude { get; set; } + [JsonProperty("longitude",NullValueHandling = NullValueHandling.Ignore)] + public double? Longitude { get; set; } public CoordinateCheckpoint() { @@ -126,13 +126,13 @@ public CoordinateCheckpoint() /// /// /// - public class ReasonEventsCheckpoint + public class ReasonEventsCheckpoint { /// /// Code The code of the reason. /// - [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] - public string? Code { get; set; } + [JsonProperty("code",NullValueHandling = NullValueHandling.Ignore)] + public string? Code { get; set; } public ReasonEventsCheckpoint() { @@ -141,18 +141,18 @@ public ReasonEventsCheckpoint() /// /// /// - public class EventsCheckpoint + public class EventsCheckpoint { /// /// Code Represents the event code. /// - [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] - public string? Code { get; set; } + [JsonProperty("code",NullValueHandling = NullValueHandling.Ignore)] + public string? Code { get; set; } /// /// Reason Describes the specific reason that led to the event. /// - [JsonProperty("reason", NullValueHandling = NullValueHandling.Ignore)] - public ReasonEventsCheckpoint? Reason { get; set; } + [JsonProperty("reason",NullValueHandling = NullValueHandling.Ignore)] + public ReasonEventsCheckpoint? Reason { get; set; } public EventsCheckpoint() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/Courier.cs b/src/AfterShipTracking/AfterShipTracking/Models/Courier.cs index ae70514..bff14c9 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/Courier.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/Courier.cs @@ -11,61 +11,81 @@ namespace AfterShipTracking /// /// Courier object /// - public class Courier + public class Courier { /// /// Slug Unique code of courier. Get the slugs from . /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// /// Name Name of courier /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string? Name { get; set; } + [JsonProperty("name",NullValueHandling = NullValueHandling.Ignore)] + public string? Name { get; set; } /// /// Phone Contact phone number of courier /// - [JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)] - public string? Phone { get; set; } + [JsonProperty("phone",NullValueHandling = NullValueHandling.Ignore)] + public string? Phone { get; set; } /// /// OtherName Other name of courier /// - [JsonProperty("other_name", NullValueHandling = NullValueHandling.Ignore)] - public string? OtherName { get; set; } + [JsonProperty("other_name",NullValueHandling = NullValueHandling.Ignore)] + public string? OtherName { get; set; } /// /// WebUrl Website link of courier /// - [JsonProperty("web_url", NullValueHandling = NullValueHandling.Ignore)] - public string? WebUrl { get; set; } + [JsonProperty("web_url",NullValueHandling = NullValueHandling.Ignore)] + public string? WebUrl { get; set; } /// /// RequiredFields The extra fields need for tracking, such as `tracking_account_number`, `tracking_postal_code`, `tracking_ship_date`, `tracking_key`, `tracking_destination_country_region` /// - [JsonProperty("required_fields", NullValueHandling = NullValueHandling.Ignore)] - public string?[] RequiredFields { get; set; } + [JsonProperty("required_fields",NullValueHandling = NullValueHandling.Ignore)] + public string? [] RequiredFields { get; set; } /// /// OptionalFields The extra fields which are optional for tracking. Basically it's the same as required_fields, but the difference is that only some of the tracking numbers require these fields. /// - [JsonProperty("optional_fields", NullValueHandling = NullValueHandling.Ignore)] - public string?[] OptionalFields { get; set; } + [JsonProperty("optional_fields",NullValueHandling = NullValueHandling.Ignore)] + public string? [] OptionalFields { get; set; } /// /// DefaultLanguage Default language of tracking results /// - [JsonProperty("default_language", NullValueHandling = NullValueHandling.Ignore)] - public string? DefaultLanguage { get; set; } + [JsonProperty("default_language",NullValueHandling = NullValueHandling.Ignore)] + public string? DefaultLanguage { get; set; } /// /// SupportLanguages Other supported languages /// - [JsonProperty("support_languages", NullValueHandling = NullValueHandling.Ignore)] - public string?[] SupportLanguages { get; set; } + [JsonProperty("support_languages",NullValueHandling = NullValueHandling.Ignore)] + public string? [] SupportLanguages { get; set; } /// /// ServiceFromCountryRegions Country/Region code (ISO Alpha-3) where the courier provides service /// - [JsonProperty("service_from_country_regions", NullValueHandling = NullValueHandling.Ignore)] - public string?[] ServiceFromCountryRegions { get; set; } + [JsonProperty("service_from_country_regions",NullValueHandling = NullValueHandling.Ignore)] + public string? [] ServiceFromCountryRegions { get; set; } + /// + /// Credentials Refers to the authentication details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to create a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials",NullValueHandling = NullValueHandling.Ignore)] + public CredentialsCourier? Credentials { get; set; } public Courier() { } } + + /// + /// + /// + public class CredentialsCourier + { + /// + /// Fields Through this field, users can get the specific authentication information needed when creating a courier connection to one specific carrier, such as API keys, usernames, and passwords. Each field includes properties like name, data type, and whether it's required. + /// + [JsonProperty("fields",NullValueHandling = NullValueHandling.Ignore)] + public CredentialField? [] Fields { get; set; } + public CredentialsCourier() + { + } + } } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/CourierConnection.cs b/src/AfterShipTracking/AfterShipTracking/Models/CourierConnection.cs new file mode 100644 index 0000000..f773d5f --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/CourierConnection.cs @@ -0,0 +1,46 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. + /// + public class CourierConnection + { + /// + /// Id The courier connection ID is a special set of numbers generated by AfterShip to define each user-created connection. + /// + [JsonProperty("id",NullValueHandling = NullValueHandling.Ignore)] + public string? Id { get; set; } + /// + /// CourierSlug Unique courier code. Get courier codes . + /// + [JsonProperty("courier_slug",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierSlug { get; set; } + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials",NullValueHandling = NullValueHandling.Ignore)] + public Dictionary? Credentials { get; set; } + /// + /// CreatedAt The date and time the courier connection was created. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("created_at",NullValueHandling = NullValueHandling.Ignore)] + public string? CreatedAt { get; set; } + /// + /// UpdatedAt The date and time the courier connection was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("updated_at",NullValueHandling = NullValueHandling.Ignore)] + public string? UpdatedAt { get; set; } + public CourierConnection() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/CourierConnectionResponseForGetCourierConnections.cs b/src/AfterShipTracking/AfterShipTracking/Models/CourierConnectionResponseForGetCourierConnections.cs new file mode 100644 index 0000000..7f8cc52 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/CourierConnectionResponseForGetCourierConnections.cs @@ -0,0 +1,76 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// Courier connection response for getting courier connections + /// + public class CourierConnectionResponseForGetCourierConnections + { + /// + /// Meta Meta data + /// + [JsonProperty("meta")] + public Meta Meta { get; set; } + /// + /// Data + /// + [JsonProperty("data",NullValueHandling = NullValueHandling.Ignore)] + public DataCourierConnectionResponseForGetCourierConnections? Data { get; set; } + public CourierConnectionResponseForGetCourierConnections() + { + } + } + + /// + /// + /// + public class DataCourierConnectionResponseForGetCourierConnections + { + /// + /// Pagination + /// + [JsonProperty("pagination",NullValueHandling = NullValueHandling.Ignore)] + public PaginationDataCourierConnectionResponseForGetCourierConnections? Pagination { get; set; } + /// + /// CourierConnections + /// + [JsonProperty("courier_connections",NullValueHandling = NullValueHandling.Ignore)] + public CourierConnection? [] CourierConnections { get; set; } + + public DataCourierConnectionResponseForGetCourierConnections() + { + } + } + /// + /// + /// + public class PaginationDataCourierConnectionResponseForGetCourierConnections + { + /// + /// Total The total number of courier connections. + /// + [JsonProperty("total",NullValueHandling = NullValueHandling.Ignore)] + public int? Total { get; set; } + /// + /// NextCursor A string representing the cursor value for the next page of results. + /// + [JsonProperty("next_cursor",NullValueHandling = NullValueHandling.Ignore)] + public string? NextCursor { get; set; } + /// + /// HasNextPage To indicate if next page is available. + /// + [JsonProperty("has_next_page",NullValueHandling = NullValueHandling.Ignore)] + public bool? HasNextPage { get; set; } + + public PaginationDataCourierConnectionResponseForGetCourierConnections() + { + } + } +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/CourierResponseV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/CourierResponse.cs similarity index 61% rename from src/AfterShipTracking/AfterShipTracking/Models/CourierResponseV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/CourierResponse.cs index a8def8c..39ed558 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/CourierResponseV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/CourierResponse.cs @@ -11,40 +11,40 @@ namespace AfterShipTracking /// /// Model of all couriers endpoint response /// - public class CourierResponseV1 + public class CourierResponse { /// /// Meta Meta data /// [JsonProperty("meta")] - public MetaV1 Meta { get; set; } + public Meta Meta { get; set; } /// /// Data /// [JsonProperty("data")] - public DataCourierResponseV1 Data { get; set; } - public CourierResponseV1() + public DataCourierResponse Data { get; set; } + public CourierResponse() { } } - + /// /// /// - public class DataCourierResponseV1 + public class DataCourierResponse { /// /// Total Total count of courier objects /// - [JsonProperty("total", NullValueHandling = NullValueHandling.Ignore)] - public int? Total { get; set; } + [JsonProperty("total",NullValueHandling = NullValueHandling.Ignore)] + public int? Total { get; set; } /// /// Couriers Array of object. /// - [JsonProperty("couriers", NullValueHandling = NullValueHandling.Ignore)] - public Courier?[] Couriers { get; set; } + [JsonProperty("couriers",NullValueHandling = NullValueHandling.Ignore)] + public Courier? [] Couriers { get; set; } - public DataCourierResponseV1() + public DataCourierResponse() { } } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingRequest.cs index abba1a9..581c620 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingRequest.cs @@ -11,223 +11,208 @@ namespace AfterShipTracking /// /// /// - public class CreateTrackingRequest + public class CreateTrackingRequest { + /// + /// Id Tracking ID that is system-generated by default and can be customized by the user when creating a tracking. + /// + [JsonProperty("id",NullValueHandling = NullValueHandling.Ignore)] + public string? Id { get; set; } /// /// TrackingNumber Tracking number of a shipment.Duplicated tracking numbers, tracking numbers with invalid tracking number format will not be accepted.We only accept tracking numbers with length from 4 to 100We currently support the following characters in a tracking number:- A - Z- 0 - 9- `-` (Hyphen)- . (Period)- _ (Underscore)- / (Slash) /// [JsonProperty("tracking_number")] - public string TrackingNumber { get; set; } + public string TrackingNumber { get; set; } /// /// Slug Unique courier code. Get courier codes . /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string? Title { get; set; } + [JsonProperty("title",NullValueHandling = NullValueHandling.Ignore)] + public string? Title { get; set; } /// /// OrderId A globally-unique identifier for the order. /// - [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderId { get; set; } + [JsonProperty("order_id",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderId { get; set; } /// - /// OrderIdPath The URL for the order in your system or store. + /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any /// - [JsonProperty("order_id_path", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderIdPath { get; set; } + [JsonProperty("custom_fields",NullValueHandling = NullValueHandling.Ignore)] + public Dictionary? CustomFields { get; set; } /// - /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any + /// OrderIdPath The URL for the order in your system or store. /// - [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] - public Dictionary? CustomFields { get; set; } + [JsonProperty("order_id_path",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderIdPath { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. Use an to specify the language. /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string? Language { get; set; } + [JsonProperty("language",NullValueHandling = NullValueHandling.Ignore)] + public string? Language { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("order_promised_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderPromisedDeliveryDate { get; set; } + [JsonProperty("order_promised_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// - [JsonProperty("delivery_type", NullValueHandling = NullValueHandling.Ignore)] - public string? DeliveryType { get; set; } + [JsonProperty("delivery_type",NullValueHandling = NullValueHandling.Ignore)] + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// - [JsonProperty("pickup_location", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupLocation { get; set; } + [JsonProperty("pickup_location",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// - [JsonProperty("pickup_note", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupNote { get; set; } + [JsonProperty("pickup_note",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupNote { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// - [JsonProperty("tracking_account_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingAccountNumber { get; set; } + [JsonProperty("tracking_account_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// - [JsonProperty("tracking_key", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingKey { get; set; } + [JsonProperty("tracking_key",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// - [JsonProperty("tracking_ship_date", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingShipDate { get; set; } + [JsonProperty("tracking_ship_date",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingShipDate { get; set; } /// /// OriginCountryRegion The for more details. /// - [JsonProperty("origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCountryRegion { get; set; } + [JsonProperty("origin_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_state", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginState { get; set; } + [JsonProperty("origin_state",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_city", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCity { get; set; } + [JsonProperty("origin_city",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginPostalCode { get; set; } + [JsonProperty("origin_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginRawLocation { get; set; } + [JsonProperty("origin_raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for more details. /// - [JsonProperty("destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCountryRegion { get; set; } + [JsonProperty("destination_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. /// - [JsonProperty("destination_state", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationState { get; set; } + [JsonProperty("destination_state",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("destination_city", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCity { get; set; } + [JsonProperty("destination_city",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. /// - [JsonProperty("destination_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationPostalCode { get; set; } + [JsonProperty("destination_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("destination_raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationRawLocation { get; set; } + [JsonProperty("destination_raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationRawLocation { get; set; } /// /// Note Text field for the note /// - [JsonProperty("note", NullValueHandling = NullValueHandling.Ignore)] - public string? Note { get; set; } + [JsonProperty("note",NullValueHandling = NullValueHandling.Ignore)] + public string? Note { get; set; } /// /// SlugGroup Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. ( /// - [JsonProperty("slug_group", NullValueHandling = NullValueHandling.Ignore)] - public SlugGroupV1? SlugGroup { get; set; } + [JsonProperty("slug_group",NullValueHandling = NullValueHandling.Ignore)] + public SlugGroup? SlugGroup { get; set; } /// /// OrderDate Order date in YYYY-MM-DDTHH:mm:ssZ format. e.g. 2021-07-26T11:23:51-05:00 /// - [JsonProperty("order_date", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderDate { get; set; } + [JsonProperty("order_date",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// - [JsonProperty("order_number", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderNumber { get; set; } + [JsonProperty("order_number",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderNumber { get; set; } /// /// ShipmentType The carrier service type for the shipment. If you provide info for this field, AfterShip will not update it with info from the carrier. /// - [JsonProperty("shipment_type", NullValueHandling = NullValueHandling.Ignore)] - public string? ShipmentType { get; set; } + [JsonProperty("shipment_type",NullValueHandling = NullValueHandling.Ignore)] + public string? ShipmentType { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// - [JsonProperty("shipment_tags", NullValueHandling = NullValueHandling.Ignore)] - public string?[] ShipmentTags { get; set; } + [JsonProperty("shipment_tags",NullValueHandling = NullValueHandling.Ignore)] + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you’ve connected multiple accounts for a single carrier on AfterShip, you can now use the courier_connection_id field to tell AfterShip which carrier account you’ve used to handle a shipment so we can track it. ( /// - [JsonProperty("courier_connection_id", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingState { get; set; } + [JsonProperty("courier_connection_id",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierConnectionId { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// - [JsonProperty("location_id", NullValueHandling = NullValueHandling.Ignore)] - public string? LocationId { get; set; } + [JsonProperty("location_id",NullValueHandling = NullValueHandling.Ignore)] + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc /// - [JsonProperty("shipping_method", NullValueHandling = NullValueHandling.Ignore)] - public string? ShippingMethod { get; set; } + [JsonProperty("shipping_method",NullValueHandling = NullValueHandling.Ignore)] + public string? ShippingMethod { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// - [JsonProperty("last_mile", NullValueHandling = NullValueHandling.Ignore)] - public LastMileCreateTrackingRequest? LastMile { get; set; } + [JsonProperty("last_mile",NullValueHandling = NullValueHandling.Ignore)] + public LastMileCreateTrackingRequest? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// - [JsonProperty("customers", NullValueHandling = NullValueHandling.Ignore)] - public CustomersCreateTrackingRequest?[] Customers { get; set; } + [JsonProperty("customers",NullValueHandling = NullValueHandling.Ignore)] + public CustomersCreateTrackingRequest? [] Customers { get; set; } public CreateTrackingRequest() { } } - + /// /// /// - public class LastMileCreateTrackingRequest + public class LastMileCreateTrackingRequest { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string TrackingNumber { get; set; } + public string TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } public LastMileCreateTrackingRequest() { @@ -236,33 +221,33 @@ public LastMileCreateTrackingRequest() /// /// /// - public class CustomersCreateTrackingRequest + public class CustomersCreateTrackingRequest { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// - [JsonProperty("role", NullValueHandling = NullValueHandling.Ignore)] - public string? Role { get; set; } + [JsonProperty("role",NullValueHandling = NullValueHandling.Ignore)] + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string? Name { get; set; } + [JsonProperty("name",NullValueHandling = NullValueHandling.Ignore)] + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// - [JsonProperty("phone_number", NullValueHandling = NullValueHandling.Ignore)] - public string? PhoneNumber { get; set; } + [JsonProperty("phone_number",NullValueHandling = NullValueHandling.Ignore)] + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// - [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] - public string? Email { get; set; } + [JsonProperty("email",NullValueHandling = NullValueHandling.Ignore)] + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string? Language { get; set; } + [JsonProperty("language",NullValueHandling = NullValueHandling.Ignore)] + public string? Language { get; set; } public CustomersCreateTrackingRequest() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingResponse.cs index 9fcbbf2..343efe0 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/CreateTrackingResponse.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class CreateTrackingResponse + public class CreateTrackingResponse { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// [JsonProperty("legacy_id")] - public string? LegacyId { get; set; } + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("created_at")] - public string? CreatedAt { get; set; } + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("updated_at")] - public string? UpdatedAt { get; set; } + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// [JsonProperty("active")] - public bool? Active { get; set; } + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// [JsonProperty("custom_fields")] - public Dictionary? CustomFields { get; set; } + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// [JsonProperty("transit_time")] - public int? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// [JsonProperty("origin_country_region")] - public string? OriginCountryRegion { get; set; } + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// [JsonProperty("origin_state")] - public string? OriginState { get; set; } + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// [JsonProperty("origin_city")] - public string? OriginCity { get; set; } + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// [JsonProperty("origin_postal_code")] - public string? OriginPostalCode { get; set; } + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// [JsonProperty("origin_raw_location")] - public string? OriginRawLocation { get; set; } + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// [JsonProperty("destination_country_region")] - public string? DestinationCountryRegion { get; set; } + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// [JsonProperty("destination_state")] - public string? DestinationState { get; set; } + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// [JsonProperty("destination_city")] - public string? DestinationCity { get; set; } + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// [JsonProperty("destination_postal_code")] - public string? DestinationPostalCode { get; set; } + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// [JsonProperty("destination_raw_location")] - public string? DestinationRawLocation { get; set; } + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// [JsonProperty("courier_destination_country_region")] - public string? CourierDestinationCountryRegion { get; set; } + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// [JsonProperty("courier_estimated_delivery_date")] - public CourierEstimatedDeliveryDateCreateTrackingResponse? CourierEstimatedDeliveryDate { get; set; } + public CourierEstimatedDeliveryDateCreateTrackingResponse? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// [JsonProperty("note")] - public string? Note { get; set; } + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// [JsonProperty("order_id")] - public string? OrderId { get; set; } + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// [JsonProperty("order_id_path")] - public string? OrderIdPath { get; set; } + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// [JsonProperty("order_date")] - public string? OrderDate { get; set; } + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// [JsonProperty("shipment_package_count")] - public double? ShipmentPackageCount { get; set; } + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_pickup_date")] - public string? ShipmentPickupDate { get; set; } + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_delivery_date")] - public string? ShipmentDeliveryDate { get; set; } + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// [JsonProperty("shipment_type")] - public string? ShipmentType { get; set; } + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// [JsonProperty("shipment_weight")] - public ShipmentWeightCreateTrackingResponse? ShipmentWeight { get; set; } + public ShipmentWeightCreateTrackingResponse? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// [JsonProperty("signed_by")] - public string? SignedBy { get; set; } + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// [JsonProperty("tag")] - public TagV1? Tag { get; set; } + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// [JsonProperty("subtag")] - public string? Subtag { get; set; } + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// [JsonProperty("subtag_message")] - public string? SubtagMessage { get; set; } + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// [JsonProperty("title")] - public string? Title { get; set; } + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// [JsonProperty("tracked_count")] - public double? TrackedCount { get; set; } + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// [JsonProperty("last_mile_tracking_supported")] - public bool? LastMileTrackingSupported { get; set; } + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } /// /// UniqueToken Deprecated /// [JsonProperty("unique_token")] - public string? UniqueToken { get; set; } + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// [JsonProperty("checkpoints")] - public Checkpoint?[] Checkpoints { get; set; } + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// [JsonProperty("subscribed_smses")] - public string?[] SubscribedSmses { get; set; } + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// [JsonProperty("subscribed_emails")] - public string?[] SubscribedEmails { get; set; } + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// [JsonProperty("return_to_sender")] - public bool? ReturnToSender { get; set; } + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("order_promised_delivery_date")] - public string? OrderPromisedDeliveryDate { get; set; } + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// [JsonProperty("delivery_type")] - public string? DeliveryType { get; set; } + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// [JsonProperty("pickup_location")] - public string? PickupLocation { get; set; } + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// [JsonProperty("pickup_note")] - public string? PickupNote { get; set; } + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("first_attempted_at")] - public string? FirstAttemptedAt { get; set; } + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// [JsonProperty("tracking_account_number")] - public string? TrackingAccountNumber { get; set; } + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// [JsonProperty("tracking_key")] - public string? TrackingKey { get; set; } + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// [JsonProperty("tracking_ship_date")] - public string? TrackingShipDate { get; set; } + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// [JsonProperty("on_time_status")] - public string? OnTimeStatus { get; set; } + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// [JsonProperty("on_time_difference")] - public double? OnTimeDifference { get; set; } + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// [JsonProperty("order_tags")] - public string?[] OrderTags { get; set; } + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("aftership_estimated_delivery_date")] - public AftershipEstimatedDeliveryDateCreateTrackingResponse? AftershipEstimatedDeliveryDate { get; set; } + public AftershipEstimatedDeliveryDateCreateTrackingResponse? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("custom_estimated_delivery_date")] - public CustomEstimatedDeliveryDateCreateTrackingResponse? CustomEstimatedDeliveryDate { get; set; } + public CustomEstimatedDeliveryDateCreateTrackingResponse? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// [JsonProperty("order_number")] - public string? OrderNumber { get; set; } + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("first_estimated_delivery")] - public FirstEstimatedDeliveryCreateTrackingResponse? FirstEstimatedDelivery { get; set; } + public FirstEstimatedDeliveryCreateTrackingResponse? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("latest_estimated_delivery")] - public LatestEstimatedDeliveryCreateTrackingResponse? LatestEstimatedDelivery { get; set; } + public LatestEstimatedDeliveryCreateTrackingResponse? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// [JsonProperty("shipment_tags")] - public string?[] ShipmentTags { get; set; } + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
[JsonProperty("courier_connection_id")] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region")] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region")] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code")] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state")] - public string? TrackingState { get; set; } + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// [JsonProperty("carbon_emissions")] - public CarbonEmissionsCreateTrackingResponse? CarbonEmissions { get; set; } + public CarbonEmissionsCreateTrackingResponse? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// [JsonProperty("location_id")] - public string? LocationId { get; set; } + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// [JsonProperty("shipping_method")] - public string? ShippingMethod { get; set; } + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// [JsonProperty("failed_delivery_attempts")] - public int? FailedDeliveryAttempts { get; set; } + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
[JsonProperty("signature_requirement")] - public string? SignatureRequirement { get; set; } + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// [JsonProperty("delivery_location_type")] - public string? DeliveryLocationType { get; set; } + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_url")] - public string? AftershipTrackingUrl { get; set; } + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_order_url")] - public string? AftershipTrackingOrderUrl { get; set; } + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// [JsonProperty("first_mile")] - public FirstMileCreateTrackingResponse? FirstMile { get; set; } + public FirstMileCreateTrackingResponse? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// [JsonProperty("last_mile")] - public LastMileCreateTrackingResponse? LastMile { get; set; } + public LastMileCreateTrackingResponse? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// [JsonProperty("customers")] - public CustomersCreateTrackingResponse?[] Customers { get; set; } + public CustomersCreateTrackingResponse? [] Customers { get; set; } public CreateTrackingResponse() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateCreateTrackingResponse + public class CourierEstimatedDeliveryDateCreateTrackingResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateCreateTrackingResponse() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateCreateTrackingResponse() /// /// /// - public class ShipmentWeightCreateTrackingResponse + public class ShipmentWeightCreateTrackingResponse { /// /// Unit The unit in which the value field is expressed. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public ShipmentWeightCreateTrackingResponse() { @@ -461,28 +441,28 @@ public ShipmentWeightCreateTrackingResponse() /// /// /// - public class AftershipEstimatedDeliveryDateCreateTrackingResponse + public class AftershipEstimatedDeliveryDateCreateTrackingResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateCreateTrackingResponse() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateCreateTrackingResponse() /// /// /// - public class CustomEstimatedDeliveryDateCreateTrackingResponse + public class CustomEstimatedDeliveryDateCreateTrackingResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateCreateTrackingResponse() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateCreateTrackingResponse() /// /// /// - public class FirstEstimatedDeliveryCreateTrackingResponse + public class FirstEstimatedDeliveryCreateTrackingResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryCreateTrackingResponse() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryCreateTrackingResponse() /// /// /// - public class LatestEstimatedDeliveryCreateTrackingResponse + public class LatestEstimatedDeliveryCreateTrackingResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason")] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryCreateTrackingResponse() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryCreateTrackingResponse() /// /// /// - public class CarbonEmissionsCreateTrackingResponse + public class CarbonEmissionsCreateTrackingResponse { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public CarbonEmissionsCreateTrackingResponse() { @@ -611,33 +596,33 @@ public CarbonEmissionsCreateTrackingResponse() /// /// /// - public class FirstMileCreateTrackingResponse + public class FirstMileCreateTrackingResponse { /// /// TrackingNumber The tracking number of the first-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } public FirstMileCreateTrackingResponse() { @@ -646,38 +631,38 @@ public FirstMileCreateTrackingResponse() /// /// /// - public class LastMileCreateTrackingResponse + public class LastMileCreateTrackingResponse { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } public LastMileCreateTrackingResponse() { @@ -686,33 +671,33 @@ public LastMileCreateTrackingResponse() /// /// /// - public class CustomersCreateTrackingResponse + public class CustomersCreateTrackingResponse { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// [JsonProperty("role")] - public string? Role { get; set; } + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// [JsonProperty("phone_number")] - public string? PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// [JsonProperty("email")] - public string? Email { get; set; } + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } public CustomersCreateTrackingResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/CredentialField.cs b/src/AfterShipTracking/AfterShipTracking/Models/CredentialField.cs new file mode 100644 index 0000000..a915aae --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/CredentialField.cs @@ -0,0 +1,36 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// + /// + public class CredentialField + { + /// + /// Name The display name of the credential field that users must provide when creating a carrier connection. + /// + [JsonProperty("name",NullValueHandling = NullValueHandling.Ignore)] + public string? Name { get; set; } + /// + /// Type The data type of the credential field, indicating what kind of input is expected. + /// + [JsonProperty("type",NullValueHandling = NullValueHandling.Ignore)] + public string? Type { get; set; } + /// + /// Required It indicates whether the credentials field must be provided or not when creating a carrier connection. + /// + [JsonProperty("required",NullValueHandling = NullValueHandling.Ignore)] + public bool? Required { get; set; } + public CredentialField() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/DeleteCourierConnectionsByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/DeleteCourierConnectionsByIdResponse.cs new file mode 100644 index 0000000..98f7451 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/DeleteCourierConnectionsByIdResponse.cs @@ -0,0 +1,46 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. + /// + public class DeleteCourierConnectionsByIdResponse + { + /// + /// Id The courier connection ID is a special set of numbers generated by AfterShip to define each user-created connection. + /// + [JsonProperty("id")] + public string? Id { get; set; } + /// + /// CourierSlug Unique courier code. Get courier codes . + /// + [JsonProperty("courier_slug")] + public string? CourierSlug { get; set; } + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials")] + public Dictionary? Credentials { get; set; } + /// + /// CreatedAt The date and time the courier connection was created. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("created_at")] + public string? CreatedAt { get; set; } + /// + /// UpdatedAt The date and time the courier connection was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("updated_at")] + public string? UpdatedAt { get; set; } + public DeleteCourierConnectionsByIdResponse() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/DeleteTrackingByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/DeleteTrackingByIdResponse.cs index a3c38d4..9734b72 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/DeleteTrackingByIdResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/DeleteTrackingByIdResponse.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class DeleteTrackingByIdResponse + public class DeleteTrackingByIdResponse { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// [JsonProperty("legacy_id")] - public string? LegacyId { get; set; } + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("created_at")] - public string? CreatedAt { get; set; } + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("updated_at")] - public string? UpdatedAt { get; set; } + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// [JsonProperty("active")] - public bool? Active { get; set; } + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// [JsonProperty("custom_fields")] - public Dictionary? CustomFields { get; set; } + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// [JsonProperty("transit_time")] - public int? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// [JsonProperty("origin_country_region")] - public string? OriginCountryRegion { get; set; } + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// [JsonProperty("origin_state")] - public string? OriginState { get; set; } + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// [JsonProperty("origin_city")] - public string? OriginCity { get; set; } + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// [JsonProperty("origin_postal_code")] - public string? OriginPostalCode { get; set; } + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// [JsonProperty("origin_raw_location")] - public string? OriginRawLocation { get; set; } + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// [JsonProperty("destination_country_region")] - public string? DestinationCountryRegion { get; set; } + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// [JsonProperty("destination_state")] - public string? DestinationState { get; set; } + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// [JsonProperty("destination_city")] - public string? DestinationCity { get; set; } + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// [JsonProperty("destination_postal_code")] - public string? DestinationPostalCode { get; set; } + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// [JsonProperty("destination_raw_location")] - public string? DestinationRawLocation { get; set; } + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// [JsonProperty("courier_destination_country_region")] - public string? CourierDestinationCountryRegion { get; set; } + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// [JsonProperty("courier_estimated_delivery_date")] - public CourierEstimatedDeliveryDateDeleteTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } + public CourierEstimatedDeliveryDateDeleteTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// [JsonProperty("note")] - public string? Note { get; set; } + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// [JsonProperty("order_id")] - public string? OrderId { get; set; } + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// [JsonProperty("order_id_path")] - public string? OrderIdPath { get; set; } + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// [JsonProperty("order_date")] - public string? OrderDate { get; set; } + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// [JsonProperty("shipment_package_count")] - public double? ShipmentPackageCount { get; set; } + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_pickup_date")] - public string? ShipmentPickupDate { get; set; } + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_delivery_date")] - public string? ShipmentDeliveryDate { get; set; } + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// [JsonProperty("shipment_type")] - public string? ShipmentType { get; set; } + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// [JsonProperty("shipment_weight")] - public ShipmentWeightDeleteTrackingByIdResponse? ShipmentWeight { get; set; } + public ShipmentWeightDeleteTrackingByIdResponse? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// [JsonProperty("signed_by")] - public string? SignedBy { get; set; } + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// [JsonProperty("tag")] - public TagV1? Tag { get; set; } + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// [JsonProperty("subtag")] - public string? Subtag { get; set; } + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// [JsonProperty("subtag_message")] - public string? SubtagMessage { get; set; } + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// [JsonProperty("title")] - public string? Title { get; set; } + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// [JsonProperty("tracked_count")] - public double? TrackedCount { get; set; } + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// [JsonProperty("last_mile_tracking_supported")] - public bool? LastMileTrackingSupported { get; set; } + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } /// /// UniqueToken Deprecated /// [JsonProperty("unique_token")] - public string? UniqueToken { get; set; } + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// [JsonProperty("checkpoints")] - public Checkpoint?[] Checkpoints { get; set; } + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// [JsonProperty("subscribed_smses")] - public string?[] SubscribedSmses { get; set; } + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// [JsonProperty("subscribed_emails")] - public string?[] SubscribedEmails { get; set; } + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// [JsonProperty("return_to_sender")] - public bool? ReturnToSender { get; set; } + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("order_promised_delivery_date")] - public string? OrderPromisedDeliveryDate { get; set; } + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// [JsonProperty("delivery_type")] - public string? DeliveryType { get; set; } + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// [JsonProperty("pickup_location")] - public string? PickupLocation { get; set; } + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// [JsonProperty("pickup_note")] - public string? PickupNote { get; set; } + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("first_attempted_at")] - public string? FirstAttemptedAt { get; set; } + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// [JsonProperty("tracking_account_number")] - public string? TrackingAccountNumber { get; set; } + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// [JsonProperty("tracking_key")] - public string? TrackingKey { get; set; } + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// [JsonProperty("tracking_ship_date")] - public string? TrackingShipDate { get; set; } + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// [JsonProperty("on_time_status")] - public string? OnTimeStatus { get; set; } + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// [JsonProperty("on_time_difference")] - public double? OnTimeDifference { get; set; } + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// [JsonProperty("order_tags")] - public string?[] OrderTags { get; set; } + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("aftership_estimated_delivery_date")] - public AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } + public AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("custom_estimated_delivery_date")] - public CustomEstimatedDeliveryDateDeleteTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } + public CustomEstimatedDeliveryDateDeleteTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// [JsonProperty("order_number")] - public string? OrderNumber { get; set; } + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("first_estimated_delivery")] - public FirstEstimatedDeliveryDeleteTrackingByIdResponse? FirstEstimatedDelivery { get; set; } + public FirstEstimatedDeliveryDeleteTrackingByIdResponse? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("latest_estimated_delivery")] - public LatestEstimatedDeliveryDeleteTrackingByIdResponse? LatestEstimatedDelivery { get; set; } + public LatestEstimatedDeliveryDeleteTrackingByIdResponse? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// [JsonProperty("shipment_tags")] - public string?[] ShipmentTags { get; set; } + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
[JsonProperty("courier_connection_id")] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region")] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region")] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code")] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state")] - public string? TrackingState { get; set; } + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// [JsonProperty("carbon_emissions")] - public CarbonEmissionsDeleteTrackingByIdResponse? CarbonEmissions { get; set; } + public CarbonEmissionsDeleteTrackingByIdResponse? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// [JsonProperty("location_id")] - public string? LocationId { get; set; } + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// [JsonProperty("shipping_method")] - public string? ShippingMethod { get; set; } + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// [JsonProperty("failed_delivery_attempts")] - public int? FailedDeliveryAttempts { get; set; } + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
[JsonProperty("signature_requirement")] - public string? SignatureRequirement { get; set; } + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// [JsonProperty("delivery_location_type")] - public string? DeliveryLocationType { get; set; } + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_url")] - public string? AftershipTrackingUrl { get; set; } + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_order_url")] - public string? AftershipTrackingOrderUrl { get; set; } + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// [JsonProperty("first_mile")] - public FirstMileDeleteTrackingByIdResponse? FirstMile { get; set; } + public FirstMileDeleteTrackingByIdResponse? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// [JsonProperty("last_mile")] - public LastMileDeleteTrackingByIdResponse? LastMile { get; set; } + public LastMileDeleteTrackingByIdResponse? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// [JsonProperty("customers")] - public CustomersDeleteTrackingByIdResponse?[] Customers { get; set; } + public CustomersDeleteTrackingByIdResponse? [] Customers { get; set; } public DeleteTrackingByIdResponse() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateDeleteTrackingByIdResponse + public class CourierEstimatedDeliveryDateDeleteTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateDeleteTrackingByIdResponse() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateDeleteTrackingByIdResponse() /// /// /// - public class ShipmentWeightDeleteTrackingByIdResponse + public class ShipmentWeightDeleteTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public ShipmentWeightDeleteTrackingByIdResponse() { @@ -461,28 +441,28 @@ public ShipmentWeightDeleteTrackingByIdResponse() /// /// /// - public class AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse + public class AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse() /// /// /// - public class CustomEstimatedDeliveryDateDeleteTrackingByIdResponse + public class CustomEstimatedDeliveryDateDeleteTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateDeleteTrackingByIdResponse() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateDeleteTrackingByIdResponse() /// /// /// - public class FirstEstimatedDeliveryDeleteTrackingByIdResponse + public class FirstEstimatedDeliveryDeleteTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryDeleteTrackingByIdResponse() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryDeleteTrackingByIdResponse() /// /// /// - public class LatestEstimatedDeliveryDeleteTrackingByIdResponse + public class LatestEstimatedDeliveryDeleteTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason")] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryDeleteTrackingByIdResponse() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryDeleteTrackingByIdResponse() /// /// /// - public class CarbonEmissionsDeleteTrackingByIdResponse + public class CarbonEmissionsDeleteTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public CarbonEmissionsDeleteTrackingByIdResponse() { @@ -611,33 +596,33 @@ public CarbonEmissionsDeleteTrackingByIdResponse() /// /// /// - public class FirstMileDeleteTrackingByIdResponse + public class FirstMileDeleteTrackingByIdResponse { /// /// TrackingNumber The tracking number of the first-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } public FirstMileDeleteTrackingByIdResponse() { @@ -646,38 +631,38 @@ public FirstMileDeleteTrackingByIdResponse() /// /// /// - public class LastMileDeleteTrackingByIdResponse + public class LastMileDeleteTrackingByIdResponse { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } public LastMileDeleteTrackingByIdResponse() { @@ -686,33 +671,33 @@ public LastMileDeleteTrackingByIdResponse() /// /// /// - public class CustomersDeleteTrackingByIdResponse + public class CustomersDeleteTrackingByIdResponse { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// [JsonProperty("role")] - public string? Role { get; set; } + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// [JsonProperty("phone_number")] - public string? PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// [JsonProperty("email")] - public string? Email { get; set; } + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } public CustomersDeleteTrackingByIdResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierRequest.cs index 0cd5bc4..c88c62e 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierRequest.cs @@ -11,71 +11,61 @@ namespace AfterShipTracking /// /// /// - public class DetectCourierRequest + public class DetectCourierRequest { /// /// TrackingNumber Tracking number of a shipment. /// [JsonProperty("tracking_number")] - public string TrackingNumber { get; set; } + public string TrackingNumber { get; set; } /// /// Slug If not specified, Aftership will automatically detect the courier based on the tracking number format and your . Use array to input a list of couriers for auto detect. Cannot be used with slug_group at the same time. /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string?[] Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? [] Slug { get; set; } /// - /// TrackingPostalCode The postal code of receiver's address. Required by some couriers. Refer to for more details + /// DestinationPostalCode The postal code of receiver's address. Required by some couriers. Refer to for more details /// - [JsonProperty("tracking_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingPostalCode { get; set; } + [JsonProperty("destination_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationPostalCode { get; set; } /// /// TrackingShipDate Shipping date in `YYYYMMDD` format. Required by some couriers. Refer to for more details /// - [JsonProperty("tracking_ship_date", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingShipDate { get; set; } + [JsonProperty("tracking_ship_date",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingShipDate { get; set; } /// /// TrackingAccountNumber Account number of the shipper for a specific courier. Required by some couriers. Refer to for more details /// - [JsonProperty("tracking_account_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingAccountNumber { get; set; } + [JsonProperty("tracking_account_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Key of the shipment for a specific courier. Required by some couriers. Refer to for more details /// - [JsonProperty("tracking_key", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingKey { get; set; } + [JsonProperty("tracking_key",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingKey { get; set; } /// - /// TrackingOriginCountryRegion Origin Country/Region of the shipment for a specific courier. Required by some couriers. + /// DestinationState State of the destination shipping address of the shipment. Required by some couriers. /// - [JsonProperty("tracking_origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion Destination Country/Region of the shipment for a specific courier. Required by some couriers. Refer to for more details - /// - [JsonProperty("tracking_destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingState State of the destination shipping address of the shipment. Required by some couriers. - /// - [JsonProperty("tracking_state", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingState { get; set; } + [JsonProperty("destination_state",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationState { get; set; } /// /// SlugGroup Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. ( /// - [JsonProperty("slug_group", NullValueHandling = NullValueHandling.Ignore)] - public SlugGroupV1? SlugGroup { get; set; } + [JsonProperty("slug_group",NullValueHandling = NullValueHandling.Ignore)] + public SlugGroup? SlugGroup { get; set; } /// /// OriginCountryRegion Enter . /// - [JsonProperty("origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCountryRegion { get; set; } + [JsonProperty("origin_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCountryRegion { get; set; } /// /// DestinationCountryRegion Enter . /// - [JsonProperty("destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCountryRegion { get; set; } + [JsonProperty("destination_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCountryRegion { get; set; } public DetectCourierRequest() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierResponse.cs index 02f0629..31afe62 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/DetectCourierResponse.cs @@ -11,21 +11,21 @@ namespace AfterShipTracking /// /// /// - public class DetectCourierResponse + public class DetectCourierResponse { /// /// Total Total count of courier objects /// [JsonProperty("total")] - public int? Total { get; set; } + public int? Total { get; set; } /// /// Couriers Array of object. /// [JsonProperty("couriers")] - public Courier?[] Couriers { get; set; } + public Courier? [] Couriers { get; set; } public DetectCourierResponse() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateRequest.cs index 433cd9c..1ead1b6 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateRequest.cs @@ -11,83 +11,83 @@ namespace AfterShipTracking /// /// /// - public class EstimatedDeliveryDateRequest + public class EstimatedDeliveryDateRequest { /// /// Slug AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download. /// [JsonProperty("slug")] - public string Slug { get; set; } + public string Slug { get; set; } /// /// ServiceTypeName AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to . /// - [JsonProperty("service_type_name", NullValueHandling = NullValueHandling.Ignore)] - public string? ServiceTypeName { get; set; } + [JsonProperty("service_type_name",NullValueHandling = NullValueHandling.Ignore)] + public string? ServiceTypeName { get; set; } /// /// OriginAddress The location from where the package is picked up by the carrier to be delivered to the final destination. /// [JsonProperty("origin_address")] - public OriginAddressEstimatedDeliveryDateRequest OriginAddress { get; set; } + public OriginAddressEstimatedDeliveryDateRequest OriginAddress { get; set; } /// /// DestinationAddress The final destination of the customer where the delivery will be made. /// [JsonProperty("destination_address")] - public DestinationAddressEstimatedDeliveryDateRequest DestinationAddress { get; set; } + public DestinationAddressEstimatedDeliveryDateRequest DestinationAddress { get; set; } /// /// Weight AfterShip uses this object to calculate the total weight of the order. /// - [JsonProperty("weight", NullValueHandling = NullValueHandling.Ignore)] - public WeightEstimatedDeliveryDateRequest? Weight { get; set; } + [JsonProperty("weight",NullValueHandling = NullValueHandling.Ignore)] + public WeightEstimatedDeliveryDateRequest? Weight { get; set; } /// /// PackageCount The number of packages. /// - [JsonProperty("package_count", NullValueHandling = NullValueHandling.Ignore)] - public int? PackageCount { get; set; } + [JsonProperty("package_count",NullValueHandling = NullValueHandling.Ignore)] + public int? PackageCount { get; set; } /// /// PickupTime The local pickup time in the origin address time zone of the package.Either `pickup_time` or `estimated_pickup` is required. /// - [JsonProperty("pickup_time", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupTime { get; set; } + [JsonProperty("pickup_time",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupTime { get; set; } /// /// EstimatedPickup The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required. /// - [JsonProperty("estimated_pickup", NullValueHandling = NullValueHandling.Ignore)] - public EstimatedPickupEstimatedDeliveryDateRequest? EstimatedPickup { get; set; } + [JsonProperty("estimated_pickup",NullValueHandling = NullValueHandling.Ignore)] + public EstimatedPickupEstimatedDeliveryDateRequest? EstimatedPickup { get; set; } public EstimatedDeliveryDateRequest() { } } - + /// /// /// - public class OriginAddressEstimatedDeliveryDateRequest + public class OriginAddressEstimatedDeliveryDateRequest { /// /// CountryRegion The country/region of the origin location from where the package is picked up by the carrier to be delivered to the final destination. Use 3 letters of ISO 3166-1 country/region code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. Either `origin_address.state` or `origin_address.postal_code` is required. /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// City City of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without City. /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// PostalCode Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. Either `origin_address.state` or `origin_address.postal_code` is required. /// - [JsonProperty("postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? PostalCode { get; set; } + [JsonProperty("postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the origin address. A raw address will help AI to identify the accurate location of the origin address. /// - [JsonProperty("raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? RawLocation { get; set; } + [JsonProperty("raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? RawLocation { get; set; } public OriginAddressEstimatedDeliveryDateRequest() { @@ -96,33 +96,33 @@ public OriginAddressEstimatedDeliveryDateRequest() /// /// /// - public class DestinationAddressEstimatedDeliveryDateRequest + public class DestinationAddressEstimatedDeliveryDateRequest { /// /// CountryRegion The country/region of the destination location where the package will be delivered. Use 3 letters of ISO 3166-1 country code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the destination address where the package will be delivered.Either `destination_address.state` or `destination_address.postal_code` is required. /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// City City of the destination address where the package will be delivered. /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// PostalCode Postal code of the destination address.Either `destination_address.state` or `destination_address.postal_code` is required. /// - [JsonProperty("postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? PostalCode { get; set; } + [JsonProperty("postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the destination address. A raw address will help AI to identify the accurate location of the destination address. /// - [JsonProperty("raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? RawLocation { get; set; } + [JsonProperty("raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? RawLocation { get; set; } public DestinationAddressEstimatedDeliveryDateRequest() { @@ -131,18 +131,18 @@ public DestinationAddressEstimatedDeliveryDateRequest() /// /// /// - public class WeightEstimatedDeliveryDateRequest + public class WeightEstimatedDeliveryDateRequest { /// /// Unit The weight unit of the package. /// [JsonProperty("unit")] - public string Unit { get; set; } + public string Unit { get; set; } /// /// Value The weight of the shipment. /// [JsonProperty("value")] - public double Value { get; set; } + public double Value { get; set; } public WeightEstimatedDeliveryDateRequest() { @@ -151,28 +151,28 @@ public WeightEstimatedDeliveryDateRequest() /// /// /// - public class EstimatedPickupEstimatedDeliveryDateRequest + public class EstimatedPickupEstimatedDeliveryDateRequest { /// /// OrderTime The local order time in the origin address time zone of the package. /// [JsonProperty("order_time")] - public string OrderTime { get; set; } + public string OrderTime { get; set; } /// /// OrderCutoffTime Order cut off time in the origin address time zone. The default value set by AfterShip is 18:00:00. /// - [JsonProperty("order_cutoff_time", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderCutoffTime { get; set; } + [JsonProperty("order_cutoff_time",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderCutoffTime { get; set; } /// /// BusinessDays Operating days in a week. Number refers to the weekday.E.g., [1,2,3,4,5] means operating days are from Monday to Friday.AfterShip will set [1,2,3,4,5] as the default value. /// - [JsonProperty("business_days", NullValueHandling = NullValueHandling.Ignore)] - public int?[] BusinessDays { get; set; } + [JsonProperty("business_days",NullValueHandling = NullValueHandling.Ignore)] + public int? [] BusinessDays { get; set; } /// /// OrderProcessingTime /// - [JsonProperty("order_processing_time", NullValueHandling = NullValueHandling.Ignore)] - public OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest? OrderProcessingTime { get; set; } + [JsonProperty("order_processing_time",NullValueHandling = NullValueHandling.Ignore)] + public OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest? OrderProcessingTime { get; set; } public EstimatedPickupEstimatedDeliveryDateRequest() { @@ -181,18 +181,18 @@ public EstimatedPickupEstimatedDeliveryDateRequest() /// /// /// - public class OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest + public class OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest { /// /// Unit Processing time of an order, from being placed to being picked up. Only support day as value now.AfterShip will set day as the default value. /// - [JsonProperty("unit", NullValueHandling = NullValueHandling.Ignore)] - public string? Unit { get; set; } + [JsonProperty("unit",NullValueHandling = NullValueHandling.Ignore)] + public string? Unit { get; set; } /// /// Value Processing time of an order, from being placed to being picked up.AfterShip will set 0 as the default value. /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public double? Value { get; set; } + [JsonProperty("value",NullValueHandling = NullValueHandling.Ignore)] + public double? Value { get; set; } public OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateResponse.cs index ec033e4..6e3bab1 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/EstimatedDeliveryDateResponse.cs @@ -11,108 +11,108 @@ namespace AfterShipTracking /// /// /// - public class EstimatedDeliveryDateResponse + public class EstimatedDeliveryDateResponse { /// /// Id A string that acts as a unique identifier for the estimated delivery date value generated by AfterShip Predict API /// [JsonProperty("id")] - public string Id { get; set; } + public string Id { get; set; } /// /// Slug AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download. /// [JsonProperty("slug")] - public string Slug { get; set; } + public string Slug { get; set; } /// /// ServiceTypeName AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to . /// - [JsonProperty("service_type_name", NullValueHandling = NullValueHandling.Ignore)] - public string? ServiceTypeName { get; set; } + [JsonProperty("service_type_name",NullValueHandling = NullValueHandling.Ignore)] + public string? ServiceTypeName { get; set; } /// /// OriginAddress The location from where the package is picked up by the carrier to be delivered to the final destination. /// [JsonProperty("origin_address")] - public OriginAddressEstimatedDeliveryDateResponse OriginAddress { get; set; } + public OriginAddressEstimatedDeliveryDateResponse OriginAddress { get; set; } /// /// DestinationAddress The final destination of the customer where the delivery will be made. /// [JsonProperty("destination_address")] - public DestinationAddressEstimatedDeliveryDateResponse DestinationAddress { get; set; } + public DestinationAddressEstimatedDeliveryDateResponse DestinationAddress { get; set; } /// /// Weight AfterShip uses this object to calculate the total weight of the order. /// - [JsonProperty("weight", NullValueHandling = NullValueHandling.Ignore)] - public WeightEstimatedDeliveryDateResponse? Weight { get; set; } + [JsonProperty("weight",NullValueHandling = NullValueHandling.Ignore)] + public WeightEstimatedDeliveryDateResponse? Weight { get; set; } /// /// PackageCount The number of packages. /// - [JsonProperty("package_count", NullValueHandling = NullValueHandling.Ignore)] - public int? PackageCount { get; set; } + [JsonProperty("package_count",NullValueHandling = NullValueHandling.Ignore)] + public int? PackageCount { get; set; } /// /// PickupTime The local pickup time in the origin address time zone of the package.Either `pickup_time` or `estimated_pickup` is required. /// - [JsonProperty("pickup_time", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupTime { get; set; } + [JsonProperty("pickup_time",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupTime { get; set; } /// /// EstimatedPickup The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required. /// - [JsonProperty("estimated_pickup", NullValueHandling = NullValueHandling.Ignore)] - public EstimatedPickupEstimatedDeliveryDateResponse? EstimatedPickup { get; set; } + [JsonProperty("estimated_pickup",NullValueHandling = NullValueHandling.Ignore)] + public EstimatedPickupEstimatedDeliveryDateResponse? EstimatedPickup { get; set; } /// /// EstimatedDeliveryDate The estimated arrival date of the shipment, provided by AfterShip. /// - [JsonProperty("estimated_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDate { get; set; } + [JsonProperty("estimated_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// - [JsonProperty("confidence_code", NullValueHandling = NullValueHandling.Ignore)] - public double? ConfidenceCode { get; set; } + [JsonProperty("confidence_code",NullValueHandling = NullValueHandling.Ignore)] + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment, provided by AfterShip. /// - [JsonProperty("estimated_delivery_date_min", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDateMin { get; set; } + [JsonProperty("estimated_delivery_date_min",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The latest estimated delivery date of the shipment, provided by AfterShip. /// - [JsonProperty("estimated_delivery_date_max", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDateMax { get; set; } + [JsonProperty("estimated_delivery_date_max",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDateMax { get; set; } public EstimatedDeliveryDateResponse() { } } - + /// /// /// - public class OriginAddressEstimatedDeliveryDateResponse + public class OriginAddressEstimatedDeliveryDateResponse { /// /// CountryRegion The country/region of the origin location from where the package is picked up by the carrier to be delivered to the final destination. Use 3 letters of ISO 3166-1 country/region code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. Either `origin_address.state` or `origin_address.postal_code` is required. /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// City City of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without City. /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// PostalCode Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. Either `origin_address.state` or `origin_address.postal_code` is required. /// - [JsonProperty("postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? PostalCode { get; set; } + [JsonProperty("postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the origin address. A raw address will help AI to identify the accurate location of the origin address. /// - [JsonProperty("raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? RawLocation { get; set; } + [JsonProperty("raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? RawLocation { get; set; } public OriginAddressEstimatedDeliveryDateResponse() { @@ -121,33 +121,33 @@ public OriginAddressEstimatedDeliveryDateResponse() /// /// /// - public class DestinationAddressEstimatedDeliveryDateResponse + public class DestinationAddressEstimatedDeliveryDateResponse { /// /// CountryRegion The country/region of the destination location where the package will be delivered. Use 3 letters of ISO 3166-1 country code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the destination address where the package will be delivered.Either `destination_address.state` or `destination_address.postal_code` is required. /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// City City of the destination address where the package will be delivered. /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// PostalCode Postal code of the destination address.Either `destination_address.state` or `destination_address.postal_code` is required. /// - [JsonProperty("postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? PostalCode { get; set; } + [JsonProperty("postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the destination address. A raw address will help AI to identify the accurate location of the destination address. /// - [JsonProperty("raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? RawLocation { get; set; } + [JsonProperty("raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? RawLocation { get; set; } public DestinationAddressEstimatedDeliveryDateResponse() { @@ -156,18 +156,18 @@ public DestinationAddressEstimatedDeliveryDateResponse() /// /// /// - public class WeightEstimatedDeliveryDateResponse + public class WeightEstimatedDeliveryDateResponse { /// /// Unit The weight unit of the package. /// [JsonProperty("unit")] - public string Unit { get; set; } + public string Unit { get; set; } /// /// Value The weight of the shipment. /// [JsonProperty("value")] - public double Value { get; set; } + public double Value { get; set; } public WeightEstimatedDeliveryDateResponse() { @@ -176,33 +176,33 @@ public WeightEstimatedDeliveryDateResponse() /// /// /// - public class EstimatedPickupEstimatedDeliveryDateResponse + public class EstimatedPickupEstimatedDeliveryDateResponse { /// /// OrderTime The local order time in the origin address time zone of the package. /// [JsonProperty("order_time")] - public string OrderTime { get; set; } + public string OrderTime { get; set; } /// /// OrderCutoffTime Order cut off time in the origin address time zone. The default value set by AfterShip is 18:00:00. /// - [JsonProperty("order_cutoff_time", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderCutoffTime { get; set; } + [JsonProperty("order_cutoff_time",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderCutoffTime { get; set; } /// /// BusinessDays Operating days in a week. Number refers to the weekday.E.g., [1,2,3,4,5] means operating days are from Monday to Friday.AfterShip will set [1,2,3,4,5] as the default value. /// - [JsonProperty("business_days", NullValueHandling = NullValueHandling.Ignore)] - public int?[] BusinessDays { get; set; } + [JsonProperty("business_days",NullValueHandling = NullValueHandling.Ignore)] + public int? [] BusinessDays { get; set; } /// /// OrderProcessingTime /// - [JsonProperty("order_processing_time", NullValueHandling = NullValueHandling.Ignore)] - public OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse? OrderProcessingTime { get; set; } + [JsonProperty("order_processing_time",NullValueHandling = NullValueHandling.Ignore)] + public OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse? OrderProcessingTime { get; set; } /// /// PickupTime The local pickup time of the package. /// - [JsonProperty("pickup_time", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupTime { get; set; } + [JsonProperty("pickup_time",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupTime { get; set; } public EstimatedPickupEstimatedDeliveryDateResponse() { @@ -211,18 +211,18 @@ public EstimatedPickupEstimatedDeliveryDateResponse() /// /// /// - public class OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse + public class OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse { /// /// Unit Processing time of an order, from being placed to being picked up. Only support day as value now.AfterShip will set day as the default value. /// - [JsonProperty("unit", NullValueHandling = NullValueHandling.Ignore)] - public string? Unit { get; set; } + [JsonProperty("unit",NullValueHandling = NullValueHandling.Ignore)] + public string? Unit { get; set; } /// /// Value Processing time of an order, from being placed to being picked up.AfterShip will set 0 as the default value. /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public double? Value { get; set; } + [JsonProperty("value",NullValueHandling = NullValueHandling.Ignore)] + public double? Value { get; set; } public OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsByIdResponse.cs new file mode 100644 index 0000000..3e8dda3 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsByIdResponse.cs @@ -0,0 +1,46 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. + /// + public class GetCourierConnectionsByIdResponse + { + /// + /// Id The courier connection ID is a special set of numbers generated by AfterShip to define each user-created connection. + /// + [JsonProperty("id")] + public string? Id { get; set; } + /// + /// CourierSlug Unique courier code. Get courier codes . + /// + [JsonProperty("courier_slug")] + public string? CourierSlug { get; set; } + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials")] + public Dictionary? Credentials { get; set; } + /// + /// CreatedAt The date and time the courier connection was created. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("created_at")] + public string? CreatedAt { get; set; } + /// + /// UpdatedAt The date and time the courier connection was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("updated_at")] + public string? UpdatedAt { get; set; } + public GetCourierConnectionsByIdResponse() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsResponse.cs new file mode 100644 index 0000000..72fd0f2 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/GetCourierConnectionsResponse.cs @@ -0,0 +1,91 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// + /// + public class GetCourierConnectionsResponse + { + /// + /// Pagination + /// + [JsonProperty("pagination")] + public PaginationGetCourierConnectionsResponse? Pagination { get; set; } + /// + /// CourierConnections + /// + [JsonProperty("courier_connections")] + public CourierConnection? [] CourierConnections { get; set; } + /// + /// Page + /// + [JsonProperty("page")] + public int? Page { get; set; } + /// + /// Limit + /// + [JsonProperty("limit")] + public int? Limit { get; set; } + /// + /// Count + /// + [JsonProperty("total")] + public int? Count { get; set; } + public GetCourierConnectionsResponse() + { + } + } + + /// + /// + /// + public class PaginationGetCourierConnectionsResponse + { + /// + /// Total The total number of courier connections. + /// + [JsonProperty("total")] + public int? Total { get; set; } + /// + /// NextCursor A string representing the cursor value for the next page of results. + /// + [JsonProperty("next_cursor")] + public string? NextCursor { get; set; } + /// + /// HasNextPage To indicate if next page is available. + /// + [JsonProperty("has_next_page")] + public bool? HasNextPage { get; set; } + + public PaginationGetCourierConnectionsResponse() + { + } + } + /// + /// + /// + public class GetCourierConnectionsResponseCourierConnectionListData + { + /// + /// CourierConnections + /// + [JsonProperty("courier_connections")] + public CourierConnection? [] CourierConnections { get; set; } + /// + /// Pagination + /// + [JsonProperty("pagination")] + public PaginationPage? Pagination { get; set; } + + public GetCourierConnectionsResponseCourierConnectionListData() + { + } + } +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/GetAllCouriersResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/GetCouriersResponse.cs similarity index 75% rename from src/AfterShipTracking/AfterShipTracking/Models/GetAllCouriersResponse.cs rename to src/AfterShipTracking/AfterShipTracking/Models/GetCouriersResponse.cs index 0ef5b45..0b2c001 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/GetAllCouriersResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/GetCouriersResponse.cs @@ -11,21 +11,21 @@ namespace AfterShipTracking /// /// /// - public class GetAllCouriersResponse + public class GetCouriersResponse { /// /// Total Total count of courier objects /// [JsonProperty("total")] - public int? Total { get; set; } + public int? Total { get; set; } /// /// Couriers Array of object. /// [JsonProperty("couriers")] - public Courier?[] Couriers { get; set; } - public GetAllCouriersResponse() + public Courier? [] Couriers { get; set; } + public GetCouriersResponse() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingByIdResponse.cs index aedeb4d..493da6f 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingByIdResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingByIdResponse.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class GetTrackingByIdResponse + public class GetTrackingByIdResponse { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// [JsonProperty("legacy_id")] - public string? LegacyId { get; set; } + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("created_at")] - public string? CreatedAt { get; set; } + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("updated_at")] - public string? UpdatedAt { get; set; } + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// [JsonProperty("active")] - public bool? Active { get; set; } + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// [JsonProperty("custom_fields")] - public Dictionary? CustomFields { get; set; } + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// [JsonProperty("transit_time")] - public int? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// [JsonProperty("origin_country_region")] - public string? OriginCountryRegion { get; set; } + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// [JsonProperty("origin_state")] - public string? OriginState { get; set; } + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// [JsonProperty("origin_city")] - public string? OriginCity { get; set; } + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// [JsonProperty("origin_postal_code")] - public string? OriginPostalCode { get; set; } + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// [JsonProperty("origin_raw_location")] - public string? OriginRawLocation { get; set; } + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// [JsonProperty("destination_country_region")] - public string? DestinationCountryRegion { get; set; } + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// [JsonProperty("destination_state")] - public string? DestinationState { get; set; } + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// [JsonProperty("destination_city")] - public string? DestinationCity { get; set; } + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// [JsonProperty("destination_postal_code")] - public string? DestinationPostalCode { get; set; } + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// [JsonProperty("destination_raw_location")] - public string? DestinationRawLocation { get; set; } + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// [JsonProperty("courier_destination_country_region")] - public string? CourierDestinationCountryRegion { get; set; } + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// [JsonProperty("courier_estimated_delivery_date")] - public CourierEstimatedDeliveryDateGetTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } + public CourierEstimatedDeliveryDateGetTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// [JsonProperty("note")] - public string? Note { get; set; } + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// [JsonProperty("order_id")] - public string? OrderId { get; set; } + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// [JsonProperty("order_id_path")] - public string? OrderIdPath { get; set; } + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// [JsonProperty("order_date")] - public string? OrderDate { get; set; } + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// [JsonProperty("shipment_package_count")] - public double? ShipmentPackageCount { get; set; } + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_pickup_date")] - public string? ShipmentPickupDate { get; set; } + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_delivery_date")] - public string? ShipmentDeliveryDate { get; set; } + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// [JsonProperty("shipment_type")] - public string? ShipmentType { get; set; } + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// [JsonProperty("shipment_weight")] - public ShipmentWeightGetTrackingByIdResponse? ShipmentWeight { get; set; } + public ShipmentWeightGetTrackingByIdResponse? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// [JsonProperty("signed_by")] - public string? SignedBy { get; set; } + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// [JsonProperty("tag")] - public TagV1? Tag { get; set; } + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// [JsonProperty("subtag")] - public string? Subtag { get; set; } + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// [JsonProperty("subtag_message")] - public string? SubtagMessage { get; set; } + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// [JsonProperty("title")] - public string? Title { get; set; } + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// [JsonProperty("tracked_count")] - public double? TrackedCount { get; set; } + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// [JsonProperty("last_mile_tracking_supported")] - public bool? LastMileTrackingSupported { get; set; } + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } /// /// UniqueToken Deprecated /// [JsonProperty("unique_token")] - public string? UniqueToken { get; set; } + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// [JsonProperty("checkpoints")] - public Checkpoint?[] Checkpoints { get; set; } + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// [JsonProperty("subscribed_smses")] - public string?[] SubscribedSmses { get; set; } + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// [JsonProperty("subscribed_emails")] - public string?[] SubscribedEmails { get; set; } + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// [JsonProperty("return_to_sender")] - public bool? ReturnToSender { get; set; } + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("order_promised_delivery_date")] - public string? OrderPromisedDeliveryDate { get; set; } + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// [JsonProperty("delivery_type")] - public string? DeliveryType { get; set; } + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// [JsonProperty("pickup_location")] - public string? PickupLocation { get; set; } + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// [JsonProperty("pickup_note")] - public string? PickupNote { get; set; } + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("first_attempted_at")] - public string? FirstAttemptedAt { get; set; } + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// [JsonProperty("tracking_account_number")] - public string? TrackingAccountNumber { get; set; } + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// [JsonProperty("tracking_key")] - public string? TrackingKey { get; set; } + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// [JsonProperty("tracking_ship_date")] - public string? TrackingShipDate { get; set; } + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// [JsonProperty("on_time_status")] - public string? OnTimeStatus { get; set; } + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// [JsonProperty("on_time_difference")] - public double? OnTimeDifference { get; set; } + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// [JsonProperty("order_tags")] - public string?[] OrderTags { get; set; } + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("aftership_estimated_delivery_date")] - public AftershipEstimatedDeliveryDateGetTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } + public AftershipEstimatedDeliveryDateGetTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("custom_estimated_delivery_date")] - public CustomEstimatedDeliveryDateGetTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } + public CustomEstimatedDeliveryDateGetTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// [JsonProperty("order_number")] - public string? OrderNumber { get; set; } + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("first_estimated_delivery")] - public FirstEstimatedDeliveryGetTrackingByIdResponse? FirstEstimatedDelivery { get; set; } + public FirstEstimatedDeliveryGetTrackingByIdResponse? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("latest_estimated_delivery")] - public LatestEstimatedDeliveryGetTrackingByIdResponse? LatestEstimatedDelivery { get; set; } + public LatestEstimatedDeliveryGetTrackingByIdResponse? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// [JsonProperty("shipment_tags")] - public string?[] ShipmentTags { get; set; } + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
[JsonProperty("courier_connection_id")] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region")] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region")] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code")] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state")] - public string? TrackingState { get; set; } + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// [JsonProperty("carbon_emissions")] - public CarbonEmissionsGetTrackingByIdResponse? CarbonEmissions { get; set; } + public CarbonEmissionsGetTrackingByIdResponse? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// [JsonProperty("location_id")] - public string? LocationId { get; set; } + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// [JsonProperty("shipping_method")] - public string? ShippingMethod { get; set; } + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// [JsonProperty("failed_delivery_attempts")] - public int? FailedDeliveryAttempts { get; set; } + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
[JsonProperty("signature_requirement")] - public string? SignatureRequirement { get; set; } + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// [JsonProperty("delivery_location_type")] - public string? DeliveryLocationType { get; set; } + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_url")] - public string? AftershipTrackingUrl { get; set; } + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_order_url")] - public string? AftershipTrackingOrderUrl { get; set; } + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// [JsonProperty("first_mile")] - public FirstMileGetTrackingByIdResponse? FirstMile { get; set; } + public FirstMileGetTrackingByIdResponse? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// [JsonProperty("last_mile")] - public LastMileGetTrackingByIdResponse? LastMile { get; set; } + public LastMileGetTrackingByIdResponse? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// [JsonProperty("customers")] - public CustomersGetTrackingByIdResponse?[] Customers { get; set; } + public CustomersGetTrackingByIdResponse? [] Customers { get; set; } public GetTrackingByIdResponse() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateGetTrackingByIdResponse + public class CourierEstimatedDeliveryDateGetTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateGetTrackingByIdResponse() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateGetTrackingByIdResponse() /// /// /// - public class ShipmentWeightGetTrackingByIdResponse + public class ShipmentWeightGetTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public ShipmentWeightGetTrackingByIdResponse() { @@ -461,28 +441,28 @@ public ShipmentWeightGetTrackingByIdResponse() /// /// /// - public class AftershipEstimatedDeliveryDateGetTrackingByIdResponse + public class AftershipEstimatedDeliveryDateGetTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateGetTrackingByIdResponse() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateGetTrackingByIdResponse() /// /// /// - public class CustomEstimatedDeliveryDateGetTrackingByIdResponse + public class CustomEstimatedDeliveryDateGetTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateGetTrackingByIdResponse() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateGetTrackingByIdResponse() /// /// /// - public class FirstEstimatedDeliveryGetTrackingByIdResponse + public class FirstEstimatedDeliveryGetTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryGetTrackingByIdResponse() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryGetTrackingByIdResponse() /// /// /// - public class LatestEstimatedDeliveryGetTrackingByIdResponse + public class LatestEstimatedDeliveryGetTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason")] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryGetTrackingByIdResponse() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryGetTrackingByIdResponse() /// /// /// - public class CarbonEmissionsGetTrackingByIdResponse + public class CarbonEmissionsGetTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public CarbonEmissionsGetTrackingByIdResponse() { @@ -611,33 +596,33 @@ public CarbonEmissionsGetTrackingByIdResponse() /// /// /// - public class FirstMileGetTrackingByIdResponse + public class FirstMileGetTrackingByIdResponse { /// /// TrackingNumber The tracking number of the first-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } public FirstMileGetTrackingByIdResponse() { @@ -646,38 +631,38 @@ public FirstMileGetTrackingByIdResponse() /// /// /// - public class LastMileGetTrackingByIdResponse + public class LastMileGetTrackingByIdResponse { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } public LastMileGetTrackingByIdResponse() { @@ -686,33 +671,33 @@ public LastMileGetTrackingByIdResponse() /// /// /// - public class CustomersGetTrackingByIdResponse + public class CustomersGetTrackingByIdResponse { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// [JsonProperty("role")] - public string? Role { get; set; } + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// [JsonProperty("phone_number")] - public string? PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// [JsonProperty("email")] - public string? Email { get; set; } + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } public CustomersGetTrackingByIdResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingsResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingsResponse.cs index d066502..22b3abf 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingsResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/GetTrackingsResponse.cs @@ -11,61 +11,81 @@ namespace AfterShipTracking /// /// /// - public class GetTrackingsResponse + public class GetTrackingsResponse { /// /// Pagination The Pagination holds the information for the pagination when the response contains multiple objects. /// [JsonProperty("pagination")] - public PaginationGetTrackingsResponse? Pagination { get; set; } + public PaginationGetTrackingsResponse? Pagination { get; set; } /// /// Trackings Array of /// [JsonProperty("trackings")] - public Tracking?[] Trackings { get; set; } + public Tracking? [] Trackings { get; set; } /// /// Page /// [JsonProperty("page")] - public int? Page { get; set; } + public int? Page { get; set; } /// /// Limit /// [JsonProperty("limit")] - public int? Limit { get; set; } + public int? Limit { get; set; } /// /// Count /// [JsonProperty("total")] - public int? Count { get; set; } + public int? Count { get; set; } public GetTrackingsResponse() { } } - + /// /// /// - public class PaginationGetTrackingsResponse + public class PaginationGetTrackingsResponse { /// /// Total The total number of trackings. /// [JsonProperty("total")] - public int? Total { get; set; } + public int? Total { get; set; } /// /// NextCursor A string representing the cursor value for the next page of results. /// [JsonProperty("next_cursor")] - public string? NextCursor { get; set; } + public string? NextCursor { get; set; } /// /// HasNextPage To indicate if next page is available. /// [JsonProperty("has_next_page")] - public bool? HasNextPage { get; set; } + public bool? HasNextPage { get; set; } public PaginationGetTrackingsResponse() { } } + /// + /// + /// + public class GetTrackingsResponseTrackingListData + { + /// + /// Trackings + /// + [JsonProperty("trackings")] + public Tracking? [] Trackings { get; set; } + /// + /// Pagination + /// + [JsonProperty("pagination")] + public PaginationPage? Pagination { get; set; } + + public GetTrackingsResponseTrackingListData() + { + } + } } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/GetUserCouriersResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/GetUserCouriersResponse.cs deleted file mode 100644 index d8f5c7d..0000000 --- a/src/AfterShipTracking/AfterShipTracking/Models/GetUserCouriersResponse.cs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This code was auto generated by AfterShip SDK Generator. - * Do not edit the class manually. - */ -using System; -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace AfterShipTracking -{ - /// - /// - /// - public class GetUserCouriersResponse - { - /// - /// Total Total count of courier objects - /// - [JsonProperty("total")] - public int? Total { get; set; } - /// - /// Couriers Array of object. - /// - [JsonProperty("couriers")] - public Courier?[] Couriers { get; set; } - public GetUserCouriersResponse() - { - } - } - -} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdRequest.cs index c1f8e93..c981432 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdRequest.cs @@ -11,16 +11,21 @@ namespace AfterShipTracking /// /// /// - public class MarkTrackingCompletedByIdRequest + public class MarkTrackingCompletedByIdRequest { /// /// Reason One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`. /// [JsonProperty("reason")] - public string Reason { get; set; } + public string Reason { get; set; } + /// + /// EventDatetime The actual occurrence time of the marked tracking status.The field supports the following formats: - YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ + /// + [JsonProperty("event_datetime",NullValueHandling = NullValueHandling.Ignore)] + public string? EventDatetime { get; set; } public MarkTrackingCompletedByIdRequest() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdResponse.cs index 7545a14..5198c2a 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/MarkTrackingCompletedByIdResponse.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class MarkTrackingCompletedByIdResponse + public class MarkTrackingCompletedByIdResponse { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// [JsonProperty("legacy_id")] - public string? LegacyId { get; set; } + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("created_at")] - public string? CreatedAt { get; set; } + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("updated_at")] - public string? UpdatedAt { get; set; } + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// [JsonProperty("active")] - public bool? Active { get; set; } + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// [JsonProperty("custom_fields")] - public Dictionary? CustomFields { get; set; } + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// [JsonProperty("transit_time")] - public int? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// [JsonProperty("origin_country_region")] - public string? OriginCountryRegion { get; set; } + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// [JsonProperty("origin_state")] - public string? OriginState { get; set; } + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// [JsonProperty("origin_city")] - public string? OriginCity { get; set; } + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// [JsonProperty("origin_postal_code")] - public string? OriginPostalCode { get; set; } + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// [JsonProperty("origin_raw_location")] - public string? OriginRawLocation { get; set; } + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// [JsonProperty("destination_country_region")] - public string? DestinationCountryRegion { get; set; } + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// [JsonProperty("destination_state")] - public string? DestinationState { get; set; } + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// [JsonProperty("destination_city")] - public string? DestinationCity { get; set; } + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// [JsonProperty("destination_postal_code")] - public string? DestinationPostalCode { get; set; } + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// [JsonProperty("destination_raw_location")] - public string? DestinationRawLocation { get; set; } + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// [JsonProperty("courier_destination_country_region")] - public string? CourierDestinationCountryRegion { get; set; } + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// [JsonProperty("courier_estimated_delivery_date")] - public CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse? CourierEstimatedDeliveryDate { get; set; } + public CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// [JsonProperty("note")] - public string? Note { get; set; } + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// [JsonProperty("order_id")] - public string? OrderId { get; set; } + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// [JsonProperty("order_id_path")] - public string? OrderIdPath { get; set; } + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// [JsonProperty("order_date")] - public string? OrderDate { get; set; } + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// [JsonProperty("shipment_package_count")] - public double? ShipmentPackageCount { get; set; } + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_pickup_date")] - public string? ShipmentPickupDate { get; set; } + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_delivery_date")] - public string? ShipmentDeliveryDate { get; set; } + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// [JsonProperty("shipment_type")] - public string? ShipmentType { get; set; } + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// [JsonProperty("shipment_weight")] - public ShipmentWeightMarkTrackingCompletedByIdResponse? ShipmentWeight { get; set; } + public ShipmentWeightMarkTrackingCompletedByIdResponse? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// [JsonProperty("signed_by")] - public string? SignedBy { get; set; } + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// [JsonProperty("tag")] - public TagV1? Tag { get; set; } + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// [JsonProperty("subtag")] - public string? Subtag { get; set; } + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// [JsonProperty("subtag_message")] - public string? SubtagMessage { get; set; } + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// [JsonProperty("title")] - public string? Title { get; set; } + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// [JsonProperty("tracked_count")] - public double? TrackedCount { get; set; } + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// [JsonProperty("last_mile_tracking_supported")] - public bool? LastMileTrackingSupported { get; set; } + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } /// /// UniqueToken Deprecated /// [JsonProperty("unique_token")] - public string? UniqueToken { get; set; } + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// [JsonProperty("checkpoints")] - public Checkpoint?[] Checkpoints { get; set; } + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// [JsonProperty("subscribed_smses")] - public string?[] SubscribedSmses { get; set; } + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// [JsonProperty("subscribed_emails")] - public string?[] SubscribedEmails { get; set; } + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// [JsonProperty("return_to_sender")] - public bool? ReturnToSender { get; set; } + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("order_promised_delivery_date")] - public string? OrderPromisedDeliveryDate { get; set; } + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// [JsonProperty("delivery_type")] - public string? DeliveryType { get; set; } + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// [JsonProperty("pickup_location")] - public string? PickupLocation { get; set; } + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// [JsonProperty("pickup_note")] - public string? PickupNote { get; set; } + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("first_attempted_at")] - public string? FirstAttemptedAt { get; set; } + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// [JsonProperty("tracking_account_number")] - public string? TrackingAccountNumber { get; set; } + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// [JsonProperty("tracking_key")] - public string? TrackingKey { get; set; } + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// [JsonProperty("tracking_ship_date")] - public string? TrackingShipDate { get; set; } + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// [JsonProperty("on_time_status")] - public string? OnTimeStatus { get; set; } + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// [JsonProperty("on_time_difference")] - public double? OnTimeDifference { get; set; } + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// [JsonProperty("order_tags")] - public string?[] OrderTags { get; set; } + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("aftership_estimated_delivery_date")] - public AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse? AftershipEstimatedDeliveryDate { get; set; } + public AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("custom_estimated_delivery_date")] - public CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse? CustomEstimatedDeliveryDate { get; set; } + public CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// [JsonProperty("order_number")] - public string? OrderNumber { get; set; } + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("first_estimated_delivery")] - public FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse? FirstEstimatedDelivery { get; set; } + public FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("latest_estimated_delivery")] - public LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse? LatestEstimatedDelivery { get; set; } + public LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// [JsonProperty("shipment_tags")] - public string?[] ShipmentTags { get; set; } + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
[JsonProperty("courier_connection_id")] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region")] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region")] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code")] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state")] - public string? TrackingState { get; set; } + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// [JsonProperty("carbon_emissions")] - public CarbonEmissionsMarkTrackingCompletedByIdResponse? CarbonEmissions { get; set; } + public CarbonEmissionsMarkTrackingCompletedByIdResponse? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// [JsonProperty("location_id")] - public string? LocationId { get; set; } + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// [JsonProperty("shipping_method")] - public string? ShippingMethod { get; set; } + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// [JsonProperty("failed_delivery_attempts")] - public int? FailedDeliveryAttempts { get; set; } + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
[JsonProperty("signature_requirement")] - public string? SignatureRequirement { get; set; } + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// [JsonProperty("delivery_location_type")] - public string? DeliveryLocationType { get; set; } + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_url")] - public string? AftershipTrackingUrl { get; set; } + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_order_url")] - public string? AftershipTrackingOrderUrl { get; set; } + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// [JsonProperty("first_mile")] - public FirstMileMarkTrackingCompletedByIdResponse? FirstMile { get; set; } + public FirstMileMarkTrackingCompletedByIdResponse? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// [JsonProperty("last_mile")] - public LastMileMarkTrackingCompletedByIdResponse? LastMile { get; set; } + public LastMileMarkTrackingCompletedByIdResponse? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// [JsonProperty("customers")] - public CustomersMarkTrackingCompletedByIdResponse?[] Customers { get; set; } + public CustomersMarkTrackingCompletedByIdResponse? [] Customers { get; set; } public MarkTrackingCompletedByIdResponse() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse + public class CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse() /// /// /// - public class ShipmentWeightMarkTrackingCompletedByIdResponse + public class ShipmentWeightMarkTrackingCompletedByIdResponse { /// /// Unit The unit in which the value field is expressed. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public ShipmentWeightMarkTrackingCompletedByIdResponse() { @@ -461,28 +441,28 @@ public ShipmentWeightMarkTrackingCompletedByIdResponse() /// /// /// - public class AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse + public class AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse() /// /// /// - public class CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse + public class CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse() /// /// /// - public class FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse + public class FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse() /// /// /// - public class LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse + public class LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason")] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse() /// /// /// - public class CarbonEmissionsMarkTrackingCompletedByIdResponse + public class CarbonEmissionsMarkTrackingCompletedByIdResponse { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public CarbonEmissionsMarkTrackingCompletedByIdResponse() { @@ -611,33 +596,33 @@ public CarbonEmissionsMarkTrackingCompletedByIdResponse() /// /// /// - public class FirstMileMarkTrackingCompletedByIdResponse + public class FirstMileMarkTrackingCompletedByIdResponse { /// /// TrackingNumber The tracking number of the first-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } public FirstMileMarkTrackingCompletedByIdResponse() { @@ -646,38 +631,38 @@ public FirstMileMarkTrackingCompletedByIdResponse() /// /// /// - public class LastMileMarkTrackingCompletedByIdResponse + public class LastMileMarkTrackingCompletedByIdResponse { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } public LastMileMarkTrackingCompletedByIdResponse() { @@ -686,33 +671,33 @@ public LastMileMarkTrackingCompletedByIdResponse() /// /// /// - public class CustomersMarkTrackingCompletedByIdResponse + public class CustomersMarkTrackingCompletedByIdResponse { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// [JsonProperty("role")] - public string? Role { get; set; } + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// [JsonProperty("phone_number")] - public string? PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// [JsonProperty("email")] - public string? Email { get; set; } + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } public CustomersMarkTrackingCompletedByIdResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/MetaV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/Meta.cs similarity index 65% rename from src/AfterShipTracking/AfterShipTracking/Models/MetaV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/Meta.cs index 32fde3f..851c3d3 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/MetaV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/Meta.cs @@ -11,26 +11,26 @@ namespace AfterShipTracking /// /// Meta data /// - public class MetaV1 + public class Meta { /// /// Code meta code /// [JsonProperty("code")] - public int Code { get; set; } + public int Code { get; set; } /// /// Message error message, only exist if the response status is not 2xx /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string? Message { get; set; } + [JsonProperty("message",NullValueHandling = NullValueHandling.Ignore)] + public string? Message { get; set; } /// /// Type error type, only exist if the response status is not 2xx /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string? Type { get; set; } - public MetaV1() + [JsonProperty("type",NullValueHandling = NullValueHandling.Ignore)] + public string? Type { get; set; } + public Meta() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsRequest.cs new file mode 100644 index 0000000..1c0aaa9 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsRequest.cs @@ -0,0 +1,31 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// + /// + public class PostCourierConnectionsRequest + { + /// + /// CourierSlug Unique code of courier. Get the slugs from . + /// + [JsonProperty("courier_slug")] + public string CourierSlug { get; set; } + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials")] + public Dictionary Credentials { get; set; } + public PostCourierConnectionsRequest() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsResponse.cs new file mode 100644 index 0000000..a4ec419 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/PostCourierConnectionsResponse.cs @@ -0,0 +1,46 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. + /// + public class PostCourierConnectionsResponse + { + /// + /// Id The courier connection ID is a special set of numbers generated by AfterShip to define each user-created connection. + /// + [JsonProperty("id")] + public string? Id { get; set; } + /// + /// CourierSlug Unique courier code. Get courier codes . + /// + [JsonProperty("courier_slug")] + public string? CourierSlug { get; set; } + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials")] + public Dictionary? Credentials { get; set; } + /// + /// CreatedAt The date and time the courier connection was created. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("created_at")] + public string? CreatedAt { get; set; } + /// + /// UpdatedAt The date and time the courier connection was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("updated_at")] + public string? UpdatedAt { get; set; } + public PostCourierConnectionsResponse() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchRequest.cs index 39ddd60..e5fab4c 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchRequest.cs @@ -11,16 +11,16 @@ namespace AfterShipTracking /// /// /// - public class PredictBatchRequest + public class PredictBatchRequest { /// /// EstimatedDeliveryDates /// [JsonProperty("estimated_delivery_dates")] - public EstimatedDeliveryDateRequest[] EstimatedDeliveryDates { get; set; } + public EstimatedDeliveryDateRequest [] EstimatedDeliveryDates { get; set; } public PredictBatchRequest() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchResponse.cs index b08311d..9c2cbc8 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/PredictBatchResponse.cs @@ -11,16 +11,16 @@ namespace AfterShipTracking /// /// /// - public class PredictBatchResponse + public class PredictBatchResponse { /// /// EstimatedDeliveryDates /// [JsonProperty("estimated_delivery_dates")] - public EstimatedDeliveryDateResponse[] EstimatedDeliveryDates { get; set; } + public EstimatedDeliveryDateResponse [] EstimatedDeliveryDates { get; set; } public PredictBatchResponse() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PredictRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/PredictRequest.cs index d7585b0..ff619ed 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/PredictRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/PredictRequest.cs @@ -11,83 +11,83 @@ namespace AfterShipTracking /// /// /// - public class PredictRequest + public class PredictRequest { /// /// Slug AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download. /// [JsonProperty("slug")] - public string Slug { get; set; } + public string Slug { get; set; } /// /// ServiceTypeName AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to . /// - [JsonProperty("service_type_name", NullValueHandling = NullValueHandling.Ignore)] - public string? ServiceTypeName { get; set; } + [JsonProperty("service_type_name",NullValueHandling = NullValueHandling.Ignore)] + public string? ServiceTypeName { get; set; } /// /// OriginAddress The location from where the package is picked up by the carrier to be delivered to the final destination. /// [JsonProperty("origin_address")] - public OriginAddressPredictRequest OriginAddress { get; set; } + public OriginAddressPredictRequest OriginAddress { get; set; } /// /// DestinationAddress The final destination of the customer where the delivery will be made. /// [JsonProperty("destination_address")] - public DestinationAddressPredictRequest DestinationAddress { get; set; } + public DestinationAddressPredictRequest DestinationAddress { get; set; } /// /// Weight AfterShip uses this object to calculate the total weight of the order. /// - [JsonProperty("weight", NullValueHandling = NullValueHandling.Ignore)] - public WeightPredictRequest? Weight { get; set; } + [JsonProperty("weight",NullValueHandling = NullValueHandling.Ignore)] + public WeightPredictRequest? Weight { get; set; } /// /// PackageCount The number of packages. /// - [JsonProperty("package_count", NullValueHandling = NullValueHandling.Ignore)] - public int? PackageCount { get; set; } + [JsonProperty("package_count",NullValueHandling = NullValueHandling.Ignore)] + public int? PackageCount { get; set; } /// /// PickupTime The local pickup time in the origin address time zone of the package.Either `pickup_time` or `estimated_pickup` is required. /// - [JsonProperty("pickup_time", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupTime { get; set; } + [JsonProperty("pickup_time",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupTime { get; set; } /// /// EstimatedPickup The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required. /// - [JsonProperty("estimated_pickup", NullValueHandling = NullValueHandling.Ignore)] - public EstimatedPickupPredictRequest? EstimatedPickup { get; set; } + [JsonProperty("estimated_pickup",NullValueHandling = NullValueHandling.Ignore)] + public EstimatedPickupPredictRequest? EstimatedPickup { get; set; } public PredictRequest() { } } - + /// /// /// - public class OriginAddressPredictRequest + public class OriginAddressPredictRequest { /// /// CountryRegion The country/region of the origin location from where the package is picked up by the carrier to be delivered to the final destination. Use 3 letters of ISO 3166-1 country/region code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. Either `origin_address.state` or `origin_address.postal_code` is required. /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// City City of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without City. /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// PostalCode Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. Either `origin_address.state` or `origin_address.postal_code` is required. /// - [JsonProperty("postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? PostalCode { get; set; } + [JsonProperty("postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the origin address. A raw address will help AI to identify the accurate location of the origin address. /// - [JsonProperty("raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? RawLocation { get; set; } + [JsonProperty("raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? RawLocation { get; set; } public OriginAddressPredictRequest() { @@ -96,33 +96,33 @@ public OriginAddressPredictRequest() /// /// /// - public class DestinationAddressPredictRequest + public class DestinationAddressPredictRequest { /// /// CountryRegion The country/region of the destination location where the package will be delivered. Use 3 letters of ISO 3166-1 country code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the destination address where the package will be delivered.Either `destination_address.state` or `destination_address.postal_code` is required. /// - [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] - public string? State { get; set; } + [JsonProperty("state",NullValueHandling = NullValueHandling.Ignore)] + public string? State { get; set; } /// /// City City of the destination address where the package will be delivered. /// - [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] - public string? City { get; set; } + [JsonProperty("city",NullValueHandling = NullValueHandling.Ignore)] + public string? City { get; set; } /// /// PostalCode Postal code of the destination address.Either `destination_address.state` or `destination_address.postal_code` is required. /// - [JsonProperty("postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? PostalCode { get; set; } + [JsonProperty("postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the destination address. A raw address will help AI to identify the accurate location of the destination address. /// - [JsonProperty("raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? RawLocation { get; set; } + [JsonProperty("raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? RawLocation { get; set; } public DestinationAddressPredictRequest() { @@ -131,18 +131,18 @@ public DestinationAddressPredictRequest() /// /// /// - public class WeightPredictRequest + public class WeightPredictRequest { /// /// Unit The weight unit of the package. /// [JsonProperty("unit")] - public string Unit { get; set; } + public string Unit { get; set; } /// /// Value The weight of the shipment. /// [JsonProperty("value")] - public double Value { get; set; } + public double Value { get; set; } public WeightPredictRequest() { @@ -151,28 +151,28 @@ public WeightPredictRequest() /// /// /// - public class EstimatedPickupPredictRequest + public class EstimatedPickupPredictRequest { /// /// OrderTime The local order time in the origin address time zone of the package. /// [JsonProperty("order_time")] - public string OrderTime { get; set; } + public string OrderTime { get; set; } /// /// OrderCutoffTime Order cut off time in the origin address time zone. The default value set by AfterShip is 18:00:00. /// - [JsonProperty("order_cutoff_time", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderCutoffTime { get; set; } + [JsonProperty("order_cutoff_time",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderCutoffTime { get; set; } /// /// BusinessDays Operating days in a week. Number refers to the weekday.E.g., [1,2,3,4,5] means operating days are from Monday to Friday.AfterShip will set [1,2,3,4,5] as the default value. /// - [JsonProperty("business_days", NullValueHandling = NullValueHandling.Ignore)] - public int?[] BusinessDays { get; set; } + [JsonProperty("business_days",NullValueHandling = NullValueHandling.Ignore)] + public int? [] BusinessDays { get; set; } /// /// OrderProcessingTime /// - [JsonProperty("order_processing_time", NullValueHandling = NullValueHandling.Ignore)] - public OrderProcessingTimeEstimatedPickupPredictRequest? OrderProcessingTime { get; set; } + [JsonProperty("order_processing_time",NullValueHandling = NullValueHandling.Ignore)] + public OrderProcessingTimeEstimatedPickupPredictRequest? OrderProcessingTime { get; set; } public EstimatedPickupPredictRequest() { @@ -181,18 +181,18 @@ public EstimatedPickupPredictRequest() /// /// /// - public class OrderProcessingTimeEstimatedPickupPredictRequest + public class OrderProcessingTimeEstimatedPickupPredictRequest { /// /// Unit Processing time of an order, from being placed to being picked up. Only support day as value now.AfterShip will set day as the default value. /// - [JsonProperty("unit", NullValueHandling = NullValueHandling.Ignore)] - public string? Unit { get; set; } + [JsonProperty("unit",NullValueHandling = NullValueHandling.Ignore)] + public string? Unit { get; set; } /// /// Value Processing time of an order, from being placed to being picked up.AfterShip will set 0 as the default value. /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public double? Value { get; set; } + [JsonProperty("value",NullValueHandling = NullValueHandling.Ignore)] + public double? Value { get; set; } public OrderProcessingTimeEstimatedPickupPredictRequest() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PredictResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/PredictResponse.cs index 4e955ec..e04895a 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/PredictResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/PredictResponse.cs @@ -11,108 +11,108 @@ namespace AfterShipTracking /// /// /// - public class PredictResponse + public class PredictResponse { /// /// Id A string that acts as a unique identifier for the estimated delivery date value generated by AfterShip Predict API /// [JsonProperty("id")] - public string Id { get; set; } + public string Id { get; set; } /// /// Slug AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download. /// [JsonProperty("slug")] - public string Slug { get; set; } + public string Slug { get; set; } /// /// ServiceTypeName AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to . /// [JsonProperty("service_type_name")] - public string? ServiceTypeName { get; set; } + public string? ServiceTypeName { get; set; } /// /// OriginAddress The location from where the package is picked up by the carrier to be delivered to the final destination. /// [JsonProperty("origin_address")] - public OriginAddressPredictResponse OriginAddress { get; set; } + public OriginAddressPredictResponse OriginAddress { get; set; } /// /// DestinationAddress The final destination of the customer where the delivery will be made. /// [JsonProperty("destination_address")] - public DestinationAddressPredictResponse DestinationAddress { get; set; } + public DestinationAddressPredictResponse DestinationAddress { get; set; } /// /// Weight AfterShip uses this object to calculate the total weight of the order. /// [JsonProperty("weight")] - public WeightPredictResponse? Weight { get; set; } + public WeightPredictResponse? Weight { get; set; } /// /// PackageCount The number of packages. /// [JsonProperty("package_count")] - public int? PackageCount { get; set; } + public int? PackageCount { get; set; } /// /// PickupTime The local pickup time in the origin address time zone of the package.Either `pickup_time` or `estimated_pickup` is required. /// [JsonProperty("pickup_time")] - public string? PickupTime { get; set; } + public string? PickupTime { get; set; } /// /// EstimatedPickup The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required. /// [JsonProperty("estimated_pickup")] - public EstimatedPickupPredictResponse? EstimatedPickup { get; set; } + public EstimatedPickupPredictResponse? EstimatedPickup { get; set; } /// /// EstimatedDeliveryDate The estimated arrival date of the shipment, provided by AfterShip. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment, provided by AfterShip. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The latest estimated delivery date of the shipment, provided by AfterShip. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public PredictResponse() { } } - + /// /// /// - public class OriginAddressPredictResponse + public class OriginAddressPredictResponse { /// /// CountryRegion The country/region of the origin location from where the package is picked up by the carrier to be delivered to the final destination. Use 3 letters of ISO 3166-1 country/region code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. Either `origin_address.state` or `origin_address.postal_code` is required. /// [JsonProperty("state")] - public string? State { get; set; } + public string? State { get; set; } /// /// City City of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without City. /// [JsonProperty("city")] - public string? City { get; set; } + public string? City { get; set; } /// /// PostalCode Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. Either `origin_address.state` or `origin_address.postal_code` is required. /// [JsonProperty("postal_code")] - public string? PostalCode { get; set; } + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the origin address. A raw address will help AI to identify the accurate location of the origin address. /// [JsonProperty("raw_location")] - public string? RawLocation { get; set; } + public string? RawLocation { get; set; } public OriginAddressPredictResponse() { @@ -121,33 +121,33 @@ public OriginAddressPredictResponse() /// /// /// - public class DestinationAddressPredictResponse + public class DestinationAddressPredictResponse { /// /// CountryRegion The country/region of the destination location where the package will be delivered. Use 3 letters of ISO 3166-1 country code. /// [JsonProperty("country_region")] - public string CountryRegion { get; set; } + public string CountryRegion { get; set; } /// /// State State, province, or the equivalent location of the destination address where the package will be delivered.Either `destination_address.state` or `destination_address.postal_code` is required. /// [JsonProperty("state")] - public string? State { get; set; } + public string? State { get; set; } /// /// City City of the destination address where the package will be delivered. /// [JsonProperty("city")] - public string? City { get; set; } + public string? City { get; set; } /// /// PostalCode Postal code of the destination address.Either `destination_address.state` or `destination_address.postal_code` is required. /// [JsonProperty("postal_code")] - public string? PostalCode { get; set; } + public string? PostalCode { get; set; } /// /// RawLocation Raw location of the destination address. A raw address will help AI to identify the accurate location of the destination address. /// [JsonProperty("raw_location")] - public string? RawLocation { get; set; } + public string? RawLocation { get; set; } public DestinationAddressPredictResponse() { @@ -156,18 +156,18 @@ public DestinationAddressPredictResponse() /// /// /// - public class WeightPredictResponse + public class WeightPredictResponse { /// /// Unit The weight unit of the package. /// [JsonProperty("unit")] - public string Unit { get; set; } + public string Unit { get; set; } /// /// Value The weight of the shipment. /// [JsonProperty("value")] - public double Value { get; set; } + public double Value { get; set; } public WeightPredictResponse() { @@ -176,33 +176,33 @@ public WeightPredictResponse() /// /// /// - public class EstimatedPickupPredictResponse + public class EstimatedPickupPredictResponse { /// /// OrderTime The local order time in the origin address time zone of the package. /// [JsonProperty("order_time")] - public string OrderTime { get; set; } + public string OrderTime { get; set; } /// /// OrderCutoffTime Order cut off time in the origin address time zone. The default value set by AfterShip is 18:00:00. /// [JsonProperty("order_cutoff_time")] - public string? OrderCutoffTime { get; set; } + public string? OrderCutoffTime { get; set; } /// /// BusinessDays Operating days in a week. Number refers to the weekday.E.g., [1,2,3,4,5] means operating days are from Monday to Friday.AfterShip will set [1,2,3,4,5] as the default value. /// [JsonProperty("business_days")] - public int?[] BusinessDays { get; set; } + public int? [] BusinessDays { get; set; } /// /// OrderProcessingTime /// [JsonProperty("order_processing_time")] - public OrderProcessingTimeEstimatedPickupPredictResponse? OrderProcessingTime { get; set; } + public OrderProcessingTimeEstimatedPickupPredictResponse? OrderProcessingTime { get; set; } /// /// PickupTime The local pickup time of the package. /// [JsonProperty("pickup_time")] - public string? PickupTime { get; set; } + public string? PickupTime { get; set; } public EstimatedPickupPredictResponse() { @@ -211,18 +211,18 @@ public EstimatedPickupPredictResponse() /// /// /// - public class OrderProcessingTimeEstimatedPickupPredictResponse + public class OrderProcessingTimeEstimatedPickupPredictResponse { /// /// Unit Processing time of an order, from being placed to being picked up. Only support day as value now.AfterShip will set day as the default value. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value Processing time of an order, from being placed to being picked up.AfterShip will set 0 as the default value. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public OrderProcessingTimeEstimatedPickupPredictResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdRequest.cs new file mode 100644 index 0000000..d96ef55 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdRequest.cs @@ -0,0 +1,26 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// + /// + public class PutCourierConnectionsByIdRequest + { + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials")] + public Dictionary Credentials { get; set; } + public PutCourierConnectionsByIdRequest() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdResponse.cs new file mode 100644 index 0000000..30e1352 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/Models/PutCourierConnectionsByIdResponse.cs @@ -0,0 +1,46 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. + /// + public class PutCourierConnectionsByIdResponse + { + /// + /// Id The courier connection ID is a special set of numbers generated by AfterShip to define each user-created connection. + /// + [JsonProperty("id")] + public string? Id { get; set; } + /// + /// CourierSlug Unique courier code. Get courier codes . + /// + [JsonProperty("courier_slug")] + public string? CourierSlug { get; set; } + /// + /// Credentials It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier. + /// + [JsonProperty("credentials")] + public Dictionary? Credentials { get; set; } + /// + /// CreatedAt The date and time the courier connection was created. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("created_at")] + public string? CreatedAt { get; set; } + /// + /// UpdatedAt The date and time the courier connection was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0. + /// + [JsonProperty("updated_at")] + public string? UpdatedAt { get; set; } + public PutCourierConnectionsByIdResponse() + { + } + } + +} diff --git a/src/AfterShipTracking/AfterShipTracking/Models/RetrackTrackingByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/RetrackTrackingByIdResponse.cs index 7caf15b..eb392e1 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/RetrackTrackingByIdResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/RetrackTrackingByIdResponse.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class RetrackTrackingByIdResponse + public class RetrackTrackingByIdResponse { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// [JsonProperty("legacy_id")] - public string? LegacyId { get; set; } + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("created_at")] - public string? CreatedAt { get; set; } + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("updated_at")] - public string? UpdatedAt { get; set; } + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// [JsonProperty("active")] - public bool? Active { get; set; } + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// [JsonProperty("custom_fields")] - public Dictionary? CustomFields { get; set; } + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// [JsonProperty("transit_time")] - public int? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// [JsonProperty("origin_country_region")] - public string? OriginCountryRegion { get; set; } + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// [JsonProperty("origin_state")] - public string? OriginState { get; set; } + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// [JsonProperty("origin_city")] - public string? OriginCity { get; set; } + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// [JsonProperty("origin_postal_code")] - public string? OriginPostalCode { get; set; } + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// [JsonProperty("origin_raw_location")] - public string? OriginRawLocation { get; set; } + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// [JsonProperty("destination_country_region")] - public string? DestinationCountryRegion { get; set; } + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// [JsonProperty("destination_state")] - public string? DestinationState { get; set; } + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// [JsonProperty("destination_city")] - public string? DestinationCity { get; set; } + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// [JsonProperty("destination_postal_code")] - public string? DestinationPostalCode { get; set; } + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// [JsonProperty("destination_raw_location")] - public string? DestinationRawLocation { get; set; } + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// [JsonProperty("courier_destination_country_region")] - public string? CourierDestinationCountryRegion { get; set; } + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// [JsonProperty("courier_estimated_delivery_date")] - public CourierEstimatedDeliveryDateRetrackTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } + public CourierEstimatedDeliveryDateRetrackTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// [JsonProperty("note")] - public string? Note { get; set; } + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// [JsonProperty("order_id")] - public string? OrderId { get; set; } + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// [JsonProperty("order_id_path")] - public string? OrderIdPath { get; set; } + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// [JsonProperty("order_date")] - public string? OrderDate { get; set; } + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// [JsonProperty("shipment_package_count")] - public double? ShipmentPackageCount { get; set; } + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_pickup_date")] - public string? ShipmentPickupDate { get; set; } + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_delivery_date")] - public string? ShipmentDeliveryDate { get; set; } + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// [JsonProperty("shipment_type")] - public string? ShipmentType { get; set; } + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// [JsonProperty("shipment_weight")] - public ShipmentWeightRetrackTrackingByIdResponse? ShipmentWeight { get; set; } + public ShipmentWeightRetrackTrackingByIdResponse? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// [JsonProperty("signed_by")] - public string? SignedBy { get; set; } + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// [JsonProperty("tag")] - public TagV1? Tag { get; set; } + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// [JsonProperty("subtag")] - public string? Subtag { get; set; } + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// [JsonProperty("subtag_message")] - public string? SubtagMessage { get; set; } + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// [JsonProperty("title")] - public string? Title { get; set; } + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// [JsonProperty("tracked_count")] - public double? TrackedCount { get; set; } + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// [JsonProperty("last_mile_tracking_supported")] - public bool? LastMileTrackingSupported { get; set; } + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } /// /// UniqueToken Deprecated /// [JsonProperty("unique_token")] - public string? UniqueToken { get; set; } + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// [JsonProperty("checkpoints")] - public Checkpoint?[] Checkpoints { get; set; } + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// [JsonProperty("subscribed_smses")] - public string?[] SubscribedSmses { get; set; } + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// [JsonProperty("subscribed_emails")] - public string?[] SubscribedEmails { get; set; } + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// [JsonProperty("return_to_sender")] - public bool? ReturnToSender { get; set; } + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("order_promised_delivery_date")] - public string? OrderPromisedDeliveryDate { get; set; } + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// [JsonProperty("delivery_type")] - public string? DeliveryType { get; set; } + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// [JsonProperty("pickup_location")] - public string? PickupLocation { get; set; } + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// [JsonProperty("pickup_note")] - public string? PickupNote { get; set; } + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("first_attempted_at")] - public string? FirstAttemptedAt { get; set; } + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// [JsonProperty("tracking_account_number")] - public string? TrackingAccountNumber { get; set; } + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// [JsonProperty("tracking_key")] - public string? TrackingKey { get; set; } + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// [JsonProperty("tracking_ship_date")] - public string? TrackingShipDate { get; set; } + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// [JsonProperty("on_time_status")] - public string? OnTimeStatus { get; set; } + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// [JsonProperty("on_time_difference")] - public double? OnTimeDifference { get; set; } + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// [JsonProperty("order_tags")] - public string?[] OrderTags { get; set; } + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("aftership_estimated_delivery_date")] - public AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } + public AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("custom_estimated_delivery_date")] - public CustomEstimatedDeliveryDateRetrackTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } + public CustomEstimatedDeliveryDateRetrackTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// [JsonProperty("order_number")] - public string? OrderNumber { get; set; } + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("first_estimated_delivery")] - public FirstEstimatedDeliveryRetrackTrackingByIdResponse? FirstEstimatedDelivery { get; set; } + public FirstEstimatedDeliveryRetrackTrackingByIdResponse? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("latest_estimated_delivery")] - public LatestEstimatedDeliveryRetrackTrackingByIdResponse? LatestEstimatedDelivery { get; set; } + public LatestEstimatedDeliveryRetrackTrackingByIdResponse? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// [JsonProperty("shipment_tags")] - public string?[] ShipmentTags { get; set; } + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
[JsonProperty("courier_connection_id")] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region")] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region")] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code")] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state")] - public string? TrackingState { get; set; } + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// [JsonProperty("carbon_emissions")] - public CarbonEmissionsRetrackTrackingByIdResponse? CarbonEmissions { get; set; } + public CarbonEmissionsRetrackTrackingByIdResponse? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// [JsonProperty("location_id")] - public string? LocationId { get; set; } + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// [JsonProperty("shipping_method")] - public string? ShippingMethod { get; set; } + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// [JsonProperty("failed_delivery_attempts")] - public int? FailedDeliveryAttempts { get; set; } + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
[JsonProperty("signature_requirement")] - public string? SignatureRequirement { get; set; } + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// [JsonProperty("delivery_location_type")] - public string? DeliveryLocationType { get; set; } + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_url")] - public string? AftershipTrackingUrl { get; set; } + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_order_url")] - public string? AftershipTrackingOrderUrl { get; set; } + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// [JsonProperty("first_mile")] - public FirstMileRetrackTrackingByIdResponse? FirstMile { get; set; } + public FirstMileRetrackTrackingByIdResponse? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// [JsonProperty("last_mile")] - public LastMileRetrackTrackingByIdResponse? LastMile { get; set; } + public LastMileRetrackTrackingByIdResponse? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// [JsonProperty("customers")] - public CustomersRetrackTrackingByIdResponse?[] Customers { get; set; } + public CustomersRetrackTrackingByIdResponse? [] Customers { get; set; } public RetrackTrackingByIdResponse() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateRetrackTrackingByIdResponse + public class CourierEstimatedDeliveryDateRetrackTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateRetrackTrackingByIdResponse() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateRetrackTrackingByIdResponse() /// /// /// - public class ShipmentWeightRetrackTrackingByIdResponse + public class ShipmentWeightRetrackTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public ShipmentWeightRetrackTrackingByIdResponse() { @@ -461,28 +441,28 @@ public ShipmentWeightRetrackTrackingByIdResponse() /// /// /// - public class AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse + public class AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse() /// /// /// - public class CustomEstimatedDeliveryDateRetrackTrackingByIdResponse + public class CustomEstimatedDeliveryDateRetrackTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateRetrackTrackingByIdResponse() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateRetrackTrackingByIdResponse() /// /// /// - public class FirstEstimatedDeliveryRetrackTrackingByIdResponse + public class FirstEstimatedDeliveryRetrackTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryRetrackTrackingByIdResponse() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryRetrackTrackingByIdResponse() /// /// /// - public class LatestEstimatedDeliveryRetrackTrackingByIdResponse + public class LatestEstimatedDeliveryRetrackTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason")] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryRetrackTrackingByIdResponse() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryRetrackTrackingByIdResponse() /// /// /// - public class CarbonEmissionsRetrackTrackingByIdResponse + public class CarbonEmissionsRetrackTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public CarbonEmissionsRetrackTrackingByIdResponse() { @@ -611,33 +596,33 @@ public CarbonEmissionsRetrackTrackingByIdResponse() /// /// /// - public class FirstMileRetrackTrackingByIdResponse + public class FirstMileRetrackTrackingByIdResponse { /// /// TrackingNumber The tracking number of the first-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } public FirstMileRetrackTrackingByIdResponse() { @@ -646,38 +631,38 @@ public FirstMileRetrackTrackingByIdResponse() /// /// /// - public class LastMileRetrackTrackingByIdResponse + public class LastMileRetrackTrackingByIdResponse { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } public LastMileRetrackTrackingByIdResponse() { @@ -686,33 +671,33 @@ public LastMileRetrackTrackingByIdResponse() /// /// /// - public class CustomersRetrackTrackingByIdResponse + public class CustomersRetrackTrackingByIdResponse { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// [JsonProperty("role")] - public string? Role { get; set; } + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// [JsonProperty("phone_number")] - public string? PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// [JsonProperty("email")] - public string? Email { get; set; } + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } public CustomersRetrackTrackingByIdResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/SlugGroupV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/SlugGroup.cs similarity index 98% rename from src/AfterShipTracking/AfterShipTracking/Models/SlugGroupV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/SlugGroup.cs index 3065c47..832c6cd 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/SlugGroupV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/SlugGroup.cs @@ -12,7 +12,7 @@ namespace AfterShipTracking /// Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. ( /// [JsonConverter(typeof(StringEnumConverter))] - public enum SlugGroupV1 + public enum SlugGroup { [EnumMember(Value = "amazon-group")] AmazonGroup, diff --git a/src/AfterShipTracking/AfterShipTracking/Models/TagV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/Tag.cs similarity index 97% rename from src/AfterShipTracking/AfterShipTracking/Models/TagV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/Tag.cs index 6931b91..d2abeb6 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/TagV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/Tag.cs @@ -12,7 +12,7 @@ namespace AfterShipTracking /// Current status of tracking. ( /// [JsonConverter(typeof(StringEnumConverter))] - public enum TagV1 + public enum Tag { [EnumMember(Value = "Pending")] Pending, diff --git a/src/AfterShipTracking/AfterShipTracking/Models/Tracking.cs b/src/AfterShipTracking/AfterShipTracking/Models/Tracking.cs index f0f5880..22ff7ff 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/Tracking.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/Tracking.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class Tracking + public class Tracking { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string? Id { get; set; } + [JsonProperty("id",NullValueHandling = NullValueHandling.Ignore)] + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// - [JsonProperty("legacy_id", NullValueHandling = NullValueHandling.Ignore)] - public string? LegacyId { get; set; } + [JsonProperty("legacy_id",NullValueHandling = NullValueHandling.Ignore)] + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// - [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] - public string? CreatedAt { get; set; } + [JsonProperty("created_at",NullValueHandling = NullValueHandling.Ignore)] + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// - [JsonProperty("updated_at", NullValueHandling = NullValueHandling.Ignore)] - public string? UpdatedAt { get; set; } + [JsonProperty("updated_at",NullValueHandling = NullValueHandling.Ignore)] + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// - [JsonProperty("tracking_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingNumber { get; set; } + [JsonProperty("tracking_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// - [JsonProperty("active", NullValueHandling = NullValueHandling.Ignore)] - public bool? Active { get; set; } + [JsonProperty("active",NullValueHandling = NullValueHandling.Ignore)] + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// - [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] - public Dictionary? CustomFields { get; set; } + [JsonProperty("custom_fields",NullValueHandling = NullValueHandling.Ignore)] + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// - [JsonProperty("transit_time", NullValueHandling = NullValueHandling.Ignore)] - public int? TransitTime { get; set; } + [JsonProperty("transit_time",NullValueHandling = NullValueHandling.Ignore)] + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// - [JsonProperty("origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCountryRegion { get; set; } + [JsonProperty("origin_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// - [JsonProperty("origin_state", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginState { get; set; } + [JsonProperty("origin_state",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// - [JsonProperty("origin_city", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCity { get; set; } + [JsonProperty("origin_city",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// - [JsonProperty("origin_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginPostalCode { get; set; } + [JsonProperty("origin_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// - [JsonProperty("origin_raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginRawLocation { get; set; } + [JsonProperty("origin_raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// - [JsonProperty("destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCountryRegion { get; set; } + [JsonProperty("destination_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// - [JsonProperty("destination_state", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationState { get; set; } + [JsonProperty("destination_state",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// - [JsonProperty("destination_city", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCity { get; set; } + [JsonProperty("destination_city",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// - [JsonProperty("destination_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationPostalCode { get; set; } + [JsonProperty("destination_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// - [JsonProperty("destination_raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationRawLocation { get; set; } + [JsonProperty("destination_raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// - [JsonProperty("courier_destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierDestinationCountryRegion { get; set; } + [JsonProperty("courier_destination_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// - [JsonProperty("courier_estimated_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public CourierEstimatedDeliveryDateTracking? CourierEstimatedDeliveryDate { get; set; } + [JsonProperty("courier_estimated_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public CourierEstimatedDeliveryDateTracking? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// - [JsonProperty("note", NullValueHandling = NullValueHandling.Ignore)] - public string? Note { get; set; } + [JsonProperty("note",NullValueHandling = NullValueHandling.Ignore)] + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// - [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderId { get; set; } + [JsonProperty("order_id",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// - [JsonProperty("order_id_path", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderIdPath { get; set; } + [JsonProperty("order_id_path",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// - [JsonProperty("order_date", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderDate { get; set; } + [JsonProperty("order_date",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// - [JsonProperty("shipment_package_count", NullValueHandling = NullValueHandling.Ignore)] - public double? ShipmentPackageCount { get; set; } + [JsonProperty("shipment_package_count",NullValueHandling = NullValueHandling.Ignore)] + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("shipment_pickup_date", NullValueHandling = NullValueHandling.Ignore)] - public string? ShipmentPickupDate { get; set; } + [JsonProperty("shipment_pickup_date",NullValueHandling = NullValueHandling.Ignore)] + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("shipment_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? ShipmentDeliveryDate { get; set; } + [JsonProperty("shipment_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// - [JsonProperty("shipment_type", NullValueHandling = NullValueHandling.Ignore)] - public string? ShipmentType { get; set; } + [JsonProperty("shipment_type",NullValueHandling = NullValueHandling.Ignore)] + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// - [JsonProperty("shipment_weight", NullValueHandling = NullValueHandling.Ignore)] - public ShipmentWeightTracking? ShipmentWeight { get; set; } + [JsonProperty("shipment_weight",NullValueHandling = NullValueHandling.Ignore)] + public ShipmentWeightTracking? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// - [JsonProperty("signed_by", NullValueHandling = NullValueHandling.Ignore)] - public string? SignedBy { get; set; } + [JsonProperty("signed_by",NullValueHandling = NullValueHandling.Ignore)] + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public string? Source { get; set; } + [JsonProperty("source",NullValueHandling = NullValueHandling.Ignore)] + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// - [JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)] - public TagV1? Tag { get; set; } + [JsonProperty("tag",NullValueHandling = NullValueHandling.Ignore)] + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// - [JsonProperty("subtag", NullValueHandling = NullValueHandling.Ignore)] - public string? Subtag { get; set; } + [JsonProperty("subtag",NullValueHandling = NullValueHandling.Ignore)] + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// - [JsonProperty("subtag_message", NullValueHandling = NullValueHandling.Ignore)] - public string? SubtagMessage { get; set; } + [JsonProperty("subtag_message",NullValueHandling = NullValueHandling.Ignore)] + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string? Title { get; set; } + [JsonProperty("title",NullValueHandling = NullValueHandling.Ignore)] + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// - [JsonProperty("tracked_count", NullValueHandling = NullValueHandling.Ignore)] - public double? TrackedCount { get; set; } + [JsonProperty("tracked_count",NullValueHandling = NullValueHandling.Ignore)] + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// - [JsonProperty("last_mile_tracking_supported", NullValueHandling = NullValueHandling.Ignore)] - public bool? LastMileTrackingSupported { get; set; } + [JsonProperty("last_mile_tracking_supported",NullValueHandling = NullValueHandling.Ignore)] + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string? Language { get; set; } + [JsonProperty("language",NullValueHandling = NullValueHandling.Ignore)] + public string? Language { get; set; } /// /// UniqueToken Deprecated /// - [JsonProperty("unique_token", NullValueHandling = NullValueHandling.Ignore)] - public string? UniqueToken { get; set; } + [JsonProperty("unique_token",NullValueHandling = NullValueHandling.Ignore)] + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// - [JsonProperty("checkpoints", NullValueHandling = NullValueHandling.Ignore)] - public Checkpoint?[] Checkpoints { get; set; } + [JsonProperty("checkpoints",NullValueHandling = NullValueHandling.Ignore)] + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// - [JsonProperty("subscribed_smses", NullValueHandling = NullValueHandling.Ignore)] - public string?[] SubscribedSmses { get; set; } + [JsonProperty("subscribed_smses",NullValueHandling = NullValueHandling.Ignore)] + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// - [JsonProperty("subscribed_emails", NullValueHandling = NullValueHandling.Ignore)] - public string?[] SubscribedEmails { get; set; } + [JsonProperty("subscribed_emails",NullValueHandling = NullValueHandling.Ignore)] + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// - [JsonProperty("return_to_sender", NullValueHandling = NullValueHandling.Ignore)] - public bool? ReturnToSender { get; set; } + [JsonProperty("return_to_sender",NullValueHandling = NullValueHandling.Ignore)] + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("order_promised_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderPromisedDeliveryDate { get; set; } + [JsonProperty("order_promised_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// - [JsonProperty("delivery_type", NullValueHandling = NullValueHandling.Ignore)] - public string? DeliveryType { get; set; } + [JsonProperty("delivery_type",NullValueHandling = NullValueHandling.Ignore)] + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// - [JsonProperty("pickup_location", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupLocation { get; set; } + [JsonProperty("pickup_location",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// - [JsonProperty("pickup_note", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupNote { get; set; } + [JsonProperty("pickup_note",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// - [JsonProperty("courier_tracking_link", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierTrackingLink { get; set; } + [JsonProperty("courier_tracking_link",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("first_attempted_at", NullValueHandling = NullValueHandling.Ignore)] - public string? FirstAttemptedAt { get; set; } + [JsonProperty("first_attempted_at",NullValueHandling = NullValueHandling.Ignore)] + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// - [JsonProperty("courier_redirect_link", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierRedirectLink { get; set; } + [JsonProperty("courier_redirect_link",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// - [JsonProperty("tracking_account_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingAccountNumber { get; set; } + [JsonProperty("tracking_account_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// - [JsonProperty("tracking_key", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingKey { get; set; } + [JsonProperty("tracking_key",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// - [JsonProperty("tracking_ship_date", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingShipDate { get; set; } + [JsonProperty("tracking_ship_date",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// - [JsonProperty("on_time_status", NullValueHandling = NullValueHandling.Ignore)] - public string? OnTimeStatus { get; set; } + [JsonProperty("on_time_status",NullValueHandling = NullValueHandling.Ignore)] + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// - [JsonProperty("on_time_difference", NullValueHandling = NullValueHandling.Ignore)] - public double? OnTimeDifference { get; set; } + [JsonProperty("on_time_difference",NullValueHandling = NullValueHandling.Ignore)] + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// - [JsonProperty("order_tags", NullValueHandling = NullValueHandling.Ignore)] - public string?[] OrderTags { get; set; } + [JsonProperty("order_tags",NullValueHandling = NullValueHandling.Ignore)] + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// - [JsonProperty("aftership_estimated_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public AftershipEstimatedDeliveryDateTracking? AftershipEstimatedDeliveryDate { get; set; } + [JsonProperty("aftership_estimated_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public AftershipEstimatedDeliveryDateTracking? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// - [JsonProperty("custom_estimated_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public CustomEstimatedDeliveryDateTracking? CustomEstimatedDeliveryDate { get; set; } + [JsonProperty("custom_estimated_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public CustomEstimatedDeliveryDateTracking? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// - [JsonProperty("order_number", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderNumber { get; set; } + [JsonProperty("order_number",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// - [JsonProperty("first_estimated_delivery", NullValueHandling = NullValueHandling.Ignore)] - public FirstEstimatedDeliveryTracking? FirstEstimatedDelivery { get; set; } + [JsonProperty("first_estimated_delivery",NullValueHandling = NullValueHandling.Ignore)] + public FirstEstimatedDeliveryTracking? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// - [JsonProperty("latest_estimated_delivery", NullValueHandling = NullValueHandling.Ignore)] - public LatestEstimatedDeliveryTracking? LatestEstimatedDelivery { get; set; } + [JsonProperty("latest_estimated_delivery",NullValueHandling = NullValueHandling.Ignore)] + public LatestEstimatedDeliveryTracking? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// - [JsonProperty("shipment_tags", NullValueHandling = NullValueHandling.Ignore)] - public string?[] ShipmentTags { get; set; } + [JsonProperty("shipment_tags",NullValueHandling = NullValueHandling.Ignore)] + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
- [JsonProperty("courier_connection_id", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingState { get; set; } + [JsonProperty("courier_connection_id",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// - [JsonProperty("carbon_emissions", NullValueHandling = NullValueHandling.Ignore)] - public CarbonEmissionsTracking? CarbonEmissions { get; set; } + [JsonProperty("carbon_emissions",NullValueHandling = NullValueHandling.Ignore)] + public CarbonEmissionsTracking? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// - [JsonProperty("location_id", NullValueHandling = NullValueHandling.Ignore)] - public string? LocationId { get; set; } + [JsonProperty("location_id",NullValueHandling = NullValueHandling.Ignore)] + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// - [JsonProperty("shipping_method", NullValueHandling = NullValueHandling.Ignore)] - public string? ShippingMethod { get; set; } + [JsonProperty("shipping_method",NullValueHandling = NullValueHandling.Ignore)] + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// - [JsonProperty("failed_delivery_attempts", NullValueHandling = NullValueHandling.Ignore)] - public int? FailedDeliveryAttempts { get; set; } + [JsonProperty("failed_delivery_attempts",NullValueHandling = NullValueHandling.Ignore)] + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
- [JsonProperty("signature_requirement", NullValueHandling = NullValueHandling.Ignore)] - public string? SignatureRequirement { get; set; } + [JsonProperty("signature_requirement",NullValueHandling = NullValueHandling.Ignore)] + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// - [JsonProperty("delivery_location_type", NullValueHandling = NullValueHandling.Ignore)] - public string? DeliveryLocationType { get; set; } + [JsonProperty("delivery_location_type",NullValueHandling = NullValueHandling.Ignore)] + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// - [JsonProperty("aftership_tracking_url", NullValueHandling = NullValueHandling.Ignore)] - public string? AftershipTrackingUrl { get; set; } + [JsonProperty("aftership_tracking_url",NullValueHandling = NullValueHandling.Ignore)] + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// - [JsonProperty("aftership_tracking_order_url", NullValueHandling = NullValueHandling.Ignore)] - public string? AftershipTrackingOrderUrl { get; set; } + [JsonProperty("aftership_tracking_order_url",NullValueHandling = NullValueHandling.Ignore)] + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// - [JsonProperty("first_mile", NullValueHandling = NullValueHandling.Ignore)] - public FirstMileTracking? FirstMile { get; set; } + [JsonProperty("first_mile",NullValueHandling = NullValueHandling.Ignore)] + public FirstMileTracking? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// - [JsonProperty("last_mile", NullValueHandling = NullValueHandling.Ignore)] - public LastMileTracking? LastMile { get; set; } + [JsonProperty("last_mile",NullValueHandling = NullValueHandling.Ignore)] + public LastMileTracking? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// - [JsonProperty("customers", NullValueHandling = NullValueHandling.Ignore)] - public CustomersTracking?[] Customers { get; set; } + [JsonProperty("customers",NullValueHandling = NullValueHandling.Ignore)] + public CustomersTracking? [] Customers { get; set; } public Tracking() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateTracking + public class CourierEstimatedDeliveryDateTracking { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("estimated_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDate { get; set; } + [JsonProperty("estimated_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("estimated_delivery_date_min", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDateMin { get; set; } + [JsonProperty("estimated_delivery_date_min",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("estimated_delivery_date_max", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDateMax { get; set; } + [JsonProperty("estimated_delivery_date_max",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateTracking() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateTracking() /// /// /// - public class ShipmentWeightTracking + public class ShipmentWeightTracking { /// /// Unit The unit in which the value field is expressed. /// - [JsonProperty("unit", NullValueHandling = NullValueHandling.Ignore)] - public string? Unit { get; set; } + [JsonProperty("unit",NullValueHandling = NullValueHandling.Ignore)] + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public double? Value { get; set; } + [JsonProperty("value",NullValueHandling = NullValueHandling.Ignore)] + public double? Value { get; set; } public ShipmentWeightTracking() { @@ -461,28 +441,28 @@ public ShipmentWeightTracking() /// /// /// - public class AftershipEstimatedDeliveryDateTracking + public class AftershipEstimatedDeliveryDateTracking { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// - [JsonProperty("estimated_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDate { get; set; } + [JsonProperty("estimated_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// - [JsonProperty("confidence_code", NullValueHandling = NullValueHandling.Ignore)] - public double? ConfidenceCode { get; set; } + [JsonProperty("confidence_code",NullValueHandling = NullValueHandling.Ignore)] + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// - [JsonProperty("estimated_delivery_date_min", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDateMin { get; set; } + [JsonProperty("estimated_delivery_date_min",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// - [JsonProperty("estimated_delivery_date_max", NullValueHandling = NullValueHandling.Ignore)] - public string? EstimatedDeliveryDateMax { get; set; } + [JsonProperty("estimated_delivery_date_max",NullValueHandling = NullValueHandling.Ignore)] + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateTracking() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateTracking() /// /// /// - public class CustomEstimatedDeliveryDateTracking + public class CustomEstimatedDeliveryDateTracking { /// /// Type The format of the EDD. Either a single date or a date range. /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string? Type { get; set; } + [JsonProperty("type",NullValueHandling = NullValueHandling.Ignore)] + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// - [JsonProperty("datetime", NullValueHandling = NullValueHandling.Ignore)] - public string? Datetime { get; set; } + [JsonProperty("datetime",NullValueHandling = NullValueHandling.Ignore)] + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// - [JsonProperty("datetime_min", NullValueHandling = NullValueHandling.Ignore)] - public string? DatetimeMin { get; set; } + [JsonProperty("datetime_min",NullValueHandling = NullValueHandling.Ignore)] + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// - [JsonProperty("datetime_max", NullValueHandling = NullValueHandling.Ignore)] - public string? DatetimeMax { get; set; } + [JsonProperty("datetime_max",NullValueHandling = NullValueHandling.Ignore)] + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateTracking() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateTracking() /// /// /// - public class FirstEstimatedDeliveryTracking + public class FirstEstimatedDeliveryTracking { /// /// Type The format of the EDD. Either a single date or a date range. /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string? Type { get; set; } + [JsonProperty("type",NullValueHandling = NullValueHandling.Ignore)] + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public string? Source { get; set; } + [JsonProperty("source",NullValueHandling = NullValueHandling.Ignore)] + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// - [JsonProperty("datetime", NullValueHandling = NullValueHandling.Ignore)] - public string? Datetime { get; set; } + [JsonProperty("datetime",NullValueHandling = NullValueHandling.Ignore)] + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// - [JsonProperty("datetime_min", NullValueHandling = NullValueHandling.Ignore)] - public string? DatetimeMin { get; set; } + [JsonProperty("datetime_min",NullValueHandling = NullValueHandling.Ignore)] + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// - [JsonProperty("datetime_max", NullValueHandling = NullValueHandling.Ignore)] - public string? DatetimeMax { get; set; } + [JsonProperty("datetime_max",NullValueHandling = NullValueHandling.Ignore)] + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryTracking() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryTracking() /// /// /// - public class LatestEstimatedDeliveryTracking + public class LatestEstimatedDeliveryTracking { /// /// Type The format of the EDD. Either a single date or a date range. /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string? Type { get; set; } + [JsonProperty("type",NullValueHandling = NullValueHandling.Ignore)] + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public string? Source { get; set; } + [JsonProperty("source",NullValueHandling = NullValueHandling.Ignore)] + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// - [JsonProperty("datetime", NullValueHandling = NullValueHandling.Ignore)] - public string? Datetime { get; set; } + [JsonProperty("datetime",NullValueHandling = NullValueHandling.Ignore)] + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// - [JsonProperty("datetime_min", NullValueHandling = NullValueHandling.Ignore)] - public string? DatetimeMin { get; set; } + [JsonProperty("datetime_min",NullValueHandling = NullValueHandling.Ignore)] + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// - [JsonProperty("datetime_max", NullValueHandling = NullValueHandling.Ignore)] - public string? DatetimeMax { get; set; } + [JsonProperty("datetime_max",NullValueHandling = NullValueHandling.Ignore)] + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason",NullValueHandling = NullValueHandling.Ignore)] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryTracking() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryTracking() /// /// /// - public class CarbonEmissionsTracking + public class CarbonEmissionsTracking { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// - [JsonProperty("unit", NullValueHandling = NullValueHandling.Ignore)] - public string? Unit { get; set; } + [JsonProperty("unit",NullValueHandling = NullValueHandling.Ignore)] + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public double? Value { get; set; } + [JsonProperty("value",NullValueHandling = NullValueHandling.Ignore)] + public double? Value { get; set; } public CarbonEmissionsTracking() { @@ -611,33 +596,33 @@ public CarbonEmissionsTracking() /// /// /// - public class FirstMileTracking + public class FirstMileTracking { /// /// TrackingNumber The tracking number of the first-mile carrier. /// - [JsonProperty("tracking_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingNumber { get; set; } + [JsonProperty("tracking_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// - [JsonProperty("transit_time", NullValueHandling = NullValueHandling.Ignore)] - public string? TransitTime { get; set; } + [JsonProperty("transit_time",NullValueHandling = NullValueHandling.Ignore)] + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// - [JsonProperty("courier_redirect_link", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierRedirectLink { get; set; } + [JsonProperty("courier_redirect_link",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// - [JsonProperty("courier_tracking_link", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierTrackingLink { get; set; } + [JsonProperty("courier_tracking_link",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierTrackingLink { get; set; } public FirstMileTracking() { @@ -646,38 +631,38 @@ public FirstMileTracking() /// /// /// - public class LastMileTracking + public class LastMileTracking { /// /// TrackingNumber The tracking number of the last-mile carrier. /// - [JsonProperty("tracking_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingNumber { get; set; } + [JsonProperty("tracking_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// - [JsonProperty("transit_time", NullValueHandling = NullValueHandling.Ignore)] - public string? TransitTime { get; set; } + [JsonProperty("transit_time",NullValueHandling = NullValueHandling.Ignore)] + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// - [JsonProperty("courier_tracking_link", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierTrackingLink { get; set; } + [JsonProperty("courier_tracking_link",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// - [JsonProperty("courier_redirect_link", NullValueHandling = NullValueHandling.Ignore)] - public string? CourierRedirectLink { get; set; } + [JsonProperty("courier_redirect_link",NullValueHandling = NullValueHandling.Ignore)] + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public string? Source { get; set; } + [JsonProperty("source",NullValueHandling = NullValueHandling.Ignore)] + public string? Source { get; set; } public LastMileTracking() { @@ -686,33 +671,33 @@ public LastMileTracking() /// /// /// - public class CustomersTracking + public class CustomersTracking { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// - [JsonProperty("role", NullValueHandling = NullValueHandling.Ignore)] - public string? Role { get; set; } + [JsonProperty("role",NullValueHandling = NullValueHandling.Ignore)] + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string? Name { get; set; } + [JsonProperty("name",NullValueHandling = NullValueHandling.Ignore)] + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// - [JsonProperty("phone_number", NullValueHandling = NullValueHandling.Ignore)] - public string? PhoneNumber { get; set; } + [JsonProperty("phone_number",NullValueHandling = NullValueHandling.Ignore)] + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// - [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] - public string? Email { get; set; } + [JsonProperty("email",NullValueHandling = NullValueHandling.Ignore)] + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string? Language { get; set; } + [JsonProperty("language",NullValueHandling = NullValueHandling.Ignore)] + public string? Language { get; set; } public CustomersTracking() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponse.cs similarity index 79% rename from src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/TrackingResponse.cs index a8ce610..743d2f2 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponse.cs @@ -11,21 +11,21 @@ namespace AfterShipTracking /// /// Tracking response for returning single tracking /// - public class TrackingResponseV1 + public class TrackingResponse { /// /// Meta Meta data /// [JsonProperty("meta")] - public MetaV1 Meta { get; set; } + public Meta Meta { get; set; } /// /// Data Object describes the tracking information.
///
[JsonProperty("data")] - public Tracking Data { get; set; } - public TrackingResponseV1() + public Tracking Data { get; set; } + public TrackingResponse() { } } - + } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseGetMultipleV1.cs b/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseForGetTrackings.cs similarity index 52% rename from src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseGetMultipleV1.cs rename to src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseForGetTrackings.cs index 9c777f0..662724e 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseGetMultipleV1.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/TrackingResponseForGetTrackings.cs @@ -11,65 +11,65 @@ namespace AfterShipTracking /// /// Tracking response for getting tracking /// - public class TrackingResponseGetMultipleV1 + public class TrackingResponseForGetTrackings { /// /// Meta Meta data /// [JsonProperty("meta")] - public MetaV1 Meta { get; set; } + public Meta Meta { get; set; } /// /// Data /// - [JsonProperty("data", NullValueHandling = NullValueHandling.Ignore)] - public DataTrackingResponseGetMultipleV1? Data { get; set; } - public TrackingResponseGetMultipleV1() + [JsonProperty("data",NullValueHandling = NullValueHandling.Ignore)] + public DataTrackingResponseForGetTrackings? Data { get; set; } + public TrackingResponseForGetTrackings() { } } - + /// /// /// - public class DataTrackingResponseGetMultipleV1 + public class DataTrackingResponseForGetTrackings { /// /// Pagination The Pagination holds the information for the pagination when the response contains multiple objects. /// - [JsonProperty("pagination", NullValueHandling = NullValueHandling.Ignore)] - public PaginationDataTrackingResponseGetMultipleV1? Pagination { get; set; } + [JsonProperty("pagination",NullValueHandling = NullValueHandling.Ignore)] + public PaginationDataTrackingResponseForGetTrackings? Pagination { get; set; } /// /// Trackings Array of /// - [JsonProperty("trackings", NullValueHandling = NullValueHandling.Ignore)] - public Tracking?[] Trackings { get; set; } + [JsonProperty("trackings",NullValueHandling = NullValueHandling.Ignore)] + public Tracking? [] Trackings { get; set; } - public DataTrackingResponseGetMultipleV1() + public DataTrackingResponseForGetTrackings() { } } /// /// /// - public class PaginationDataTrackingResponseGetMultipleV1 + public class PaginationDataTrackingResponseForGetTrackings { /// /// Total The total number of trackings. /// - [JsonProperty("total", NullValueHandling = NullValueHandling.Ignore)] - public int? Total { get; set; } + [JsonProperty("total",NullValueHandling = NullValueHandling.Ignore)] + public int? Total { get; set; } /// /// NextCursor A string representing the cursor value for the next page of results. /// - [JsonProperty("next_cursor", NullValueHandling = NullValueHandling.Ignore)] - public string? NextCursor { get; set; } + [JsonProperty("next_cursor",NullValueHandling = NullValueHandling.Ignore)] + public string? NextCursor { get; set; } /// /// HasNextPage To indicate if next page is available. /// - [JsonProperty("has_next_page", NullValueHandling = NullValueHandling.Ignore)] - public bool? HasNextPage { get; set; } + [JsonProperty("has_next_page",NullValueHandling = NullValueHandling.Ignore)] + public bool? HasNextPage { get; set; } - public PaginationDataTrackingResponseGetMultipleV1() + public PaginationDataTrackingResponseForGetTrackings() { } } diff --git a/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdRequest.cs b/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdRequest.cs index 8afc63f..ab2fdf8 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdRequest.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdRequest.cs @@ -11,213 +11,193 @@ namespace AfterShipTracking /// /// /// - public class UpdateTrackingByIdRequest + public class UpdateTrackingByIdRequest { /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string? Title { get; set; } + [JsonProperty("title",NullValueHandling = NullValueHandling.Ignore)] + public string? Title { get; set; } /// /// OrderId A globally-unique identifier for the order. /// - [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderId { get; set; } + [JsonProperty("order_id",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// - [JsonProperty("order_id_path", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderIdPath { get; set; } + [JsonProperty("order_id_path",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderIdPath { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any /// - [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] - public Dictionary? CustomFields { get; set; } + [JsonProperty("custom_fields",NullValueHandling = NullValueHandling.Ignore)] + public Dictionary? CustomFields { get; set; } /// /// Note Text field for the note.Input `""` to clear the value of this field. /// - [JsonProperty("note", NullValueHandling = NullValueHandling.Ignore)] - public string? Note { get; set; } + [JsonProperty("note",NullValueHandling = NullValueHandling.Ignore)] + public string? Note { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. Use an to specify the language. /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string? Language { get; set; } + [JsonProperty("language",NullValueHandling = NullValueHandling.Ignore)] + public string? Language { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// - [JsonProperty("order_promised_delivery_date", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderPromisedDeliveryDate { get; set; } + [JsonProperty("order_promised_delivery_date",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- `pickup_at_store`- `pickup_at_courier`- `door_to_door` /// - [JsonProperty("delivery_type", NullValueHandling = NullValueHandling.Ignore)] - public string? DeliveryType { get; set; } + [JsonProperty("delivery_type",NullValueHandling = NullValueHandling.Ignore)] + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// - [JsonProperty("pickup_location", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupLocation { get; set; } + [JsonProperty("pickup_location",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// - [JsonProperty("pickup_note", NullValueHandling = NullValueHandling.Ignore)] - public string? PickupNote { get; set; } + [JsonProperty("pickup_note",NullValueHandling = NullValueHandling.Ignore)] + public string? PickupNote { get; set; } /// /// Slug Unique code of each courier. Provide a single courier.(https://admin.aftership.com/settings/couriers). Get a list of courier slug using /// - [JsonProperty("slug", NullValueHandling = NullValueHandling.Ignore)] - public string? Slug { get; set; } + [JsonProperty("slug",NullValueHandling = NullValueHandling.Ignore)] + public string? Slug { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// - [JsonProperty("tracking_account_number", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingAccountNumber { get; set; } + [JsonProperty("tracking_account_number",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// - [JsonProperty("tracking_key", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingKey { get; set; } + [JsonProperty("tracking_key",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// - [JsonProperty("tracking_ship_date", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingShipDate { get; set; } + [JsonProperty("tracking_ship_date",NullValueHandling = NullValueHandling.Ignore)] + public string? TrackingShipDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// - [JsonProperty("order_number", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderNumber { get; set; } + [JsonProperty("order_number",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderNumber { get; set; } /// /// OrderDate Order date in YYYY-MM-DDTHH:mm:ssZ format. e.g. 2021-07-26T11:23:51-05:00 /// - [JsonProperty("order_date", NullValueHandling = NullValueHandling.Ignore)] - public string? OrderDate { get; set; } + [JsonProperty("order_date",NullValueHandling = NullValueHandling.Ignore)] + public string? OrderDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. If you provide info for this field, AfterShip will not update it with info from the carrier. /// - [JsonProperty("shipment_type", NullValueHandling = NullValueHandling.Ignore)] - public string? ShipmentType { get; set; } + [JsonProperty("shipment_type",NullValueHandling = NullValueHandling.Ignore)] + public string? ShipmentType { get; set; } /// /// OriginCountryRegion The for more details. /// - [JsonProperty("origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCountryRegion { get; set; } + [JsonProperty("origin_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_state", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginState { get; set; } + [JsonProperty("origin_state",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_city", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginCity { get; set; } + [JsonProperty("origin_city",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginPostalCode { get; set; } + [JsonProperty("origin_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("origin_raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? OriginRawLocation { get; set; } + [JsonProperty("origin_raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for more details. /// - [JsonProperty("destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCountryRegion { get; set; } + [JsonProperty("destination_country_region",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. /// - [JsonProperty("destination_state", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationState { get; set; } + [JsonProperty("destination_state",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("destination_city", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationCity { get; set; } + [JsonProperty("destination_city",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. /// - [JsonProperty("destination_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationPostalCode { get; set; } + [JsonProperty("destination_postal_code",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. /// - [JsonProperty("destination_raw_location", NullValueHandling = NullValueHandling.Ignore)] - public string? DestinationRawLocation { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state", NullValueHandling = NullValueHandling.Ignore)] - public string? TrackingState { get; set; } + [JsonProperty("destination_raw_location",NullValueHandling = NullValueHandling.Ignore)] + public string? DestinationRawLocation { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// - [JsonProperty("location_id", NullValueHandling = NullValueHandling.Ignore)] - public string? LocationId { get; set; } + [JsonProperty("location_id",NullValueHandling = NullValueHandling.Ignore)] + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// - [JsonProperty("shipping_method", NullValueHandling = NullValueHandling.Ignore)] - public string? ShippingMethod { get; set; } + [JsonProperty("shipping_method",NullValueHandling = NullValueHandling.Ignore)] + public string? ShippingMethod { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// - [JsonProperty("customers", NullValueHandling = NullValueHandling.Ignore)] - public CustomersUpdateTrackingByIdRequest?[] Customers { get; set; } + [JsonProperty("customers",NullValueHandling = NullValueHandling.Ignore)] + public CustomersUpdateTrackingByIdRequest? [] Customers { get; set; } public UpdateTrackingByIdRequest() { } } - + /// /// /// - public class CustomersUpdateTrackingByIdRequest + public class CustomersUpdateTrackingByIdRequest { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// - [JsonProperty("role", NullValueHandling = NullValueHandling.Ignore)] - public string? Role { get; set; } + [JsonProperty("role",NullValueHandling = NullValueHandling.Ignore)] + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string? Name { get; set; } + [JsonProperty("name",NullValueHandling = NullValueHandling.Ignore)] + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// - [JsonProperty("phone_number", NullValueHandling = NullValueHandling.Ignore)] - public string? PhoneNumber { get; set; } + [JsonProperty("phone_number",NullValueHandling = NullValueHandling.Ignore)] + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// - [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] - public string? Email { get; set; } + [JsonProperty("email",NullValueHandling = NullValueHandling.Ignore)] + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string? Language { get; set; } + [JsonProperty("language",NullValueHandling = NullValueHandling.Ignore)] + public string? Language { get; set; } public CustomersUpdateTrackingByIdRequest() { diff --git a/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdResponse.cs b/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdResponse.cs index b0167b9..c03a143 100644 --- a/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdResponse.cs +++ b/src/AfterShipTracking/AfterShipTracking/Models/UpdateTrackingByIdResponse.cs @@ -11,428 +11,408 @@ namespace AfterShipTracking /// /// Object describes the tracking information.
///
- public class UpdateTrackingByIdResponse + public class UpdateTrackingByIdResponse { /// - /// Id Tracking ID. + /// Id A system-generated tracking ID by default, which can be customized by the user when creating a tracking. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } /// /// LegacyId The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before. /// [JsonProperty("legacy_id")] - public string? LegacyId { get; set; } + public string? LegacyId { get; set; } /// /// CreatedAt The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("created_at")] - public string? CreatedAt { get; set; } + public string? CreatedAt { get; set; } /// /// UpdatedAt The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0. /// [JsonProperty("updated_at")] - public string? UpdatedAt { get; set; } + public string? UpdatedAt { get; set; } /// /// TrackingNumber Tracking number. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// - /// Active Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update. + /// Active Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update. /// [JsonProperty("active")] - public bool? Active { get; set; } + public bool? Active { get; set; } /// /// CustomFields Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields. /// [JsonProperty("custom_fields")] - public Dictionary? CustomFields { get; set; } + public Dictionary? CustomFields { get; set; } /// /// TransitTime Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date. /// [JsonProperty("transit_time")] - public int? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// OriginCountryRegion The for the origin country/region. E.g. USA for the United States. /// [JsonProperty("origin_country_region")] - public string? OriginCountryRegion { get; set; } + public string? OriginCountryRegion { get; set; } /// /// OriginState The state of the sender’s address. /// [JsonProperty("origin_state")] - public string? OriginState { get; set; } + public string? OriginState { get; set; } /// /// OriginCity The city of the sender’s address. /// [JsonProperty("origin_city")] - public string? OriginCity { get; set; } + public string? OriginCity { get; set; } /// /// OriginPostalCode The postal code of the sender’s address. /// [JsonProperty("origin_postal_code")] - public string? OriginPostalCode { get; set; } + public string? OriginPostalCode { get; set; } /// /// OriginRawLocation The sender address that the shipment is shipping from. /// [JsonProperty("origin_raw_location")] - public string? OriginRawLocation { get; set; } + public string? OriginRawLocation { get; set; } /// /// DestinationCountryRegion The for the destination country/region. E.g. USA for the United States. /// [JsonProperty("destination_country_region")] - public string? DestinationCountryRegion { get; set; } + public string? DestinationCountryRegion { get; set; } /// /// DestinationState The state of the recipient’s address. /// [JsonProperty("destination_state")] - public string? DestinationState { get; set; } + public string? DestinationState { get; set; } /// /// DestinationCity The city of the recipient’s address. /// [JsonProperty("destination_city")] - public string? DestinationCity { get; set; } + public string? DestinationCity { get; set; } /// /// DestinationPostalCode The postal code of the recipient’s address. /// [JsonProperty("destination_postal_code")] - public string? DestinationPostalCode { get; set; } + public string? DestinationPostalCode { get; set; } /// /// DestinationRawLocation The shipping address that the shipment is shipping to. /// [JsonProperty("destination_raw_location")] - public string? DestinationRawLocation { get; set; } + public string? DestinationRawLocation { get; set; } /// /// CourierDestinationCountryRegion Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country. /// [JsonProperty("courier_destination_country_region")] - public string? CourierDestinationCountryRegion { get; set; } + public string? CourierDestinationCountryRegion { get; set; } /// /// CourierEstimatedDeliveryDate The field contains the estimated delivery date provided by the carrier. /// [JsonProperty("courier_estimated_delivery_date")] - public CourierEstimatedDeliveryDateUpdateTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } + public CourierEstimatedDeliveryDateUpdateTrackingByIdResponse? CourierEstimatedDeliveryDate { get; set; } /// /// Note Text field for the note. /// [JsonProperty("note")] - public string? Note { get; set; } + public string? Note { get; set; } /// /// OrderId A globally-unique identifier for the order. /// [JsonProperty("order_id")] - public string? OrderId { get; set; } + public string? OrderId { get; set; } /// /// OrderIdPath The URL for the order in your system or store. /// [JsonProperty("order_id_path")] - public string? OrderIdPath { get; set; } + public string? OrderIdPath { get; set; } /// /// OrderDate The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide. /// [JsonProperty("order_date")] - public string? OrderDate { get; set; } + public string? OrderDate { get; set; } /// /// ShipmentPackageCount Number of packages under the tracking. /// [JsonProperty("shipment_package_count")] - public double? ShipmentPackageCount { get; set; } + public double? ShipmentPackageCount { get; set; } /// /// ShipmentPickupDate The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_pickup_date")] - public string? ShipmentPickupDate { get; set; } + public string? ShipmentPickupDate { get; set; } /// /// ShipmentDeliveryDate The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("shipment_delivery_date")] - public string? ShipmentDeliveryDate { get; set; } + public string? ShipmentDeliveryDate { get; set; } /// /// ShipmentType The carrier service type for the shipment. /// [JsonProperty("shipment_type")] - public string? ShipmentType { get; set; } + public string? ShipmentType { get; set; } /// /// ShipmentWeight The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making /// [JsonProperty("shipment_weight")] - public ShipmentWeightUpdateTrackingByIdResponse? ShipmentWeight { get; set; } + public ShipmentWeightUpdateTrackingByIdResponse? ShipmentWeight { get; set; } /// /// SignedBy Signed by information for delivered shipment. /// [JsonProperty("signed_by")] - public string? SignedBy { get; set; } + public string? SignedBy { get; set; } /// /// Source Source of how this tracking is added. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Tag Current status of tracking. ( /// [JsonProperty("tag")] - public TagV1? Tag { get; set; } + public Tag? Tag { get; set; } /// /// Subtag Current subtag of tracking. ( /// [JsonProperty("subtag")] - public string? Subtag { get; set; } + public string? Subtag { get; set; } /// /// SubtagMessage Normalized tracking message. ( /// [JsonProperty("subtag_message")] - public string? SubtagMessage { get; set; } + public string? SubtagMessage { get; set; } /// /// Title By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number). /// [JsonProperty("title")] - public string? Title { get; set; } + public string? Title { get; set; } /// /// TrackedCount Number of attempts AfterShip tracks at courier's system. /// [JsonProperty("tracked_count")] - public double? TrackedCount { get; set; } + public double? TrackedCount { get; set; } /// /// LastMileTrackingSupported Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null /// [JsonProperty("last_mile_tracking_supported")] - public bool? LastMileTrackingSupported { get; set; } + public bool? LastMileTrackingSupported { get; set; } /// /// Language The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } /// /// UniqueToken Deprecated /// [JsonProperty("unique_token")] - public string? UniqueToken { get; set; } + public string? UniqueToken { get; set; } /// /// Checkpoints Array of checkpoint object describes the checkpoint information. /// [JsonProperty("checkpoints")] - public Checkpoint?[] Checkpoints { get; set; } + public Checkpoint? [] Checkpoints { get; set; } /// /// SubscribedSmses Phone number(s) subscribed to receive sms notifications. /// [JsonProperty("subscribed_smses")] - public string?[] SubscribedSmses { get; set; } + public string? [] SubscribedSmses { get; set; } /// /// SubscribedEmails Email address(es) subscribed to receive email notifications. /// [JsonProperty("subscribed_emails")] - public string?[] SubscribedEmails { get; set; } + public string? [] SubscribedEmails { get; set; } /// /// ReturnToSender Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`. /// [JsonProperty("return_to_sender")] - public bool? ReturnToSender { get; set; } + public bool? ReturnToSender { get; set; } /// /// OrderPromisedDeliveryDate The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("order_promised_delivery_date")] - public string? OrderPromisedDeliveryDate { get; set; } + public string? OrderPromisedDeliveryDate { get; set; } /// /// DeliveryType Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door /// [JsonProperty("delivery_type")] - public string? DeliveryType { get; set; } + public string? DeliveryType { get; set; } /// /// PickupLocation Shipment pickup location for receiver /// [JsonProperty("pickup_location")] - public string? PickupLocation { get; set; } + public string? PickupLocation { get; set; } /// /// PickupNote Shipment pickup note for receiver /// [JsonProperty("pickup_note")] - public string? PickupNote { get; set; } + public string? PickupNote { get; set; } /// /// CourierTrackingLink Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// FirstAttemptedAt The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("first_attempted_at")] - public string? FirstAttemptedAt { get; set; } + public string? FirstAttemptedAt { get; set; } /// /// CourierRedirectLink Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default. /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// TrackingAccountNumber Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details. /// [JsonProperty("tracking_account_number")] - public string? TrackingAccountNumber { get; set; } + public string? TrackingAccountNumber { get; set; } /// /// TrackingKey Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details. /// [JsonProperty("tracking_key")] - public string? TrackingKey { get; set; } + public string? TrackingKey { get; set; } /// /// TrackingShipDate The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field. /// [JsonProperty("tracking_ship_date")] - public string? TrackingShipDate { get; set; } + public string? TrackingShipDate { get; set; } /// /// OnTimeStatus Whether the tracking is delivered on time or not. /// [JsonProperty("on_time_status")] - public string? OnTimeStatus { get; set; } + public string? OnTimeStatus { get; set; } /// /// OnTimeDifference The difference days of the on time. /// [JsonProperty("on_time_difference")] - public double? OnTimeDifference { get; set; } + public double? OnTimeDifference { get; set; } /// /// OrderTags The tags of the order. /// [JsonProperty("order_tags")] - public string?[] OrderTags { get; set; } + public string? [] OrderTags { get; set; } /// /// AftershipEstimatedDeliveryDate The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("aftership_estimated_delivery_date")] - public AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } + public AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse? AftershipEstimatedDeliveryDate { get; set; } /// /// CustomEstimatedDeliveryDate Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. /// [JsonProperty("custom_estimated_delivery_date")] - public CustomEstimatedDeliveryDateUpdateTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } + public CustomEstimatedDeliveryDateUpdateTrackingByIdResponse? CustomEstimatedDeliveryDate { get; set; } /// /// OrderNumber A unique, human-readable identifier for the order. /// [JsonProperty("order_number")] - public string? OrderNumber { get; set; } + public string? OrderNumber { get; set; } /// /// FirstEstimatedDelivery The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("first_estimated_delivery")] - public FirstEstimatedDeliveryUpdateTrackingByIdResponse? FirstEstimatedDelivery { get; set; } + public FirstEstimatedDeliveryUpdateTrackingByIdResponse? FirstEstimatedDelivery { get; set; } /// /// LatestEstimatedDelivery The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone. /// [JsonProperty("latest_estimated_delivery")] - public LatestEstimatedDeliveryUpdateTrackingByIdResponse? LatestEstimatedDelivery { get; set; } + public LatestEstimatedDeliveryUpdateTrackingByIdResponse? LatestEstimatedDelivery { get; set; } /// /// ShipmentTags Used to add tags to your shipments to help categorize and filter them easily. /// [JsonProperty("shipment_tags")] - public string?[] ShipmentTags { get; set; } + public string? [] ShipmentTags { get; set; } /// /// CourierConnectionId If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts. ///
[JsonProperty("courier_connection_id")] - public string? CourierConnectionId { get; set; } - /// - /// TrackingOriginCountryRegion (Legacy) Replaced by `origin_country_region`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_origin_country_region")] - public string? TrackingOriginCountryRegion { get; set; } - /// - /// TrackingDestinationCountryRegion (Legacy) Replaced by `destination_country_region`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details. - /// - [JsonProperty("tracking_destination_country_region")] - public string? TrackingDestinationCountryRegion { get; set; } - /// - /// TrackingPostalCode (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_postal_code")] - public string? TrackingPostalCode { get; set; } - /// - /// TrackingState (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details. - /// - [JsonProperty("tracking_state")] - public string? TrackingState { get; set; } + public string? CourierConnectionId { get; set; } /// /// CarbonEmissions The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more. /// [JsonProperty("carbon_emissions")] - public CarbonEmissionsUpdateTrackingByIdResponse? CarbonEmissions { get; set; } + public CarbonEmissionsUpdateTrackingByIdResponse? CarbonEmissions { get; set; } /// /// LocationId The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations . /// [JsonProperty("location_id")] - public string? LocationId { get; set; } + public string? LocationId { get; set; } /// /// ShippingMethod The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc. /// [JsonProperty("shipping_method")] - public string? ShippingMethod { get; set; } + public string? ShippingMethod { get; set; } /// /// FailedDeliveryAttempts By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality. /// [JsonProperty("failed_delivery_attempts")] - public int? FailedDeliveryAttempts { get; set; } + public int? FailedDeliveryAttempts { get; set; } /// /// SignatureRequirement The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.
///
[JsonProperty("signature_requirement")] - public string? SignatureRequirement { get; set; } + public string? SignatureRequirement { get; set; } /// /// DeliveryLocationType The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage. /// [JsonProperty("delivery_location_type")] - public string? DeliveryLocationType { get; set; } + public string? DeliveryLocationType { get; set; } /// /// AftershipTrackingUrl The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_url")] - public string? AftershipTrackingUrl { get; set; } + public string? AftershipTrackingUrl { get; set; } /// /// AftershipTrackingOrderUrl The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it. /// [JsonProperty("aftership_tracking_order_url")] - public string? AftershipTrackingOrderUrl { get; set; } + public string? AftershipTrackingOrderUrl { get; set; } /// /// FirstMile The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object. /// [JsonProperty("first_mile")] - public FirstMileUpdateTrackingByIdResponse? FirstMile { get; set; } + public FirstMileUpdateTrackingByIdResponse? FirstMile { get; set; } /// /// LastMile This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically. /// [JsonProperty("last_mile")] - public LastMileUpdateTrackingByIdResponse? LastMile { get; set; } + public LastMileUpdateTrackingByIdResponse? LastMile { get; set; } /// /// Customers The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed. /// [JsonProperty("customers")] - public CustomersUpdateTrackingByIdResponse?[] Customers { get; set; } + public CustomersUpdateTrackingByIdResponse? [] Customers { get; set; } public UpdateTrackingByIdResponse() { } } - + /// /// /// - public class CourierEstimatedDeliveryDateUpdateTrackingByIdResponse + public class CourierEstimatedDeliveryDateUpdateTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// EstimatedDeliveryDateMin The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public CourierEstimatedDeliveryDateUpdateTrackingByIdResponse() { @@ -441,18 +421,18 @@ public CourierEstimatedDeliveryDateUpdateTrackingByIdResponse() /// /// /// - public class ShipmentWeightUpdateTrackingByIdResponse + public class ShipmentWeightUpdateTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of shipment weight. /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public ShipmentWeightUpdateTrackingByIdResponse() { @@ -461,28 +441,28 @@ public ShipmentWeightUpdateTrackingByIdResponse() /// /// /// - public class AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse + public class AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse { /// /// EstimatedDeliveryDate The estimated arrival date of the shipment. /// [JsonProperty("estimated_delivery_date")] - public string? EstimatedDeliveryDate { get; set; } + public string? EstimatedDeliveryDate { get; set; } /// /// ConfidenceCode Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to . /// [JsonProperty("confidence_code")] - public double? ConfidenceCode { get; set; } + public double? ConfidenceCode { get; set; } /// /// EstimatedDeliveryDateMin Earliest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_min")] - public string? EstimatedDeliveryDateMin { get; set; } + public string? EstimatedDeliveryDateMin { get; set; } /// /// EstimatedDeliveryDateMax Latest estimated delivery date of the shipment. /// [JsonProperty("estimated_delivery_date_max")] - public string? EstimatedDeliveryDateMax { get; set; } + public string? EstimatedDeliveryDateMax { get; set; } public AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse() { @@ -491,28 +471,28 @@ public AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse() /// /// /// - public class CustomEstimatedDeliveryDateUpdateTrackingByIdResponse + public class CustomEstimatedDeliveryDateUpdateTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Datetime The specific EDD date. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public CustomEstimatedDeliveryDateUpdateTrackingByIdResponse() { @@ -521,33 +501,33 @@ public CustomEstimatedDeliveryDateUpdateTrackingByIdResponse() /// /// /// - public class FirstEstimatedDeliveryUpdateTrackingByIdResponse + public class FirstEstimatedDeliveryUpdateTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } public FirstEstimatedDeliveryUpdateTrackingByIdResponse() { @@ -556,33 +536,38 @@ public FirstEstimatedDeliveryUpdateTrackingByIdResponse() /// /// /// - public class LatestEstimatedDeliveryUpdateTrackingByIdResponse + public class LatestEstimatedDeliveryUpdateTrackingByIdResponse { /// /// Type The format of the EDD. Either a single date or a date range. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } /// /// Source The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } /// /// Datetime The latest EDD time. /// [JsonProperty("datetime")] - public string? Datetime { get; set; } + public string? Datetime { get; set; } /// /// DatetimeMin For a date range EDD format, the date and time for the lower end of the range. /// [JsonProperty("datetime_min")] - public string? DatetimeMin { get; set; } + public string? DatetimeMin { get; set; } /// /// DatetimeMax For a date range EDD format, the date and time for the upper end of the range. /// [JsonProperty("datetime_max")] - public string? DatetimeMax { get; set; } + public string? DatetimeMax { get; set; } + /// + /// ReviseReason Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:1. The source for the latest EDD is AfterShip EDD. 2. The reason for the change is known.For a comprehensive list of reasons, please refer to this document. + /// + [JsonProperty("revise_reason")] + public string? ReviseReason { get; set; } public LatestEstimatedDeliveryUpdateTrackingByIdResponse() { @@ -591,18 +576,18 @@ public LatestEstimatedDeliveryUpdateTrackingByIdResponse() /// /// /// - public class CarbonEmissionsUpdateTrackingByIdResponse + public class CarbonEmissionsUpdateTrackingByIdResponse { /// /// Unit The unit in which the value field is expressed. Allowed values: kg /// [JsonProperty("unit")] - public string? Unit { get; set; } + public string? Unit { get; set; } /// /// Value The total amount of carbon emissions /// [JsonProperty("value")] - public double? Value { get; set; } + public double? Value { get; set; } public CarbonEmissionsUpdateTrackingByIdResponse() { @@ -611,33 +596,33 @@ public CarbonEmissionsUpdateTrackingByIdResponse() /// /// /// - public class FirstMileUpdateTrackingByIdResponse + public class FirstMileUpdateTrackingByIdResponse { /// /// TrackingNumber The tracking number of the first-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.- First mile transit time (in days) = Handover date - Pickup date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } public FirstMileUpdateTrackingByIdResponse() { @@ -646,38 +631,38 @@ public FirstMileUpdateTrackingByIdResponse() /// /// /// - public class LastMileUpdateTrackingByIdResponse + public class LastMileUpdateTrackingByIdResponse { /// /// TrackingNumber The tracking number of the last-mile carrier. /// [JsonProperty("tracking_number")] - public string? TrackingNumber { get; set; } + public string? TrackingNumber { get; set; } /// /// Slug The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs . /// [JsonProperty("slug")] - public string? Slug { get; set; } + public string? Slug { get; set; } /// /// TransitTime The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.- Last mile transit time (in days)= Delivered date - Handover date /// [JsonProperty("transit_time")] - public string? TransitTime { get; set; } + public int? TransitTime { get; set; } /// /// CourierTrackingLink The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_tracking_link")] - public string? CourierTrackingLink { get; set; } + public string? CourierTrackingLink { get; set; } /// /// CourierRedirectLink The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US". /// [JsonProperty("courier_redirect_link")] - public string? CourierRedirectLink { get; set; } + public string? CourierRedirectLink { get; set; } /// /// Source The field indicates the source of last-mile carrier. /// [JsonProperty("source")] - public string? Source { get; set; } + public string? Source { get; set; } public LastMileUpdateTrackingByIdResponse() { @@ -686,33 +671,33 @@ public LastMileUpdateTrackingByIdResponse() /// /// /// - public class CustomersUpdateTrackingByIdResponse + public class CustomersUpdateTrackingByIdResponse { /// /// Role The role of the customer, indicating whether the customer is an individual or a company. /// [JsonProperty("role")] - public string? Role { get; set; } + public string? Role { get; set; } /// /// Name Customer name associated with the tracking. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } /// /// PhoneNumber The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code. /// [JsonProperty("phone_number")] - public string? PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } /// /// Email Email address(es) to receive email notifications. /// [JsonProperty("email")] - public string? Email { get; set; } + public string? Email { get; set; } /// /// Language The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language. /// [JsonProperty("language")] - public string? Language { get; set; } + public string? Language { get; set; } public CustomersUpdateTrackingByIdResponse() { diff --git a/src/AfterShipTracking/AfterShipTracking/Properties/AssemblyInfo.cs b/src/AfterShipTracking/AfterShipTracking/Properties/AssemblyInfo.cs index 8b3efbc..b423bc0 100644 --- a/src/AfterShipTracking/AfterShipTracking/Properties/AssemblyInfo.cs +++ b/src/AfterShipTracking/AfterShipTracking/Properties/AssemblyInfo.cs @@ -12,5 +12,5 @@ internal class AssemblyInformation { - public const string AssemblyInformationalVersion = "10.0.0"; + public const string AssemblyInformationalVersion = "11.0.0"; } diff --git a/src/AfterShipTracking/AfterShipTracking/Public/AfterShipConfiguration.cs b/src/AfterShipTracking/AfterShipTracking/Public/AfterShipConfiguration.cs index 1ae5221..a03d448 100644 --- a/src/AfterShipTracking/AfterShipTracking/Public/AfterShipConfiguration.cs +++ b/src/AfterShipTracking/AfterShipTracking/Public/AfterShipConfiguration.cs @@ -15,7 +15,7 @@ public static class AfterShipConfiguration public const string SDK_PREFIX = "AFTERSHIP_TRACKING_SDK"; public const int DEFAULT_MAX_RETRY = 2; public const int DEFAULT_TIMEOUT = 10000; - public const string DEFAULT_USER_AGENT = "tracking-sdk-net/10.0.0 (https://www.aftership.com) System.Net.Http.HttpClient/0.0.0"; + public const string DEFAULT_USER_AGENT = "tracking-sdk-net/11.0.0 (https://www.aftership.com) System.Net.Http.HttpClient/0.0.0"; public const string DEFAULT_DOMAIN = "https://api.aftership.com"; private static string domain; @@ -38,7 +38,7 @@ public static string Domain { return domain; } - return Environment.GetEnvironmentVariable(SDK_PREFIX + "_DOMAIN") ?? DEFAULT_DOMAIN; + return Environment.GetEnvironmentVariable(SDK_PREFIX+"_DOMAIN") ?? DEFAULT_DOMAIN; } set @@ -78,13 +78,13 @@ public static int Timeout { get { - if (timeout > 0) + if (timeout >0 ) { return timeout; } if (int.TryParse(Environment.GetEnvironmentVariable(SDK_PREFIX + "_TIMEOUT"), out int n) && n > 0) { - return n; + return n; } return DEFAULT_TIMEOUT; } @@ -106,7 +106,7 @@ public static string UserAgent { return userAgent; } - return Environment.GetEnvironmentVariable(SDK_PREFIX + "_USER_AGENT") ?? null; + return Environment.GetEnvironmentVariable(SDK_PREFIX+"_USER_AGENT") ?? null; } set @@ -127,7 +127,7 @@ public static string Proxy { return proxy; } - return Environment.GetEnvironmentVariable(SDK_PREFIX + "_PROXY") ?? ""; + return Environment.GetEnvironmentVariable(SDK_PREFIX+"_PROXY") ?? ""; } set @@ -147,7 +147,7 @@ public static string ApiKey { return apiKey; } - return Environment.GetEnvironmentVariable(SDK_PREFIX + "_API_KEY") ?? ""; + return Environment.GetEnvironmentVariable(SDK_PREFIX+"_API_KEY") ?? ""; } set @@ -167,7 +167,7 @@ public static string ApiSecret { return apiSecret; } - return Environment.GetEnvironmentVariable(SDK_PREFIX + "_API_SECRET") ?? ""; + return Environment.GetEnvironmentVariable(SDK_PREFIX+"_API_SECRET") ?? ""; } set @@ -187,7 +187,7 @@ public static string AuthenticationType { return authenticationType; } - return Environment.GetEnvironmentVariable(SDK_PREFIX + "_AUTHENTICATION_TYPE") ?? AUTHENTICATION_TYPE_API_KEY; + return Environment.GetEnvironmentVariable(SDK_PREFIX+"_AUTHENTICATION_TYPE") ?? AUTHENTICATION_TYPE_API_KEY; } set diff --git a/src/AfterShipTracking/AfterShipTracking/Public/Base/BaseResourceService.cs b/src/AfterShipTracking/AfterShipTracking/Public/Base/BaseResourceService.cs index c492539..4c10b06 100644 --- a/src/AfterShipTracking/AfterShipTracking/Public/Base/BaseResourceService.cs +++ b/src/AfterShipTracking/AfterShipTracking/Public/Base/BaseResourceService.cs @@ -117,7 +117,7 @@ public static T FromJson(string value) { try { - return JsonConvert.DeserializeObject(value, settings); + return JsonConvert.DeserializeObject(value,settings); } catch (JsonException e) { diff --git a/src/AfterShipTracking/AfterShipTracking/Public/Base/Meta.cs b/src/AfterShipTracking/AfterShipTracking/Public/Base/Meta.cs deleted file mode 100644 index 6b20523..0000000 --- a/src/AfterShipTracking/AfterShipTracking/Public/Base/Meta.cs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This code was auto generated by AfterShip SDK Generator. - * Do not edit the class manually. - */ -using Newtonsoft.Json; - -namespace AfterShipTracking -{ - public class Meta - { - [JsonProperty("code")] - public int? Code { get; set; } - [JsonProperty("type")] - public string? Type { get; set; } - [JsonProperty("message")] - public string? Message { get; set; } - - public Meta(int code, string type, string message) - { - Code = code; - Type = type; - Message = message; - } - } -} - diff --git a/src/AfterShipTracking/AfterShipTracking/Public/SystemNetHttpClient.cs b/src/AfterShipTracking/AfterShipTracking/Public/SystemNetHttpClient.cs index 209944f..ef2ae24 100644 --- a/src/AfterShipTracking/AfterShipTracking/Public/SystemNetHttpClient.cs +++ b/src/AfterShipTracking/AfterShipTracking/Public/SystemNetHttpClient.cs @@ -126,10 +126,9 @@ public SystemNetHttpClient( /// with default parameters. /// /// The new instance of the class. - public static HttpClient BuildSystemNetHttpClient(int timeoutMs = DefaultTimeout, string proxyUrl = null) + public static HttpClient BuildSystemNetHttpClient(int timeoutMs= DefaultTimeout, string proxyUrl = null) { - if (timeoutMs <= 0) - { + if (timeoutMs <=0) { timeoutMs = DefaultTimeout; } TimeSpan timeout = TimeSpan.FromMilliseconds(timeoutMs); @@ -205,7 +204,7 @@ await reader.ReadToEndAsync().ConfigureAwait(false)) while (true) { requestException = null; - if (retry > this.MaxNetworkRetries) + if (retry > this.MaxNetworkRetries) { requestException = ErrorCode.GenSDKError(ErrorCode.TIMED_OUT, ErrorCode.TIMED_OUT); break; @@ -228,7 +227,7 @@ await reader.ReadToEndAsync().ConfigureAwait(false)) } catch (OperationCanceledException) { - requestException = ErrorCode.GenSDKError(ErrorCode.TIMED_OUT, ErrorCode.TIMED_OUT); + requestException = ErrorCode.GenSDKError(ErrorCode.TIMED_OUT,ErrorCode.TIMED_OUT); } stopwatch.Stop(); @@ -341,7 +340,7 @@ private TimeSpan SleepTime(int retryAttempt) public Dictionary BuildDefaultHeader(string userAgent) { - userAgent = string.IsNullOrEmpty(userAgent) ? AfterShipConfiguration.DEFAULT_USER_AGENT : userAgent; + userAgent = string.IsNullOrEmpty(userAgent) ? AfterShipConfiguration.DEFAULT_USER_AGENT: userAgent; Dictionary headers = new(); headers.Add("content-type", "application/json"); headers.Add("date", DateTime.UtcNow.ToString("r")); diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierOption.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierOption.cs index 95cf3a7..cc40685 100644 --- a/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierOption.cs +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierOption.cs @@ -10,31 +10,29 @@ namespace AfterShipTracking /// /// Description /// - public class GetAllCouriersOptions : BaseOptions + public class GetCouriersOptions : BaseOptions { - public GetAllCouriersOptions() + public GetCouriersOptions() { } + public string Active { get; set; } + public string Slug { get; set; } - } - /// - /// Description - /// - public class GetUserCouriersOptions : BaseOptions - { - public GetUserCouriersOptions() + override public List> GetQueryParams() { + var p = new List>(); + p.Add(new KeyValuePair("active", Active)); + p.Add(new KeyValuePair("slug", Slug)); + return p; } - - } /// /// Description /// public class DetectCourierOptions : BaseOptions { - public DetectCourierOptions() + public DetectCourierOptions() { } @@ -45,7 +43,7 @@ override public string GetBody() { string body = null; - if (DetectCourierRequest != null) + if ( DetectCourierRequest != null) { body = BaseResourceService.ToJson(DetectCourierRequest); } diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierService.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierService.cs index a8556d8..e8e52de 100644 --- a/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierService.cs +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/Courier/CourierService.cs @@ -16,9 +16,9 @@ public CourierService(IHttpClient httpClient) this.HttpClient = httpClient; } - public GetAllCouriersResponse GetAllCouriers(GetAllCouriersOptions? options = null) + public GetCouriersResponse GetCouriers( GetCouriersOptions? options = null) { - string path = $"/tracking/2025-01/couriers/all"; + string path = $"/tracking/2025-04/couriers"; Request request = new Request( HttpMethod.Get, path, @@ -26,23 +26,11 @@ public GetAllCouriersResponse GetAllCouriers(GetAllCouriersOptions? options = nu ); var response = this.HttpClient.MakeRequest(request); - return ProcessData(response); + return ProcessData(response); } - public GetUserCouriersResponse GetUserCouriers(GetUserCouriersOptions? options = null) + public DetectCourierResponse DetectCourier( DetectCourierOptions? options = null) { - string path = $"/tracking/2025-01/couriers"; - Request request = new Request( - HttpMethod.Get, - path, - options - ); - - var response = this.HttpClient.MakeRequest(request); - return ProcessData(response); - } - public DetectCourierResponse DetectCourier(DetectCourierOptions? options = null) - { - string path = $"/tracking/2025-01/couriers/detect"; + string path = $"/tracking/2025-04/couriers/detect"; Request request = new Request( HttpMethod.Post, path, diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionOption.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionOption.cs new file mode 100644 index 0000000..3927b17 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionOption.cs @@ -0,0 +1,100 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace AfterShipTracking +{ + /// + /// Description + /// + public class PutCourierConnectionsByIdOptions : BaseOptions + { + public PutCourierConnectionsByIdOptions() + { + } + + + public PutCourierConnectionsByIdRequest PutCourierConnectionsByIdRequest { get; set; } + + override public string GetBody() + { + string body = null; + + if ( PutCourierConnectionsByIdRequest != null) + { + body = BaseResourceService.ToJson(PutCourierConnectionsByIdRequest); + } + return body; + } + } + /// + /// Description + /// + public class GetCourierConnectionsOptions : BaseOptions + { + public GetCourierConnectionsOptions() + { + } + + public string CourierSlug { get; set; } + public string Cursor { get; set; } + public string Limit { get; set; } + + override public List> GetQueryParams() + { + var p = new List>(); + p.Add(new KeyValuePair("courier_slug", CourierSlug)); + p.Add(new KeyValuePair("cursor", Cursor)); + p.Add(new KeyValuePair("limit", Limit)); + return p; + } + } + /// + /// Description + /// + public class PostCourierConnectionsOptions : BaseOptions + { + public PostCourierConnectionsOptions() + { + } + + + public PostCourierConnectionsRequest PostCourierConnectionsRequest { get; set; } + + override public string GetBody() + { + string body = null; + + if ( PostCourierConnectionsRequest != null) + { + body = BaseResourceService.ToJson(PostCourierConnectionsRequest); + } + return body; + } + } + /// + /// Description + /// + public class GetCourierConnectionsByIdOptions : BaseOptions + { + public GetCourierConnectionsByIdOptions() + { + } + + + } + /// + /// Description + /// + public class DeleteCourierConnectionsByIdOptions : BaseOptions + { + public DeleteCourierConnectionsByIdOptions() + { + } + + + } +} diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionService.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionService.cs new file mode 100644 index 0000000..302a3c2 --- /dev/null +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/CourierConnection/CourierConnectionService.cs @@ -0,0 +1,93 @@ +/* + * This code was auto generated by AfterShip SDK Generator. + * Do not edit the class manually. + */ +using System; +using System.Net.Http; + +namespace AfterShipTracking +{ + public class CourierConnectionService : BaseResourceService + { + IHttpClient HttpClient; + + public CourierConnectionService(IHttpClient httpClient) + { + this.HttpClient = httpClient; + } + + public CourierConnection PutCourierConnectionsById(string id, PutCourierConnectionsByIdOptions? options = null) + { + string path = $"/tracking/2025-04/courier-connections/{id}"; + if (string.IsNullOrEmpty(id)) + { + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); + } + Request request = new Request( + HttpMethod.Patch, + path, + options + ); + + var response = this.HttpClient.MakeRequest(request); + return ProcessData(response); + } + public GetCourierConnectionsResponseCourierConnectionListData GetCourierConnections( GetCourierConnectionsOptions? options = null) + { + string path = $"/tracking/2025-04/courier-connections"; + Request request = new Request( + HttpMethod.Get, + path, + options + ); + + var response = this.HttpClient.MakeRequest(request); + return ProcessData(response); + } + public CourierConnection PostCourierConnections( PostCourierConnectionsOptions? options = null) + { + string path = $"/tracking/2025-04/courier-connections"; + Request request = new Request( + HttpMethod.Post, + path, + options + ); + + var response = this.HttpClient.MakeRequest(request); + return ProcessData(response); + } + public CourierConnection GetCourierConnectionsById(string id, GetCourierConnectionsByIdOptions? options = null) + { + string path = $"/tracking/2025-04/courier-connections/{id}"; + if (string.IsNullOrEmpty(id)) + { + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); + } + Request request = new Request( + HttpMethod.Get, + path, + options + ); + + var response = this.HttpClient.MakeRequest(request); + return ProcessData(response); + } + public CourierConnection DeleteCourierConnectionsById(string id, DeleteCourierConnectionsByIdOptions? options = null) + { + string path = $"/tracking/2025-04/courier-connections/{id}"; + if (string.IsNullOrEmpty(id)) + { + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); + } + Request request = new Request( + HttpMethod.Delete, + path, + options + ); + + var response = this.HttpClient.MakeRequest(request); + return ProcessData(response); + } + } +} + diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateOption.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateOption.cs index 5e2bb0f..7262f0d 100644 --- a/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateOption.cs +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateOption.cs @@ -10,22 +10,22 @@ namespace AfterShipTracking /// /// Description /// - public class PredictOptions : BaseOptions + public class PredictBatchOptions : BaseOptions { - public PredictOptions() + public PredictBatchOptions() { } - public PredictRequest PredictRequest { get; set; } + public PredictBatchRequest PredictBatchRequest { get; set; } override public string GetBody() { string body = null; - if (PredictRequest != null) + if ( PredictBatchRequest != null) { - body = BaseResourceService.ToJson(PredictRequest); + body = BaseResourceService.ToJson(PredictBatchRequest); } return body; } @@ -33,22 +33,22 @@ override public string GetBody() /// /// Description /// - public class PredictBatchOptions : BaseOptions + public class PredictOptions : BaseOptions { - public PredictBatchOptions() + public PredictOptions() { } - public PredictBatchRequest PredictBatchRequest { get; set; } + public PredictRequest PredictRequest { get; set; } override public string GetBody() { string body = null; - if (PredictBatchRequest != null) + if ( PredictRequest != null) { - body = BaseResourceService.ToJson(PredictBatchRequest); + body = BaseResourceService.ToJson(PredictRequest); } return body; } diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateService.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateService.cs index 70fd714..ebd0eb6 100644 --- a/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateService.cs +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/EstimatedDeliveryDate/EstimatedDeliveryDateService.cs @@ -16,9 +16,9 @@ public EstimatedDeliveryDateService(IHttpClient httpClient) this.HttpClient = httpClient; } - public EstimatedDeliveryDateResponse Predict(PredictOptions? options = null) + public PredictBatchResponse PredictBatch( PredictBatchOptions? options = null) { - string path = $"/tracking/2025-01/estimated-delivery-date/predict"; + string path = $"/tracking/2025-04/estimated-delivery-date/predict-batch"; Request request = new Request( HttpMethod.Post, path, @@ -26,11 +26,11 @@ public EstimatedDeliveryDateResponse Predict(PredictOptions? options = null) ); var response = this.HttpClient.MakeRequest(request); - return ProcessData(response); + return ProcessData(response); } - public PredictBatchResponse PredictBatch(PredictBatchOptions? options = null) + public EstimatedDeliveryDateResponse Predict( PredictOptions? options = null) { - string path = $"/tracking/2025-01/estimated-delivery-date/predict-batch"; + string path = $"/tracking/2025-04/estimated-delivery-date/predict"; Request request = new Request( HttpMethod.Post, path, @@ -38,7 +38,7 @@ public PredictBatchResponse PredictBatch(PredictBatchOptions? options = null) ); var response = this.HttpClient.MakeRequest(request); - return ProcessData(response); + return ProcessData(response); } } } diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingOption.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingOption.cs index 15e05d2..9d6e67e 100644 --- a/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingOption.cs +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingOption.cs @@ -7,58 +7,12 @@ namespace AfterShipTracking { - /// - /// Description - /// - public class MarkTrackingCompletedByIdOptions : BaseOptions - { - public MarkTrackingCompletedByIdOptions() - { - } - - - public MarkTrackingCompletedByIdRequest MarkTrackingCompletedByIdRequest { get; set; } - - override public string GetBody() - { - string body = null; - - if (MarkTrackingCompletedByIdRequest != null) - { - body = BaseResourceService.ToJson(MarkTrackingCompletedByIdRequest); - } - return body; - } - } - /// - /// Description - /// - public class CreateTrackingOptions : BaseOptions - { - public CreateTrackingOptions() - { - } - - - public CreateTrackingRequest CreateTrackingRequest { get; set; } - - override public string GetBody() - { - string body = null; - - if (CreateTrackingRequest != null) - { - body = BaseResourceService.ToJson(CreateTrackingRequest); - } - return body; - } - } /// /// Description /// public class GetTrackingByIdOptions : BaseOptions { - public GetTrackingByIdOptions() + public GetTrackingByIdOptions() { } @@ -78,7 +32,7 @@ override public List> GetQueryParams() /// public class UpdateTrackingByIdOptions : BaseOptions { - public UpdateTrackingByIdOptions() + public UpdateTrackingByIdOptions() { } @@ -89,7 +43,7 @@ override public string GetBody() { string body = null; - if (UpdateTrackingByIdRequest != null) + if ( UpdateTrackingByIdRequest != null) { body = BaseResourceService.ToJson(UpdateTrackingByIdRequest); } @@ -99,9 +53,9 @@ override public string GetBody() /// /// Description /// - public class RetrackTrackingByIdOptions : BaseOptions + public class DeleteTrackingByIdOptions : BaseOptions { - public RetrackTrackingByIdOptions() + public DeleteTrackingByIdOptions() { } @@ -112,7 +66,7 @@ public RetrackTrackingByIdOptions() /// public class GetTrackingsOptions : BaseOptions { - public GetTrackingsOptions() + public GetTrackingsOptions() { } @@ -162,12 +116,58 @@ override public List> GetQueryParams() /// /// Description /// - public class DeleteTrackingByIdOptions : BaseOptions + public class RetrackTrackingByIdOptions : BaseOptions + { + public RetrackTrackingByIdOptions() + { + } + + + } + /// + /// Description + /// + public class MarkTrackingCompletedByIdOptions : BaseOptions + { + public MarkTrackingCompletedByIdOptions() + { + } + + + public MarkTrackingCompletedByIdRequest MarkTrackingCompletedByIdRequest { get; set; } + + override public string GetBody() + { + string body = null; + + if ( MarkTrackingCompletedByIdRequest != null) + { + body = BaseResourceService.ToJson(MarkTrackingCompletedByIdRequest); + } + return body; + } + } + /// + /// Description + /// + public class CreateTrackingOptions : BaseOptions { - public DeleteTrackingByIdOptions() + public CreateTrackingOptions() { } + public CreateTrackingRequest CreateTrackingRequest { get; set; } + + override public string GetBody() + { + string body = null; + + if ( CreateTrackingRequest != null) + { + body = BaseResourceService.ToJson(CreateTrackingRequest); + } + return body; + } } } diff --git a/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingService.cs b/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingService.cs index 3db3864..e6b273b 100644 --- a/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingService.cs +++ b/src/AfterShipTracking/AfterShipTracking/RestAPI/Tracking/TrackingService.cs @@ -16,15 +16,15 @@ public TrackingService(IHttpClient httpClient) this.HttpClient = httpClient; } - public Tracking MarkTrackingCompletedById(string id, MarkTrackingCompletedByIdOptions? options = null) + public Tracking GetTrackingById(string id, GetTrackingByIdOptions? options = null) { - string path = $"/tracking/2025-01/trackings/{id}/mark-as-completed"; + string path = $"/tracking/2025-04/trackings/{id}"; if (string.IsNullOrEmpty(id)) { - throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR, "request error" + ": `id` is invalid"); + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); } Request request = new Request( - HttpMethod.Post, + HttpMethod.Get, path, options ); @@ -32,11 +32,15 @@ public Tracking MarkTrackingCompletedById(string id, MarkTrackingCompletedByIdOp var response = this.HttpClient.MakeRequest(request); return ProcessData(response); } - public Tracking CreateTracking(CreateTrackingOptions? options = null) + public Tracking UpdateTrackingById(string id, UpdateTrackingByIdOptions? options = null) { - string path = $"/tracking/2025-01/trackings"; + string path = $"/tracking/2025-04/trackings/{id}"; + if (string.IsNullOrEmpty(id)) + { + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); + } Request request = new Request( - HttpMethod.Post, + HttpMethod.Put, path, options ); @@ -44,15 +48,15 @@ public Tracking CreateTracking(CreateTrackingOptions? options = null) var response = this.HttpClient.MakeRequest(request); return ProcessData(response); } - public Tracking GetTrackingById(string id, GetTrackingByIdOptions? options = null) + public Tracking DeleteTrackingById(string id, DeleteTrackingByIdOptions? options = null) { - string path = $"/tracking/2025-01/trackings/{id}"; + string path = $"/tracking/2025-04/trackings/{id}"; if (string.IsNullOrEmpty(id)) { - throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR, "request error" + ": `id` is invalid"); + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); } Request request = new Request( - HttpMethod.Get, + HttpMethod.Delete, path, options ); @@ -60,28 +64,24 @@ public Tracking GetTrackingById(string id, GetTrackingByIdOptions? options = nul var response = this.HttpClient.MakeRequest(request); return ProcessData(response); } - public Tracking UpdateTrackingById(string id, UpdateTrackingByIdOptions? options = null) + public GetTrackingsResponseTrackingListData GetTrackings( GetTrackingsOptions? options = null) { - string path = $"/tracking/2025-01/trackings/{id}"; - if (string.IsNullOrEmpty(id)) - { - throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR, "request error" + ": `id` is invalid"); - } + string path = $"/tracking/2025-04/trackings"; Request request = new Request( - HttpMethod.Put, + HttpMethod.Get, path, options ); var response = this.HttpClient.MakeRequest(request); - return ProcessData(response); + return ProcessData(response); } - public Tracking RetrackTrackingById(string id, RetrackTrackingByIdOptions? options = null) + public Tracking RetrackTrackingById(string id, RetrackTrackingByIdOptions? options = null) { - string path = $"/tracking/2025-01/trackings/{id}/retrack"; + string path = $"/tracking/2025-04/trackings/{id}/retrack"; if (string.IsNullOrEmpty(id)) { - throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR, "request error" + ": `id` is invalid"); + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); } Request request = new Request( HttpMethod.Post, @@ -92,27 +92,27 @@ public Tracking RetrackTrackingById(string id, RetrackTrackingByIdOptions? optio var response = this.HttpClient.MakeRequest(request); return ProcessData(response); } - public GetTrackingsResponse GetTrackings(GetTrackingsOptions? options = null) + public Tracking MarkTrackingCompletedById(string id, MarkTrackingCompletedByIdOptions? options = null) { - string path = $"/tracking/2025-01/trackings"; + string path = $"/tracking/2025-04/trackings/{id}/mark-as-completed"; + if (string.IsNullOrEmpty(id)) + { + throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR,"request error"+": `id` is invalid"); + } Request request = new Request( - HttpMethod.Get, + HttpMethod.Post, path, options ); var response = this.HttpClient.MakeRequest(request); - return ProcessData(response); + return ProcessData(response); } - public Tracking DeleteTrackingById(string id, DeleteTrackingByIdOptions? options = null) + public Tracking CreateTracking( CreateTrackingOptions? options = null) { - string path = $"/tracking/2025-01/trackings/{id}"; - if (string.IsNullOrEmpty(id)) - { - throw ErrorCode.GenSDKError(ErrorCode.REQUEST_ERROR, "request error" + ": `id` is invalid"); - } + string path = $"/tracking/2025-04/trackings"; Request request = new Request( - HttpMethod.Delete, + HttpMethod.Post, path, options );