Skip to content

Commit 431cb1e

Browse files
committed
chore: remove create_list tracker function
1 parent ff68dc0 commit 431cb1e

File tree

4 files changed

+4
-104
lines changed

4 files changed

+4
-104
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## Next Release
4+
5+
- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API
6+
37
## v9.4.1 (2024-08-09)
48

59
- Fix `get_next_page_of_children` function for User service with correct filter key

easypost/services/tracker_service.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
from typing import (
22
Any,
33
Dict,
4-
List,
54
Optional,
65
)
7-
from warnings import warn
86

97
from easypost.constant import _FILTERS_KEY
108
from easypost.models import Tracker
11-
from easypost.requestor import (
12-
RequestMethod,
13-
Requestor,
14-
)
159
from easypost.services.base_service import BaseService
1610

1711

@@ -60,18 +54,3 @@ def get_next_page(
6054
params.update(optional_params)
6155

6256
return self.all(**params)
63-
64-
def create_list(self, trackers: List[Dict[str, Any]]) -> None:
65-
"""Create a list of Trackers.
66-
67-
NOTE: This function is deprecated, use the create function instead.
68-
"""
69-
warn(
70-
"This function is deprecated, use the create function instead.",
71-
DeprecationWarning,
72-
stacklevel=2,
73-
)
74-
url = f"{self._class_url(self._model_class)}/create_list"
75-
wrapped_params = {"trackers": trackers}
76-
77-
Requestor(self._client).request(method=RequestMethod.POST, url=url, params=wrapped_params)

tests/cassettes/test_tracker_create_list.yaml

Lines changed: 0 additions & 68 deletions
This file was deleted.

tests/test_tracker.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,3 @@ def test_tracker_get_next_page(page_size, test_client):
5454
except Exception as e:
5555
if e.message != NO_MORE_PAGES_ERROR:
5656
raise Exception(_TEST_FAILED_INTENTIONALLY_ERROR)
57-
58-
59-
@pytest.mark.vcr()
60-
def test_tracker_create_list(test_client):
61-
"""Tests that we can create a list of trackers in bulk."""
62-
try:
63-
test_client.tracker.create_list(
64-
{
65-
"0": {"tracking_code": "EZ1000000001"},
66-
"1": {"tracking_code": "EZ1000000002"},
67-
"2": {"tracking_code": "EZ1000000003"},
68-
}
69-
)
70-
except Exception:
71-
assert False

0 commit comments

Comments
 (0)