Package ch.aaap.harvestclient.api
Interface TimesheetsApi
- All Known Implementing Classes:
TimesheetsApiImpl
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(TimeEntryCreationInfoDuration creationInfo) Create a TimeEntry with a duration.create
(TimeEntryCreationInfoTimestamp creationInfo) Create a TimeEntry with a started time.void
Delete an existing TimeEntryRetrieve an existing TimeEntrylist
(TimeEntryFilter filter) Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by creation date, newest first.list
(TimeEntryFilter filter, int page, int perPage) Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by creation date, newest first.Restart a TimeEntry.Stop a TimeEntry.update
(Reference<TimeEntry> timeEntryReference, TimeEntryUpdateInfo updatedInfo) Modify an existing TimeEntry.
-
Method Details
-
list
Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by creation date, newest first.- Parameters:
filter
- filtering options- Returns:
- a list of all matching TimeEntry, newest first.
-
list
Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by creation date, newest first. Page and perPage allow controlling how many results to return.- Parameters:
filter
- filtering optionspage
- the page numberperPage
- how many results to return for one page. Max 100- Returns:
- a list of all matching TimeEntry, newest first.
-
get
Retrieve an existing TimeEntry -
create
Create a TimeEntry with a duration. If no duration is given, the TimeEntry will be running, otherwise it will not be.- Parameters:
creationInfo
- creation options- Returns:
- the created TimeEntry
- See Also:
-
create
Create a TimeEntry with a started time. The Entry will be running after if a startTime has been given.- Parameters:
creationInfo
- creation options- Returns:
- the created TimeEntry
- See Also:
-
update
Modify an existing TimeEntry.- Parameters:
timeEntryReference
- the existing TimeEntry to be modifiedupdatedInfo
- the changes to be done- Returns:
- the updated TimeEntry
- See Also:
-
delete
Delete an existing TimeEntry- Parameters:
timeEntryReference
- a reference to the TimeEntry to be deleted
-
restart
Restart a TimeEntry. Only possible if it is not running- Parameters:
timeEntryReference
- a reference to the TimeEntry to be restarted- Returns:
- the modified TimeEntry
-
stop
Stop a TimeEntry. Only possible if it is running- Parameters:
timeEntryReference
- a reference to the TimeEntry to be stopped- Returns:
- the modified TimeEntry
-