Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AccountingApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AppStoreApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AssetApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down Expand Up @@ -772,7 +772,7 @@
requestOptions.HeaderParameters.Add("Accept", accept);


if (status != null)

Check warning on line 775 in Xero.NetStandard.OAuth2/Api/AssetApi.cs

View workflow job for this annotation

GitHub Actions / build-test-lint

The result of the expression is always 'true' since a value of type 'AssetStatusQueryParam' is never equal to 'null' of type 'AssetStatusQueryParam?'
{
foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "status", status))
{
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/FilesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/FinanceApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/IdentityApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
124 changes: 1 addition & 123 deletions Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down Expand Up @@ -2020,37 +2020,6 @@ public interface IPayrollNzApiAsync : IApiAccessor
/// <returns>Task of ApiResponse (EmployeeTaxObject)</returns>
System.Threading.Tasks.Task<ApiResponse<EmployeeTaxObject>> UpdateEmployeeTaxAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid employeeID, EmployeeTax employeeTax, string idempotencyKey = null, CancellationToken cancellationToken = default);
/// <summary>
/// Updates a pay run
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of PayRunObject</returns>
System.Threading.Tasks.Task<PayRunObject> UpdatePayRunAsync (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default);

/// <summary>
/// Updates a pay run
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of ApiResponse (PayRunObject)</returns>
System.Threading.Tasks.Task<ApiResponse<PayRunObject>> UpdatePayRunAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default);
/// <summary>
/// Creates an employee pay slip
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -8195,97 +8164,6 @@ public async System.Threading.Tasks.Task<EmployeeTaxObject> UpdateEmployeeTaxAsy
}


/// <summary>
/// Updates a pay run
/// </summary>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of PayRunObject</returns>
public async System.Threading.Tasks.Task<PayRunObject> UpdatePayRunAsync (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default)
{
Xero.NetStandard.OAuth2.Client.ApiResponse<PayRunObject> localVarResponse = await UpdatePayRunAsyncWithHttpInfo(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey, cancellationToken);
return localVarResponse.Data;

}

/// <summary>
/// Updates a pay run
/// </summary>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of ApiResponse (PayRunObject)</returns>
public async System.Threading.Tasks.Task<Xero.NetStandard.OAuth2.Client.ApiResponse<PayRunObject>> UpdatePayRunAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling PayrollNzApi->UpdatePayRun");

// verify the required parameter 'payRunID' is set
if (payRunID == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'payRunID' when calling PayrollNzApi->UpdatePayRun");

// verify the required parameter 'payRun' is set
if (payRun == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'payRun' when calling PayrollNzApi->UpdatePayRun");


Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions();

String[] @contentTypes = new String[] {
"application/json"
};

// to determine the Accept header
String[] @accepts = new String[] {
"application/json"
};

foreach (var cType in @contentTypes)
requestOptions.HeaderParameters.Add("Content-Type", cType);

foreach (var accept in @accepts)
requestOptions.HeaderParameters.Add("Accept", accept);

if (payRunID != null)
requestOptions.PathParameters.Add("PayRunID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(payRunID)); // path parameter
if (xeroTenantId != null)
requestOptions.HeaderParameters.Add("Xero-Tenant-Id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter
if (idempotencyKey != null)
requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter
requestOptions.Data = payRun;

// authentication (OAuth2) required
// oauth required
if (!String.IsNullOrEmpty(accessToken))
{
requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
}
// make the HTTP request



var response = await this.AsynchronousClient.PutAsync<PayRunObject>("/PayRuns/{PayRunID}", requestOptions, this.Configuration, cancellationToken);

if (this.ExceptionFactory != null)
{
Exception exception = this.ExceptionFactory("UpdatePayRun", response);
if (exception != null) throw exception;
}

return response;
}


/// <summary>
/// Creates an employee pay slip
/// </summary>
Expand Down
124 changes: 1 addition & 123 deletions Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down Expand Up @@ -1989,37 +1989,6 @@ public interface IPayrollUkApiAsync : IApiAccessor
/// <returns>Task of ApiResponse (SalaryAndWageObject)</returns>
System.Threading.Tasks.Task<ApiResponse<SalaryAndWageObject>> UpdateEmployeeSalaryAndWageAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid employeeID, Guid salaryAndWagesID, SalaryAndWage salaryAndWage, string idempotencyKey = null, CancellationToken cancellationToken = default);
/// <summary>
/// Updates a specific pay run
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of PayRunObject</returns>
System.Threading.Tasks.Task<PayRunObject> UpdatePayRunAsync (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default);

/// <summary>
/// Updates a specific pay run
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of ApiResponse (PayRunObject)</returns>
System.Threading.Tasks.Task<ApiResponse<PayRunObject>> UpdatePayRunAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default);
/// <summary>
/// Updates a specific timesheet line for a specific timesheet
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -8052,97 +8021,6 @@ public async System.Threading.Tasks.Task<SalaryAndWageObject> UpdateEmployeeSala
}


/// <summary>
/// Updates a specific pay run
/// </summary>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of PayRunObject</returns>
public async System.Threading.Tasks.Task<PayRunObject> UpdatePayRunAsync (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default)
{
Xero.NetStandard.OAuth2.Client.ApiResponse<PayRunObject> localVarResponse = await UpdatePayRunAsyncWithHttpInfo(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey, cancellationToken);
return localVarResponse.Data;

}

/// <summary>
/// Updates a specific pay run
/// </summary>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="payRunID">Identifier for the pay run</param>
/// <param name="payRun"></param>
/// <param name="idempotencyKey">This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)</param>
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
/// <returns>Task of ApiResponse (PayRunObject)</returns>
public async System.Threading.Tasks.Task<Xero.NetStandard.OAuth2.Client.ApiResponse<PayRunObject>> UpdatePayRunAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid payRunID, PayRun payRun, string idempotencyKey = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling PayrollUkApi->UpdatePayRun");

// verify the required parameter 'payRunID' is set
if (payRunID == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'payRunID' when calling PayrollUkApi->UpdatePayRun");

// verify the required parameter 'payRun' is set
if (payRun == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'payRun' when calling PayrollUkApi->UpdatePayRun");


Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions();

String[] @contentTypes = new String[] {
"application/json"
};

// to determine the Accept header
String[] @accepts = new String[] {
"application/json"
};

foreach (var cType in @contentTypes)
requestOptions.HeaderParameters.Add("Content-Type", cType);

foreach (var accept in @accepts)
requestOptions.HeaderParameters.Add("Accept", accept);

if (payRunID != null)
requestOptions.PathParameters.Add("PayRunID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(payRunID)); // path parameter
if (xeroTenantId != null)
requestOptions.HeaderParameters.Add("Xero-Tenant-Id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter
if (idempotencyKey != null)
requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter
requestOptions.Data = payRun;

// authentication (OAuth2) required
// oauth required
if (!String.IsNullOrEmpty(accessToken))
{
requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
}
// make the HTTP request



var response = await this.AsynchronousClient.PutAsync<PayRunObject>("/PayRuns/{PayRunID}", requestOptions, this.Configuration, cancellationToken);

if (this.ExceptionFactory != null)
{
Exception exception = this.ExceptionFactory("UpdatePayRun", response);
if (exception != null) throw exception;
}

return response;
}


/// <summary>
/// Updates a specific timesheet line for a specific timesheet
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/ProjectApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 9.1.0
// The version of the OpenAPI document: 9.2.0


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ protected virtual void InterceptRequest(HttpRequestMessage req)
{

}

/// <summary>
/// Intercepts the response after it is received. Override to add custom logic.
/// </summary>
Expand Down
Loading
Loading