Class ProjectApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert intput to byte arraycreateProject(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) Create one or more new projectscom.google.api.client.http.HttpResponsecreateProjectForHttpResponse(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) Create one or more new projectscreateTask(String accessToken, String xeroTenantId, UUID projectId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) Allows you to create a task Allows you to create a specific taskcom.google.api.client.http.HttpResponsecreateTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) Allows you to create a task Allows you to create a specific taskcreateTimeEntry(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) Creates a time entry for a specific project Allows you to create a specific taskcom.google.api.client.http.HttpResponsecreateTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) Creates a time entry for a specific project Allows you to create a specific taskvoiddeleteTask(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) Allows you to delete a task Allows you to delete a specific taskcom.google.api.client.http.HttpResponsedeleteTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) Allows you to delete a task Allows you to delete a specific taskvoiddeleteTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) Deletes a time entry for a specific project Allows you to delete a specific time entrycom.google.api.client.http.HttpResponsedeleteTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) Deletes a time entry for a specific project Allows you to delete a specific time entryget ApiClientstatic ProjectApigetInstance(ApiClient apiClient) ProjectApi getInstancegetProject(String accessToken, String xeroTenantId, UUID projectId) Retrieves a single project Allows you to retrieve a specific project using the projectIdcom.google.api.client.http.HttpResponsegetProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId) Retrieves a single project Allows you to retrieve a specific project using the projectIdgetProjects(String accessToken, String xeroTenantId, List<UUID> projectIds, UUID contactID, String states, Integer page, Integer pageSize) Retrieves all projects Allows you to retrieve, create and update projects.com.google.api.client.http.HttpResponsegetProjectsForHttpResponse(String accessToken, String xeroTenantId, List<UUID> projectIds, UUID contactID, String states, Integer page, Integer pageSize) Retrieves all projects Allows you to retrieve, create and update projects.getProjectUsers(String accessToken, String xeroTenantId, Integer page, Integer pageSize) Retrieves a list of all project users Allows you to retrieve the users on a projects.com.google.api.client.http.HttpResponsegetProjectUsersForHttpResponse(String accessToken, String xeroTenantId, Integer page, Integer pageSize) Retrieves a list of all project users Allows you to retrieve the users on a projects.Retrieves a single project task Allows you to retrieve a specific projectcom.google.api.client.http.HttpResponsegetTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) Retrieves a single project task Allows you to retrieve a specific projectgetTasks(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds, ChargeType chargeType) Retrieves all project tasks Allows you to retrieve a specific projectcom.google.api.client.http.HttpResponsegetTasksForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds, ChargeType chargeType) Retrieves all project tasks Allows you to retrieve a specific projectgetTimeEntries(String accessToken, String xeroTenantId, UUID projectId, UUID userId, UUID taskId, UUID invoiceId, UUID contactId, Integer page, Integer pageSize, List<String> states, Boolean isChargeable, org.threeten.bp.OffsetDateTime dateAfterUtc, org.threeten.bp.OffsetDateTime dateBeforeUtc) Retrieves all time entries associated with a specific project Allows you to retrieve the time entries associated with a specific projectcom.google.api.client.http.HttpResponsegetTimeEntriesForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID userId, UUID taskId, UUID invoiceId, UUID contactId, Integer page, Integer pageSize, List<String> states, Boolean isChargeable, org.threeten.bp.OffsetDateTime dateAfterUtc, org.threeten.bp.OffsetDateTime dateBeforeUtc) Retrieves all time entries associated with a specific project Allows you to retrieve the time entries associated with a specific projectgetTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) Retrieves a single time entry for a specific project Allows you to get a single time entry in a projectcom.google.api.client.http.HttpResponsegetTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) Retrieves a single time entry for a specific project Allows you to get a single time entry in a projectget user agentvoidpatchProject(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch, String idempotencyKey) creates a project for the specified contact Allows you to update a specific projects.com.google.api.client.http.HttpResponsepatchProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch, String idempotencyKey) creates a project for the specified contact Allows you to update a specific projects.voidsetApiClient(ApiClient apiClient) set ApiClientvoidsetUserAgent(String userAgent) set user agentvoidupdateProject(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) Updates a specific project Allows you to update a specific projects.com.google.api.client.http.HttpResponseupdateProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) Updates a specific project Allows you to update a specific projects.voidupdateTask(String accessToken, String xeroTenantId, UUID projectId, UUID taskId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) Allows you to update a task Allows you to update a specific taskcom.google.api.client.http.HttpResponseupdateTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) Allows you to update a task Allows you to update a specific taskvoidupdateTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) Updates a time entry for a specific project Allows you to update time entry in a projectcom.google.api.client.http.HttpResponseupdateTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) Updates a time entry for a specific project Allows you to update time entry in a project
-
Constructor Details
-
ProjectApi
public ProjectApi()ProjectApi -
ProjectApi
ProjectApi- Parameters:
apiClient- ApiClient pass into the new instance of this class
-
-
Method Details
-
getInstance
ProjectApi getInstance- Parameters:
apiClient- ApiClient pass into the new instance of this class- Returns:
- instance of this class
-
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
-
createProject
public Project createProject(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) throws IOException Create one or more new projects201 - OK/success, returns the new project object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectCreateOrUpdate- Create a new project with ProjectCreateOrUpdate objectidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- Project
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createProjectForHttpResponse
public com.google.api.client.http.HttpResponse createProjectForHttpResponse(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) throws IOException Create one or more new projects201 - OK/success, returns the new project object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectCreateOrUpdate- Create a new project with ProjectCreateOrUpdate objectidempotencyKey- 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
-
createTask
public Task createTask(String accessToken, String xeroTenantId, UUID projectId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) throws IOException Allows you to create a task Allows you to create a specific task201 - OK/success, returns the new task object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can create a task on a specified projectIdtaskCreateOrUpdate- The task object you are creatingidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- Task
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createTaskForHttpResponse
public com.google.api.client.http.HttpResponse createTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) throws IOException Allows you to create a task Allows you to create a specific task201 - OK/success, returns the new task object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can create a task on a specified projectIdtaskCreateOrUpdate- The task object 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
-
createTimeEntry
public TimeEntry createTimeEntry(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) throws IOException Creates a time entry for a specific project Allows you to create a specific task200 - OK/success, returns the newly created time entry
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryCreateOrUpdate- The time entry object you are creatingidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Returns:
- TimeEntry
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
createTimeEntryForHttpResponse
public com.google.api.client.http.HttpResponse createTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) throws IOException Creates a time entry for a specific project Allows you to create a specific task200 - OK/success, returns the newly created time entry
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryCreateOrUpdate- The time entry object 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
-
deleteTask
public void deleteTask(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) throws IOException Allows you to delete a task Allows you to delete a specific task204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtaskId- You can specify an individual task by appending the id to the endpoint- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
deleteTaskForHttpResponse
public com.google.api.client.http.HttpResponse deleteTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) throws IOException Allows you to delete a task Allows you to delete a specific task204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtaskId- You can specify an individual task by appending the id to the endpoint- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
deleteTimeEntry
public void deleteTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException Deletes a time entry for a specific project Allows you to delete a specific time entry204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryId- You can specify an individual task by appending the id to the endpoint- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
deleteTimeEntryForHttpResponse
public com.google.api.client.http.HttpResponse deleteTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException Deletes a time entry for a specific project Allows you to delete a specific time entry204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryId- You can specify an individual task by appending the id to the endpoint- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getProject
public Project getProject(String accessToken, String xeroTenantId, UUID projectId) throws IOException Retrieves a single project Allows you to retrieve a specific project using the projectId200 - OK/success, returns the specified project object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpoint- Returns:
- Project
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getProjectForHttpResponse
public com.google.api.client.http.HttpResponse getProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId) throws IOException Retrieves a single project Allows you to retrieve a specific project using the projectId200 - OK/success, returns the specified project object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpoint- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getProjectUsers
public ProjectUsers getProjectUsers(String accessToken, String xeroTenantId, Integer page, Integer pageSize) throws IOException Retrieves a list of all project users Allows you to retrieve the users on a projects.200 - OK/success, returns a list of project users
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantpage- set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.- Returns:
- ProjectUsers
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getProjectUsersForHttpResponse
public com.google.api.client.http.HttpResponse getProjectUsersForHttpResponse(String accessToken, String xeroTenantId, Integer page, Integer pageSize) throws IOException Retrieves a list of all project users Allows you to retrieve the users on a projects.200 - OK/success, returns a list of project users
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for Tenantpage- set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getProjects
public Projects getProjects(String accessToken, String xeroTenantId, List<UUID> projectIds, UUID contactID, String states, Integer page, Integer pageSize) throws IOException Retrieves all projects Allows you to retrieve, create and update projects.200 - OK/success, returns a list of project objects
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectIds- Search for all projects that match a comma separated list of projectIdscontactID- Filter for projects for a specific contactstates- Filter for projects in a particular state (INPROGRESS or CLOSED)page- set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.- Returns:
- Projects
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getProjectsForHttpResponse
public com.google.api.client.http.HttpResponse getProjectsForHttpResponse(String accessToken, String xeroTenantId, List<UUID> projectIds, UUID contactID, String states, Integer page, Integer pageSize) throws IOException Retrieves all projects Allows you to retrieve, create and update projects.200 - OK/success, returns a list of project objects
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectIds- Search for all projects that match a comma separated list of projectIdscontactID- Filter for projects for a specific contactstates- Filter for projects in a particular state (INPROGRESS or CLOSED)page- set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getTask
public Task getTask(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) throws IOException Retrieves a single project task Allows you to retrieve a specific project200 - OK/success, returns the specified task object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtaskId- You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}- Returns:
- Task
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getTaskForHttpResponse
public com.google.api.client.http.HttpResponse getTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) throws IOException Retrieves a single project task Allows you to retrieve a specific project200 - OK/success, returns the specified task object
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtaskId- You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getTasks
public Tasks getTasks(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds, ChargeType chargeType) throws IOException Retrieves all project tasks Allows you to retrieve a specific project200 - OK/success, returns a list of task objects
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointpage- Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.taskIds- Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}chargeType- The chargeType parameter- Returns:
- Tasks
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getTasksForHttpResponse
public com.google.api.client.http.HttpResponse getTasksForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds, ChargeType chargeType) throws IOException Retrieves all project tasks Allows you to retrieve a specific project200 - OK/success, returns a list of task objects
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointpage- Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.taskIds- Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}chargeType- The chargeType parameter- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getTimeEntries
public TimeEntries getTimeEntries(String accessToken, String xeroTenantId, UUID projectId, UUID userId, UUID taskId, UUID invoiceId, UUID contactId, Integer page, Integer pageSize, List<String> states, Boolean isChargeable, org.threeten.bp.OffsetDateTime dateAfterUtc, org.threeten.bp.OffsetDateTime dateBeforeUtc) throws IOException Retrieves all time entries associated with a specific project Allows you to retrieve the time entries associated with a specific project200 - OK/success, returns a list of time entry objects
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- Identifier of the project, that the task (which the time entry is logged against) belongs to.userId- The xero user identifier of the person who logged time.taskId- Identifier of the task that time entry is logged against.invoiceId- Finds all time entries for this invoice.contactId- Finds all time entries for this contact identifier.page- Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.states- Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.isChargeable- Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.dateAfterUtc- ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.dateBeforeUtc- ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.- Returns:
- TimeEntries
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getTimeEntriesForHttpResponse
public com.google.api.client.http.HttpResponse getTimeEntriesForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID userId, UUID taskId, UUID invoiceId, UUID contactId, Integer page, Integer pageSize, List<String> states, Boolean isChargeable, org.threeten.bp.OffsetDateTime dateAfterUtc, org.threeten.bp.OffsetDateTime dateBeforeUtc) throws IOException Retrieves all time entries associated with a specific project Allows you to retrieve the time entries associated with a specific project200 - OK/success, returns a list of time entry objects
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- Identifier of the project, that the task (which the time entry is logged against) belongs to.userId- The xero user identifier of the person who logged time.taskId- Identifier of the task that time entry is logged against.invoiceId- Finds all time entries for this invoice.contactId- Finds all time entries for this contact identifier.page- Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.pageSize- Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.states- Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.isChargeable- Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.dateAfterUtc- ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.dateBeforeUtc- ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
getTimeEntry
public TimeEntry getTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException Retrieves a single time entry for a specific project Allows you to get a single time entry in a project200 - OK/success, returns the specified time entry
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryId- You can specify an individual time entry by appending the id to the endpoint- Returns:
- TimeEntry
- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
getTimeEntryForHttpResponse
public com.google.api.client.http.HttpResponse getTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException Retrieves a single time entry for a specific project Allows you to get a single time entry in a project200 - OK/success, returns the specified time entry
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryId- You can specify an individual time entry by appending the id to the endpoint- Returns:
- HttpResponse
- Throws:
IOException- if an error occurs while attempting to invoke the API
-
patchProject
public void patchProject(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch, String idempotencyKey) throws IOException creates a project for the specified contact Allows you to update a specific projects.204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointprojectPatch- Update the status of an existing ProjectidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
patchProjectForHttpResponse
public com.google.api.client.http.HttpResponse patchProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch, String idempotencyKey) throws IOException creates a project for the specified contact Allows you to update a specific projects.204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointprojectPatch- Update the status of an existing ProjectidempotencyKey- 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
-
updateProject
public void updateProject(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) throws IOException Updates a specific project Allows you to update a specific projects.204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointprojectCreateOrUpdate- Request of type ProjectCreateOrUpdateidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
updateProjectForHttpResponse
public com.google.api.client.http.HttpResponse updateProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate, String idempotencyKey) throws IOException Updates a specific project Allows you to update a specific projects.204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointprojectCreateOrUpdate- Request of type ProjectCreateOrUpdateidempotencyKey- 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
-
updateTask
public void updateTask(String accessToken, String xeroTenantId, UUID projectId, UUID taskId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) throws IOException Allows you to update a task Allows you to update a specific task204 - OK/Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtaskId- You can specify an individual task by appending the id to the endpointtaskCreateOrUpdate- The task object you are updatingidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
updateTaskForHttpResponse
public com.google.api.client.http.HttpResponse updateTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId, TaskCreateOrUpdate taskCreateOrUpdate, String idempotencyKey) throws IOException Allows you to update a task Allows you to update a specific task204 - OK/Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtaskId- You can specify an individual task by appending the id to the endpointtaskCreateOrUpdate- The task object you are updatingidempotencyKey- 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
-
updateTimeEntry
public void updateTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) throws IOException Updates a time entry for a specific project Allows you to update time entry in a project204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryId- You can specify an individual time entry by appending the id to the endpointtimeEntryCreateOrUpdate- The time entry object you are updatingidempotencyKey- This allows you to safely retry requests without the risk of duplicate processing. 128 character max.- Throws:
IOException- if an error occurs while attempting to invoke the API *
-
updateTimeEntryForHttpResponse
public com.google.api.client.http.HttpResponse updateTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate, String idempotencyKey) throws IOException Updates a time entry for a specific project Allows you to update time entry in a project204 - Success - return response 204 no content
400 - A failed request due to validation error
- Parameters:
accessToken- Authorization token for user set in header of each requestxeroTenantId- Xero identifier for TenantprojectId- You can specify an individual project by appending the projectId to the endpointtimeEntryId- You can specify an individual time entry by appending the id to the endpointtimeEntryCreateOrUpdate- The time entry object you are updatingidempotencyKey- 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
-
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
-