Skip to content

Commit f680bea

Browse files
committed
fix: response models
1 parent 6cfab49 commit f680bea

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
package com.easypost.model;
22

33
import java.util.Map;
4-
54
import lombok.Getter;
65

76
@Getter
8-
public final class FedExAccountValidationResponse extends EasyPostResource {
7+
public final class FedExAccountValidationResponse {
8+
// If the response contains the following, one must complete pin or invoice validation next
99
private String emailAddress;
1010
private Map<String, String> options;
1111
private String phoneNumber;
12+
13+
// If the response contains the following, pre-validation has been completed
14+
private String id;
15+
private String object;
16+
private String type;
17+
private Map<String, String> credentials;
1218
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.easypost.model;
2+
3+
import lombok.Getter;
4+
5+
@Getter
6+
public class FedExRequestPinResponse {
7+
private String message;
8+
}

src/main/java/com/easypost/model/FedexRegistration.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/main/java/com/easypost/service/FedexRegistrationService.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public FedExAccountValidationResponse registerAddress(final String fedexAccountN
4545
*
4646
* @param fedexAccountNumber The FedEx account number.
4747
* @param pinMethodOption The PIN delivery method: "SMS", "CALL", or "EMAIL".
48-
* @return FedExAccountValidationResponse object confirming PIN was sent.
48+
* @return FedExRequestPinResponse object confirming PIN was sent.
4949
* @throws EasyPostException when the request fails.
5050
*/
51-
public FedExAccountValidationResponse requestPin(final String fedexAccountNumber, final String pinMethodOption)
51+
public FedExRequestPinResponse requestPin(final String fedexAccountNumber, final String pinMethodOption)
5252
throws EasyPostException {
5353
Map<String, Object> pinMethod = new HashMap<>();
5454
pinMethod.put("option", pinMethodOption);
@@ -64,10 +64,10 @@ public FedExAccountValidationResponse requestPin(final String fedexAccountNumber
6464
*
6565
* @param fedexAccountNumber The FedEx account number.
6666
* @param params Map of parameters.
67-
* @return FedexRegistration object.
67+
* @return FedExAccountValidationResponse object.
6868
* @throws EasyPostException when the request fails.
6969
*/
70-
public FedexRegistration validatePin(final String fedexAccountNumber, final Map<String, Object> params)
70+
public FedExAccountValidationResponse validatePin(final String fedexAccountNumber, final Map<String, Object> params)
7171
throws EasyPostException {
7272
Map<String, Object> wrappedParams = wrapPinValidation(params);
7373
String endpoint = String.format("fedex_registrations/%s/pin/validate", fedexAccountNumber);
@@ -80,10 +80,10 @@ public FedexRegistration validatePin(final String fedexAccountNumber, final Map<
8080
*
8181
* @param fedexAccountNumber The FedEx account number.
8282
* @param params Map of parameters.
83-
* @return FedexRegistration object.
83+
* @return FedExAccountValidationResponse object.
8484
* @throws EasyPostException when the request fails.
8585
*/
86-
public FedexRegistration submitInvoice(final String fedexAccountNumber, final Map<String, Object> params)
86+
public FedExAccountValidationResponse submitInvoice(final String fedexAccountNumber, final Map<String, Object> params)
8787
throws EasyPostException {
8888
Map<String, Object> wrappedParams = wrapInvoiceValidation(params);
8989
String endpoint = String.format("fedex_registrations/%s/invoice", fedexAccountNumber);

0 commit comments

Comments
 (0)