Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v10.9.1 (2026-11-30)

- Fixes `get_next_page` (claims, events, insurances, pickups, refunds, scan forms, shipments and trackers) dropping the `start_datetime` and `end_datetime` filters of the original `all` call
- Fixes `claim.get_next_page` dropping the `type` and `status` filters of the original `all` call
- Fixes `tracker.get_next_page` dropping the `tracking_codes` filter of the original `all` call

## v10.9.0 (2026-11-09)

- Removes the legacy Google App Engine `urlfetch` transport; all requests now use `requests`
Expand Down
2 changes: 1 addition & 1 deletion easypost/constant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
# Library version
VERSION = "10.9.0"
VERSION = "10.9.1"
VERSION_INFO = [str(number) for number in VERSION.split(".")]

# Client defaults
Expand Down
9 changes: 9 additions & 0 deletions easypost/services/claim_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Optional,
)

from easypost.constant import _FILTERS_KEY
from easypost.easypost_object import convert_to_easypost_object
from easypost.models import Claim
from easypost.requestor import (
Expand All @@ -29,6 +30,10 @@ def all(self, **params) -> dict[str, Any]:
"""Retrieve a list of Claims."""
filters = {
"key": "claims",
"type": params.get("type"),
"status": params.get("status"),
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(class_name=self._model_class, filters=filters, beta=False, **params)
Expand All @@ -49,6 +54,10 @@ def get_next_page(
params = {
"before_id": claims["claims"][-1].id,
"page_size": page_size,
"type": claims.get(_FILTERS_KEY, {}).get("type"),
"status": claims.get(_FILTERS_KEY, {}).get("status"),
"start_datetime": claims.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": claims.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
5 changes: 5 additions & 0 deletions easypost/services/event_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Optional,
)

from easypost.constant import _FILTERS_KEY
from easypost.easypost_object import convert_to_easypost_object
from easypost.models import (
Event,
Expand All @@ -28,6 +29,8 @@ def all(self, **params) -> dict[str, Any]:
"""Retrieve a list of Events."""
filters = {
"key": "events",
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(self._model_class, filters, **params)
Expand Down Expand Up @@ -64,6 +67,8 @@ def get_next_page(
params = {
"before_id": events["events"][-1].id,
"page_size": page_size,
"start_datetime": events.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": events.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
5 changes: 5 additions & 0 deletions easypost/services/insurance_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Optional,
)

from easypost.constant import _FILTERS_KEY
from easypost.easypost_object import convert_to_easypost_object
from easypost.models import Insurance
from easypost.requestor import (
Expand All @@ -25,6 +26,8 @@ def all(self, **params) -> dict[str, Any]:
"""Retrieve a list of Insurances."""
filters = {
"key": "insurances",
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(self._model_class, filters, **params)
Expand All @@ -45,6 +48,8 @@ def get_next_page(
params = {
"before_id": insurances["insurances"][-1].id,
"page_size": page_size,
"start_datetime": insurances.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": insurances.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
5 changes: 5 additions & 0 deletions easypost/services/pickup_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Optional,
)

from easypost.constant import _FILTERS_KEY
from easypost.easypost_object import convert_to_easypost_object
from easypost.models import Pickup
from easypost.requestor import (
Expand All @@ -25,6 +26,8 @@ def all(self, **params) -> dict[str, Any]:
"""Retrieve a list of Pickups."""
filters = {
"key": "pickups",
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(self._model_class, filters, **params)
Expand All @@ -45,6 +48,8 @@ def get_next_page(
params = {
"before_id": pickups["pickups"][-1].id,
"page_size": page_size,
"start_datetime": pickups.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": pickups.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
5 changes: 5 additions & 0 deletions easypost/services/refund_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Optional,
)

from easypost.constant import _FILTERS_KEY
from easypost.models import Refund
from easypost.services.base_service import BaseService

Expand All @@ -20,6 +21,8 @@ def all(self, **params) -> dict[str, Any]:
"""Retrieve a list of Shipment Refunds."""
filters = {
"key": "refunds",
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(self._model_class, filters, **params)
Expand All @@ -40,6 +43,8 @@ def get_next_page(
params = {
"before_id": refunds["refunds"][-1].id,
"page_size": page_size,
"start_datetime": refunds.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": refunds.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
5 changes: 5 additions & 0 deletions easypost/services/scan_form_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Optional,
)

from easypost.constant import _FILTERS_KEY
from easypost.models import ScanForm
from easypost.services.base_service import BaseService

Expand All @@ -20,6 +21,8 @@ def all(self, **params) -> dict[str, Any]:
"""Retrieve a list of ScanForms."""
filters = {
"key": "scan_forms",
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(self._model_class, filters, **params)
Expand All @@ -40,6 +43,8 @@ def get_next_page(
params = {
"before_id": scan_forms["scan_forms"][-1].id,
"page_size": page_size,
"start_datetime": scan_forms.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": scan_forms.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
4 changes: 4 additions & 0 deletions easypost/services/shipment_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def all(self, **params) -> dict[str, Any]:
"key": "shipments",
"include_children": params.get("include_children"),
"purchased": params.get("purchased"),
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}

return self._all_resources(self._model_class, filters, **params)
Expand All @@ -63,6 +65,8 @@ def get_next_page(
"include_children": shipments.get(_FILTERS_KEY, {}).get("include_children"),
# Use the same purchased as the last page
"purchased": shipments.get(_FILTERS_KEY, {}).get("purchased"),
"start_datetime": shipments.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": shipments.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
7 changes: 7 additions & 0 deletions easypost/services/tracker_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def all(self, **params) -> dict[str, Any]:
"tracking_code": params.get("tracking_code"),
"tracking_codes": params.get("tracking_codes"),
"carrier": params.get("carrier"),
"start_datetime": params.get("start_datetime"),
"end_datetime": params.get("end_datetime"),
}
# Make Ruby on Rails happy with proper URL encoding
if params.get("tracking_codes"):
Expand Down Expand Up @@ -57,7 +59,12 @@ def get_next_page(
"tracking_code": trackers.get(_FILTERS_KEY, {}).get(
"tracking_code"
), # Use the same tracking_code as the last page
"tracking_codes": trackers.get(_FILTERS_KEY, {}).get(
"tracking_codes"
), # Use the same tracking_codes as the last page
"carrier": trackers.get(_FILTERS_KEY, {}).get("carrier"), # Use the same carrier as the last page
"start_datetime": trackers.get(_FILTERS_KEY, {}).get("start_datetime"),
"end_datetime": trackers.get(_FILTERS_KEY, {}).get("end_datetime"),
}

if optional_params:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "easypost"
description = "EasyPost Shipping API Client Library for Python"
version = "10.9.0"
version = "10.9.1"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
Expand Down
Loading