public class UsersApiImpl extends Object implements UsersApi
| Constructor and Description |
|---|
UsersApiImpl(UserService userService) |
| Modifier and Type | Method and Description |
|---|---|
User |
create(User creationInfo)
Create a new User.
|
void |
delete(Reference<User> userReference)
Delete a user.
|
User |
get(Reference<User> userReference)
Retrieve an existing user
|
User |
getSelf()
Retrieve the currently authenticated user
|
List<User> |
list(Boolean isActive,
Instant updatedSince)
Return a list of users, filtered by activity and update date, newest user
first.
|
Pagination<User> |
list(Boolean isActive,
Instant updatedSince,
int page,
int perPage)
Return a list of users, filtered by activity and update date, newest user
first.
|
User |
update(Reference<User> userReference,
UserUpdateInfo toChange)
Change an existing user.
|
public UsersApiImpl(UserService userService)
public List<User> list(Boolean isActive, Instant updatedSince)
UsersApilist in interface UsersApiisActive - if true, return only getActive users. Set to null to disable
filteringupdatedSince - return only users that have been updated at least 1 second after
updatedSince. Set to null to disable filtering.public Pagination<User> list(Boolean isActive, Instant updatedSince, int page, int perPage)
UsersApilist in interface UsersApiisActive - if true, return only getActive users. Set to null to disable
filteringupdatedSince - return only users that have been updated at least 1 second after
updatedSince. Set to null to disable filtering.page - the page numberperPage - how many results to return for one page. Max 100public User create(User creationInfo)
UsersApicreate in interface Api.Create<User>create in interface UsersApicreationInfo - a user creation object with the wanted properties. Null fields
will get a default value according to the Harvest docspublic User getSelf()
UsersApipublic User get(Reference<User> userReference)
UsersApipublic User update(Reference<User> userReference, UserUpdateInfo toChange)
UsersApipublic void delete(Reference<User> userReference)
UsersApidelete in interface Api.Delete<User>delete in interface UsersApiuserReference - a reference to an existing User to be deleted