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

## 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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/EasyPost/Constant/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions lib/EasyPost/Service/FedExRegistrationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
7 changes: 6 additions & 1 deletion test/EasyPost/FedExRegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,13 @@ public function testRegisterAddress(): void
public function testRequestPin(): void
{
$fedexAccountNumber = '123456789';
$params = [
'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
Expand Down
Loading