public class ProjectApi extends Object
| Constructor and Description |
|---|
ProjectApi() |
ProjectApi(ApiClient apiClient) |
| Modifier and Type | Method and Description |
|---|---|
ByteArrayInputStream |
convertInputToByteArray(InputStream is) |
Project |
createProject(String accessToken,
String xeroTenantId,
ProjectCreateOrUpdate projectCreateOrUpdate)
create one or more new projects
|
com.google.api.client.http.HttpResponse |
createProjectForHttpResponse(String accessToken,
String xeroTenantId,
ProjectCreateOrUpdate projectCreateOrUpdate) |
TimeEntry |
createTimeEntry(String accessToken,
String xeroTenantId,
UUID projectId,
TimeEntryCreateOrUpdate timeEntryCreateOrUpdate)
Allows you to create a task
Allows you to create a specific task
|
com.google.api.client.http.HttpResponse |
createTimeEntryForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) |
void |
deleteTimeEntry(String accessToken,
String xeroTenantId,
UUID projectId,
UUID timeEntryId)
Allows you to delete a time entry
Allows you to delete a specific time entry
|
com.google.api.client.http.HttpResponse |
deleteTimeEntryForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
UUID timeEntryId) |
ApiClient |
getApiClient() |
static ProjectApi |
getInstance(ApiClient apiClient) |
Project |
getProject(String accessToken,
String xeroTenantId,
UUID projectId)
Allows you to retrieve a single project
Allows you to retrieve a specific project
|
com.google.api.client.http.HttpResponse |
getProjectForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId) |
Projects |
getProjects(String accessToken,
String xeroTenantId,
List<UUID> projectIds,
UUID contactID,
String states,
Integer page,
Integer pageSize)
list all projects
Allows you to retrieve, create and update projects.
|
com.google.api.client.http.HttpResponse |
getProjectsForHttpResponse(String accessToken,
String xeroTenantId,
List<UUID> projectIds,
UUID contactID,
String states,
Integer page,
Integer pageSize) |
ProjectUsers |
getProjectUsers(String accessToken,
String xeroTenantId,
Integer page,
Integer pageSize)
list all project users
Allows you to retrieve the users on a projects.
|
com.google.api.client.http.HttpResponse |
getProjectUsersForHttpResponse(String accessToken,
String xeroTenantId,
Integer page,
Integer pageSize) |
Task |
getTask(String accessToken,
String xeroTenantId,
UUID projectId,
UUID taskId)
Allows you to retrieve a single project
Allows you to retrieve a specific project
|
com.google.api.client.http.HttpResponse |
getTaskForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
UUID taskId) |
Tasks |
getTasks(String accessToken,
String xeroTenantId,
UUID projectId,
Integer page,
Integer pageSize,
String taskIds)
Allows you to retrieve a single project
Allows you to retrieve a specific project
|
com.google.api.client.http.HttpResponse |
getTasksForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
Integer page,
Integer pageSize,
String taskIds) |
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)
Allows you to retrieve the time entries associated with a specific project
Allows you to retrieve the time entries associated with a specific project
|
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) |
TimeEntry |
getTimeEntry(String accessToken,
String xeroTenantId,
UUID projectId,
UUID timeEntryId)
Allows you to get a single time entry in a project
Allows you to upget a single time entry in a project
|
com.google.api.client.http.HttpResponse |
getTimeEntryForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
UUID timeEntryId) |
String |
getUserAgent() |
void |
patchProject(String accessToken,
String xeroTenantId,
UUID projectId,
ProjectPatch projectPatch)
creates a project for the specified contact
Allows you to update a specific projects.
|
com.google.api.client.http.HttpResponse |
patchProjectForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
ProjectPatch projectPatch) |
void |
setApiClient(ApiClient apiClient) |
void |
setUserAgent(String userAgent) |
void |
updateProject(String accessToken,
String xeroTenantId,
UUID projectId,
ProjectCreateOrUpdate projectCreateOrUpdate)
update a specific project
Allows you to update a specific projects.
|
com.google.api.client.http.HttpResponse |
updateProjectForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
ProjectCreateOrUpdate projectCreateOrUpdate) |
void |
updateTimeEntry(String accessToken,
String xeroTenantId,
UUID projectId,
UUID timeEntryId,
TimeEntryCreateOrUpdate timeEntryCreateOrUpdate)
Allows you to update time entry in a project
Allows you to update time entry in a project
|
com.google.api.client.http.HttpResponse |
updateTimeEntryForHttpResponse(String accessToken,
String xeroTenantId,
UUID projectId,
UUID timeEntryId,
TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) |
public ProjectApi()
public ProjectApi(ApiClient apiClient)
public static ProjectApi getInstance(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
public void setUserAgent(String userAgent)
public String getUserAgent()
public Project createProject(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException
201 - OK/success, returns the new project object
400 - A failed request due to validation error
xeroTenantId - Xero identifier for TenantprojectCreateOrUpdate - Create a new project with ProjectCreateOrUpdate 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 createProjectForHttpResponse(String accessToken, String xeroTenantId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException
IOExceptionpublic TimeEntry createTimeEntry(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException
200 - OK/success, returns the newly created time entry
xeroTenantId - Xero identifier for TenantprojectId - You can specify an individual project by appending the projectId to the endpointtimeEntryCreateOrUpdate - The time entry object 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 createTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException
IOExceptionpublic void deleteTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException
204 - Success - return response 204 no content
xeroTenantId - 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 endpointIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse deleteTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException
IOExceptionpublic Project getProject(String accessToken, String xeroTenantId, UUID projectId) throws IOException
200 - OK/success, returns a list of project objects
400 - A failed request due to validation error
xeroTenantId - Xero identifier for TenantprojectId - You can specify an individual project by appending the projectId to the endpointaccessToken - 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 getProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId) throws IOException
IOExceptionpublic ProjectUsers getProjectUsers(String accessToken, String xeroTenantId, Integer page, Integer pageSize) throws IOException
200 - OK/success, returns a list of project objects
400 - A failed request due to validation error
xeroTenantId - 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.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 getProjectUsersForHttpResponse(String accessToken, String xeroTenantId, Integer page, Integer pageSize) throws IOException
IOExceptionpublic Projects getProjects(String accessToken, String xeroTenantId, List<UUID> projectIds, UUID contactID, String states, Integer page, Integer pageSize) throws IOException
200 - OK/success, returns a list of project objects
400 - A failed request due to validation error
xeroTenantId - 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.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 getProjectsForHttpResponse(String accessToken, String xeroTenantId, List<UUID> projectIds, UUID contactID, String states, Integer page, Integer pageSize) throws IOException
IOExceptionpublic Task getTask(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) throws IOException
200 - OK/success, returns a list of task objects
xeroTenantId - 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}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 getTaskForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID taskId) throws IOException
IOExceptionpublic Tasks getTasks(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds) throws IOException
200 - OK/success, returns a list of task objects
xeroTenantId - 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 - taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId}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 getTasksForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, Integer page, Integer pageSize, String taskIds) throws IOException
IOExceptionpublic 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
200 - OK/success, returns a list of time entry objects
xeroTenantId - 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’s 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.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 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
IOExceptionpublic TimeEntry getTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException
200 - OK/success, returns a single time entry
xeroTenantId - 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 endpointaccessToken - 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 getTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId) throws IOException
IOExceptionpublic void patchProject(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch) throws IOException
204 - Success - return response 204 no content
400 - A failed request due to validation error
xeroTenantId - Xero identifier for TenantprojectId - You can specify an individual project by appending the projectId to the endpointprojectPatch - Update the status of an existing ProjectIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse patchProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectPatch projectPatch) throws IOException
IOExceptionpublic void updateProject(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException
204 - Success - return response 204 no content
400 - A failed request due to validation error
xeroTenantId - Xero identifier for TenantprojectId - You can specify an individual project by appending the projectId to the endpointprojectCreateOrUpdate - Request of type ProjectCreateOrUpdateIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse updateProjectForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, ProjectCreateOrUpdate projectCreateOrUpdate) throws IOException
IOExceptionpublic void updateTimeEntry(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException
204 - Success - return response 204 no content
xeroTenantId - 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 updatingIOException - if an error occurs while attempting to invoke the APIpublic com.google.api.client.http.HttpResponse updateTimeEntryForHttpResponse(String accessToken, String xeroTenantId, UUID projectId, UUID timeEntryId, TimeEntryCreateOrUpdate timeEntryCreateOrUpdate) throws IOException
IOExceptionpublic ByteArrayInputStream convertInputToByteArray(InputStream is) throws IOException
IOExceptionCopyright © 2020. All rights reserved.