Skip to content

Commit

Permalink
chore: remove create_list tracker endpoint function
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Sep 23, 2024
1 parent c0b3e19 commit 9a3ab85
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 136 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next Release

- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API

## v7.4.3 (2024-09-16)

- Remove the custom DateDeserializer that contained a parsing issue. This change closes the related GitHub issue [#333](https://github.com/EasyPost/easypost-java/issues/333)
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/com/easypost/service/TrackerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,4 @@ public TrackerCollection apply(Map<String, Object> parameters) {
}
}, collection.getTrackers(), pageSize);
}

/**
* Create a list of Trackers.
*
* @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.
*/
@Deprecated public void createList(final Map<String, Object> params) throws EasyPostException {
Map<String, Object> newParams = new HashMap<String, Object>();
newParams.put("trackers", params);

String endpoint = "trackers/create_list";

Requestor.request(RequestMethod.POST, endpoint, newParams, Object.class, client);
}
}
94 changes: 0 additions & 94 deletions src/test/cassettes/tracker/create_list.json

This file was deleted.

26 changes: 0 additions & 26 deletions src/test/java/com/easypost/TrackerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,30 +208,4 @@ public Map<String, Object> getNextPageParams() throws EndOfPaginationError {
assertEquals(trackingCode, nextPageParams.get("tracking_code"));
assertEquals(carrier, nextPageParams.get("carrier"));
}

/**
* Test creating a list of trackers.
*
* @throws EasyPostException when the request fails.
*/
@Test
public void testCreateList() throws EasyPostException {
vcr.setUpTest("create_list");

Map<String, Object> params = new HashMap<>();
String[] trackingCodes = new String[] {
"EZ1000000001",
"EZ1000000002",
"EZ1000000003"
};

for (int i = 0; i < trackingCodes.length; i++) {
Map<String, Object> tracker = new HashMap<>();

tracker.put("tracking_code", trackingCodes[i]);
params.put(String.valueOf(i), tracker);
}

assertDoesNotThrow(() -> vcr.client.tracker.createList(params));
}
}

0 comments on commit 9a3ab85

Please sign in to comment.