Package ch.aaap.harvestclient.impl
Class TimesheetsApiImpl
Object
ch.aaap.harvestclient.impl.TimesheetsApiImpl
- All Implemented Interfaces:
Api.Get<TimeEntry>
,TimesheetsApi
-
Constructor Summary
-
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.
-
Constructor Details
-
TimesheetsApiImpl
-
-
Method Details
-
list
Description copied from interface:TimesheetsApi
Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by creation date, newest first.- Specified by:
list
in interfaceTimesheetsApi
- Parameters:
filter
- filtering options- Returns:
- a list of all matching TimeEntry, newest first.
-
list
Description copied from interface:TimesheetsApi
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.- Specified by:
list
in interfaceTimesheetsApi
- 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
Description copied from interface:TimesheetsApi
Retrieve an existing TimeEntry- Specified by:
get
in interfaceApi.Get<TimeEntry>
- Specified by:
get
in interfaceTimesheetsApi
- Parameters:
timeEntryReference
- a reference to an the timeentry to retrieve- Returns:
- a Full TimeEntry object
-
create
Description copied from interface:TimesheetsApi
Create a TimeEntry with a duration. If no duration is given, the TimeEntry will be running, otherwise it will not be.- Specified by:
create
in interfaceTimesheetsApi
- Parameters:
creationInfo
- creation options- Returns:
- the created TimeEntry
- See Also:
-
create
Description copied from interface:TimesheetsApi
Create a TimeEntry with a started time. The Entry will be running after if a startTime has been given.- Specified by:
create
in interfaceTimesheetsApi
- Parameters:
creationInfo
- creation options- Returns:
- the created TimeEntry
- See Also:
-
update
Description copied from interface:TimesheetsApi
Modify an existing TimeEntry.- Specified by:
update
in interfaceTimesheetsApi
- Parameters:
timeEntryReference
- the existing TimeEntry to be modifiedupdatedInfo
- the changes to be done- Returns:
- the updated TimeEntry
- See Also:
-
delete
Description copied from interface:TimesheetsApi
Delete an existing TimeEntry- Specified by:
delete
in interfaceTimesheetsApi
- Parameters:
timeEntryReference
- a reference to the TimeEntry to be deleted
-
restart
Description copied from interface:TimesheetsApi
Restart a TimeEntry. Only possible if it is not running- Specified by:
restart
in interfaceTimesheetsApi
- Parameters:
timeEntryReference
- a reference to the TimeEntry to be restarted- Returns:
- the modified TimeEntry
-
stop
Description copied from interface:TimesheetsApi
Stop a TimeEntry. Only possible if it is running- Specified by:
stop
in interfaceTimesheetsApi
- Parameters:
timeEntryReference
- a reference to the TimeEntry to be stopped- Returns:
- the modified TimeEntry
-