From 40285f41588e83c9510552bed04d2ba01e08a576 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:53:03 -0600 Subject: [PATCH 1/3] 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 --- lib/EasyPost/Service/FedExRegistrationService.php | 10 +++++----- test/EasyPost/FedExRegistrationTest.php | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/EasyPost/Service/FedExRegistrationService.php b/lib/EasyPost/Service/FedExRegistrationService.php index dd0f29be..6843494c 100644 --- a/lib/EasyPost/Service/FedExRegistrationService.php +++ b/lib/EasyPost/Service/FedExRegistrationService.php @@ -33,14 +33,14 @@ public function registerAddress(string $fedexAccountNumber, mixed $params = null * * @param string $fedexAccountNumber * @param string $pinMethodOption + * @param mixed $params * @return mixed */ - public function requestPin(string $fedexAccountNumber, string $pinMethodOption): mixed + public function requestPin(string $fedexAccountNumber, string $pinMethodOption, mixed $params = null): mixed { - $wrappedParams = [ - 'pin_method' => [ - 'option' => $pinMethodOption, - ], + $wrappedParams = $this->wrapPinValidation($params); + $wrappedParams['pin_method'] = [ + 'option' => $pinMethodOption, ]; $url = "/fedex_registrations/{$fedexAccountNumber}/pin"; diff --git a/test/EasyPost/FedExRegistrationTest.php b/test/EasyPost/FedExRegistrationTest.php index afbbda6d..9a01c8b4 100644 --- a/test/EasyPost/FedExRegistrationTest.php +++ b/test/EasyPost/FedExRegistrationTest.php @@ -112,8 +112,16 @@ public function testRegisterAddress(): void public function testRequestPin(): void { $fedexAccountNumber = '123456789'; + $params = [ + 'pin_method' => [ + 'option' => 'SMS', + ], + 'easypost_details' => [ + 'carrier_account_id' => 'ca_123', + ], + ]; - $response = self::$client->fedexRegistration->requestPin($fedexAccountNumber, 'SMS'); + $response = self::$client->fedexRegistration->requestPin($fedexAccountNumber, 'SMS', $params); $this->assertInstanceOf(EasyPostObject::class, $response); $this->assertEquals('sent secured Pin', $response->message); // @phpstan-ignore-line From 5c15193f82a001a850551b98b46f0122153cde9e Mon Sep 17 00:00:00 2001 From: Justin Hammond Date: Wed, 24 Jun 2026 14:25:27 -0600 Subject: [PATCH 2/3] Remove pin_method from testRequestPin method Removed unused pin_method parameter from test. --- test/EasyPost/FedExRegistrationTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/EasyPost/FedExRegistrationTest.php b/test/EasyPost/FedExRegistrationTest.php index 9a01c8b4..e7226271 100644 --- a/test/EasyPost/FedExRegistrationTest.php +++ b/test/EasyPost/FedExRegistrationTest.php @@ -113,9 +113,6 @@ public function testRequestPin(): void { $fedexAccountNumber = '123456789'; $params = [ - 'pin_method' => [ - 'option' => 'SMS', - ], 'easypost_details' => [ 'carrier_account_id' => 'ca_123', ], From 1c226c7106103e0a9aa2e9b1732fa250cc634ee5 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:28:05 -0600 Subject: [PATCH 3/3] docs: update changelog and version --- CHANGELOG.md | 4 ++++ composer.json | 2 +- lib/EasyPost/Constant/Constants.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b12d7209..c5dda903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v8.8.0 (2026-06-25) + +- Adds `params` to `requestPin` ensuring users can pass `easypost_details` to the call. + ## v8.7.0 (2026-02-25) - Adds generic `makeApiCall` function diff --git a/composer.json b/composer.json index 50a8ed8a..352bfd89 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "easypost/easypost-php", "description": "EasyPost Shipping API Client Library for PHP", - "version": "8.7.0", + "version": "8.8.0", "keywords": [ "shipping", "api", diff --git a/lib/EasyPost/Constant/Constants.php b/lib/EasyPost/Constant/Constants.php index 5c03b8cc..bad59171 100644 --- a/lib/EasyPost/Constant/Constants.php +++ b/lib/EasyPost/Constant/Constants.php @@ -11,7 +11,7 @@ abstract class Constants const BETA_API_VERSION = 'beta'; // Library constants - const LIBRARY_VERSION = '8.7.0'; + const LIBRARY_VERSION = '8.8.0'; const SUPPORT_EMAIL = 'support@easypost.com'; // Validation