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

## v10.7.0 (2026-06-25)

- Adds `params` to `request_pin` ensuring users can pass `easypost_details` to the call.

## v10.6.0 (2026-02-25)

- Adds generic `make_api_call` function
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.6.0"
VERSION = "10.7.0"
VERSION_INFO = [str(number) for number in VERSION.split(".")]

# Client defaults
Expand Down
5 changes: 3 additions & 2 deletions easypost/services/fedex_registration_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ def register_address(self, fedex_account_number: str, **params) -> dict[str, Any

return convert_to_easypost_object(response=response)

def request_pin(self, fedex_account_number: str, pin_method_option: str) -> dict[str, Any]:
def request_pin(self, fedex_account_number: str, pin_method_option: str, **params) -> dict[str, Any]:
"""Request a PIN for FedEx account verification."""
wrapped_params = {"pin_method": {"option": pin_method_option}}
wrapped_params = self._wrap_pin_validation(params)
wrapped_params["pin_method"] = {"option": pin_method_option}
url = f"/fedex_registrations/{fedex_account_number}/pin"

response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=wrapped_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.6.0"
version = "10.7.0"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
Expand Down
5 changes: 4 additions & 1 deletion tests/test_fedex_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def test_register_address(prod_client, monkeypatch):
def test_request_pin(prod_client, monkeypatch):
"""Tests requesting a pin."""
fedex_account_number = "123456789"
params = {
"easypost_details": {"carrier_account_id": "ca_123"},
}

json_response = {"message": "sent secured Pin"}

Expand All @@ -52,7 +55,7 @@ def test_request_pin(prod_client, monkeypatch):

monkeypatch.setattr("easypost.services.fedex_registration_service.Requestor", mock_requestor)

response = prod_client.fedex_registration.request_pin(fedex_account_number, "SMS")
response = prod_client.fedex_registration.request_pin(fedex_account_number, "SMS", **params)
assert isinstance(response, EasyPostObject)
assert response.message == "sent secured Pin"

Expand Down
Loading