Skip to content

Commit 8aa140e

Browse files
authored
fix: Machinable shipment option type (closes #653) (#654)
# Description The type of this shipment option was incorrect. If sent as is, the shipment will return errors. This fixes the type. <!-- Please provide a general summary of your PR changes and link any related issues or other pull requests. --> # Testing <!-- Please provide details on how you tested this code. See below. - All pull requests must be tested (unit tests where possible with accompanying cassettes, or provide a screenshot of end-to-end testing when unit tests are not possible) - New features must get a new unit test - Bug fixes/refactors must re-record existing cassettes --> # Pull Request Type Please select the option(s) that are relevant to this PR. - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Improvement (fixing a typo, updating readme, renaming a variable name, etc)
1 parent 2e1e836 commit 8aa140e

8 files changed

Lines changed: 25 additions & 61 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## v7.7.1 (2026-04-03)
4+
5+
- Fixes the type of the Shipment option `Machinable` from `string` to `bool` (closes #653)
6+
37
## v7.7.0 (2026-02-25)
48

59
- Adds generic `MakeApiCallAsync` function

EasyPost.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
<id>EasyPost-Official</id>
55
<title>EasyPost (Official)</title>
6-
<version>7.7.0</version>
6+
<version>7.7.1</version>
77
<authors>EasyPost</authors>
88
<owners>EasyPost</owners>
99
<projectUrl>https://www.easypost.com</projectUrl>

EasyPost/Models/API/Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public class Options : EasyPostObject
604604
/// Whether or not the parcel can be processed by the carriers equipment.
605605
/// </summary>
606606
[JsonProperty("machinable")]
607-
public string? Machinable { get; set; }
607+
public bool? Machinable { get; set; }
608608

609609
/// <summary>
610610
/// This is a required field for DHL eCommerce shipments and should be the merchant's name. It will be displayed on the shipping label and associated with the shipment throughout transit.

EasyPost/Parameters/Shipment/GenerateForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public override Dictionary<string, object> ToDictionary()
3737
}
3838

3939
Dictionary<string, object> data = Data ?? new Dictionary<string, object>();
40-
data.Add("type", Type!);
40+
data.Add("type", Type);
4141

4242
return data.Wrap("form");
4343
}

EasyPost/Properties/VersionInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
// Version information for an assembly must follow semantic versioning
44
// When releasing a release candidate, append a 4th digit being the number of the release candidate
5-
[assembly: AssemblyVersion("7.7.0")]
6-
[assembly: AssemblyFileVersion("7.7.0")]
7-
[assembly: AssemblyInformationalVersion("7.7.0")]
5+
[assembly: AssemblyVersion("7.7.1")]
6+
[assembly: AssemblyFileVersion("7.7.1")]
7+
[assembly: AssemblyInformationalVersion("7.7.1")]

EasyPost/Services/ReferralCustomerService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public async Task<PaymentMethod> AddCreditCardToUser(string referralApiKey, stri
132132
}
133133

134134
// ReSharper disable once RedundantSuppressNullableWarningExpression
135-
string stripeToken = await CreateStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey!, cancellationToken);
135+
string stripeToken = await CreateStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey, cancellationToken);
136136

137137
#pragma warning disable IDE0046
138138
if (string.IsNullOrEmpty(stripeToken))

EasyPost/_base/EasyPostObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public abstract class EasyPostObject : EphemeralEasyPostObject
4646
public virtual Dictionary<string, object> AsDictionary() => JsonConvert.DeserializeObject<Dictionary<string, object>>(AsJson())!;
4747

4848
/// <inheritdoc />
49-
public override string ToString() => $"{Object!} {Id!}";
49+
public override string ToString() => $"{Object} {Id}";
5050

5151
/// <inheritdoc />
5252
public override bool Equals(object? obj) => GetType() == obj?.GetType() && GetHashCode() == ((EasyPostObject)obj).GetHashCode();

EasyPost/packages.lock.json

Lines changed: 13 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,26 @@
11
{
22
"version": 1,
33
"dependencies": {
4-
".NETStandard,Version=v2.0": {
5-
"NETStandard.Library": {
6-
"type": "Direct",
7-
"requested": "[2.0.3, )",
8-
"resolved": "2.0.3",
9-
"contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
10-
"dependencies": {
11-
"Microsoft.NETCore.Platforms": "1.1.0"
12-
}
13-
},
14-
"Newtonsoft.Json": {
15-
"type": "Direct",
16-
"requested": "[13.0.1, 14.0.0)",
17-
"resolved": "13.0.1",
18-
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
19-
},
20-
"Microsoft.NETCore.Platforms": {
21-
"type": "Transitive",
22-
"resolved": "1.1.0",
23-
"contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A=="
24-
}
25-
},
264
"net10.0": {
275
"Newtonsoft.Json": {
286
"type": "Direct",
297
"requested": "[13.0.1, 14.0.0)",
308
"resolved": "13.0.1",
319
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
32-
}
33-
},
34-
"net6.0": {
35-
"Newtonsoft.Json": {
36-
"type": "Direct",
37-
"requested": "[13.0.1, 14.0.0)",
38-
"resolved": "13.0.1",
39-
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
40-
}
41-
},
42-
"net7.0": {
43-
"Newtonsoft.Json": {
44-
"type": "Direct",
45-
"requested": "[13.0.1, 14.0.0)",
46-
"resolved": "13.0.1",
47-
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
48-
}
49-
},
50-
"net8.0": {
51-
"Newtonsoft.Json": {
52-
"type": "Direct",
53-
"requested": "[13.0.1, 14.0.0)",
54-
"resolved": "13.0.1",
55-
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
56-
}
57-
},
58-
"net9.0": {
59-
"Newtonsoft.Json": {
10+
},
11+
"StyleCop.Analyzers": {
6012
"type": "Direct",
61-
"requested": "[13.0.1, 14.0.0)",
62-
"resolved": "13.0.1",
63-
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
13+
"requested": "[1.2.0-beta.435, )",
14+
"resolved": "1.2.0-beta.435",
15+
"contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==",
16+
"dependencies": {
17+
"StyleCop.Analyzers.Unstable": "1.2.0.435"
18+
}
19+
},
20+
"StyleCop.Analyzers.Unstable": {
21+
"type": "Transitive",
22+
"resolved": "1.2.0.435",
23+
"contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg=="
6424
}
6525
}
6626
}

0 commit comments

Comments
 (0)