Skip to content

Commit

Permalink
chore: deprecate tracker create_list
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Jun 14, 2024
1 parent 59fcb26 commit 99336fd
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 137 deletions.
2 changes: 1 addition & 1 deletion examples
Submodule examples updated 2714 files
3 changes: 2 additions & 1 deletion src/main/java/com/easypost/service/TrackerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ public TrackerCollection apply(Map<String, Object> parameters) {
*
* @param params Map of parameters used to create the Trackers.
* @throws EasyPostException when the request fails.
* @deprecated Use the create function instead. createList will be removed in a future release.
*/
public void createList(final Map<String, Object> params) throws EasyPostException {
@Deprecated public void createList(final Map<String, Object> params) throws EasyPostException {
Map<String, Object> newParams = new HashMap<String, Object>();
newParams.put("trackers", params);

Expand Down
46 changes: 23 additions & 23 deletions src/test/cassettes/order/buy_with_params.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions src/test/cassettes/order/buy_with_rate.json

Large diffs are not rendered by default.

27 changes: 15 additions & 12 deletions src/test/cassettes/order/create.json

Large diffs are not rendered by default.

27 changes: 12 additions & 15 deletions src/test/cassettes/order/get_rates.json

Large diffs are not rendered by default.

27 changes: 15 additions & 12 deletions src/test/cassettes/order/lowest_rate.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions src/test/cassettes/order/new_rate.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions src/test/cassettes/order/retrieve.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/test/java/com/easypost/OrderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ public void testLowestRate() throws EasyPostException {
// Test lowest rate with no filters
Rate lowestRate = order.lowestRate();
assertEquals("GroundAdvantage", lowestRate.getService());
assertEquals(5.92, lowestRate.getRate(), 0.01);
assertEquals(11.33, lowestRate.getRate(), 0.01);
assertEquals("USPS", lowestRate.getCarrier());

// Test lowest rate with service filter (this rate is higher than the lowest but should filter)
// Test lowest rate with service filter (this rate is higher than the lowest but
// should filter)
List<String> services = new ArrayList<>(Arrays.asList("Priority"));
Rate lowestRateService = order.lowestRate(null, services);
assertEquals("Priority", lowestRateService.getService());
assertEquals(6.94, lowestRateService.getRate(), 0.01);
assertEquals(13.79, lowestRateService.getRate(), 0.01);
assertEquals("USPS", lowestRateService.getCarrier());

// Test lowest rate with carrier filter (should error due to bad carrier)
Expand Down

0 comments on commit 99336fd

Please sign in to comment.