Package ch.aaap.harvestclient.impl
Class EstimatesApiImpl
Object
ch.aaap.harvestclient.impl.EstimatesApiImpl
- All Implemented Interfaces:
 Api.Create<Estimate>,Api.Delete<Estimate>,Api.Get<Estimate>,Api.Simple<Estimate>,EstimatesApi
- 
Constructor Summary
Constructors - 
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.voidDelete 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 
- 
Constructor Details
- 
EstimatesApiImpl
 
 - 
 - 
Method Details
- 
list
Description copied from interface:EstimatesApiReturn a list of estimates, sorted by issue date, newest first. Use the filter object to filter the list.- Specified by:
 listin interfaceEstimatesApi- Parameters:
 filter- filtering options- Returns:
 - a (filtered) list of Estimates
 
 - 
list
Description copied from interface:EstimatesApiReturn 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.- Specified by:
 listin interfaceEstimatesApi- Parameters:
 filter- filtering optionspage- the page numberperPage- how many results to return for one page. Max 100- Returns:
 - a (filtered) list of Estimates
 
 - 
get
- Specified by:
 getin interfaceApi.Get<Estimate>- Specified by:
 getin interfaceEstimatesApi- Parameters:
 estimateReference- a reference to an existing Estimate- Returns:
 - Return a full Estimate object
 
 - 
create
Description copied from interface:EstimatesApiCreate a new Estimate according to given creation information.- Specified by:
 createin interfaceApi.Create<Estimate>- Specified by:
 createin interfaceEstimatesApi- Parameters:
 estimateCreationInfo- the creation options- Returns:
 - the newly created Estimate
 
 - 
addLineItem
Description copied from interface:EstimatesApiCreate a new estimate line item and add it to the given estimate- Specified by:
 addLineItemin interfaceEstimatesApi- Parameters:
 estimateReference- the estimate to add the item tocreationInfo- the line item to be created- Returns:
 - the updated Estimate
 
 - 
updateLineItem
public Estimate updateLineItem(Reference<Estimate> estimateReference, Reference<EstimateItem> estimateItemReference, EstimateItemUpdateInfo updateInfo) Description copied from interface:EstimatesApiUpdate an existing line item- Specified by:
 updateLineItemin interfaceEstimatesApi- 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
public Estimate deleteLineItem(Reference<Estimate> estimateReference, Reference<EstimateItem> estimateItemReference) Description copied from interface:EstimatesApiDelete an existing line item- Specified by:
 deleteLineItemin interfaceEstimatesApi- Parameters:
 estimateReference- the estimate that contains the itemestimateItemReference- the line item to be deleted- Returns:
 - the updated Estimate
 
 - 
addLineItems
public Estimate addLineItems(Reference<Estimate> estimateReference, List<EstimateItem> creationInfoList) Description copied from interface:EstimatesApiCreate new estimate line items and add it to the given estimate- Specified by:
 addLineItemsin interfaceEstimatesApi- Parameters:
 estimateReference- the estimate to add the item tocreationInfoList- a list of items to be created- Returns:
 - the updated Estimate
 
 - 
updateLineItems
public Estimate updateLineItems(Reference<Estimate> estimateReference, List<? extends Reference<EstimateItem>> estimateItemReferenceList, List<EstimateItemUpdateInfo> updateInfoList) Description copied from interface:EstimatesApiUpdate an existing line item- Specified by:
 updateLineItemsin interfaceEstimatesApi- 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
public Estimate deleteLineItems(Reference<Estimate> estimateReference, List<? extends Reference<EstimateItem>> estimateItemReferenceList) Description copied from interface:EstimatesApiDelete an existing line item- Specified by:
 deleteLineItemsin interfaceEstimatesApi- Parameters:
 estimateReference- the estimate that contains the itemestimateItemReferenceList- a list of the line items to be deleted- Returns:
 - the updated Estimate
 
 - 
update
Description copied from interface:EstimatesApiUpdates 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. SeeEstimatesApi.deleteLineItems(Reference, List)to delete existing items- Specified by:
 updatein interfaceEstimatesApi- Parameters:
 estimateReference- the existing estimate to be updatedtoChange- the properties to be updated- Returns:
 - the updated Estimate
 
 - 
delete
Description copied from interface:EstimatesApiDelete an existing Estimate.- Specified by:
 deletein interfaceApi.Delete<Estimate>- Specified by:
 deletein interfaceEstimatesApi- Parameters:
 estimateReference- a reference to an existing Estimate to be deleted
 
 -