@@ -35,13 +35,13 @@ public static EndShipper create(final Map<String, Object> params, final String a
35
35
wrappedParams .put ("address" , params );
36
36
37
37
return request (RequestMethod .POST , String .format ("%s/%s" , EasyPost .BETA_API_BASE , "end_shippers" ),
38
- wrappedParams , EndShipper .class , apiKey );
38
+ wrappedParams , EndShipper .class , apiKey );
39
39
}
40
40
41
41
/**
42
42
* Retrieve EndShipper object from API.
43
43
*
44
- * @param id ID of end shipper to retrieve.
44
+ * @param id ID of end shipper to retrieve.
45
45
* @return EndShipper object.
46
46
* @throws EasyPostException when the request fails.
47
47
*/
@@ -59,7 +59,7 @@ public static EndShipper retrieve(final String id) throws EasyPostException {
59
59
*/
60
60
public static EndShipper retrieve (final String id , final String apiKey ) throws EasyPostException {
61
61
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 );
63
63
}
64
64
65
65
/**
@@ -85,7 +85,7 @@ public static List<EndShipper> all(final Map<String, Object> params)
85
85
public static List <EndShipper > all (final Map <String , Object > params , final String apiKey )
86
86
throws EasyPostException {
87
87
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 );
89
89
90
90
return Arrays .asList (response );
91
91
}
@@ -115,8 +115,9 @@ public EndShipper update(final Map<String, Object> params, final String apiKey)
115
115
wrappedParams .put ("address" , params );
116
116
117
117
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 );
119
119
120
- return response ;
120
+ this .merge (this , response );
121
+ return this ;
121
122
}
122
123
}
0 commit comments