public class TimesheetsApiImpl extends Object implements TimesheetsApi
| Constructor and Description |
|---|
TimesheetsApiImpl(TimeEntryService timeEntryService) |
| Modifier and Type | Method and Description |
|---|---|
TimeEntry |
create(TimeEntryCreationInfoDuration creationInfo)
Create a TimeEntry with a duration.
|
TimeEntry |
create(TimeEntryCreationInfoTimestamp creationInfo)
Create a TimeEntry with a started time.
|
void |
delete(Reference<TimeEntry> timeEntryReference)
Delete an existing TimeEntry
|
TimeEntry |
get(Reference<TimeEntry> timeEntryReference)
Retrieve an existing TimeEntry
|
List<TimeEntry> |
list(TimeEntryFilter filter)
Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by
creation date, newest first.
|
Pagination<TimeEntry> |
list(TimeEntryFilter filter,
int page,
int perPage)
Return a list of all TimeEntries, filtered by the TimeEntryFilter, sorted by
creation date, newest first.
|
TimeEntry |
restart(Reference<TimeEntry> timeEntryReference)
Restart a TimeEntry.
|
TimeEntry |
stop(Reference<TimeEntry> timeEntryReference)
Stop a TimeEntry.
|
TimeEntry |
update(Reference<TimeEntry> timeEntryReference,
TimeEntryUpdateInfo updatedInfo)
Modify an existing TimeEntry.
|
public TimesheetsApiImpl(TimeEntryService timeEntryService)
public List<TimeEntry> list(TimeEntryFilter filter)
TimesheetsApilist in interface TimesheetsApifilter - filtering optionspublic Pagination<TimeEntry> list(TimeEntryFilter filter, int page, int perPage)
TimesheetsApilist in interface TimesheetsApifilter - filtering optionspage - the page numberperPage - how many results to return for one page. Max 100public TimeEntry get(Reference<TimeEntry> timeEntryReference)
TimesheetsApiget in interface Api.Get<TimeEntry>get in interface TimesheetsApitimeEntryReference - a reference to an the timeentry to retrievepublic TimeEntry create(TimeEntryCreationInfoDuration creationInfo)
TimesheetsApicreate in interface TimesheetsApicreationInfo - creation optionsTimeEntryCreationInfoDurationpublic TimeEntry create(TimeEntryCreationInfoTimestamp creationInfo)
TimesheetsApicreate in interface TimesheetsApicreationInfo - creation optionsTimeEntryCreationInfoTimestamppublic TimeEntry update(Reference<TimeEntry> timeEntryReference, TimeEntryUpdateInfo updatedInfo)
TimesheetsApiupdate in interface TimesheetsApitimeEntryReference - the existing TimeEntry to be modifiedupdatedInfo - the changes to be doneTimesheetsApi.stop(Reference),
TimesheetsApi.restart(Reference)public void delete(Reference<TimeEntry> timeEntryReference)
TimesheetsApidelete in interface TimesheetsApitimeEntryReference - a reference to the TimeEntry to be deletedpublic TimeEntry restart(Reference<TimeEntry> timeEntryReference)
TimesheetsApirestart in interface TimesheetsApitimeEntryReference - a reference to the TimeEntry to be restartedpublic TimeEntry stop(Reference<TimeEntry> timeEntryReference)
TimesheetsApistop in interface TimesheetsApitimeEntryReference - a reference to the TimeEntry to be stopped