Class FilesApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert intput to byte arraycreateFileAssociation(String accessToken, String xeroTenantId, UUID fileId, Association association, String idempotencyKey) Creates a new file association By passing in the appropriate options, you can create a new foldercom.google.api.client.http.HttpResponsecreateFileAssociationForHttpResponse(String accessToken, String xeroTenantId, UUID fileId, Association association, String idempotencyKey) Creates a new file association By passing in the appropriate options, you can create a new foldercreateFolder(String accessToken, String xeroTenantId, Folder folder, String idempotencyKey) Creates a new folder By passing in the appropriate properties, you can create a new foldercom.google.api.client.http.HttpResponsecreateFolderForHttpResponse(String accessToken, String xeroTenantId, Folder folder, String idempotencyKey) Creates a new folder By passing in the appropriate properties, you can create a new foldervoiddeleteFile(String accessToken, String xeroTenantId, UUID fileId) Deletes a specific file Delete a specific filevoiddeleteFileAssociation(String accessToken, String xeroTenantId, UUID fileId, UUID objectId) Deletes an existing file association By passing in the appropriate options, you can create a new foldercom.google.api.client.http.HttpResponsedeleteFileAssociationForHttpResponse(String accessToken, String xeroTenantId, UUID fileId, UUID objectId) Deletes an existing file association By passing in the appropriate options, you can create a new foldercom.google.api.client.http.HttpResponsedeleteFileForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) Deletes a specific file Delete a specific filevoiddeleteFolder(String accessToken, String xeroTenantId, UUID folderId) Deletes a folder By passing in the appropriate ID, you can delete a foldercom.google.api.client.http.HttpResponsedeleteFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId) Deletes a folder By passing in the appropriate ID, you can delete a folderget ApiClientgetAssociationsByObject(String accessToken, String xeroTenantId, UUID objectId, Integer pagesize, Integer page, String sort, String direction) Retrieves an association object using a unique object ID By passing in the appropriate options, you can retrieve an associationcom.google.api.client.http.HttpResponsegetAssociationsByObjectForHttpResponse(String accessToken, String xeroTenantId, UUID objectId, Integer pagesize, Integer page, String sort, String direction) Retrieves an association object using a unique object ID By passing in the appropriate options, you can retrieve an associationgetAssociationsCount(String accessToken, String xeroTenantId, List<UUID> objectIds) Retrieves a count of associations for a list of objects.com.google.api.client.http.HttpResponsegetAssociationsCountForHttpResponse(String accessToken, String xeroTenantId, List<UUID> objectIds) Retrieves a count of associations for a list of objects.Retrieves a file by a unique file IDgetFileAssociations(String accessToken, String xeroTenantId, UUID fileId) Retrieves a specific file associations By passing in the appropriate options,com.google.api.client.http.HttpResponsegetFileAssociationsForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) Retrieves a specific file associations By passing in the appropriate options,getFileContent(String accessToken, String xeroTenantId, UUID fileId) Retrieves the content of a specific file By passing in the appropriate options, retrieve data for specific filecom.google.api.client.http.HttpResponsegetFileContentForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) Retrieves the content of a specific file By passing in the appropriate options, retrieve data for specific filecom.google.api.client.http.HttpResponsegetFileForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) Retrieves a file by a unique file IDRetrieves filescom.google.api.client.http.HttpResponsegetFilesForHttpResponse(String accessToken, String xeroTenantId, Integer pagesize, Integer page, String sort) Retrieves filesRetrieves specific folder by using a unique folder ID By passing in the appropriate ID, you can search for specific foldercom.google.api.client.http.HttpResponsegetFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId) Retrieves specific folder by using a unique folder ID By passing in the appropriate ID, you can search for specific foldergetFolders(String accessToken, String xeroTenantId, String sort) Retrieves folders By passing in the appropriate options, you can search for available folderscom.google.api.client.http.HttpResponsegetFoldersForHttpResponse(String accessToken, String xeroTenantId, String sort) Retrieves folders By passing in the appropriate options, you can search for available foldersRetrieves inbox folder Search for the user inboxcom.google.api.client.http.HttpResponsegetInboxForHttpResponse(String accessToken, String xeroTenantId) Retrieves inbox folder Search for the user inboxstatic FilesApigetInstance(ApiClient apiClient) FilesApi getInstanceget user agentvoidsetApiClient(ApiClient apiClient) set ApiClientvoidsetUserAgent(String userAgent) set user agentupdateFile(String accessToken, String xeroTenantId, UUID fileId, FileObject fileObject, String idempotencyKey) Update a file Updates file properties of a single filecom.google.api.client.http.HttpResponseupdateFileForHttpResponse(String accessToken, String xeroTenantId, UUID fileId, FileObject fileObject, String idempotencyKey) Update a file Updates file properties of a single fileupdateFolder(String accessToken, String xeroTenantId, UUID folderId, Folder folder, String idempotencyKey) Updates an existing folder By passing in the appropriate ID and properties, you can update a foldercom.google.api.client.http.HttpResponseupdateFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId, Folder folder, String idempotencyKey) Updates an existing folder By passing in the appropriate ID and properties, you can update a folderuploadFile(String accessToken, String xeroTenantId, File body, String name, String filename, String idempotencyKey, String mimeType) Uploads a File to the inboxcom.google.api.client.http.HttpResponseuploadFileForHttpResponse(String accessToken, String xeroTenantId, File body, String name, String filename, String idempotencyKey, String mimeType) Uploads a File to the inboxuploadFileToFolder(String accessToken, String xeroTenantId, UUID folderId, File body, String name, String filename, String idempotencyKey, String mimeType) Uploads a File to a specific foldercom.google.api.client.http.HttpResponseuploadFileToFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId, File body, String name, String filename, String idempotencyKey, String mimeType) Uploads a File to a specific folder
-
Constructor Details
-
FilesApi
public FilesApi()FilesApi -
FilesApi
FilesApi- 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
-
createFileAssociation
public Association createFileAssociation(String accessToken, String xeroTenantId, UUID fileId, Association association, String idempotencyKey) throws IOException Creates a new file association By passing in the appropriate options, you can create a new folder201 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single objectassociation- The association parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- Association
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createFileAssociationForHttpResponse
public com.google.api.client.http.HttpResponse createFileAssociationForHttpResponse(String accessToken, String xeroTenantId, UUID fileId, Association association, String idempotencyKey) throws IOException Creates a new file association By passing in the appropriate options, you can create a new folder201 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single objectassociation- The association parameteridempotencyKey- 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
-
createFolder
public Folder createFolder(String accessToken, String xeroTenantId, Folder folder, String idempotencyKey) throws IOException Creates a new folder By passing in the appropriate properties, you can create a new folder200 - search results matching criteria
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantfolder- The folder parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- Folder
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createFolderForHttpResponse
public com.google.api.client.http.HttpResponse createFolderForHttpResponse(String accessToken, String xeroTenantId, Folder folder, String idempotencyKey) throws IOException Creates a new folder By passing in the appropriate properties, you can create a new folder200 - search results matching criteria
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantfolder- The folder parameteridempotencyKey- 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
-
deleteFile
Deletes a specific file Delete a specific file204 - Successful deletion - return response 204 no content
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
deleteFileForHttpResponse
public com.google.api.client.http.HttpResponse deleteFileForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) throws IOException Deletes a specific file Delete a specific file204 - Successful deletion - return response 204 no content
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
deleteFileAssociation
public void deleteFileAssociation(String accessToken, String xeroTenantId, UUID fileId, UUID objectId) throws IOException Deletes an existing file association By passing in the appropriate options, you can create a new folder204 - Successful deletion - return response 204 no content
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single objectobjectId- Object id for single object- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
deleteFileAssociationForHttpResponse
public com.google.api.client.http.HttpResponse deleteFileAssociationForHttpResponse(String accessToken, String xeroTenantId, UUID fileId, UUID objectId) throws IOException Deletes an existing file association By passing in the appropriate options, you can create a new folder204 - Successful deletion - return response 204 no content
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single objectobjectId- Object id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
deleteFolder
Deletes a folder By passing in the appropriate ID, you can delete a folder204 - Successful deletion - return response 204 no content
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- Folder id for single object- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
deleteFolderForHttpResponse
public com.google.api.client.http.HttpResponse deleteFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId) throws IOException Deletes a folder By passing in the appropriate ID, you can delete a folder204 - Successful deletion - return response 204 no content
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- Folder id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getAssociationsByObject
public List<Association> getAssociationsByObject(String accessToken, String xeroTenantId, UUID objectId, Integer pagesize, Integer page, String sort, String direction) throws IOException Retrieves an association object using a unique object ID By passing in the appropriate options, you can retrieve an association200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantobjectId- Object id for single objectpagesize- pass an optional page size valuepage- number of records to skip for paginationsort- values to sort bydirection- direction to sort by- Returns:
- List<Association>
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getAssociationsByObjectForHttpResponse
public com.google.api.client.http.HttpResponse getAssociationsByObjectForHttpResponse(String accessToken, String xeroTenantId, UUID objectId, Integer pagesize, Integer page, String sort, String direction) throws IOException Retrieves an association object using a unique object ID By passing in the appropriate options, you can retrieve an association200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantobjectId- Object id for single objectpagesize- pass an optional page size valuepage- number of records to skip for paginationsort- values to sort bydirection- direction to sort by- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getAssociationsCount
public Object getAssociationsCount(String accessToken, String xeroTenantId, List<UUID> objectIds) throws IOException Retrieves a count of associations for a list of objects. By passing in the appropriate options, you can retrieve the association count for objects200 - A dictionary of the object Ids and associations count
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantobjectIds- A comma-separated list of object ids- Returns:
- Object
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getAssociationsCountForHttpResponse
public com.google.api.client.http.HttpResponse getAssociationsCountForHttpResponse(String accessToken, String xeroTenantId, List<UUID> objectIds) throws IOException Retrieves a count of associations for a list of objects. By passing in the appropriate options, you can retrieve the association count for objects200 - A dictionary of the object Ids and associations count
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantobjectIds- A comma-separated list of object ids- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getFile
Retrieves a file by a unique file ID200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- FileObject
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getFileForHttpResponse
public com.google.api.client.http.HttpResponse getFileForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) throws IOException Retrieves a file by a unique file ID200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getFileAssociations
public List<Association> getFileAssociations(String accessToken, String xeroTenantId, UUID fileId) throws IOException Retrieves a specific file associations By passing in the appropriate options,200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- List<Association>
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getFileAssociationsForHttpResponse
public com.google.api.client.http.HttpResponse getFileAssociationsForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) throws IOException Retrieves a specific file associations By passing in the appropriate options,200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getFileContent
public ByteArrayInputStream getFileContent(String accessToken, String xeroTenantId, UUID fileId) throws IOException Retrieves the content of a specific file By passing in the appropriate options, retrieve data for specific file200 - returns the byte array of the specific file based on id
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- ByteArrayInputStream
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getFileContentForHttpResponse
public com.google.api.client.http.HttpResponse getFileContentForHttpResponse(String accessToken, String xeroTenantId, UUID fileId) throws IOException Retrieves the content of a specific file By passing in the appropriate options, retrieve data for specific file200 - returns the byte array of the specific file based on id
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getFiles
public Files getFiles(String accessToken, String xeroTenantId, Integer pagesize, Integer page, String sort) throws IOException Retrieves files200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantpagesize- pass an optional page size valuepage- number of records to skip for paginationsort- values to sort by- Returns:
- Files
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getFilesForHttpResponse
public com.google.api.client.http.HttpResponse getFilesForHttpResponse(String accessToken, String xeroTenantId, Integer pagesize, Integer page, String sort) throws IOException Retrieves files200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantpagesize- pass an optional page size valuepage- number of records to skip for paginationsort- values to sort by- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getFolder
Retrieves specific folder by using a unique folder ID By passing in the appropriate ID, you can search for specific folder200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- Folder id for single object- Returns:
- Folder
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getFolderForHttpResponse
public com.google.api.client.http.HttpResponse getFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId) throws IOException Retrieves specific folder by using a unique folder ID By passing in the appropriate ID, you can search for specific folder200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- Folder id for single object- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getFolders
public List<Folder> getFolders(String accessToken, String xeroTenantId, String sort) throws IOException Retrieves folders By passing in the appropriate options, you can search for available folders200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantsort- values to sort by- Returns:
- List<Folder>
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getFoldersForHttpResponse
public com.google.api.client.http.HttpResponse getFoldersForHttpResponse(String accessToken, String xeroTenantId, String sort) throws IOException Retrieves folders By passing in the appropriate options, you can search for available folders200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantsort- values to sort by- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getInbox
Retrieves inbox folder Search for the user inbox200 - search results matching criteria
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenant- Returns:
- Folder
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getInboxForHttpResponse
public com.google.api.client.http.HttpResponse getInboxForHttpResponse(String accessToken, String xeroTenantId) throws IOException Retrieves inbox folder Search for the user inbox200 - search results matching criteria
- 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
-
updateFile
public FileObject updateFile(String accessToken, String xeroTenantId, UUID fileId, FileObject fileObject, String idempotencyKey) throws IOException Update a file Updates file properties of a single file200 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single objectfileObject- The fileObject parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- FileObject
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
updateFileForHttpResponse
public com.google.api.client.http.HttpResponse updateFileForHttpResponse(String accessToken, String xeroTenantId, UUID fileId, FileObject fileObject, String idempotencyKey) throws IOException Update a file Updates file properties of a single file200 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfileId- File id for single objectfileObject- The fileObject parameteridempotencyKey- 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
-
updateFolder
public Folder updateFolder(String accessToken, String xeroTenantId, UUID folderId, Folder folder, String idempotencyKey) throws IOException Updates an existing folder By passing in the appropriate ID and properties, you can update a folder200 - return the updated object
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- Folder id for single objectfolder- The folder parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- Folder
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
updateFolderForHttpResponse
public com.google.api.client.http.HttpResponse updateFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId, Folder folder, String idempotencyKey) throws IOException Updates an existing folder By passing in the appropriate ID and properties, you can update a folder200 - return the updated object
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- Folder id for single objectfolder- The folder parameteridempotencyKey- 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
-
uploadFile
public FileObject uploadFile(String accessToken, String xeroTenantId, File body, String name, String filename, String idempotencyKey, String mimeType) throws IOException Uploads a File to the inbox201 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantbody- The body parametername- exact name of the file you are uploadingfilename- The filename parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.mimeType- The mimeType parameter- Returns:
- FileObject
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
uploadFileForHttpResponse
public com.google.api.client.http.HttpResponse uploadFileForHttpResponse(String accessToken, String xeroTenantId, File body, String name, String filename, String idempotencyKey, String mimeType) throws IOException Uploads a File to the inbox201 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantbody- The body parametername- exact name of the file you are uploadingfilename- The filename parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.mimeType- The mimeType parameter- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
uploadFileToFolder
public FileObject uploadFileToFolder(String accessToken, String xeroTenantId, UUID folderId, File body, String name, String filename, String idempotencyKey, String mimeType) throws IOException Uploads a File to a specific folder201 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- pass required folder id to save file to specific folderbody- The body parametername- exact name of the file you are uploadingfilename- The filename parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.mimeType- The mimeType parameter- Returns:
- FileObject
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
uploadFileToFolderForHttpResponse
public com.google.api.client.http.HttpResponse uploadFileToFolderForHttpResponse(String accessToken, String xeroTenantId, UUID folderId, File body, String name, String filename, String idempotencyKey, String mimeType) throws IOException Uploads a File to a specific folder201 - A successful request
400 - invalid input, object invalid
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantfolderId- pass required folder id to save file to specific folderbody- The body parametername- exact name of the file you are uploadingfilename- The filename parameteridempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.mimeType- The mimeType parameter- 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
-