Package ch.aaap.harvestclient.impl
Class ProjectsApiImpl
Object
ch.aaap.harvestclient.impl.ProjectsApiImpl
- All Implemented Interfaces:
 Api.Create<Project>,Api.Delete<Project>,Api.Get<Project>,Api.Simple<Project>,ProjectsApi
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionCreate a new Project according to given creation information.voidDelete an existing Project.list(ProjectFilter filter) Return a list of projects, sorted by creation date, newest first.list(ProjectFilter filter, int page, int perPage) Return a list of projects, sorted by creation date, newest first.update(Reference<Project> projectReference, ProjectUpdateInfo toChange) Updates an existing Project with the properties set in ProjectUpdateInfo 
- 
Constructor Details
- 
ProjectsApiImpl
 
 - 
 - 
Method Details
- 
list
Description copied from interface:ProjectsApiReturn a list of projects, sorted by creation date, newest first. Use the filter object to filter the list.- Specified by:
 listin interfaceProjectsApi- Parameters:
 filter- filtering options- Returns:
 - a (filtered) list of Projects
 
 - 
list
Description copied from interface:ProjectsApiReturn a list of projects, sorted by creation date, newest first. Use the filter object to filter the list. Page and perPage allow controlling how many results to return.- Specified by:
 listin interfaceProjectsApi- Parameters:
 filter- filtering optionspage- the page numberperPage- how many results to return for one page. Max 100- Returns:
 - a (filtered) list of Projects
 
 - 
get
- Specified by:
 getin interfaceApi.Get<Project>- Specified by:
 getin interfaceProjectsApi- Parameters:
 projectReference- a reference to an existing Project- Returns:
 - Return a full Project object
 
 - 
create
Description copied from interface:ProjectsApiCreate a new Project according to given creation information. Example:Project creationInfo = ImmutableProject.builder() .client(clientReference) .name(name) .billable(billable) .billBy(billingMethod) .budgetBy(budgetBy) .build(); project = projectsApi.create(creationInfo);- Specified by:
 createin interfaceApi.Create<Project>- Specified by:
 createin interfaceProjectsApi- Parameters:
 projectCreationInfo- the creation options- Returns:
 - the newly created Project
 
 - 
update
Description copied from interface:ProjectsApiUpdates an existing Project with the properties set in ProjectUpdateInfo- Specified by:
 updatein interfaceProjectsApi- Parameters:
 projectReference- the existing project to be updatedtoChange- the properties to be updated- Returns:
 - the updated Project
 
 - 
delete
Description copied from interface:ProjectsApiDelete an existing Project. Careful with this API! It also deletes TimeEntries, Expenses and Retainers connected to this project. This will generate an email notification from Harvest.- Specified by:
 deletein interfaceApi.Delete<Project>- Specified by:
 deletein interfaceProjectsApi- Parameters:
 projectReference- a reference to an existing Project to be deleted
 
 -