Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deprecate tracker create_list #315

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading