-
-
-
using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdatePayRunExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PayrollNzApi();
- var xeroTenantId = "xeroTenantId_example";
- var payRunID = Guid.Parse("38400000-8cf0-11bd-b23e-10b96e4ef00d");
- var idempotencyKey = "KEY_VALUE";
- var startDate = new DateTime(2020, 10, 10);
- var paymentDate = new DateTime(2020, 10, 12);
-
- var payRunCalendar = new PayRunCalendar();
- payRunCalendar.CalendarType = CalendarType.Weekly;
- payRunCalendar.PeriodStartDate = startDate;
- payRunCalendar.PaymentDate = paymentDate;
-
- try {
- var result = await apiInstance.UpdatePayRunAsync(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdatePayRun: " + e.Message );
- }
- }
- }
-}
-
-
-