Skip to content

Commit 50fbe12

Browse files
authored
chore: remove all obsolete functions (#610)
* chore: remove all obsolete functions * feat: adds MerchantId shipment option * docs: remove bad changelog entry * fix: nullable name/value and comments in makefile
2 parents cc9d050 + ddadc28 commit 50fbe12

File tree

65 files changed

+855
-1731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+855
-1731
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: make scan
6161

6262
Coverage_Requirements:
63-
runs-on: ubuntu-22.04
63+
runs-on: ubuntu-latest
6464
steps:
6565
- uses: actions/checkout@v4
6666

@@ -77,7 +77,7 @@ jobs:
7777

7878
Upload_Coverage_Report:
7979
if: github.ref == 'refs/heads/master'
80-
runs-on: ubuntu-22.04
80+
runs-on: ubuntu-latest
8181
steps:
8282
- uses: actions/checkout@v4
8383

@@ -118,7 +118,7 @@ jobs:
118118

119119
NET_Tests:
120120
# derived from https://dev.to/felipetofoli/github-actions-for-net-full-framework-build-and-test-299h
121-
runs-on: windows-2022
121+
runs-on: windows-latest
122122
env:
123123
EASYPOST_TEST_API_KEY: "123"
124124
EASYPOST_PROD_API_KEY: "123"
@@ -174,7 +174,7 @@ jobs:
174174
run: make unit-test fw=${{ matrix.framework }}
175175

176176
Integration_Tests:
177-
runs-on: windows-2022
177+
runs-on: windows-latest
178178
steps:
179179
- uses: actions/checkout@v4
180180
with:
@@ -234,7 +234,7 @@ jobs:
234234
run: make netstandard-compat-test fw=net472
235235

236236
FSharp_Compatibility_Tests:
237-
runs-on: windows-2022
237+
runs-on: windows-latest
238238
steps:
239239
- uses: actions/checkout@v4
240240
with:
@@ -266,7 +266,7 @@ jobs:
266266
run: make fs-compat-test fw=net9.0 # Always run compatibility tests on the latest framework
267267

268268
Visual_Basic_Compatibility_Test:
269-
runs-on: windows-2022
269+
runs-on: windows-latest
270270
steps:
271271
- uses: actions/checkout@v4
272272
with:

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ _TeamCity*
9191
# DotCover is a Code Coverage Tool
9292
*.dotCover
9393

94+
# ReportGenerator is a Code Coverage Tool
95+
coveragereport
96+
9497
# NCrunch
9598
*.ncrunch*
9699
.*crunch*.local.xml

CHANGELOG.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,25 @@
33
## Next Release
44

55
- Minimum .NET Framework is now v4.7.2
6-
- Add custom webhook headers when creating/updating a webhook
6+
- Adds custom webhook headers when creating/updating a webhook
7+
- Adds `MerchantId` as Shipment option (closes #592)
8+
- Remove previously-marked obsolete parameter, functions and classes:
9+
- `EasyPost.Models.API.DeliveryDateForZipPairEstimate.EasyPostTimeInTransitData` property (use `EasyPost.Models.API.DeliveryDateForZipPairEstimate.TimeInTransitDetails` instead)
10+
- `EasyPost.Models.API.Options.BillReceiverAccount` property (use `EasyPost.Models.API.Options.Payment` instead)
11+
- `EasyPost.Models.API.Options.BillReceiverPostalCode` property (use `EasyPost.Models.API.Options.Payment` instead)
12+
- `EasyPost.Models.API.Options.BillThirdPartyAccount` property (use `EasyPost.Models.API.Options.Payment` instead)
13+
- `EasyPost.Models.API.Options.BillThirdPartyCountry` property (use `EasyPost.Models.API.Options.Payment` instead)
14+
- `EasyPost.Models.API.Options.BillThirdPartyPostalCode` property (use `EasyPost.Models.API.Options.Payment` instead)
15+
- `EasyPost.Models.API.Rate.EstDeliveryDays` property (use `EasyPost.Models.API.Rate.DeliveryDays` instead)
16+
- `EasyPost.Models.API.SmartRate.EstDeliveryDays` property (use `EasyPost.Models.API.SmartRate.DeliveryDays` instead)
17+
- `EasyPost.Models.API.RateWithEstimatedDeliveryDate.EasyPostTimeInTransitData` property (use `EasyPost.Models.API.RateWithEstimatedDeliveryDate.TimeInTransitDetails` instead)
18+
- `EasyPost.Models.API.RecommendShipDateForShipmentResult.EasyPostTimeInTransitData` property (use `EasyPost.Models.API.RecommendShipDateForShipmentResult.TimeInTransitDetails` instead)
19+
- `EasyPost.Models.API.ShipDateForZipPairRecommendation.EasyPostTimeInTransitData` property (use `EasyPost.Models.API.ShipDateForZipPairRecommendation.TimeInTransitDetails` instead)
20+
- `EasyPost.Models.API.Tracker.TrackingUpdatedAt` property (use `EasyPost.Models.API.Tracker.UpdatedAt` instead)
21+
- `EasyPost.Models.API.TimeInTransitDetails` class (use `EasyPost.Models.API.TimeInTransitDetailsForDeliveryDateEstimate` instead)
22+
- `EasyPost.Parameters.Tracker.CreateList` class (related function was removed in v6.8.0)
23+
- `EasyPost.Constants.CarrierAccounts.FedExAccount` variable (use `EasyPost.Models.API.CarrierAccountType.FedEx` instead)
24+
- `EasyPost.Constants.CarrierAccounts.UpsAccount` variable (use `EasyPost.Models.API.CarrierAccountType.Ups` instead)
725

826
## v6.9.0 (2024-11-19)
927

EasyPost.Integration/Basics.cs

-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public void UserCanLocallyConstructResponseObject()
7676
var supportedFeature = new SupportedFeature();
7777
var taxIdentifier = new TaxIdentifier();
7878
var timeInTransit = new TimeInTransit();
79-
var timeInTransitDetails = new TimeInTransitDetails();
8079
var timeInTransitDetailsForDeliveryDateEstimate = new TimeInTransitDetailsForDeliveryDateEstimate();
8180
var timeInTransitDetailsByDeliveryDate = new TimeInTransitDetailsForShipDateRecommendation();
8281
var tracker = new Tracker();
@@ -155,7 +154,6 @@ public void UserCanConstructParameterSets()
155154
var taxIdentifierCreateParameters = new EasyPost.Parameters.TaxIdentifier.Create();
156155
var trackerCreateParameters = new EasyPost.Parameters.Tracker.Create();
157156
var trackerAllParameters = new EasyPost.Parameters.Tracker.All();
158-
var trackerCreateListParameters = new EasyPost.Parameters.Tracker.CreateList();
159157
var userCreateChildParameters = new EasyPost.Parameters.User.CreateChild();
160158
var userAllChildrenParameters = new EasyPost.Parameters.User.AllChildren();
161159
var userUpdateParameters = new EasyPost.Parameters.User.Update();

EasyPost.Tests/Fixture.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ internal static Dictionary<string, object> BasicPickup
6464
{
6565
Dictionary<string, object> fixture = GetFixtureStructure().Pickups.Basic;
6666

67-
const string pickupDate = "2024-08-21";
67+
const string pickupDate = "2025-03-19";
6868

6969
fixture!.AddOrUpdate(pickupDate, "min_datetime");
7070
fixture!.AddOrUpdate(pickupDate, "max_datetime");
@@ -178,8 +178,6 @@ internal static ParameterSets.Address.All All(Dictionary<string, object>? fixtur
178178
PageSize = fixture.GetOrNullInt("page_size"),
179179
BeforeId = fixture.GetOrNull<string>("before_id"),
180180
AfterId = fixture.GetOrNull<string>("after_id"),
181-
StartDatetime = fixture.GetOrNull<string>("start_datetime"),
182-
EndDatetime = fixture.GetOrNull<string>("end_datetime"),
183181
};
184182
}
185183
}
@@ -597,8 +595,6 @@ internal static ParameterSets.ReferralCustomer.All All(Dictionary<string, object
597595
PageSize = fixture.GetOrNullInt("page_size"),
598596
BeforeId = fixture.GetOrNull<string>("before_id"),
599597
AfterId = fixture.GetOrNull<string>("after_id"),
600-
StartDatetime = fixture.GetOrNull<string>("start_datetime"),
601-
EndDatetime = fixture.GetOrNull<string>("end_datetime"),
602598
};
603599
}
604600
}
@@ -793,7 +789,6 @@ internal static ParameterSets.User.AllChildren AllChildren(Dictionary<string, ob
793789
return new ParameterSets.User.AllChildren
794790
{
795791
PageSize = fixture.GetOrNullInt("page_size"),
796-
BeforeId = fixture.GetOrNull<string>("before_id"),
797792
AfterId = fixture.GetOrNull<string>("after_id"),
798793
};
799794
}

