Skip to content

Commit 24801c7

Browse files
authored
Merge pull request #616 from EasyPost/tracker_props
feat: adds missing tracker props
2 parents e8039c5 + 83969e5 commit 24801c7

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- `ReferralCustomer.AddCreditCardFromStripe`
1111
- `ReferralCustomer.AddBankAccountFromStripe`
1212
- Adds `MerchantId` as Shipment option (closes #592)
13+
- Adds missing tracker props
1314
- Routes `AmazonShippingAccount` to the correct endpoint on create
1415
- Fixes error parsing
1516
- Allows for alternative format of `errors` field (previously we deserialized the `errors` field into a list of `Error` objects; however, sometimes the errors are simply a list of strings. This change make the `errors` field a list of `objects` allowing for either the new `FieldError` object or a list of strings. Users will need to check for the type of error returned and handle appropriately)

EasyPost/Models/API/Tracker.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,18 @@ public class Tracker : EasyPostObject, Parameters.ITrackerParameter
207207
[JsonProperty("weight")]
208208
public double? Weight { get; set; }
209209

210+
/// <summary>
211+
/// Is the tracker in a finalized state.
212+
/// </summary>
213+
[JsonProperty("finalized")]
214+
public bool? Finalized { get; set; }
215+
216+
/// <summary>
217+
/// Is the tracker for a return shipment.
218+
/// </summary>
219+
[JsonProperty("is_return")]
220+
public bool? IsReturn { get; set; }
221+
210222
#endregion
211223

212224
}

EasyPost/Models/API/TrackingDetail.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ public class TrackingDetail : EasyPostObject
2323
[JsonProperty("message")]
2424
public string? Message { get; set; }
2525

26+
/// <summary>
27+
/// A human-readable description of the scan event.
28+
/// </summary>
29+
[JsonProperty("description")]
30+
public string? Description { get; set; }
31+
32+
/// <summary>
33+
/// A code associated with the carrier.
34+
/// </summary>
35+
[JsonProperty("carrier_code")]
36+
public string? CarrierCode { get; set; }
37+
2638
/// <summary>
2739
/// The original source of the information for this scan event, usually the carrier.
2840
/// </summary>
@@ -164,6 +176,12 @@ public class TrackingDetail : EasyPostObject
164176
[JsonProperty("tracking_location")]
165177
public TrackingLocation? TrackingLocation { get; set; }
166178

179+
/// <summary>
180+
/// The estimated delivery date of the tracker.
181+
/// </summary>
182+
[JsonProperty("est_delivery_date")]
183+
public DateTime? EstDeliveryDate { get; set; }
184+
167185
#endregion
168186

169187
}

0 commit comments

Comments
 (0)