Class UserService
java.lang.Object
com.easypost.service.UserService
-
Method Summary
Modifier and TypeMethodDescriptionallChildren(Map<String, Object> params) Retrieve the paginated list of child users for the authenticated user.Create a User object with a map of parameters.voidDelete this User.getNextPage(ChildUserCollection collection, Integer pageSize) Get the next page of a ChildUserCollection.Retrieve a User from the API.Retrieve your User from the API.Update this User.updateBrand(String id, Map<String, Object> params) Update the user brand.
-
Method Details
-
retrieve
Retrieve a User from the API.- Parameters:
id- The ID of the User to retrieve.- Returns:
- User object.
- Throws:
EasyPostException- when the request fails.
-
retrieveMe
Retrieve your User from the API.- Returns:
- User object.
- Throws:
EasyPostException- when the request fails.
-
create
Create a User object with a map of parameters.- Parameters:
params- Map of User parameters.- Returns:
- User object.
- Throws:
EasyPostException- when the request fails.
-
update
Update this User.- Parameters:
id- The ID of user.params- Map of User parameters.- Returns:
- User object.
- Throws:
EasyPostException- when the request fails.
-
delete
Delete this User.- Parameters:
id- The ID of the user.- Throws:
EasyPostException- when the request fails.
-
updateBrand
Update the user brand.- Parameters:
id- The ID of user.params- Map of parameters.- Returns:
- Brand object.
- Throws:
EasyPostException- when the request fails.
-
allChildren
Retrieve the paginated list of child users for the authenticated user.- Parameters:
params- Map of parameters.- Returns:
- ChildUserCollection object.
- Throws:
EasyPostException- when the request fails.
-
getNextPage
public ChildUserCollection getNextPage(ChildUserCollection collection, Integer pageSize) throws EndOfPaginationError Get the next page of a ChildUserCollection.- Parameters:
collection- ChildUserCollection to get next page of.pageSize- The number of results to return on the next page.- Returns:
- ChildUserCollection object.
- Throws:
EndOfPaginationError- when there are no more pages to retrieve.
-