+
+
+
# configure api_client for use with xero-python sdk client
+api_client = ApiClient(
+ Configuration(
+ debug=false,
+ oauth2_token=OAuth2Token(
+ client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
+ ),
+ ),
+ pool_threads=1,
+)
+
+api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
+
+def accounting_update_timesheet_line():
+ api_instance = PayrollAuV2Api(api_client)
+ xero_tenant_id = 'xeroTenantId_example'
+ timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
+ timesheet_line_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
+ idempotency_key = 'KEY_VALUE'
+ date = dateutil.parser.parse('2020-10-28T00:00:00Z')
+
+ timesheet_line = TimesheetLine(
+ timesheet_line_id = "00000000-0000-0000-0000-000000000000",
+ date = date,
+ earnings_rate_id = "00000000-0000-0000-0000-000000000000",
+ tracking_item_id = "00000000-0000-0000-0000-000000000000",
+ number_of_units = 6)
+
+ try:
+ api_response = api_instance.update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheetLine, idempotency_key)
+ print(api_response)
+ except AccountingBadRequestException as e:
+ print("Exception when calling PayrollAuV2Api->updateTimesheetLine: %s\n" % e)
+
+
+