Package ch.aaap.harvestclient.impl
Class EstimateItemCategoriesApiImpl
Object
ch.aaap.harvestclient.impl.EstimateItemCategoriesApiImpl
- All Implemented Interfaces:
Api.Create<EstimateItem.Category>
,Api.Delete<EstimateItem.Category>
,Api.Get<EstimateItem.Category>
,Api.Simple<EstimateItem.Category>
,EstimateItemCategoriesApi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(EstimateItem.Category creationInfo) Create a new EstimateItemCategoryvoid
delete
(Reference<EstimateItem.Category> categoryReference) Delete an existing EstimateItemCategory.get
(Reference<EstimateItem.Category> categoryReference) Return an existing EstimateItemCategory.Return a list of estimateItemCategories, sorted by creation date, newest first.update
(Reference<EstimateItem.Category> categoryReference, EstimateItem.Category toChange) Updates the specific estimateItemCategory by setting the values of the parameters passed.
-
Constructor Details
-
EstimateItemCategoriesApiImpl
-
-
Method Details
-
list
- Specified by:
list
in interfaceEstimateItemCategoriesApi
- Parameters:
updatedSince
- if set, only return categories updated since the given timestamp- Returns:
- a list of all EstimateItemCategories in the account, sorted by creation date, newest first.
-
list
public Pagination<EstimateItem.Category> list(@Nullable Instant updatedSince, int page, int perPage) Description copied from interface:EstimateItemCategoriesApi
Return a list of estimateItemCategories, 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:
list
in interfaceEstimateItemCategoriesApi
- Parameters:
updatedSince
- if set, only return categories updated since the given timestamppage
- the page numberperPage
- how many results to return for one page. Max 100- Returns:
- a (filtered) list of EstimateItemCategory
-
get
Description copied from interface:EstimateItemCategoriesApi
Return an existing EstimateItemCategory.- Specified by:
get
in interfaceApi.Get<EstimateItem.Category>
- Specified by:
get
in interfaceEstimateItemCategoriesApi
- Parameters:
categoryReference
- a reference to an existing EstimateItemCategory- Returns:
- the full EstimateItemCategory object
-
create
Description copied from interface:EstimateItemCategoriesApi
Create a new EstimateItemCategory- Specified by:
create
in interfaceApi.Create<EstimateItem.Category>
- Specified by:
create
in interfaceEstimateItemCategoriesApi
- Parameters:
creationInfo
- creation information- Returns:
- the created EstimateItemCategory
-
update
public EstimateItem.Category update(Reference<EstimateItem.Category> categoryReference, EstimateItem.Category toChange) Description copied from interface:EstimateItemCategoriesApi
Updates the specific estimateItemCategory by setting the values of the parameters passed. Any parameters not provided will be left unchanged- Specified by:
update
in interfaceEstimateItemCategoriesApi
- Parameters:
categoryReference
- An existing EstimateItemCategory to be updatedtoChange
- the changes to be performed- Returns:
- the updated EstimateItemCategory
-
delete
Description copied from interface:EstimateItemCategoriesApi
Delete an existing EstimateItemCategory.- Specified by:
delete
in interfaceApi.Delete<EstimateItem.Category>
- Specified by:
delete
in interfaceEstimateItemCategoriesApi
- Parameters:
categoryReference
- a reference to the EstimateItemCategory to be deleted
-