From 9c5ecd2801a48464bf172499f6e48ea3754e44b6 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:56:48 -0600 Subject: [PATCH 1/2] feat: add params to requestPin Adds `params` to `requestPin` ensuring users can pass `easypost_details` to the call. Co-Authored-By: Claude Sonnet 4.5 --- easypost/services/fedex_registration_service.py | 5 +++-- tests/test_fedex_registration.py | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/easypost/services/fedex_registration_service.py b/easypost/services/fedex_registration_service.py index 7406246..ed73910 100644 --- a/easypost/services/fedex_registration_service.py +++ b/easypost/services/fedex_registration_service.py @@ -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) diff --git a/tests/test_fedex_registration.py b/tests/test_fedex_registration.py index c37d07c..4f80b2c 100644 --- a/tests/test_fedex_registration.py +++ b/tests/test_fedex_registration.py @@ -44,6 +44,10 @@ def test_register_address(prod_client, monkeypatch): def test_request_pin(prod_client, monkeypatch): """Tests requesting a pin.""" fedex_account_number = "123456789" + easypost_details = {"carrier_account_id": "ca_123"} + params = { + "easypost_details": easypost_details, + } json_response = {"message": "sent secured Pin"} @@ -52,7 +56,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" From f67a86180b1b83ac9a1ddfb3be09c38cc25a840b Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:39:18 -0600 Subject: [PATCH 2/2] chore: bump version --- CHANGELOG.md | 4 ++++ easypost/constant.py | 2 +- pyproject.toml | 2 +- tests/test_fedex_registration.py | 3 +-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b010f7f..94f0bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/easypost/constant.py b/easypost/constant.py index b83a932..07760d4 100644 --- a/easypost/constant.py +++ b/easypost/constant.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 3b7c6ba..fbda4c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" } diff --git a/tests/test_fedex_registration.py b/tests/test_fedex_registration.py index 4f80b2c..ea4e534 100644 --- a/tests/test_fedex_registration.py +++ b/tests/test_fedex_registration.py @@ -44,9 +44,8 @@ def test_register_address(prod_client, monkeypatch): def test_request_pin(prod_client, monkeypatch): """Tests requesting a pin.""" fedex_account_number = "123456789" - easypost_details = {"carrier_account_id": "ca_123"} params = { - "easypost_details": easypost_details, + "easypost_details": {"carrier_account_id": "ca_123"}, } json_response = {"message": "sent secured Pin"}