Class AssetApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert intput to byte arraycreateAsset(String accessToken, String xeroTenantId, Asset asset, String idempotencyKey) adds a fixed asset Adds an asset to the systemcom.google.api.client.http.HttpResponsecreateAssetForHttpResponse(String accessToken, String xeroTenantId, Asset asset, String idempotencyKey) adds a fixed asset Adds an asset to the systemcreateAssetType(String accessToken, String xeroTenantId, AssetType assetType, String idempotencyKey) adds a fixed asset type Adds an fixed asset type to the systemcom.google.api.client.http.HttpResponsecreateAssetTypeForHttpResponse(String accessToken, String xeroTenantId, AssetType assetType, String idempotencyKey) adds a fixed asset type Adds an fixed asset type to the systemget ApiClientgetAssetById(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 systemcom.google.api.client.http.HttpResponsegetAssetByIdForHttpResponse(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 systemgetAssets(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 systemgetAssetSettings(String accessToken, String xeroTenantId) searches fixed asset settings By passing in the appropriate options, you can search for available fixed asset types in the systemcom.google.api.client.http.HttpResponsegetAssetSettingsForHttpResponse(String accessToken, String xeroTenantId) searches fixed asset settings By passing in the appropriate options, you can search for available fixed asset types in the systemcom.google.api.client.http.HttpResponsegetAssetsForHttpResponse(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 systemgetAssetTypes(String accessToken, String xeroTenantId) searches fixed asset types By passing in the appropriate options, you can search for available fixed asset types in the systemcom.google.api.client.http.HttpResponsegetAssetTypesForHttpResponse(String accessToken, String xeroTenantId) searches fixed asset types By passing in the appropriate options, you can search for available fixed asset types in the systemstatic AssetApigetInstance(ApiClient apiClient) AssetApi getInstanceget user agentvoidsetApiClient(ApiClient apiClient) set ApiClientvoidsetUserAgent(String userAgent) set user agent
-
Constructor Details
-
AssetApi
public AssetApi()AssetApi -
AssetApi
AssetApi- Parameters:
apiClient- ApiClient pass into the new instance of this class
-
-
Method Details
-
getInstance
-
getApiClient
-
setApiClient
set ApiClient- Parameters:
apiClient- ApiClient pass into the new instance of this class
-
setUserAgent
set user agent- Parameters:
userAgent- string to override the user agent
-
getUserAgent
-
createAsset
public Asset createAsset(String accessToken, String xeroTenantId, Asset asset, String idempotencyKey) throws IOException adds a fixed asset Adds an asset to the system200 - return single object - create new asset
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantasset- Fixed asset you are creatingidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- Asset
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createAssetForHttpResponse
public com.google.api.client.http.HttpResponse createAssetForHttpResponse(String accessToken, String xeroTenantId, Asset asset, String idempotencyKey) throws IOException adds a fixed asset Adds an asset to the system200 - return single object - create new asset
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantasset- Fixed asset you are creatingidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
createAssetType
public AssetType createAssetType(String accessToken, String xeroTenantId, AssetType assetType, String idempotencyKey) throws IOException adds a fixed asset type Adds an fixed asset type to the system200 - results single object - created fixed type
400 - invalid input, object invalid
409 - a type already exists
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantassetType- Asset type to addidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- AssetType
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createAssetTypeForHttpResponse
public com.google.api.client.http.HttpResponse createAssetTypeForHttpResponse(String accessToken, String xeroTenantId, AssetType assetType, String idempotencyKey) throws IOException adds a fixed asset type Adds an fixed asset type to the system200 - results single object - created fixed type
400 - invalid input, object invalid
409 - a type already exists
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantassetType- Asset type to addidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getAssetById
Retrieves fixed asset by id By passing in the appropriate asset id, you can search for a specific fixed asset in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantid- fixed asset id for single object- Returns:
- Asset
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getAssetByIdForHttpResponse
public com.google.api.client.http.HttpResponse getAssetByIdForHttpResponse(String accessToken, String xeroTenantId, UUID id) throws IOException Retrieves fixed asset by id By passing in the appropriate asset id, you can search for a specific fixed asset in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantid- fixed asset id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getAssetSettings
searches fixed asset settings By passing in the appropriate options, you can search for available fixed asset types in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenant- Returns:
- Setting
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getAssetSettingsForHttpResponse
public com.google.api.client.http.HttpResponse getAssetSettingsForHttpResponse(String accessToken, String xeroTenantId) throws IOException searches fixed asset settings By passing in the appropriate options, you can search for available fixed asset types in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenant- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getAssetTypes
searches fixed asset types By passing in the appropriate options, you can search for available fixed asset types in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenant- Returns:
- List<AssetType>
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getAssetTypesForHttpResponse
public com.google.api.client.http.HttpResponse getAssetTypesForHttpResponse(String accessToken, String xeroTenantId) throws IOException searches fixed asset types By passing in the appropriate options, you can search for available fixed asset types in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenant- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getAssets
public Assets getAssets(String accessToken, String xeroTenantId, AssetStatusQueryParam status, Integer page, Integer pageSize, String orderBy, String sortDirection, String filterBy) throws IOException searches fixed asset By passing in the appropriate options, you can search for available fixed asset in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- 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.- Returns:
- Assets
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getAssetsForHttpResponse
public 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 searches fixed asset By passing in the appropriate options, you can search for available fixed asset in the system200 - search results matching criteria
400 - bad input parameter
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- 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.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
convertInputToByteArray
convert intput to byte array- Parameters:
is- InputStream the server status code returned- Returns:
- byteArrayInputStream a ByteArrayInputStream
- Throws:
IOException- for failed or interrupted I/O operations
-