EasyPost.Tests/ServicesTests/CarrierAccountServiceTest.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using System.Net;
44
using System.Threading.Tasks;
5-
using EasyPost.Exceptions.API;
65
using EasyPost.Exceptions.General;
76
using EasyPost.Http;
87
using EasyPost.Models.API;

EasyPost.Tests/ServicesTests/ShipmentServiceTest.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,10 @@ public async Task TestRetrieveEstimatedDeliveryDates()
532532
foreach (var rate in ratesWithEstimatedDeliveryDates)
533533
{
534534
// Deprecated property
535-
Assert.NotNull(rate.EasyPostTimeInTransitData);
536-
Assert.NotNull(rate.EasyPostTimeInTransitData.EasyPostEstimatedDeliveryDate);
537-
Assert.NotNull(rate.EasyPostTimeInTransitData.DaysInTransit);
538-
Assert.NotNull(rate.EasyPostTimeInTransitData.PlannedShipDate);
535+
Assert.NotNull(rate.TimeInTransitDetails);
536+
Assert.NotNull(rate.TimeInTransitDetails.EasyPostEstimatedDeliveryDate);
537+
Assert.NotNull(rate.TimeInTransitDetails.DaysInTransit);
538+
Assert.NotNull(rate.TimeInTransitDetails.PlannedShipDate);
539539

540540
// Replacement property, same data
541541
Assert.NotNull(rate.TimeInTransitDetails);

EasyPost.Tests/ServicesTests/WithParameters/ShipmentServiceTest.cs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using System.Linq;
32
using System.Threading.Tasks;
43
using EasyPost.Models.API;
54
using EasyPost.Tests._Utilities;
@@ -320,10 +319,10 @@ public async Task TestEstimatedDeliveryDates()
320319

321320
foreach (var rate in ratesWithEstimatedDeliveryDates)
322321
{
323-
Assert.NotNull(rate.EasyPostTimeInTransitData);
324-
Assert.NotNull(rate.EasyPostTimeInTransitData.EasyPostEstimatedDeliveryDate);
325-
Assert.NotNull(rate.EasyPostTimeInTransitData.DaysInTransit);
326-
Assert.NotNull(rate.EasyPostTimeInTransitData.PlannedShipDate);
322+
Assert.NotNull(rate.TimeInTransitDetails);
323+
Assert.NotNull(rate.TimeInTransitDetails.EasyPostEstimatedDeliveryDate);
324+
Assert.NotNull(rate.TimeInTransitDetails.DaysInTransit);
325+
Assert.NotNull(rate.TimeInTransitDetails.PlannedShipDate);
327326
}
328327
}
329328

EasyPost.Tests/ServicesTests/WithParameters/SmartRateServiceTest.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using System.Linq;
32
using System.Threading.Tasks;
43
using EasyPost.Exceptions.General;
54
using EasyPost.Models.API;
@@ -88,9 +87,9 @@ public async Task TestRecommendShipDate()
8887
{
8988
Assert.NotNull(estimate.Carrier);
9089
Assert.NotNull(estimate.Service);
91-
Assert.NotNull(estimate.EasyPostTimeInTransitData);
92-
Assert.NotNull(estimate.EasyPostTimeInTransitData.DaysInTransit);
93-
Assert.NotNull(estimate.EasyPostTimeInTransitData.DaysInTransit.Percentile75);
90+
Assert.NotNull(estimate.TimeInTransitDetails);
91+
Assert.NotNull(estimate.TimeInTransitDetails.DaysInTransit);
92+
Assert.NotNull(estimate.TimeInTransitDetails.DaysInTransit.Percentile75);
9493
}
9594
}
9695

0 commit comments

Comments
 (0)