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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this to your project's POM:
<dependency>
<groupId>com.easypost</groupId>
<artifactId>easypost-api-client</artifactId>
<version>8.7.0</version>
<version>8.8.0</version>
</dependency>
```

Expand All @@ -25,7 +25,7 @@ Add this to your project's POM:
Add this to your project's build file:

```groovy
implementation "com.easypost:easypost-api-client:8.7.0"
implementation "com.easypost:easypost-api-client:8.8.0"
```

**NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.7.0
8.8.0
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.easypost</groupId>
<artifactId>easypost-api-client</artifactId>

<version>8.7.0</version>
<version>8.8.0</version>
<packaging>jar</packaging>

<name>com.easypost:easypost-api-client</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ public FedExAccountValidationResponse registerAddress(final String fedexAccountN
*
* @param fedexAccountNumber The FedEx account number.
* @param pinMethodOption The PIN delivery method: "SMS", "CALL", or "EMAIL".
* @param params Map of parameters.
* @return FedExRequestPinResponse object confirming PIN was sent.
* @throws EasyPostException when the request fails.
*/
public FedExRequestPinResponse requestPin(final String fedexAccountNumber, final String pinMethodOption)
public FedExRequestPinResponse requestPin(final String fedexAccountNumber, final String pinMethodOption,
final Map<String, Object> params)
throws EasyPostException {
Map<String, Object> wrappedParams = new HashMap<>();
Map<String, Object> wrappedParams = wrapPinValidation(params);
Map<String, Object> pinMethodMap = new HashMap<>();
pinMethodMap.put("option", pinMethodOption);
wrappedParams.put("pin_method", pinMethodMap);
Expand Down
5 changes: 4 additions & 1 deletion src/test/java/com/easypost/FedExRegistrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ public void testRequestPin() throws EasyPostException {
String fedexAccountNumber = "123456789";
Map<String, Object> pinMethodMap = new java.util.HashMap<>();
pinMethodMap.put("option", "SMS");
Map<String, Object> easypostDetails = new java.util.HashMap<>();
easypostDetails.put("carrier_account_id", "ca_123");
Map<String, Object> params = new java.util.HashMap<>();
params.put("pin_method", pinMethodMap);
params.put("easypost_details", easypostDetails);

String jsonResponse = "{\"message\":\"sent secured Pin\"}";
FedExRequestPinResponse pinResponse = Constants.Http.GSON.fromJson(jsonResponse, FedExRequestPinResponse.class);
Expand All @@ -109,7 +112,7 @@ public void testRequestPin() throws EasyPostException {
vcr.client))
.thenReturn(pinResponse);

FedExRequestPinResponse response = vcr.client.fedexRegistration.requestPin(fedexAccountNumber, "SMS");
FedExRequestPinResponse response = vcr.client.fedexRegistration.requestPin(fedexAccountNumber, "SMS", params);
assertEquals("sent secured Pin", response.getMessage());
}

Expand Down
Loading