public class AssetApi extends Object
| Constructor and Description |
|---|
AssetApi() |
AssetApi(ApiClient apiClient) |
| Modifier and Type | Method and Description |
|---|---|
ByteArrayInputStream |
convertInputToByteArray(InputStream is) |
Asset |
createAsset(String accessToken,
String xeroTenantId,
Asset asset)
adds a fixed asset
Adds an asset to the system
|
com.google.api.client.http.HttpResponse |
createAssetForHttpResponse(String accessToken,
String xeroTenantId,
Asset asset) |
AssetType |
createAssetType(String accessToken,
String xeroTenantId,
AssetType assetType)
adds a fixed asset type
Adds an fixed asset type to the system
|
com.google.api.client.http.HttpResponse |
createAssetTypeForHttpResponse(String accessToken,
String xeroTenantId,
AssetType assetType) |
ApiClient |
getApiClient() |
Asset |
getAssetById(String accessToken,
String xeroTenantId,
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(String accessToken,
String xeroTenantId,
UUID id) |
Assets |
getAssets(String accessToken,
String xeroTenantId,
AssetStatusQueryParam 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(String accessToken,
String xeroTenantId)
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(String accessToken,
String xeroTenantId) |
com.google.api.client.http.HttpResponse |
getAssetsForHttpResponse(String accessToken,
String xeroTenantId,
AssetStatusQueryParam status,
Integer page,
Integer pageSize,
String orderBy,
String sortDirection,
String filterBy) |
List<AssetType> |
getAssetTypes(String accessToken,
String xeroTenantId)
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 accessToken,
String xeroTenantId) |
static AssetApi |
getInstance(ApiClient apiClient) |
String |
getUserAgent() |
void |
setApiClient(ApiClient apiClient) |
void |
setUserAgent(String userAgent) |
public AssetApi()
public AssetApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
public void setUserAgent(String userAgent)
public String getUserAgent()
public Asset createAsset(String accessToken, String xeroTenantId, Asset asset) throws IOException
200 - return single object - create new asset
400 - invalid input, object invalid
xeroTenantId - Xero identifier for Tenantasset - Fixed asset you are creatingaccessToken - Authorization token for user set in header of each requestIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse createAssetForHttpResponse(String accessToken, String xeroTenantId, Asset asset) throws IOException
IOExceptionpublic AssetType createAssetType(String accessToken, String xeroTenantId, AssetType assetType) throws IOException
200 - results single object - created fixed type
400 - invalid input, object invalid
409 - a type already exists
xeroTenantId - Xero identifier for TenantassetType - Asset type to addaccessToken - Authorization token for user set in header of each requestIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse createAssetTypeForHttpResponse(String accessToken, String xeroTenantId, AssetType assetType) throws IOException
IOExceptionpublic Asset getAssetById(String accessToken, String xeroTenantId, UUID id) throws IOException
200 - search results matching criteria
400 - bad input parameter
xeroTenantId - Xero identifier for Tenantid - fixed asset id for single objectaccessToken - Authorization token for user set in header of each requestIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetByIdForHttpResponse(String accessToken, String xeroTenantId, UUID id) throws IOException
IOExceptionpublic Setting getAssetSettings(String accessToken, String xeroTenantId) throws IOException
200 - search results matching criteria
400 - bad input parameter
xeroTenantId - Xero identifier for TenantaccessToken - Authorization token for user set in header of each requestIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetSettingsForHttpResponse(String accessToken, String xeroTenantId) throws IOException
IOExceptionpublic List<AssetType> getAssetTypes(String accessToken, String xeroTenantId) throws IOException
200 - search results matching criteria
400 - bad input parameter
xeroTenantId - Xero identifier for TenantaccessToken - Authorization token for user set in header of each requestIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetTypesForHttpResponse(String accessToken, String xeroTenantId) throws IOException
IOExceptionpublic Assets getAssets(String accessToken, String xeroTenantId, AssetStatusQueryParam status, Integer page, Integer pageSize, String orderBy, String sortDirection, String filterBy) throws IOException
200 - search results matching criteria
400 - bad input parameter
xeroTenantId - Xero identifier for Tenantstatus - 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.accessToken - Authorization token for user set in header of each requestIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse getAssetsForHttpResponse(String accessToken, String xeroTenantId, AssetStatusQueryParam status, Integer page, Integer pageSize, String orderBy, String sortDirection, String filterBy) throws IOException
IOExceptionpublic ByteArrayInputStream convertInputToByteArray(InputStream is) throws IOException
IOExceptionCopyright © 2020. All rights reserved.