Interface TimesheetsApi

All Superinterfaces:
Api.Get<TimeEntry>
All Known Implementing Classes:
TimesheetsApiImpl

public interface TimesheetsApi extends Api.Get<TimeEntry>
See Also:
  • 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

      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. Page and perPage allow controlling how many results to return.
      Parameters:
      filter - filtering options
      page - the page number
      perPage - how many results to return for one page. Max 100
      Returns:
      a list of all matching TimeEntry, newest first.
    • get

      TimeEntry get(Reference<TimeEntry> timeEntryReference)
      Retrieve an existing TimeEntry
      Specified by:
      get in interface Api.Get<TimeEntry>
      Parameters:
      timeEntryReference - a reference to an the timeentry to retrieve
      Returns:
      a Full TimeEntry object
    • 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

      TimeEntry update(Reference<TimeEntry> timeEntryReference, TimeEntryUpdateInfo updatedInfo)
      Modify an existing TimeEntry.
      Parameters:
      timeEntryReference - the existing TimeEntry to be modified
      updatedInfo - the changes to be done
      Returns:
      the updated TimeEntry
      See Also:
    • delete

      void delete(Reference<TimeEntry> timeEntryReference)
      Delete an existing TimeEntry
      Parameters:
      timeEntryReference - a reference to the TimeEntry to be deleted
    • restart

      TimeEntry restart(Reference<TimeEntry> timeEntryReference)
      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

      TimeEntry stop(Reference<TimeEntry> timeEntryReference)
      Stop a TimeEntry. Only possible if it is running
      Parameters:
      timeEntryReference - a reference to the TimeEntry to be stopped
      Returns:
      the modified TimeEntry