Skip to content

Commit 295f361

Browse files
authored
Merge pull request #139 from EasyPost/v5.4.0
chore: prepare v5.4.0 for release
2 parents 73124fb + 936f074 commit 295f361

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# CHANGELOG
22

3-
## Next Release
3+
## v5.4.0
44

55
- Adds `PaymentMethod.all()`, `CreditCard.fund()`, and `CreditCard.delete()` functions.
6+
- Fixes a bug that did not merge local and remote objects correctly on update (eg: User, Referral)
67

78
## v5.3.0 (2022-05-19)
89

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.0
1+
5.4.0

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.easypost</groupId>
77
<artifactId>easypost-api-client</artifactId>
88

9-
<version>5.3.0</version>
9+
<version>5.4.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>com.easypost:easypost-api-client</name>

src/main/java/com/easypost/model/beta/EndShipper.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public static EndShipper create(final Map<String, Object> params, final String a
3535
wrappedParams.put("address", params);
3636

3737
return request(RequestMethod.POST, String.format("%s/%s", EasyPost.BETA_API_BASE, "end_shippers"),
38-
wrappedParams, EndShipper.class, apiKey);
38+
wrappedParams, EndShipper.class, apiKey);
3939
}
4040

4141
/**
4242
* Retrieve EndShipper object from API.
4343
*
44-
* @param id ID of end shipper to retrieve.
44+
* @param id ID of end shipper to retrieve.
4545
* @return EndShipper object.
4646
* @throws EasyPostException when the request fails.
4747
*/
@@ -59,7 +59,7 @@ public static EndShipper retrieve(final String id) throws EasyPostException {
5959
*/
6060
public static EndShipper retrieve(final String id, final String apiKey) throws EasyPostException {
6161
return request(RequestMethod.GET, String.format("%s/%s/%s",
62-
EasyPost.BETA_API_BASE, "end_shippers", id), null, EndShipper.class, apiKey);
62+
EasyPost.BETA_API_BASE, "end_shippers", id), null, EndShipper.class, apiKey);
6363
}
6464

6565
/**
@@ -85,7 +85,7 @@ public static List<EndShipper> all(final Map<String, Object> params)
8585
public static List<EndShipper> all(final Map<String, Object> params, final String apiKey)
8686
throws EasyPostException {
8787
EndShipper[] response = request(RequestMethod.GET, String.format("%s/%s", EasyPost.BETA_API_BASE,
88-
"end_shippers"), params, EndShipper[].class, apiKey);
88+
"end_shippers"), params, EndShipper[].class, apiKey);
8989

9090
return Arrays.asList(response);
9191
}
@@ -115,8 +115,9 @@ public EndShipper update(final Map<String, Object> params, final String apiKey)
115115
wrappedParams.put("address", params);
116116

117117
EndShipper response = request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.BETA_API_BASE,
118-
"end_shippers", this.getId()), wrappedParams, EndShipper.class, apiKey);
118+
"end_shippers", this.getId()), wrappedParams, EndShipper.class, apiKey);
119119

120-
return response;
120+
this.merge(this, response);
121+
return this;
121122
}
122123
}

0 commit comments

Comments
 (0)