From 44c670c0564157a65b984c9089c679bde1385bb4 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Thu, 21 Mar 2024 10:19:29 -0600 Subject: [PATCH] - Fix public accessibility of EasyPostTimeInTransitData class (closes #304) (#305) --- CHANGELOG.md | 4 ++++ .../com/easypost/model/EasyPostTimeInTransitData.java | 10 ++++++++++ .../java/com/easypost/model/EstimatedDeliveryDate.java | 6 ------ src/test/java/com/easypost/ShipmentTest.java | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/easypost/model/EasyPostTimeInTransitData.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 794e14f94..eda796717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Next Releease + +- Fix `EasyPostTimeInTransitData` class and `easypostTimeInTransitData` property of `EstimatedDeliveryDate` class being publicly inaccessible + ## v7.1.0 (2024-01-08) - Adds `allChildren` function in User service to get a paginated list of child users diff --git a/src/main/java/com/easypost/model/EasyPostTimeInTransitData.java b/src/main/java/com/easypost/model/EasyPostTimeInTransitData.java new file mode 100644 index 000000000..bd5bb7cda --- /dev/null +++ b/src/main/java/com/easypost/model/EasyPostTimeInTransitData.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class EasyPostTimeInTransitData { + private TimeInTransit daysInTransit; + private String easypostEstimatedDeliveryDate; + private String plannedShipDate; +} diff --git a/src/main/java/com/easypost/model/EstimatedDeliveryDate.java b/src/main/java/com/easypost/model/EstimatedDeliveryDate.java index 928d717e6..563051411 100644 --- a/src/main/java/com/easypost/model/EstimatedDeliveryDate.java +++ b/src/main/java/com/easypost/model/EstimatedDeliveryDate.java @@ -8,9 +8,3 @@ public class EstimatedDeliveryDate { private Rate rate; } -@Getter -class EasyPostTimeInTransitData { - private TimeInTransit daysInTransit; - private String easypostEstimatedDeliveryDate; - private String plannedShipDate; -} diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 283ac2afd..e5b3b6a8c 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -713,6 +713,9 @@ public void testRetrieveEstimatedDeliveryDate() throws EasyPostException { .retrieveEstimatedDeliveryDate(shipment.getId(), Fixtures.plannedShipDate()); for (EstimatedDeliveryDate estimatedDeliveryDate : estimatedDeliveryDates) { assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData()); + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData().getEasypostEstimatedDeliveryDate()); + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData().getDaysInTransit()); + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData().getDaysInTransit().getPercentile99()); } } }