Package ch.aaap.harvestclient.api
Interface EstimatesApi
- All Superinterfaces:
Api.Create<Estimate>
,Api.Delete<Estimate>
,Api.Get<Estimate>
,Api.Simple<Estimate>
- All Known Implementing Classes:
EstimatesApiImpl
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddLineItem
(Reference<Estimate> estimateReference, EstimateItem creationInfo) Create a new estimate line item and add it to the given estimateaddLineItems
(Reference<Estimate> estimateReference, List<EstimateItem> creationInfoList) Create new estimate line items and add it to the given estimateCreate a new Estimate according to given creation information.void
Delete an existing Estimate.deleteLineItem
(Reference<Estimate> estimateReference, Reference<EstimateItem> estimateItemReference) Delete an existing line itemdeleteLineItems
(Reference<Estimate> estimateReference, List<? extends Reference<EstimateItem>> estimateItemReferenceList) Delete an existing line itemlist
(EstimateFilter filter) Return a list of estimates, sorted by issue date, newest first.list
(EstimateFilter filter, int page, int perPage) Return a list of estimates, sorted by issue date, newest first.update
(Reference<Estimate> estimateReference, EstimateUpdateInfo toChange) Updates an existing Estimate with the properties set in EstimateUpdateInfo.updateLineItem
(Reference<Estimate> estimateReference, Reference<EstimateItem> estimateItemReference, EstimateItemUpdateInfo updateInfo) Update an existing line itemupdateLineItems
(Reference<Estimate> estimateReference, List<? extends Reference<EstimateItem>> estimateItemReferenceList, List<EstimateItemUpdateInfo> updateInfoList) Update an existing line item
-
Method Details
-
list
Return a list of estimates, sorted by issue date, newest first. Use the filter object to filter the list.- Parameters:
filter
- filtering options- Returns:
- a (filtered) list of Estimates
-
list
Return a list of estimates, sorted by issue date, newest first. Use the filter object to filter the list. 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 (filtered) list of Estimates
-
get
-
create
Create a new Estimate according to given creation information.- Specified by:
create
in interfaceApi.Create<Estimate>
- Parameters:
estimateCreationInfo
- the creation options- Returns:
- the newly created Estimate
-
addLineItem
Create a new estimate line item and add it to the given estimate- Parameters:
estimateReference
- the estimate to add the item tocreationInfo
- the line item to be created- Returns:
- the updated Estimate
-
updateLineItem
Estimate updateLineItem(Reference<Estimate> estimateReference, Reference<EstimateItem> estimateItemReference, EstimateItemUpdateInfo updateInfo) Update an existing line item- Parameters:
estimateReference
- the estimate that contains the itemestimateItemReference
- a reference to the line itemupdateInfo
- the line item to be updated- Returns:
- the updated Estimate
-
deleteLineItem
Estimate deleteLineItem(Reference<Estimate> estimateReference, Reference<EstimateItem> estimateItemReference) Delete an existing line item- Parameters:
estimateReference
- the estimate that contains the itemestimateItemReference
- the line item to be deleted- Returns:
- the updated Estimate
-
addLineItems
Create new estimate line items and add it to the given estimate- Parameters:
estimateReference
- the estimate to add the item tocreationInfoList
- a list of items to be created- Returns:
- the updated Estimate
-
updateLineItems
Estimate updateLineItems(Reference<Estimate> estimateReference, List<? extends Reference<EstimateItem>> estimateItemReferenceList, List<EstimateItemUpdateInfo> updateInfoList) Update an existing line item- Parameters:
estimateReference
- the estimate that contains the itemestimateItemReferenceList
- a list of the item references to be updated, in the same order as updateInfoListupdateInfoList
- a list of the line items to be updated- Returns:
- the updated Estimate
-
deleteLineItems
Estimate deleteLineItems(Reference<Estimate> estimateReference, List<? extends Reference<EstimateItem>> estimateItemReferenceList) Delete an existing line item- Parameters:
estimateReference
- the estimate that contains the itemestimateItemReferenceList
- a list of the line items to be deleted- Returns:
- the updated Estimate
-
update
Updates an existing Estimate with the properties set in EstimateUpdateInfo. Be careful: setting a list of EstimateItem will add them to the existing ones, not replace them. SeedeleteLineItems(Reference, List)
to delete existing items- Parameters:
estimateReference
- the existing estimate to be updatedtoChange
- the properties to be updated- Returns:
- the updated Estimate
-
delete
Delete an existing Estimate.- Specified by:
delete
in interfaceApi.Delete<Estimate>
- Parameters:
estimateReference
- a reference to an existing Estimate to be deleted
-