+
+
+
await xero.setTokenSet(tokenSet);
+
+const xeroTenantId = 'xeroTenantId_example';
+const timesheetID = '38400000-8cf0-11bd-b23e-10b96e4ef00d';
+const timesheetLineID = '38400000-8cf0-11bd-b23e-10b96e4ef00d';
+const idempotencyKey = 'KEY_VALUE';
+const date = '2020-10-28'
+
+const timesheetLine: TimesheetLine = {
+ timesheetLineID: "00000000-0000-0000-0000-000000000000",
+ date: date,
+ earningsRateID: "00000000-0000-0000-0000-000000000000",
+ trackingItemID: "00000000-0000-0000-0000-000000000000",
+ numberOfUnits: 6
+};
+
+try {
+ const response = await xero.accountingApi.updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine, idempotencyKey);
+ console.log(response.body || response.response.statusCode)
+} catch (err) {
+ const error = JSON.stringify(err.response.body, null, 2)
+ console.log(`Status Code: ${err.response.statusCode} => ${error}`);
+}
+
+
+