Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v7.13.1 (2026-11-23)

- Fixes `EasyPostObject.GetHashCode()` and `Equals()` throwing a `NullReferenceException` when `Id` is null, such as on id-less objects returned by the API (e.g. `TrackingDetail`, `Fee`, `Message`) or models created locally (closes [678](https://github.com/EasyPost/easypost-csharp/issues/678))

## v7.13.0 (2026-11-09)

- Adds `DeliveryEvidence` property and model to the `Tracker` API model
Expand Down
11 changes: 11 additions & 0 deletions EasyPost.Tests/baseTests/EasyPostObjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ public void TestHashCode()
Assert.NotEqual(apiKey.GetHashCode(), differentProperties.GetHashCode());
}

[Fact]
[Testing.EdgeCase]
public void TestHashCodeWhenIdIsNull()
{
ApiKey apiKey = new();
ApiKey sameProperties = new();

Assert.Equal(apiKey.GetHashCode(), sameProperties.GetHashCode());
Assert.True(apiKey.Equals(sameProperties));
}

[Fact]
[Testing.Function]
public void TestEquals()
Expand Down
2 changes: 1 addition & 1 deletion EasyPost.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>EasyPost-Official</id>
<title>EasyPost (Official)</title>
<version>7.13.0</version>
<version>7.13.1</version>
<authors>EasyPost</authors>
<owners>EasyPost</owners>
<projectUrl>https://www.easypost.com</projectUrl>
Expand Down
6 changes: 3 additions & 3 deletions EasyPost/Properties/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

// Version information for an assembly must follow semantic versioning
// When releasing a release candidate, append a 4th digit being the number of the release candidate
[assembly: AssemblyVersion("7.13.0")]
[assembly: AssemblyFileVersion("7.13.0")]
[assembly: AssemblyInformationalVersion("7.13.0")]
[assembly: AssemblyVersion("7.13.1")]
[assembly: AssemblyFileVersion("7.13.1")]
[assembly: AssemblyInformationalVersion("7.13.1")]
2 changes: 1 addition & 1 deletion EasyPost/_base/EasyPostObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public abstract class EasyPostObject : EphemeralEasyPostObject
/// <inheritdoc />
// ReSharper disable once NonReadonlyMemberInGetHashCode
#pragma warning disable CA1307
public override int GetHashCode() => base.GetHashCode() ^ Id!.GetHashCode();
public override int GetHashCode() => base.GetHashCode() ^ (Id?.GetHashCode() ?? 0);
#pragma warning restore CA1307

/// <inheritdoc cref="EphemeralEasyPostObject.operator =="/>
Expand Down
Loading