Package ch.aaap.harvestclient.impl
Class UsersApiImpl
Object
ch.aaap.harvestclient.impl.UsersApiImpl
- All Implemented Interfaces:
Api.Create<User>
,Api.Delete<User>
,Api.Get<User>
,Api.Simple<User>
,UsersApi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new User.void
Delete a user.Retrieve an existing usergetSelf()
Retrieve the currently authenticated userReturn a list of users, filtered by activity and update date, newest user first.Return a list of users, filtered by activity and update date, newest user first.update
(Reference<User> userReference, UserUpdateInfo toChange) Change an existing user.
-
Constructor Details
-
UsersApiImpl
-
-
Method Details
-
list
Description copied from interface:UsersApi
Return a list of users, filtered by activity and update date, newest user first.- Specified by:
list
in interfaceUsersApi
- Parameters:
isActive
- 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.- Returns:
- a list of all users, filtered accordingly
-
list
Description copied from interface:UsersApi
Return a list of users, filtered by activity and update date, newest user first. Page and perPage allow controlling how many results to return.- Specified by:
list
in interfaceUsersApi
- Parameters:
isActive
- 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 100- Returns:
- a list of users, filtered accordingly
-
create
Description copied from interface:UsersApi
Create a new User. First name, last name and email are required.- Specified by:
create
in interfaceApi.Create<User>
- Specified by:
create
in interfaceUsersApi
- Parameters:
creationInfo
- a user creation object with the wanted properties. Null fields will get a default value according to the Harvest docs- Returns:
- the User that was just created
-
getSelf
Description copied from interface:UsersApi
Retrieve the currently authenticated user -
get
Description copied from interface:UsersApi
Retrieve an existing user -
update
Description copied from interface:UsersApi
Change an existing user. -
delete
Description copied from interface:UsersApi
Delete a user. Deleting a user is only possible if they have no time entries or expenses associated with them- Specified by:
delete
in interfaceApi.Delete<User>
- Specified by:
delete
in interfaceUsersApi
- Parameters:
userReference
- a reference to an existing User to be deleted
-