Class PayrollAuApi

java.lang.Object
com.xero.api.client.PayrollAuApi

public class PayrollAuApi
extends Object
  • Constructor Details

    • PayrollAuApi

      public PayrollAuApi()
    • PayrollAuApi

      public PayrollAuApi​(ApiClient apiClient)
  • Method Details

    • getInstance

      public static PayrollAuApi getInstance​(ApiClient apiClient)
    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient​(ApiClient apiClient)
    • setUserAgent

      public void setUserAgent​(String userAgent)
    • getUserAgent

      public String getUserAgent()
    • createEmployee

      public Employees createEmployee​(String accessToken, String xeroTenantId, List<Employee> employee) throws IOException
      Use this method to create a payroll employee

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      employee - The employee parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      Employees
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createEmployeeForHttpResponse

      public com.google.api.client.http.HttpResponse createEmployeeForHttpResponse​(String accessToken, String xeroTenantId, List<Employee> employee) throws IOException
      Throws:
      IOException
    • createLeaveApplication

      public LeaveApplications createLeaveApplication​(String accessToken, String xeroTenantId, List<LeaveApplication> leaveApplication) throws IOException
      Use this method to create a Leave Application

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      leaveApplication - The leaveApplication parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      LeaveApplications
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createLeaveApplicationForHttpResponse

      public com.google.api.client.http.HttpResponse createLeaveApplicationForHttpResponse​(String accessToken, String xeroTenantId, List<LeaveApplication> leaveApplication) throws IOException
      Throws:
      IOException
    • createPayItem

      public PayItems createPayItem​(String accessToken, String xeroTenantId, PayItem payItem) throws IOException
      Use this method to create a Pay Item

      200 - A successful request - currently returns empty array for JSON

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payItem - The payItem parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayItems
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createPayItemForHttpResponse

      public com.google.api.client.http.HttpResponse createPayItemForHttpResponse​(String accessToken, String xeroTenantId, PayItem payItem) throws IOException
      Throws:
      IOException
    • createPayRun

      public PayRuns createPayRun​(String accessToken, String xeroTenantId, List<PayRun> payRun) throws IOException
      Use this method to create a PayRun

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payRun - The payRun parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayRuns
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createPayRunForHttpResponse

      public com.google.api.client.http.HttpResponse createPayRunForHttpResponse​(String accessToken, String xeroTenantId, List<PayRun> payRun) throws IOException
      Throws:
      IOException
    • createPayrollCalendar

      public PayrollCalendars createPayrollCalendar​(String accessToken, String xeroTenantId, List<PayrollCalendar> payrollCalendar) throws IOException
      Use this method to create a Payroll Calendars

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payrollCalendar - The payrollCalendar parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayrollCalendars
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createPayrollCalendarForHttpResponse

      public com.google.api.client.http.HttpResponse createPayrollCalendarForHttpResponse​(String accessToken, String xeroTenantId, List<PayrollCalendar> payrollCalendar) throws IOException
      Throws:
      IOException
    • createSuperfund

      public SuperFunds createSuperfund​(String accessToken, String xeroTenantId, List<SuperFund> superFund) throws IOException
      Use this method to create a super fund

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      superFund - The superFund parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      SuperFunds
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createSuperfundForHttpResponse

      public com.google.api.client.http.HttpResponse createSuperfundForHttpResponse​(String accessToken, String xeroTenantId, List<SuperFund> superFund) throws IOException
      Throws:
      IOException
    • createTimesheet

      public Timesheets createTimesheet​(String accessToken, String xeroTenantId, List<Timesheet> timesheet) throws IOException
      Use this method to create a timesheet

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      timesheet - The timesheet parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      Timesheets
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • createTimesheetForHttpResponse

      public com.google.api.client.http.HttpResponse createTimesheetForHttpResponse​(String accessToken, String xeroTenantId, List<Timesheet> timesheet) throws IOException
      Throws:
      IOException
    • getEmployee

      public Employees getEmployee​(String accessToken, String xeroTenantId, UUID employeeId) throws IOException
      searches for an employee by unique id

      200 - search results matching criteria

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      employeeId - Employee id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      Employees
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getEmployeeForHttpResponse

      public com.google.api.client.http.HttpResponse getEmployeeForHttpResponse​(String accessToken, String xeroTenantId, UUID employeeId) throws IOException
      Throws:
      IOException
    • getEmployees

      public Employees getEmployees​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches employees

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 employees will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      Employees
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getEmployeesForHttpResponse

      public com.google.api.client.http.HttpResponse getEmployeesForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • getLeaveApplication

      public LeaveApplications getLeaveApplication​(String accessToken, String xeroTenantId, UUID leaveApplicationId) throws IOException
      searches for an Leave Application by unique id

      200 - search results matching criteria

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      leaveApplicationId - Leave Application id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      LeaveApplications
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getLeaveApplicationForHttpResponse

      public com.google.api.client.http.HttpResponse getLeaveApplicationForHttpResponse​(String accessToken, String xeroTenantId, UUID leaveApplicationId) throws IOException
      Throws:
      IOException
    • getLeaveApplications

      public LeaveApplications getLeaveApplications​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches Leave Applications

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 objects will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      LeaveApplications
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getLeaveApplicationsForHttpResponse

      public com.google.api.client.http.HttpResponse getLeaveApplicationsForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • getPayItems

      public PayItems getPayItems​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches Pay Items

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 objects will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayItems
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getPayItemsForHttpResponse

      public com.google.api.client.http.HttpResponse getPayItemsForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • getPayRun

      public PayRuns getPayRun​(String accessToken, String xeroTenantId, UUID payRunID) throws IOException
      searches for an payrun by unique id

      200 - search results matching criteria

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payRunID - PayRun id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayRuns
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getPayRunForHttpResponse

      public com.google.api.client.http.HttpResponse getPayRunForHttpResponse​(String accessToken, String xeroTenantId, UUID payRunID) throws IOException
      Throws:
      IOException
    • getPayRuns

      public PayRuns getPayRuns​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches PayRuns

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 PayRuns will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayRuns
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getPayRunsForHttpResponse

      public com.google.api.client.http.HttpResponse getPayRunsForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • getPayrollCalendar

      public PayrollCalendars getPayrollCalendar​(String accessToken, String xeroTenantId, UUID payrollCalendarID) throws IOException
      searches Payroll Calendars

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payrollCalendarID - Payroll Calendar id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayrollCalendars
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getPayrollCalendarForHttpResponse

      public com.google.api.client.http.HttpResponse getPayrollCalendarForHttpResponse​(String accessToken, String xeroTenantId, UUID payrollCalendarID) throws IOException
      Throws:
      IOException
    • getPayrollCalendars

      public PayrollCalendars getPayrollCalendars​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches Payroll Calendars

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 objects will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayrollCalendars
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getPayrollCalendarsForHttpResponse

      public com.google.api.client.http.HttpResponse getPayrollCalendarsForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • getPayslip

      public PayslipObject getPayslip​(String accessToken, String xeroTenantId, UUID payslipID) throws IOException
      searches for an payslip by unique id

      200 - search results matching criteria

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payslipID - Payslip id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayslipObject
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getPayslipForHttpResponse

      public com.google.api.client.http.HttpResponse getPayslipForHttpResponse​(String accessToken, String xeroTenantId, UUID payslipID) throws IOException
      Throws:
      IOException
    • getSettings

      public SettingsObject getSettings​(String accessToken, String xeroTenantId) throws IOException
      retrieve settings

      200 - payroll settings

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      accessToken - Authorization token for user set in header of each request
      Returns:
      SettingsObject
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getSettingsForHttpResponse

      public com.google.api.client.http.HttpResponse getSettingsForHttpResponse​(String accessToken, String xeroTenantId) throws IOException
      Throws:
      IOException
    • getSuperfund

      public SuperFunds getSuperfund​(String accessToken, String xeroTenantId, UUID superFundID) throws IOException
      searches for an Superfund by unique id

      200 - search results matching criteria

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      superFundID - Superfund id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      SuperFunds
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getSuperfundForHttpResponse

      public com.google.api.client.http.HttpResponse getSuperfundForHttpResponse​(String accessToken, String xeroTenantId, UUID superFundID) throws IOException
      Throws:
      IOException
    • getSuperfundProducts

      public SuperFundProducts getSuperfundProducts​(String accessToken, String xeroTenantId, String ABN, String USI) throws IOException
      searches SuperfundProducts

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ABN - The ABN of the Regulated SuperFund
      USI - The USI of the Regulated SuperFund
      accessToken - Authorization token for user set in header of each request
      Returns:
      SuperFundProducts
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getSuperfundProductsForHttpResponse

      public com.google.api.client.http.HttpResponse getSuperfundProductsForHttpResponse​(String accessToken, String xeroTenantId, String ABN, String USI) throws IOException
      Throws:
      IOException
    • getSuperfunds

      public SuperFunds getSuperfunds​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches SuperFunds

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 SuperFunds will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      SuperFunds
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getSuperfundsForHttpResponse

      public com.google.api.client.http.HttpResponse getSuperfundsForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • getTimesheet

      public TimesheetObject getTimesheet​(String accessToken, String xeroTenantId, UUID timesheetID) throws IOException
      searches for an timesheet by unique id

      200 - search results matching criteria

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      timesheetID - Timesheet id for single object
      accessToken - Authorization token for user set in header of each request
      Returns:
      TimesheetObject
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getTimesheetForHttpResponse

      public com.google.api.client.http.HttpResponse getTimesheetForHttpResponse​(String accessToken, String xeroTenantId, UUID timesheetID) throws IOException
      Throws:
      IOException
    • getTimesheets

      public Timesheets getTimesheets​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      searches timesheets

      200 - search results matching criteria

      400 - validation error for a bad request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      ifModifiedSince - Only records created or modified since this timestamp will be returned
      where - Filter by an any element
      order - Order by an any element
      page - e.g. page=1 – Up to 100 timesheets will be returned in a single API call
      accessToken - Authorization token for user set in header of each request
      Returns:
      Timesheets
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • getTimesheetsForHttpResponse

      public com.google.api.client.http.HttpResponse getTimesheetsForHttpResponse​(String accessToken, String xeroTenantId, String ifModifiedSince, String where, String order, Integer page) throws IOException
      Throws:
      IOException
    • updateEmployee

      public Employees updateEmployee​(String accessToken, String xeroTenantId, UUID employeeId, List<Employee> employee) throws IOException
      Update an Employee Update properties on a single employee

      200 - A successful request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      employeeId - Employee id for single object
      employee - The employee parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      Employees
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • updateEmployeeForHttpResponse

      public com.google.api.client.http.HttpResponse updateEmployeeForHttpResponse​(String accessToken, String xeroTenantId, UUID employeeId, List<Employee> employee) throws IOException
      Throws:
      IOException
    • updateLeaveApplication

      public LeaveApplications updateLeaveApplication​(String accessToken, String xeroTenantId, UUID leaveApplicationId, List<LeaveApplication> leaveApplication) throws IOException
      Use this method to update a Leave Application

      200 - A successful request

      400 - invalid input, object invalid - TODO

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      leaveApplicationId - Leave Application id for single object
      leaveApplication - The leaveApplication parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      LeaveApplications
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • updateLeaveApplicationForHttpResponse

      public com.google.api.client.http.HttpResponse updateLeaveApplicationForHttpResponse​(String accessToken, String xeroTenantId, UUID leaveApplicationId, List<LeaveApplication> leaveApplication) throws IOException
      Throws:
      IOException
    • updatePayRun

      public PayRuns updatePayRun​(String accessToken, String xeroTenantId, UUID payRunID, List<PayRun> payRun) throws IOException
      Update a PayRun Update properties on a single PayRun

      200 - A successful request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payRunID - PayRun id for single object
      payRun - The payRun parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      PayRuns
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • updatePayRunForHttpResponse

      public com.google.api.client.http.HttpResponse updatePayRunForHttpResponse​(String accessToken, String xeroTenantId, UUID payRunID, List<PayRun> payRun) throws IOException
      Throws:
      IOException
    • updatePayslip

      public Payslips updatePayslip​(String accessToken, String xeroTenantId, UUID payslipID, List<PayslipLines> payslipLines) throws IOException
      Update a Payslip Update lines on a single payslips

      200 - A successful request - currently returns empty array for JSON

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      payslipID - Payslip id for single object
      payslipLines - The payslipLines parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      Payslips
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • updatePayslipForHttpResponse

      public com.google.api.client.http.HttpResponse updatePayslipForHttpResponse​(String accessToken, String xeroTenantId, UUID payslipID, List<PayslipLines> payslipLines) throws IOException
      Throws:
      IOException
    • updateSuperfund

      public SuperFunds updateSuperfund​(String accessToken, String xeroTenantId, UUID superFundID, List<SuperFund> superFund) throws IOException
      Update a Superfund Update properties on a single Superfund

      200 - A successful request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      superFundID - Superfund id for single object
      superFund - The superFund parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      SuperFunds
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • updateSuperfundForHttpResponse

      public com.google.api.client.http.HttpResponse updateSuperfundForHttpResponse​(String accessToken, String xeroTenantId, UUID superFundID, List<SuperFund> superFund) throws IOException
      Throws:
      IOException
    • updateTimesheet

      public Timesheets updateTimesheet​(String accessToken, String xeroTenantId, UUID timesheetID, List<Timesheet> timesheet) throws IOException
      Update a Timesheet Update properties on a single timesheet

      200 - A successful request

      Parameters:
      xeroTenantId - Xero identifier for Tenant
      timesheetID - Timesheet id for single object
      timesheet - The timesheet parameter
      accessToken - Authorization token for user set in header of each request
      Returns:
      Timesheets
      Throws:
      IOException - if an error occurs while attempting to invoke the API
    • updateTimesheetForHttpResponse

      public com.google.api.client.http.HttpResponse updateTimesheetForHttpResponse​(String accessToken, String xeroTenantId, UUID timesheetID, List<Timesheet> timesheet) throws IOException
      Throws:
      IOException
    • convertInputToByteArray

      public ByteArrayInputStream convertInputToByteArray​(InputStream is) throws IOException
      Throws:
      IOException