+
+
+
using System;
+using System.Diagnostics;
+using Xero.NetStandard.OAuth2.Api;
+using Xero.NetStandard.OAuth2.Client;
+using Xero.NetStandard.OAuth2.Model;
+
+namespace Example
+{
+ public class GetTimesheetsExample
+ {
+ public async Task Main()
+ {
+ var accessToken = "YOUR_ACCESS_TOKEN";
+ var apiInstance = new PayrollAuV2Api();
+ var xeroTenantId = "xeroTenantId_example";
+ var page = 5;
+ var filter = "employeeId==00000000-0000-0000-0000-000000000000,payrollCalendarId==00000000-0000-0000-0000-000000000000";
+ var status = "Draft";
+ var startDate = "2019-01-02";
+ var endDate = "2020-01-02";
+ var sort = "startDate";
+
+ try {
+ var result = await apiInstance.GetTimesheetsAsync(accessToken, xeroTenantId, page, filter, status, startDate, endDate, sort);
+ Console.WriteLine(result);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Exception when calling apiInstance.GetTimesheets: " + e.Message );
+ }
+ }
+ }
+}
+
+
+
+
+ | Name |
+ Description |
+
+ | page |
+
+
+
+
+
+
+
+ Integer
+
+
+
+Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
+
+
+
+
+ |
+
+
+ | filter |
+
+
+
+
+
+
+
+ String
+
+
+
+Filter by employeeId and/or payrollCalendarId
+
+
+
+
+ |
+
+
+ | status |
+
+
+
+
+
+
+
+ String
+
+
+
+filter results by any timesheets with a matching timesheet status
+
+
+
+
+ |
+
+
+ | startDate |
+
+
+
+
+
+
+
+ String
+
+
+
+filter results by any timesheets with a startDate on or after the provided date
+
+
+
+
+ |
+
+
+ | endDate |
+
+
+
+
+
+
+
+ String
+
+
+
+filter results by any timesheets with a endDate on or before the provided date
+
+
+
+
+ |
+
+
+ | sort |
+
+
+
+
+
+
+
+ String
+
+
+
+sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
+
+
+
+
+ |
+
+
+
+