public class AssetApi extends Object
| Constructor and Description |
|---|
AssetApi() |
AssetApi(ApiClient apiClient) |
| Modifier and Type | Method and Description |
|---|---|
ByteArrayInputStream |
convertInputToByteArray(InputStream is) |
Asset |
createAsset(Asset asset)
adds a fixed asset
Adds an asset to the system
|
com.google.api.client.http.HttpResponse |
createAssetForHttpResponse(Asset asset) |
AssetType |
createAssetType(AssetType assetType)
adds a fixed asset type
Adds an fixed asset type to the system
|
com.google.api.client.http.HttpResponse |
createAssetTypeForHttpResponse(AssetType assetType) |
ApiClient |
getApiClient() |
Asset |
getAssetById(UUID id)
retrieves fixed asset by id
By passing in the appropriate asset id, you can search for a specific fixed asset in the system
|
com.google.api.client.http.HttpResponse |
getAssetByIdForHttpResponse(UUID id) |
Assets |
getAssets(String status,
Integer page,
Integer pageSize,
String orderBy,
String sortDirection,
String filterBy)
searches fixed asset
By passing in the appropriate options, you can search for available fixed asset in the system
|
Setting |
getAssetSettings()
searches fixed asset settings
By passing in the appropriate options, you can search for available fixed asset types in the system
|
com.google.api.client.http.HttpResponse |
getAssetSettingsForHttpResponse() |
com.google.api.client.http.HttpResponse |
getAssetsForHttpResponse(String status,
Integer page,
Integer pageSize,
String orderBy,
String sortDirection,
String filterBy) |
List<AssetType> |
getAssetTypes()
searches fixed asset types
By passing in the appropriate options, you can search for available fixed asset types in the system
|
com.google.api.client.http.HttpResponse |
getAssetTypesForHttpResponse() |
String |
getUserAgent() |
String |
getXeroTenantId() |
void |
setApiClient(ApiClient apiClient) |
void |
setUserAgent(String userAgent) |
void |
setXeroTenantId(String xeroTenantId) |
public AssetApi()
public AssetApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
public String getXeroTenantId()
public void setXeroTenantId(String xeroTenantId)
public void setUserAgent(String userAgent)
public String getUserAgent()
public Asset createAsset(Asset asset) throws IOException
200 - return single object - create new asset
400 - invalid input, object invalid
asset - Fixed asset to addIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse createAssetForHttpResponse(Asset asset) throws IOException
IOExceptionpublic AssetType createAssetType(AssetType assetType) throws IOException
200 - results single object - created fixed type
400 - invalid input, object invalid
409 - a type already exists
assetType - Asset type to addIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse createAssetTypeForHttpResponse(AssetType assetType) throws IOException
IOExceptionpublic Asset getAssetById(UUID id) throws IOException
200 - search results matching criteria
400 - bad input parameter
id - fixed asset id for single objectIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetByIdForHttpResponse(UUID id) throws IOException
IOExceptionpublic Setting getAssetSettings() throws IOException
200 - search results matching criteria
400 - bad input parameter
IOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetSettingsForHttpResponse()
throws IOException
IOExceptionpublic List<AssetType> getAssetTypes() throws IOException
200 - search results matching criteria
400 - bad input parameter
IOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetTypesForHttpResponse()
throws IOException
IOExceptionpublic Assets getAssets(String status, Integer page, Integer pageSize, String orderBy, String sortDirection, String filterBy) throws IOException
200 - search results matching criteria
400 - bad input parameter
status - Required when retrieving a collection of assets. See Asset Status Codespage - Results are paged. This specifies which page of the results to return. The default page is 1.pageSize - The number of records returned per page. By default the number of records returned is 10.orderBy - Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice.sortDirection - ASC or DESCfilterBy - A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields.IOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetsForHttpResponse(String status, Integer page, Integer pageSize, String orderBy, String sortDirection, String filterBy) throws IOException
IOExceptionpublic ByteArrayInputStream convertInputToByteArray(InputStream is) throws IOException
IOExceptionCopyright © 2019. All rights reserved.