diff --git a/Xero.NetStandard.OAuth2/Api/AccountingApi.cs b/Xero.NetStandard.OAuth2/Api/AccountingApi.cs index 1fb0f97e..23f98bd0 100644 --- a/Xero.NetStandard.OAuth2/Api/AccountingApi.cs +++ b/Xero.NetStandard.OAuth2/Api/AccountingApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/AppStoreApi.cs b/Xero.NetStandard.OAuth2/Api/AppStoreApi.cs index 04acf7f9..58097d24 100644 --- a/Xero.NetStandard.OAuth2/Api/AppStoreApi.cs +++ b/Xero.NetStandard.OAuth2/Api/AppStoreApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/AssetApi.cs b/Xero.NetStandard.OAuth2/Api/AssetApi.cs index a298b3b0..bad43f1b 100644 --- a/Xero.NetStandard.OAuth2/Api/AssetApi.cs +++ b/Xero.NetStandard.OAuth2/Api/AssetApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs b/Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs index 4baf43f2..cc7876a1 100644 --- a/Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs +++ b/Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/FilesApi.cs b/Xero.NetStandard.OAuth2/Api/FilesApi.cs index 88ee9bd1..f4da1157 100644 --- a/Xero.NetStandard.OAuth2/Api/FilesApi.cs +++ b/Xero.NetStandard.OAuth2/Api/FilesApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/FinanceApi.cs b/Xero.NetStandard.OAuth2/Api/FinanceApi.cs index 004eb717..0070a29b 100644 --- a/Xero.NetStandard.OAuth2/Api/FinanceApi.cs +++ b/Xero.NetStandard.OAuth2/Api/FinanceApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; @@ -31,116 +35,6 @@ public interface IFinanceApiAsync : IApiAccessor { #region Asynchronous Operations /// - /// Get account usage - /// - /// - /// A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned. (optional) - /// date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of AccountUsageResponse - System.Threading.Tasks.Task GetAccountingActivityAccountUsageAsync (string accessToken, string xeroTenantId, string startMonth = null, string endMonth = null, CancellationToken cancellationToken = default); - - /// - /// Get account usage - /// - /// - /// A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned. (optional) - /// date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (AccountUsageResponse) - System.Threading.Tasks.Task> GetAccountingActivityAccountUsageAsyncWithHttpInfo (string accessToken, string xeroTenantId, string startMonth = null, string endMonth = null, CancellationToken cancellationToken = default); - /// - /// Get lock history - /// - /// - /// Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of LockHistoryResponse - System.Threading.Tasks.Task GetAccountingActivityLockHistoryAsync (string accessToken, string xeroTenantId, string endDate = null, CancellationToken cancellationToken = default); - - /// - /// Get lock history - /// - /// - /// Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (LockHistoryResponse) - System.Threading.Tasks.Task> GetAccountingActivityLockHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, string endDate = null, CancellationToken cancellationToken = default); - /// - /// Get report history - /// - /// - /// For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ReportHistoryResponse - System.Threading.Tasks.Task GetAccountingActivityReportHistoryAsync (string accessToken, string xeroTenantId, string endDate = null, CancellationToken cancellationToken = default); - - /// - /// Get report history - /// - /// - /// For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (ReportHistoryResponse) - System.Threading.Tasks.Task> GetAccountingActivityReportHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, string endDate = null, CancellationToken cancellationToken = default); - /// - /// Get user activities - /// - /// - /// For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of UserActivitiesResponse - System.Threading.Tasks.Task GetAccountingActivityUserActivitiesAsync (string accessToken, string xeroTenantId, string dataMonth = null, CancellationToken cancellationToken = default); - - /// - /// Get user activities - /// - /// - /// For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (UserActivitiesResponse) - System.Threading.Tasks.Task> GetAccountingActivityUserActivitiesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string dataMonth = null, CancellationToken cancellationToken = default); - /// /// Get Bank Statement Accounting /// /// @@ -502,355 +396,6 @@ public Xero.NetStandard.OAuth2.Client.ExceptionFactory ExceptionFactory } - /// - /// Get account usage A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned. (optional) - /// date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of AccountUsageResponse - public async System.Threading.Tasks.Task GetAccountingActivityAccountUsageAsync (string accessToken, string xeroTenantId, string startMonth = null, string endMonth = null, CancellationToken cancellationToken = default) - { - Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountingActivityAccountUsageAsyncWithHttpInfo(accessToken, xeroTenantId, startMonth, endMonth, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get account usage A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned. (optional) - /// date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (AccountUsageResponse) - public async System.Threading.Tasks.Task> GetAccountingActivityAccountUsageAsyncWithHttpInfo (string accessToken, string xeroTenantId, string startMonth = null, string endMonth = 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 FinanceApi->GetAccountingActivityAccountUsage"); - - - Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); - - String[] @contentTypes = new String[] { - }; - - // 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 (startMonth != null) - { - foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "startMonth", startMonth)) - { - foreach (var value in kvp.Value) - { - requestOptions.QueryParameters.Add(kvp.Key, value); - } - } - } - - if (endMonth != null) - { - foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "endMonth", endMonth)) - { - foreach (var value in kvp.Value) - { - requestOptions.QueryParameters.Add(kvp.Key, value); - } - } - } - if (xeroTenantId != null) - requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter - - // authentication (OAuth2) required - // oauth required - if (!String.IsNullOrEmpty(accessToken)) - { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); - } - // make the HTTP request - - - - var response = await this.AsynchronousClient.GetAsync("/AccountingActivities/AccountUsage", requestOptions, this.Configuration, cancellationToken); - - if (this.ExceptionFactory != null) - { - Exception exception = this.ExceptionFactory("GetAccountingActivityAccountUsage", response); - if (exception != null) throw exception; - } - - return response; - } - - - /// - /// Get lock history Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of LockHistoryResponse - public async System.Threading.Tasks.Task GetAccountingActivityLockHistoryAsync (string accessToken, string xeroTenantId, string endDate = null, CancellationToken cancellationToken = default) - { - Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountingActivityLockHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, endDate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get lock history Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (LockHistoryResponse) - public async System.Threading.Tasks.Task> GetAccountingActivityLockHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, string endDate = 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 FinanceApi->GetAccountingActivityLockHistory"); - - - Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); - - String[] @contentTypes = new String[] { - }; - - // 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 (endDate != null) - { - foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "endDate", endDate)) - { - foreach (var value in kvp.Value) - { - requestOptions.QueryParameters.Add(kvp.Key, value); - } - } - } - if (xeroTenantId != null) - requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter - - // authentication (OAuth2) required - // oauth required - if (!String.IsNullOrEmpty(accessToken)) - { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); - } - // make the HTTP request - - - - var response = await this.AsynchronousClient.GetAsync("/AccountingActivities/LockHistory", requestOptions, this.Configuration, cancellationToken); - - if (this.ExceptionFactory != null) - { - Exception exception = this.ExceptionFactory("GetAccountingActivityLockHistory", response); - if (exception != null) throw exception; - } - - return response; - } - - - /// - /// Get report history For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ReportHistoryResponse - public async System.Threading.Tasks.Task GetAccountingActivityReportHistoryAsync (string accessToken, string xeroTenantId, string endDate = null, CancellationToken cancellationToken = default) - { - Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountingActivityReportHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, endDate, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get report history For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (ReportHistoryResponse) - public async System.Threading.Tasks.Task> GetAccountingActivityReportHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, string endDate = 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 FinanceApi->GetAccountingActivityReportHistory"); - - - Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); - - String[] @contentTypes = new String[] { - }; - - // 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 (endDate != null) - { - foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "endDate", endDate)) - { - foreach (var value in kvp.Value) - { - requestOptions.QueryParameters.Add(kvp.Key, value); - } - } - } - if (xeroTenantId != null) - requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter - - // authentication (OAuth2) required - // oauth required - if (!String.IsNullOrEmpty(accessToken)) - { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); - } - // make the HTTP request - - - - var response = await this.AsynchronousClient.GetAsync("/AccountingActivities/ReportHistory", requestOptions, this.Configuration, cancellationToken); - - if (this.ExceptionFactory != null) - { - Exception exception = this.ExceptionFactory("GetAccountingActivityReportHistory", response); - if (exception != null) throw exception; - } - - return response; - } - - - /// - /// Get user activities For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of UserActivitiesResponse - public async System.Threading.Tasks.Task GetAccountingActivityUserActivitiesAsync (string accessToken, string xeroTenantId, string dataMonth = null, CancellationToken cancellationToken = default) - { - Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountingActivityUserActivitiesAsyncWithHttpInfo(accessToken, xeroTenantId, dataMonth, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get user activities For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction. - /// - /// Thrown when fails to make API call - /// Xero API OAuth 2.0 accessToken - /// Xero identifier for Tenant - /// date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API. (optional) - /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None - /// Task of ApiResponse (UserActivitiesResponse) - public async System.Threading.Tasks.Task> GetAccountingActivityUserActivitiesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string dataMonth = 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 FinanceApi->GetAccountingActivityUserActivities"); - - - Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); - - String[] @contentTypes = new String[] { - }; - - // 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 (dataMonth != null) - { - foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "dataMonth", dataMonth)) - { - foreach (var value in kvp.Value) - { - requestOptions.QueryParameters.Add(kvp.Key, value); - } - } - } - if (xeroTenantId != null) - requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter - - // authentication (OAuth2) required - // oauth required - if (!String.IsNullOrEmpty(accessToken)) - { - requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); - } - // make the HTTP request - - - - var response = await this.AsynchronousClient.GetAsync("/AccountingActivities/UserActivities", requestOptions, this.Configuration, cancellationToken); - - if (this.ExceptionFactory != null) - { - Exception exception = this.ExceptionFactory("GetAccountingActivityUserActivities", response); - if (exception != null) throw exception; - } - - return response; - } - - /// /// Get Bank Statement Accounting For lenders that prefer using bank statement data as the source of truth. We provide a data point that will allow access to customer bank statements, plus for reconciled bank transactions the matching accounting, invoice and billing data as well. As customers reconcile bank statements to invoices and bills, this transaction detail will provide valuable insight for lender's assessment measures. /// diff --git a/Xero.NetStandard.OAuth2/Api/IdentityApi.cs b/Xero.NetStandard.OAuth2/Api/IdentityApi.cs index beec68d5..53c51ff8 100644 --- a/Xero.NetStandard.OAuth2/Api/IdentityApi.cs +++ b/Xero.NetStandard.OAuth2/Api/IdentityApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs b/Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs index 6e23c377..fed0b94b 100644 --- a/Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs +++ b/Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/PayrollAUV2Api.cs b/Xero.NetStandard.OAuth2/Api/PayrollAUV2Api.cs new file mode 100644 index 00000000..2716b40d --- /dev/null +++ b/Xero.NetStandard.OAuth2/Api/PayrollAUV2Api.cs @@ -0,0 +1,1257 @@ +/* + * Xero Payroll AU API 2.0 + * + * This is the Xero Payroll API 2.0 for orgs in Australia region. + * + * Contact: api@xero.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +// The version of the OpenAPI document: 11.1.0 + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Xero.NetStandard.OAuth2.Client; +using Xero.NetStandard.OAuth2.Model.PayrollAuV2; +using System.Threading; + +namespace Xero.NetStandard.OAuth2.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPayrollAuV2ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Approves a specific timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + System.Threading.Tasks.Task ApproveTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, string idempotencyKey = null, CancellationToken cancellationToken = default); + + /// + /// Approves a specific timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + System.Threading.Tasks.Task> ApproveTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, string idempotencyKey = null, CancellationToken cancellationToken = default); + /// + /// Creates a new timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + System.Threading.Tasks.Task CreateTimesheetAsync (string accessToken, string xeroTenantId, Timesheet timesheet, string idempotencyKey = null, CancellationToken cancellationToken = default); + + /// + /// Creates a new timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + System.Threading.Tasks.Task> CreateTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Timesheet timesheet, string idempotencyKey = null, CancellationToken cancellationToken = default); + /// + /// Creates a new timesheet line for a specific timesheet using a unique timesheet ID + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLineObject + System.Threading.Tasks.Task CreateTimesheetLineAsync (string accessToken, string xeroTenantId, Guid timesheetID, TimesheetLine timesheetLine, string idempotencyKey = null, CancellationToken cancellationToken = default); + + /// + /// Creates a new timesheet line for a specific timesheet using a unique timesheet ID + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLineObject) + System.Threading.Tasks.Task> CreateTimesheetLineAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, TimesheetLine timesheetLine, string idempotencyKey = null, CancellationToken cancellationToken = default); + /// + /// Deletes a specific timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLine + System.Threading.Tasks.Task DeleteTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, CancellationToken cancellationToken = default); + + /// + /// Deletes a specific timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLine) + System.Threading.Tasks.Task> DeleteTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, CancellationToken cancellationToken = default); + /// + /// Deletes a specific timesheet line + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLine + System.Threading.Tasks.Task DeleteTimesheetLineAsync (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, CancellationToken cancellationToken = default); + + /// + /// Deletes a specific timesheet line + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLine) + System.Threading.Tasks.Task> DeleteTimesheetLineAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, CancellationToken cancellationToken = default); + /// + /// Retrieve a specific timesheet by using a unique timesheet ID + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + System.Threading.Tasks.Task GetTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, CancellationToken cancellationToken = default); + + /// + /// Retrieve a specific timesheet by using a unique timesheet ID + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + System.Threading.Tasks.Task> GetTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, CancellationToken cancellationToken = default); + /// + /// Retrieves timesheets + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) + /// Filter by employeeId and/or payrollCalendarId (optional) + /// filter results by any timesheets with a matching timesheet status (optional) + /// filter results by any timesheets with a startDate on or after the provided date (optional) + /// filter results by any timesheets with a endDate on or before the provided date (optional) + /// 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. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of Timesheets + System.Threading.Tasks.Task GetTimesheetsAsync (string accessToken, string xeroTenantId, int? page = null, string filter = null, string status = null, string startDate = null, string endDate = null, string sort = null, CancellationToken cancellationToken = default); + + /// + /// Retrieves timesheets + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) + /// Filter by employeeId and/or payrollCalendarId (optional) + /// filter results by any timesheets with a matching timesheet status (optional) + /// filter results by any timesheets with a startDate on or after the provided date (optional) + /// filter results by any timesheets with a endDate on or before the provided date (optional) + /// 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. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (Timesheets) + System.Threading.Tasks.Task> GetTimesheetsAsyncWithHttpInfo (string accessToken, string xeroTenantId, int? page = null, string filter = null, string status = null, string startDate = null, string endDate = null, string sort = null, CancellationToken cancellationToken = default); + /// + /// Reverts a specific timesheet to draft + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + System.Threading.Tasks.Task RevertTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, string idempotencyKey = null, CancellationToken cancellationToken = default); + + /// + /// Reverts a specific timesheet to draft + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + System.Threading.Tasks.Task> RevertTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, string idempotencyKey = null, CancellationToken cancellationToken = default); + /// + /// Updates a specific timesheet line for a specific timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLineObject + System.Threading.Tasks.Task UpdateTimesheetLineAsync (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, TimesheetLine timesheetLine, string idempotencyKey = null, CancellationToken cancellationToken = default); + + /// + /// Updates a specific timesheet line for a specific timesheet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLineObject) + System.Threading.Tasks.Task> UpdateTimesheetLineAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, TimesheetLine timesheetLine, string idempotencyKey = null, CancellationToken cancellationToken = default); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPayrollAuV2Api : IPayrollAuV2ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PayrollAuV2Api : IPayrollAuV2Api + { + private Xero.NetStandard.OAuth2.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PayrollAuV2Api() : this((string) null) + { + this.Configuration = Xero.NetStandard.OAuth2.Client.Configuration.MergeConfigurations( + Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance, + new Xero.NetStandard.OAuth2.Client.Configuration { BasePath = "https://api.xero.com/payroll.xro/2.0" } + ); + this.AsynchronousClient = new Xero.NetStandard.OAuth2.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PayrollAuV2Api(String basePath) + { + this.Configuration = Xero.NetStandard.OAuth2.Client.Configuration.MergeConfigurations( + Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance, + new Xero.NetStandard.OAuth2.Client.Configuration { BasePath = basePath } + ); + this.AsynchronousClient = new Xero.NetStandard.OAuth2.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public PayrollAuV2Api(Xero.NetStandard.OAuth2.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Xero.NetStandard.OAuth2.Client.Configuration.MergeConfigurations( + Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance, + configuration + ); + this.AsynchronousClient = new Xero.NetStandard.OAuth2.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public PayrollAuV2Api(Xero.NetStandard.OAuth2.Client.ISynchronousClient client,Xero.NetStandard.OAuth2.Client.IAsynchronousClient asyncClient, Xero.NetStandard.OAuth2.Client.IReadableConfiguration configuration) + { + if(client == null) throw new ArgumentNullException("client"); + if(asyncClient == null) throw new ArgumentNullException("asyncClient"); + if(configuration == null) throw new ArgumentNullException("configuration"); + + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Xero.NetStandard.OAuth2.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Xero.NetStandard.OAuth2.Client.IReadableConfiguration Configuration {get; set;} + + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Xero.NetStandard.OAuth2.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + + /// + /// Approves a specific timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + public async System.Threading.Tasks.Task ApproveTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, string idempotencyKey = null, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await ApproveTimesheetAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, idempotencyKey, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Approves a specific timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + public async System.Threading.Tasks.Task> ApproveTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, 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 PayrollAuV2Api->ApproveTimesheet"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->ApproveTimesheet"); + + + Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); + + String[] @contentTypes = new String[] { + }; + + // 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // 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 + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.PostAsync("/Timesheets/{TimesheetID}/Approve", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("ApproveTimesheet", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Creates a new timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + public async System.Threading.Tasks.Task CreateTimesheetAsync (string accessToken, string xeroTenantId, Timesheet timesheet, string idempotencyKey = null, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateTimesheetAsyncWithHttpInfo(accessToken, xeroTenantId, timesheet, idempotencyKey, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Creates a new timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + public async System.Threading.Tasks.Task> CreateTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Timesheet timesheet, 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 PayrollAuV2Api->CreateTimesheet"); + + // verify the required parameter 'timesheet' is set + if (timesheet == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheet' when calling PayrollAuV2Api->CreateTimesheet"); + + + 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 (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 = timesheet; + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.PostAsync("/Timesheets", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("CreateTimesheet", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Creates a new timesheet line for a specific timesheet using a unique timesheet ID + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLineObject + public async System.Threading.Tasks.Task CreateTimesheetLineAsync (string accessToken, string xeroTenantId, Guid timesheetID, TimesheetLine timesheetLine, string idempotencyKey = null, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateTimesheetLineAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, timesheetLine, idempotencyKey, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Creates a new timesheet line for a specific timesheet using a unique timesheet ID + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLineObject) + public async System.Threading.Tasks.Task> CreateTimesheetLineAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, TimesheetLine timesheetLine, 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 PayrollAuV2Api->CreateTimesheetLine"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->CreateTimesheetLine"); + + // verify the required parameter 'timesheetLine' is set + if (timesheetLine == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetLine' when calling PayrollAuV2Api->CreateTimesheetLine"); + + + 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // 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 = timesheetLine; + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.PostAsync("/Timesheets/{TimesheetID}/Lines", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("CreateTimesheetLine", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Deletes a specific timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLine + public async System.Threading.Tasks.Task DeleteTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteTimesheetAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Deletes a specific timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLine) + public async System.Threading.Tasks.Task> DeleteTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, 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 PayrollAuV2Api->DeleteTimesheet"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->DeleteTimesheet"); + + + Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); + + String[] @contentTypes = new String[] { + }; + + // 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // path parameter + if (xeroTenantId != null) + requestOptions.HeaderParameters.Add("Xero-Tenant-Id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.DeleteAsync("/Timesheets/{TimesheetID}", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("DeleteTimesheet", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Deletes a specific timesheet line + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLine + public async System.Threading.Tasks.Task DeleteTimesheetLineAsync (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteTimesheetLineAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, timesheetLineID, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Deletes a specific timesheet line + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLine) + public async System.Threading.Tasks.Task> DeleteTimesheetLineAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, 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 PayrollAuV2Api->DeleteTimesheetLine"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->DeleteTimesheetLine"); + + // verify the required parameter 'timesheetLineID' is set + if (timesheetLineID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetLineID' when calling PayrollAuV2Api->DeleteTimesheetLine"); + + + Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); + + String[] @contentTypes = new String[] { + }; + + // 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // path parameter + if (timesheetLineID != null) + requestOptions.PathParameters.Add("TimesheetLineID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetLineID)); // path parameter + if (xeroTenantId != null) + requestOptions.HeaderParameters.Add("Xero-Tenant-Id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.DeleteAsync("/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("DeleteTimesheetLine", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Retrieve a specific timesheet by using a unique timesheet ID + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + public async System.Threading.Tasks.Task GetTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetTimesheetAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Retrieve a specific timesheet by using a unique timesheet ID + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + public async System.Threading.Tasks.Task> GetTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, 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 PayrollAuV2Api->GetTimesheet"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->GetTimesheet"); + + + Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); + + String[] @contentTypes = new String[] { + }; + + // 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // path parameter + if (xeroTenantId != null) + requestOptions.HeaderParameters.Add("Xero-Tenant-Id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.GetAsync("/Timesheets/{TimesheetID}", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("GetTimesheet", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Retrieves timesheets + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) + /// Filter by employeeId and/or payrollCalendarId (optional) + /// filter results by any timesheets with a matching timesheet status (optional) + /// filter results by any timesheets with a startDate on or after the provided date (optional) + /// filter results by any timesheets with a endDate on or before the provided date (optional) + /// 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. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of Timesheets + public async System.Threading.Tasks.Task GetTimesheetsAsync (string accessToken, string xeroTenantId, int? page = null, string filter = null, string status = null, string startDate = null, string endDate = null, string sort = null, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetTimesheetsAsyncWithHttpInfo(accessToken, xeroTenantId, page, filter, status, startDate, endDate, sort, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Retrieves timesheets + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) + /// Filter by employeeId and/or payrollCalendarId (optional) + /// filter results by any timesheets with a matching timesheet status (optional) + /// filter results by any timesheets with a startDate on or after the provided date (optional) + /// filter results by any timesheets with a endDate on or before the provided date (optional) + /// 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. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (Timesheets) + public async System.Threading.Tasks.Task> GetTimesheetsAsyncWithHttpInfo (string accessToken, string xeroTenantId, int? page = null, string filter = null, string status = null, string startDate = null, string endDate = null, string sort = 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 PayrollAuV2Api->GetTimesheets"); + + + Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); + + String[] @contentTypes = new String[] { + }; + + // 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 (page != null) + { + foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) + { + foreach (var value in kvp.Value) + { + requestOptions.QueryParameters.Add(kvp.Key, value); + } + } + } + + if (filter != null) + { + foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "filter", filter)) + { + foreach (var value in kvp.Value) + { + requestOptions.QueryParameters.Add(kvp.Key, value); + } + } + } + + if (status != null) + { + foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "status", status)) + { + foreach (var value in kvp.Value) + { + requestOptions.QueryParameters.Add(kvp.Key, value); + } + } + } + + if (startDate != null) + { + foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "startDate", startDate)) + { + foreach (var value in kvp.Value) + { + requestOptions.QueryParameters.Add(kvp.Key, value); + } + } + } + + if (endDate != null) + { + foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "endDate", endDate)) + { + foreach (var value in kvp.Value) + { + requestOptions.QueryParameters.Add(kvp.Key, value); + } + } + } + + if (sort != null) + { + foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "sort", sort)) + { + foreach (var value in kvp.Value) + { + requestOptions.QueryParameters.Add(kvp.Key, value); + } + } + } + if (xeroTenantId != null) + requestOptions.HeaderParameters.Add("Xero-Tenant-Id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.GetAsync("/Timesheets", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("GetTimesheets", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Reverts a specific timesheet to draft + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetObject + public async System.Threading.Tasks.Task RevertTimesheetAsync (string accessToken, string xeroTenantId, Guid timesheetID, string idempotencyKey = null, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await RevertTimesheetAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, idempotencyKey, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Reverts a specific timesheet to draft + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetObject) + public async System.Threading.Tasks.Task> RevertTimesheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, 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 PayrollAuV2Api->RevertTimesheet"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->RevertTimesheet"); + + + Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); + + String[] @contentTypes = new String[] { + }; + + // 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // 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 + + // authentication (OAuth2) required + // oauth required + if (!String.IsNullOrEmpty(accessToken)) + { + requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); + } + // make the HTTP request + + + + var response = await this.AsynchronousClient.PostAsync("/Timesheets/{TimesheetID}/RevertToDraft", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("RevertTimesheet", response); + if (exception != null) throw exception; + } + + return response; + } + + + /// + /// Updates a specific timesheet line for a specific timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of TimesheetLineObject + public async System.Threading.Tasks.Task UpdateTimesheetLineAsync (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, TimesheetLine timesheetLine, string idempotencyKey = null, CancellationToken cancellationToken = default) + { + Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateTimesheetLineAsyncWithHttpInfo(accessToken, xeroTenantId, timesheetID, timesheetLineID, timesheetLine, idempotencyKey, cancellationToken); + return localVarResponse.Data; + + } + + /// + /// Updates a specific timesheet line for a specific timesheet + /// + /// Thrown when fails to make API call + /// Xero API OAuth 2.0 accessToken + /// Xero identifier for Tenant + /// Identifier for the timesheet + /// Identifier for the timesheet line + /// + /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) + /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None + /// Task of ApiResponse (TimesheetLineObject) + public async System.Threading.Tasks.Task> UpdateTimesheetLineAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid timesheetID, Guid timesheetLineID, TimesheetLine timesheetLine, 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 PayrollAuV2Api->UpdateTimesheetLine"); + + // verify the required parameter 'timesheetID' is set + if (timesheetID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetID' when calling PayrollAuV2Api->UpdateTimesheetLine"); + + // verify the required parameter 'timesheetLineID' is set + if (timesheetLineID == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetLineID' when calling PayrollAuV2Api->UpdateTimesheetLine"); + + // verify the required parameter 'timesheetLine' is set + if (timesheetLine == null) + throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'timesheetLine' when calling PayrollAuV2Api->UpdateTimesheetLine"); + + + 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 (timesheetID != null) + requestOptions.PathParameters.Add("TimesheetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetID)); // path parameter + if (timesheetLineID != null) + requestOptions.PathParameters.Add("TimesheetLineID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(timesheetLineID)); // 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 = timesheetLine; + + // 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("/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}", requestOptions, this.Configuration, cancellationToken); + + if (this.ExceptionFactory != null) + { + Exception exception = this.ExceptionFactory("UpdateTimesheetLine", response); + if (exception != null) throw exception; + } + + return response; + } + + } +} diff --git a/Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs b/Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs index cde80f71..890e2e7d 100644 --- a/Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs +++ b/Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs b/Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs index 2c912017..e4966e55 100644 --- a/Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs +++ b/Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Api/ProjectApi.cs b/Xero.NetStandard.OAuth2/Api/ProjectApi.cs index d8f52360..cfa5df2d 100644 --- a/Xero.NetStandard.OAuth2/Api/ProjectApi.cs +++ b/Xero.NetStandard.OAuth2/Api/ProjectApi.cs @@ -7,7 +7,11 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -// The version of the OpenAPI document: 10.1.0 +<<<<<<< Updated upstream +// The version of the OpenAPI document: 11.0.0 +======= +// The version of the OpenAPI document: 11.1.0 +>>>>>>> Stashed changes using System; diff --git a/Xero.NetStandard.OAuth2/Client/Configuration.cs b/Xero.NetStandard.OAuth2/Client/Configuration.cs index 366f0509..a0ef39fb 100644 --- a/Xero.NetStandard.OAuth2/Client/Configuration.cs +++ b/Xero.NetStandard.OAuth2/Client/Configuration.cs @@ -31,7 +31,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "12.5.0"; + public const string Version = "13.0.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -103,7 +103,7 @@ public class Configuration : IReadableConfiguration [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] public Configuration() { - UserAgent = "xero-netstandard-12.5.0"; + UserAgent = "xero-netstandard-13.0.0"; BasePath = "https://api.xero.com/api.xro/2.0"; DefaultHeader = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -341,8 +341,12 @@ public static String ToDebugReport() { String report = "C# SDK (Xero.NetStandard.OAuth2) Debug Report:\n"; report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n"; - report += " Version of the API: 10.1.0\n"; - report += " SDK Package Version: 12.5.0\n"; +<<<<<<< Updated upstream + report += " Version of the API: 11.0.0\n"; +======= + report += " Version of the API: 11.1.0\n"; +>>>>>>> Stashed changes + report += " SDK Package Version: 13.0.0\n"; return report; } diff --git a/Xero.NetStandard.OAuth2/Model/Finance/AccountUsage.cs b/Xero.NetStandard.OAuth2/Model/Finance/AccountUsage.cs deleted file mode 100644 index abc19d92..00000000 --- a/Xero.NetStandard.OAuth2/Model/Finance/AccountUsage.cs +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Xero Finance API - * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - * - * Contact: api@xero.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; - -namespace Xero.NetStandard.OAuth2.Model.Finance -{ - /// - /// AccountUsage - /// - [DataContract] - public partial class AccountUsage : IEquatable, IValidatableObject - { - - /// - /// The month this usage item contains data for - /// - /// The month this usage item contains data for - [DataMember(Name="month", EmitDefaultValue=false)] - public string Month { get; set; } - - /// - /// The account this usage item contains data for - /// - /// The account this usage item contains data for - [DataMember(Name="accountId", EmitDefaultValue=false)] - public Guid? AccountId { get; set; } - - /// - /// The currency code this usage item contains data for - /// - /// The currency code this usage item contains data for - [DataMember(Name="currencyCode", EmitDefaultValue=false)] - public string CurrencyCode { get; set; } - - /// - /// Total received - /// - /// Total received - [DataMember(Name="totalReceived", EmitDefaultValue=false)] - public decimal? TotalReceived { get; set; } - - /// - /// Count of received - /// - /// Count of received - [DataMember(Name="countReceived", EmitDefaultValue=false)] - public int? CountReceived { get; set; } - - /// - /// Total paid - /// - /// Total paid - [DataMember(Name="totalPaid", EmitDefaultValue=false)] - public decimal? TotalPaid { get; set; } - - /// - /// Count of paid - /// - /// Count of paid - [DataMember(Name="countPaid", EmitDefaultValue=false)] - public int? CountPaid { get; set; } - - /// - /// Total value of manual journals - /// - /// Total value of manual journals - [DataMember(Name="totalManualJournal", EmitDefaultValue=false)] - public decimal? TotalManualJournal { get; set; } - - /// - /// Count of manual journals - /// - /// Count of manual journals - [DataMember(Name="countManualJournal", EmitDefaultValue=false)] - public int? CountManualJournal { get; set; } - - /// - /// The name of the account - /// - /// The name of the account - [DataMember(Name="accountName", EmitDefaultValue=false)] - public string AccountName { get; set; } - - /// - /// Shown if set - /// - /// Shown if set - [DataMember(Name="reportingCode", EmitDefaultValue=false)] - public string ReportingCode { get; set; } - - /// - /// Shown if set - /// - /// Shown if set - [DataMember(Name="reportingCodeName", EmitDefaultValue=false)] - public string ReportingCodeName { get; set; } - - /// - /// Last modified date UTC format - /// - /// Last modified date UTC format - [DataMember(Name="reportCodeUpdatedDateUtc", EmitDefaultValue=false)] - public DateTime? ReportCodeUpdatedDateUtc { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AccountUsage {\n"); - sb.Append(" Month: ").Append(Month).Append("\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" TotalReceived: ").Append(TotalReceived).Append("\n"); - sb.Append(" CountReceived: ").Append(CountReceived).Append("\n"); - sb.Append(" TotalPaid: ").Append(TotalPaid).Append("\n"); - sb.Append(" CountPaid: ").Append(CountPaid).Append("\n"); - sb.Append(" TotalManualJournal: ").Append(TotalManualJournal).Append("\n"); - sb.Append(" CountManualJournal: ").Append(CountManualJournal).Append("\n"); - sb.Append(" AccountName: ").Append(AccountName).Append("\n"); - sb.Append(" ReportingCode: ").Append(ReportingCode).Append("\n"); - sb.Append(" ReportingCodeName: ").Append(ReportingCodeName).Append("\n"); - sb.Append(" ReportCodeUpdatedDateUtc: ").Append(ReportCodeUpdatedDateUtc).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountUsage); - } - - /// - /// Returns true if AccountUsage instances are equal - /// - /// Instance of AccountUsage to be compared - /// Boolean - public bool Equals(AccountUsage input) - { - if (input == null) - return false; - - return - ( - this.Month == input.Month || - (this.Month != null && - this.Month.Equals(input.Month)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.TotalReceived == input.TotalReceived || - (this.TotalReceived != null && - this.TotalReceived.Equals(input.TotalReceived)) - ) && - ( - this.CountReceived == input.CountReceived || - (this.CountReceived != null && - this.CountReceived.Equals(input.CountReceived)) - ) && - ( - this.TotalPaid == input.TotalPaid || - (this.TotalPaid != null && - this.TotalPaid.Equals(input.TotalPaid)) - ) && - ( - this.CountPaid == input.CountPaid || - (this.CountPaid != null && - this.CountPaid.Equals(input.CountPaid)) - ) && - ( - this.TotalManualJournal == input.TotalManualJournal || - (this.TotalManualJournal != null && - this.TotalManualJournal.Equals(input.TotalManualJournal)) - ) && - ( - this.CountManualJournal == input.CountManualJournal || - (this.CountManualJournal != null && - this.CountManualJournal.Equals(input.CountManualJournal)) - ) && - ( - this.AccountName == input.AccountName || - (this.AccountName != null && - this.AccountName.Equals(input.AccountName)) - ) && - ( - this.ReportingCode == input.ReportingCode || - (this.ReportingCode != null && - this.ReportingCode.Equals(input.ReportingCode)) - ) && - ( - this.ReportingCodeName == input.ReportingCodeName || - (this.ReportingCodeName != null && - this.ReportingCodeName.Equals(input.ReportingCodeName)) - ) && - ( - this.ReportCodeUpdatedDateUtc == input.ReportCodeUpdatedDateUtc || - (this.ReportCodeUpdatedDateUtc != null && - this.ReportCodeUpdatedDateUtc.Equals(input.ReportCodeUpdatedDateUtc)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Month != null) - hashCode = hashCode * 59 + this.Month.GetHashCode(); - if (this.AccountId != null) - hashCode = hashCode * 59 + this.AccountId.GetHashCode(); - if (this.CurrencyCode != null) - hashCode = hashCode * 59 + this.CurrencyCode.GetHashCode(); - if (this.TotalReceived != null) - hashCode = hashCode * 59 + this.TotalReceived.GetHashCode(); - if (this.CountReceived != null) - hashCode = hashCode * 59 + this.CountReceived.GetHashCode(); - if (this.TotalPaid != null) - hashCode = hashCode * 59 + this.TotalPaid.GetHashCode(); - if (this.CountPaid != null) - hashCode = hashCode * 59 + this.CountPaid.GetHashCode(); - if (this.TotalManualJournal != null) - hashCode = hashCode * 59 + this.TotalManualJournal.GetHashCode(); - if (this.CountManualJournal != null) - hashCode = hashCode * 59 + this.CountManualJournal.GetHashCode(); - if (this.AccountName != null) - hashCode = hashCode * 59 + this.AccountName.GetHashCode(); - if (this.ReportingCode != null) - hashCode = hashCode * 59 + this.ReportingCode.GetHashCode(); - if (this.ReportingCodeName != null) - hashCode = hashCode * 59 + this.ReportingCodeName.GetHashCode(); - if (this.ReportCodeUpdatedDateUtc != null) - hashCode = hashCode * 59 + this.ReportCodeUpdatedDateUtc.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/AccountUsageResponse.cs b/Xero.NetStandard.OAuth2/Model/Finance/AccountUsageResponse.cs deleted file mode 100644 index 9c33d02e..00000000 --- a/Xero.NetStandard.OAuth2/Model/Finance/AccountUsageResponse.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Xero Finance API - * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - * - * Contact: api@xero.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; - -namespace Xero.NetStandard.OAuth2.Model.Finance -{ - /// - /// AccountUsageResponse - /// - [DataContract] - public partial class AccountUsageResponse : IEquatable, IValidatableObject - { - - /// - /// The requested Organisation to which the data pertains - /// - /// The requested Organisation to which the data pertains - [DataMember(Name="organisationId", EmitDefaultValue=false)] - public Guid? OrganisationId { get; set; } - - /// - /// The start month of the report - /// - /// The start month of the report - [DataMember(Name="startMonth", EmitDefaultValue=false)] - public string StartMonth { get; set; } - - /// - /// The end month of the report - /// - /// The end month of the report - [DataMember(Name="endMonth", EmitDefaultValue=false)] - public string EndMonth { get; set; } - - /// - /// Gets or Sets AccountUsage - /// - [DataMember(Name="accountUsage", EmitDefaultValue=false)] - public List AccountUsage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AccountUsageResponse {\n"); - sb.Append(" OrganisationId: ").Append(OrganisationId).Append("\n"); - sb.Append(" StartMonth: ").Append(StartMonth).Append("\n"); - sb.Append(" EndMonth: ").Append(EndMonth).Append("\n"); - sb.Append(" AccountUsage: ").Append(AccountUsage).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountUsageResponse); - } - - /// - /// Returns true if AccountUsageResponse instances are equal - /// - /// Instance of AccountUsageResponse to be compared - /// Boolean - public bool Equals(AccountUsageResponse input) - { - if (input == null) - return false; - - return - ( - this.OrganisationId == input.OrganisationId || - (this.OrganisationId != null && - this.OrganisationId.Equals(input.OrganisationId)) - ) && - ( - this.StartMonth == input.StartMonth || - (this.StartMonth != null && - this.StartMonth.Equals(input.StartMonth)) - ) && - ( - this.EndMonth == input.EndMonth || - (this.EndMonth != null && - this.EndMonth.Equals(input.EndMonth)) - ) && - ( - this.AccountUsage == input.AccountUsage || - this.AccountUsage != null && - input.AccountUsage != null && - this.AccountUsage.SequenceEqual(input.AccountUsage) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OrganisationId != null) - hashCode = hashCode * 59 + this.OrganisationId.GetHashCode(); - if (this.StartMonth != null) - hashCode = hashCode * 59 + this.StartMonth.GetHashCode(); - if (this.EndMonth != null) - hashCode = hashCode * 59 + this.EndMonth.GetHashCode(); - if (this.AccountUsage != null) - hashCode = hashCode * 59 + this.AccountUsage.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/HistoryRecordResponse.cs b/Xero.NetStandard.OAuth2/Model/Finance/HistoryRecordResponse.cs deleted file mode 100644 index b2e4fa42..00000000 --- a/Xero.NetStandard.OAuth2/Model/Finance/HistoryRecordResponse.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Xero Finance API - * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - * - * Contact: api@xero.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; - -namespace Xero.NetStandard.OAuth2.Model.Finance -{ - /// - /// HistoryRecordResponse - /// - [DataContract] - public partial class HistoryRecordResponse : IEquatable, IValidatableObject - { - - /// - /// The type of change recorded against the document - /// - /// The type of change recorded against the document - [DataMember(Name="changes", EmitDefaultValue=false)] - public string Changes { get; set; } - - /// - /// UTC date that the history record was created - /// - /// UTC date that the history record was created - [DataMember(Name="dateUTCString", EmitDefaultValue=false)] - public string DateUTCString { get; set; } - - /// - /// UTC date that the history record was created - /// - /// UTC date that the history record was created - [DataMember(Name="dateUTC", EmitDefaultValue=false)] - public DateTime? DateUTC { get; set; } - - /// - /// The users first and last name - /// - /// The users first and last name - [DataMember(Name="user", EmitDefaultValue=false)] - public string User { get; set; } - - /// - /// Description of the change event or transaction - /// - /// Description of the change event or transaction - [DataMember(Name="details", EmitDefaultValue=false)] - public string Details { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HistoryRecordResponse {\n"); - sb.Append(" Changes: ").Append(Changes).Append("\n"); - sb.Append(" DateUTCString: ").Append(DateUTCString).Append("\n"); - sb.Append(" DateUTC: ").Append(DateUTC).Append("\n"); - sb.Append(" User: ").Append(User).Append("\n"); - sb.Append(" Details: ").Append(Details).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HistoryRecordResponse); - } - - /// - /// Returns true if HistoryRecordResponse instances are equal - /// - /// Instance of HistoryRecordResponse to be compared - /// Boolean - public bool Equals(HistoryRecordResponse input) - { - if (input == null) - return false; - - return - ( - this.Changes == input.Changes || - (this.Changes != null && - this.Changes.Equals(input.Changes)) - ) && - ( - this.DateUTCString == input.DateUTCString || - (this.DateUTCString != null && - this.DateUTCString.Equals(input.DateUTCString)) - ) && - ( - this.DateUTC == input.DateUTC || - (this.DateUTC != null && - this.DateUTC.Equals(input.DateUTC)) - ) && - ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) - ) && - ( - this.Details == input.Details || - (this.Details != null && - this.Details.Equals(input.Details)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Changes != null) - hashCode = hashCode * 59 + this.Changes.GetHashCode(); - if (this.DateUTCString != null) - hashCode = hashCode * 59 + this.DateUTCString.GetHashCode(); - if (this.DateUTC != null) - hashCode = hashCode * 59 + this.DateUTC.GetHashCode(); - if (this.User != null) - hashCode = hashCode * 59 + this.User.GetHashCode(); - if (this.Details != null) - hashCode = hashCode * 59 + this.Details.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/LockHistoryModel.cs b/Xero.NetStandard.OAuth2/Model/Finance/LockHistoryModel.cs deleted file mode 100644 index b84200b6..00000000 --- a/Xero.NetStandard.OAuth2/Model/Finance/LockHistoryModel.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Xero Finance API - * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - * - * Contact: api@xero.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; - -namespace Xero.NetStandard.OAuth2.Model.Finance -{ - /// - /// LockHistoryModel - /// - [DataContract] - public partial class LockHistoryModel : IEquatable, IValidatableObject - { - - /// - /// Date the account hard lock was set - /// - /// Date the account hard lock was set - [DataMember(Name="hardLockDate", EmitDefaultValue=false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? HardLockDate { get; set; } - - /// - /// Date the account soft lock was set - /// - /// Date the account soft lock was set - [DataMember(Name="softLockDate", EmitDefaultValue=false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? SoftLockDate { get; set; } - - /// - /// The system date time that the lock was updated - /// - /// The system date time that the lock was updated - [DataMember(Name="updatedDateUtc", EmitDefaultValue=false)] - public DateTime? UpdatedDateUtc { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class LockHistoryModel {\n"); - sb.Append(" HardLockDate: ").Append(HardLockDate).Append("\n"); - sb.Append(" SoftLockDate: ").Append(SoftLockDate).Append("\n"); - sb.Append(" UpdatedDateUtc: ").Append(UpdatedDateUtc).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LockHistoryModel); - } - - /// - /// Returns true if LockHistoryModel instances are equal - /// - /// Instance of LockHistoryModel to be compared - /// Boolean - public bool Equals(LockHistoryModel input) - { - if (input == null) - return false; - - return - ( - this.HardLockDate == input.HardLockDate || - (this.HardLockDate != null && - this.HardLockDate.Equals(input.HardLockDate)) - ) && - ( - this.SoftLockDate == input.SoftLockDate || - (this.SoftLockDate != null && - this.SoftLockDate.Equals(input.SoftLockDate)) - ) && - ( - this.UpdatedDateUtc == input.UpdatedDateUtc || - (this.UpdatedDateUtc != null && - this.UpdatedDateUtc.Equals(input.UpdatedDateUtc)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.HardLockDate != null) - hashCode = hashCode * 59 + this.HardLockDate.GetHashCode(); - if (this.SoftLockDate != null) - hashCode = hashCode * 59 + this.SoftLockDate.GetHashCode(); - if (this.UpdatedDateUtc != null) - hashCode = hashCode * 59 + this.UpdatedDateUtc.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/PracticeResponse.cs b/Xero.NetStandard.OAuth2/Model/Finance/PracticeResponse.cs deleted file mode 100644 index 166bdb72..00000000 --- a/Xero.NetStandard.OAuth2/Model/Finance/PracticeResponse.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Xero Finance API - * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - * - * Contact: api@xero.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; - -namespace Xero.NetStandard.OAuth2.Model.Finance -{ - /// - /// PracticeResponse - /// - [DataContract] - public partial class PracticeResponse : IEquatable, IValidatableObject - { - - /// - /// Year of becoming a partner. - /// - /// Year of becoming a partner. - [DataMember(Name="xeroPartnerSince", EmitDefaultValue=false)] - public int? XeroPartnerSince { get; set; } - - /// - /// Customer tier e.g. Silver - /// - /// Customer tier e.g. Silver - [DataMember(Name="tier", EmitDefaultValue=false)] - public string Tier { get; set; } - - /// - /// Country of location. - /// - /// Country of location. - [DataMember(Name="location", EmitDefaultValue=false)] - public string Location { get; set; } - - /// - /// Organisation count. - /// - /// Organisation count. - [DataMember(Name="organisationCount", EmitDefaultValue=false)] - public int? OrganisationCount { get; set; } - - /// - /// Staff certified (true/false). - /// - /// Staff certified (true/false). - [DataMember(Name="staffCertified", EmitDefaultValue=false)] - public bool? StaffCertified { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class PracticeResponse {\n"); - sb.Append(" XeroPartnerSince: ").Append(XeroPartnerSince).Append("\n"); - sb.Append(" Tier: ").Append(Tier).Append("\n"); - sb.Append(" Location: ").Append(Location).Append("\n"); - sb.Append(" OrganisationCount: ").Append(OrganisationCount).Append("\n"); - sb.Append(" StaffCertified: ").Append(StaffCertified).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PracticeResponse); - } - - /// - /// Returns true if PracticeResponse instances are equal - /// - /// Instance of PracticeResponse to be compared - /// Boolean - public bool Equals(PracticeResponse input) - { - if (input == null) - return false; - - return - ( - this.XeroPartnerSince == input.XeroPartnerSince || - (this.XeroPartnerSince != null && - this.XeroPartnerSince.Equals(input.XeroPartnerSince)) - ) && - ( - this.Tier == input.Tier || - (this.Tier != null && - this.Tier.Equals(input.Tier)) - ) && - ( - this.Location == input.Location || - (this.Location != null && - this.Location.Equals(input.Location)) - ) && - ( - this.OrganisationCount == input.OrganisationCount || - (this.OrganisationCount != null && - this.OrganisationCount.Equals(input.OrganisationCount)) - ) && - ( - this.StaffCertified == input.StaffCertified || - (this.StaffCertified != null && - this.StaffCertified.Equals(input.StaffCertified)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.XeroPartnerSince != null) - hashCode = hashCode * 59 + this.XeroPartnerSince.GetHashCode(); - if (this.Tier != null) - hashCode = hashCode * 59 + this.Tier.GetHashCode(); - if (this.Location != null) - hashCode = hashCode * 59 + this.Location.GetHashCode(); - if (this.OrganisationCount != null) - hashCode = hashCode * 59 + this.OrganisationCount.GetHashCode(); - if (this.StaffCertified != null) - hashCode = hashCode * 59 + this.StaffCertified.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/UserResponse.cs b/Xero.NetStandard.OAuth2/Model/Finance/UserResponse.cs deleted file mode 100644 index 6c8d3ff7..00000000 --- a/Xero.NetStandard.OAuth2/Model/Finance/UserResponse.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Xero Finance API - * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - * - * Contact: api@xero.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; - -namespace Xero.NetStandard.OAuth2.Model.Finance -{ - /// - /// UserResponse - /// - [DataContract] - public partial class UserResponse : IEquatable, IValidatableObject - { - - /// - /// The Xero identifier for the user - /// - /// The Xero identifier for the user - [DataMember(Name="userId", EmitDefaultValue=false)] - public Guid? UserId { get; set; } - - /// - /// Timestamp of user creation. - /// - /// Timestamp of user creation. - [DataMember(Name="userCreatedDateUtc", EmitDefaultValue=false)] - public DateTime? UserCreatedDateUtc { get; set; } - - /// - /// Timestamp of user last login - /// - /// Timestamp of user last login - [DataMember(Name="lastLoginDateUtc", EmitDefaultValue=false)] - public DateTime? LastLoginDateUtc { get; set; } - - /// - /// User is external partner. - /// - /// User is external partner. - [DataMember(Name="isExternalPartner", EmitDefaultValue=false)] - public bool? IsExternalPartner { get; set; } - - /// - /// User has Accountant role. - /// - /// User has Accountant role. - [DataMember(Name="hasAccountantRole", EmitDefaultValue=false)] - public bool? HasAccountantRole { get; set; } - - /// - /// Month period in format yyyy-MM. - /// - /// Month period in format yyyy-MM. - [DataMember(Name="monthPeriod", EmitDefaultValue=false)] - public string MonthPeriod { get; set; } - - /// - /// Number of times the user has logged in. - /// - /// Number of times the user has logged in. - [DataMember(Name="numberOfLogins", EmitDefaultValue=false)] - public int? NumberOfLogins { get; set; } - - /// - /// Number of documents created. - /// - /// Number of documents created. - [DataMember(Name="numberOfDocumentsCreated", EmitDefaultValue=false)] - public int? NumberOfDocumentsCreated { get; set; } - - /// - /// Net value of documents created. - /// - /// Net value of documents created. - [DataMember(Name="netValueDocumentsCreated", EmitDefaultValue=false)] - public decimal? NetValueDocumentsCreated { get; set; } - - /// - /// Absolute value of documents created. - /// - /// Absolute value of documents created. - [DataMember(Name="absoluteValueDocumentsCreated", EmitDefaultValue=false)] - public decimal? AbsoluteValueDocumentsCreated { get; set; } - - /// - /// Gets or Sets AttachedPractices - /// - [DataMember(Name="attachedPractices", EmitDefaultValue=false)] - public List AttachedPractices { get; set; } - - /// - /// Gets or Sets HistoryRecords - /// - [DataMember(Name="historyRecords", EmitDefaultValue=false)] - public List HistoryRecords { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class UserResponse {\n"); - sb.Append(" UserId: ").Append(UserId).Append("\n"); - sb.Append(" UserCreatedDateUtc: ").Append(UserCreatedDateUtc).Append("\n"); - sb.Append(" LastLoginDateUtc: ").Append(LastLoginDateUtc).Append("\n"); - sb.Append(" IsExternalPartner: ").Append(IsExternalPartner).Append("\n"); - sb.Append(" HasAccountantRole: ").Append(HasAccountantRole).Append("\n"); - sb.Append(" MonthPeriod: ").Append(MonthPeriod).Append("\n"); - sb.Append(" NumberOfLogins: ").Append(NumberOfLogins).Append("\n"); - sb.Append(" NumberOfDocumentsCreated: ").Append(NumberOfDocumentsCreated).Append("\n"); - sb.Append(" NetValueDocumentsCreated: ").Append(NetValueDocumentsCreated).Append("\n"); - sb.Append(" AbsoluteValueDocumentsCreated: ").Append(AbsoluteValueDocumentsCreated).Append("\n"); - sb.Append(" AttachedPractices: ").Append(AttachedPractices).Append("\n"); - sb.Append(" HistoryRecords: ").Append(HistoryRecords).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UserResponse); - } - - /// - /// Returns true if UserResponse instances are equal - /// - /// Instance of UserResponse to be compared - /// Boolean - public bool Equals(UserResponse input) - { - if (input == null) - return false; - - return - ( - this.UserId == input.UserId || - (this.UserId != null && - this.UserId.Equals(input.UserId)) - ) && - ( - this.UserCreatedDateUtc == input.UserCreatedDateUtc || - (this.UserCreatedDateUtc != null && - this.UserCreatedDateUtc.Equals(input.UserCreatedDateUtc)) - ) && - ( - this.LastLoginDateUtc == input.LastLoginDateUtc || - (this.LastLoginDateUtc != null && - this.LastLoginDateUtc.Equals(input.LastLoginDateUtc)) - ) && - ( - this.IsExternalPartner == input.IsExternalPartner || - (this.IsExternalPartner != null && - this.IsExternalPartner.Equals(input.IsExternalPartner)) - ) && - ( - this.HasAccountantRole == input.HasAccountantRole || - (this.HasAccountantRole != null && - this.HasAccountantRole.Equals(input.HasAccountantRole)) - ) && - ( - this.MonthPeriod == input.MonthPeriod || - (this.MonthPeriod != null && - this.MonthPeriod.Equals(input.MonthPeriod)) - ) && - ( - this.NumberOfLogins == input.NumberOfLogins || - (this.NumberOfLogins != null && - this.NumberOfLogins.Equals(input.NumberOfLogins)) - ) && - ( - this.NumberOfDocumentsCreated == input.NumberOfDocumentsCreated || - (this.NumberOfDocumentsCreated != null && - this.NumberOfDocumentsCreated.Equals(input.NumberOfDocumentsCreated)) - ) && - ( - this.NetValueDocumentsCreated == input.NetValueDocumentsCreated || - (this.NetValueDocumentsCreated != null && - this.NetValueDocumentsCreated.Equals(input.NetValueDocumentsCreated)) - ) && - ( - this.AbsoluteValueDocumentsCreated == input.AbsoluteValueDocumentsCreated || - (this.AbsoluteValueDocumentsCreated != null && - this.AbsoluteValueDocumentsCreated.Equals(input.AbsoluteValueDocumentsCreated)) - ) && - ( - this.AttachedPractices == input.AttachedPractices || - this.AttachedPractices != null && - input.AttachedPractices != null && - this.AttachedPractices.SequenceEqual(input.AttachedPractices) - ) && - ( - this.HistoryRecords == input.HistoryRecords || - this.HistoryRecords != null && - input.HistoryRecords != null && - this.HistoryRecords.SequenceEqual(input.HistoryRecords) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.UserId != null) - hashCode = hashCode * 59 + this.UserId.GetHashCode(); - if (this.UserCreatedDateUtc != null) - hashCode = hashCode * 59 + this.UserCreatedDateUtc.GetHashCode(); - if (this.LastLoginDateUtc != null) - hashCode = hashCode * 59 + this.LastLoginDateUtc.GetHashCode(); - if (this.IsExternalPartner != null) - hashCode = hashCode * 59 + this.IsExternalPartner.GetHashCode(); - if (this.HasAccountantRole != null) - hashCode = hashCode * 59 + this.HasAccountantRole.GetHashCode(); - if (this.MonthPeriod != null) - hashCode = hashCode * 59 + this.MonthPeriod.GetHashCode(); - if (this.NumberOfLogins != null) - hashCode = hashCode * 59 + this.NumberOfLogins.GetHashCode(); - if (this.NumberOfDocumentsCreated != null) - hashCode = hashCode * 59 + this.NumberOfDocumentsCreated.GetHashCode(); - if (this.NetValueDocumentsCreated != null) - hashCode = hashCode * 59 + this.NetValueDocumentsCreated.GetHashCode(); - if (this.AbsoluteValueDocumentsCreated != null) - hashCode = hashCode * 59 + this.AbsoluteValueDocumentsCreated.GetHashCode(); - if (this.AttachedPractices != null) - hashCode = hashCode * 59 + this.AttachedPractices.GetHashCode(); - if (this.HistoryRecords != null) - hashCode = hashCode * 59 + this.HistoryRecords.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/EarningsRate.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/EarningsRate.cs index d0858f4a..2019b46e 100644 --- a/Xero.NetStandard.OAuth2/Model/PayrollAu/EarningsRate.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/EarningsRate.cs @@ -98,6 +98,13 @@ public partial class EarningsRate : IEquatable, IValidatableObjec [DataMember(Name="IsReportableAsW1", EmitDefaultValue=false)] public bool? IsReportableAsW1 { get; set; } + /// + /// Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings + /// + /// Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings + [DataMember(Name="IsQualifyingEarnings", EmitDefaultValue=false)] + public bool? IsQualifyingEarnings { get; set; } + /// /// Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT /// @@ -175,6 +182,7 @@ public override string ToString() sb.Append(" IsExemptFromTax: ").Append(IsExemptFromTax).Append("\n"); sb.Append(" IsExemptFromSuper: ").Append(IsExemptFromSuper).Append("\n"); sb.Append(" IsReportableAsW1: ").Append(IsReportableAsW1).Append("\n"); + sb.Append(" IsQualifyingEarnings: ").Append(IsQualifyingEarnings).Append("\n"); sb.Append(" AllowanceContributesToAnnualLeaveRate: ").Append(AllowanceContributesToAnnualLeaveRate).Append("\n"); sb.Append(" AllowanceContributesToOvertimeRate: ").Append(AllowanceContributesToOvertimeRate).Append("\n"); sb.Append(" EarningsType: ").Append(EarningsType).Append("\n"); @@ -253,6 +261,11 @@ public bool Equals(EarningsRate input) (this.IsReportableAsW1 != null && this.IsReportableAsW1.Equals(input.IsReportableAsW1)) ) && + ( + this.IsQualifyingEarnings == input.IsQualifyingEarnings || + (this.IsQualifyingEarnings != null && + this.IsQualifyingEarnings.Equals(input.IsQualifyingEarnings)) + ) && ( this.AllowanceContributesToAnnualLeaveRate == input.AllowanceContributesToAnnualLeaveRate || (this.AllowanceContributesToAnnualLeaveRate != null && @@ -341,6 +354,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.IsExemptFromSuper.GetHashCode(); if (this.IsReportableAsW1 != null) hashCode = hashCode * 59 + this.IsReportableAsW1.GetHashCode(); + if (this.IsQualifyingEarnings != null) + hashCode = hashCode * 59 + this.IsQualifyingEarnings.GetHashCode(); if (this.AllowanceContributesToAnnualLeaveRate != null) hashCode = hashCode * 59 + this.AllowanceContributesToAnnualLeaveRate.GetHashCode(); if (this.AllowanceContributesToOvertimeRate != null) diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/Employee.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/Employee.cs index e3ac905c..06148085 100644 --- a/Xero.NetStandard.OAuth2/Model/PayrollAu/Employee.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/Employee.cs @@ -154,7 +154,6 @@ public Employee() { BankAccounts = new List(); LeaveBalances = new List(); - LeaveLines = new List(); SuperMemberships = new List(); ValidationErrors = new List(); } @@ -335,12 +334,6 @@ public Employee() [DataMember(Name="LeaveBalances", EmitDefaultValue=false)] public List LeaveBalances { get; set; } - /// - /// Gets or Sets LeaveLines - /// - [DataMember(Name="LeaveLines", EmitDefaultValue=false)] - public List LeaveLines { get; set; } - /// /// Gets or Sets SuperMemberships /// @@ -400,7 +393,6 @@ public override string ToString() sb.Append(" CountryOfResidence: ").Append(CountryOfResidence).Append("\n"); sb.Append(" IsSTP2Qualified: ").Append(IsSTP2Qualified).Append("\n"); sb.Append(" LeaveBalances: ").Append(LeaveBalances).Append("\n"); - sb.Append(" LeaveLines: ").Append(LeaveLines).Append("\n"); sb.Append(" SuperMemberships: ").Append(SuperMemberships).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" UpdatedDateUTC: ").Append(UpdatedDateUTC).Append("\n"); @@ -591,12 +583,6 @@ public bool Equals(Employee input) input.LeaveBalances != null && this.LeaveBalances.SequenceEqual(input.LeaveBalances) ) && - ( - this.LeaveLines == input.LeaveLines || - this.LeaveLines != null && - input.LeaveLines != null && - this.LeaveLines.SequenceEqual(input.LeaveLines) - ) && ( this.SuperMemberships == input.SuperMemberships || this.SuperMemberships != null && @@ -686,8 +672,6 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.IsSTP2Qualified.GetHashCode(); if (this.LeaveBalances != null) hashCode = hashCode * 59 + this.LeaveBalances.GetHashCode(); - if (this.LeaveLines != null) - hashCode = hashCode * 59 + this.LeaveLines.GetHashCode(); if (this.SuperMemberships != null) hashCode = hashCode * 59 + this.SuperMemberships.GetHashCode(); hashCode = hashCode * 59 + this.Status.GetHashCode(); diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveLine.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveLine.cs index 11d24754..c9e76fc5 100644 --- a/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveLine.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveLine.cs @@ -60,6 +60,13 @@ public partial class LeaveLine : IEquatable, IValidatableObject [DataMember(Name="IncludeSuperannuationGuaranteeContribution", EmitDefaultValue=false)] public bool? IncludeSuperannuationGuaranteeContribution { get; set; } + /// + /// Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on superannuation settings + /// + /// Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on superannuation settings + [DataMember(Name="IsQualifyingEarnings", EmitDefaultValue=false)] + public bool? IsQualifyingEarnings { get; set; } + /// /// Number of units for leave line. /// @@ -94,6 +101,7 @@ public override string ToString() sb.Append(" EntitlementFinalPayPayoutType: ").Append(EntitlementFinalPayPayoutType).Append("\n"); sb.Append(" EmploymentTerminationPaymentType: ").Append(EmploymentTerminationPaymentType).Append("\n"); sb.Append(" IncludeSuperannuationGuaranteeContribution: ").Append(IncludeSuperannuationGuaranteeContribution).Append("\n"); + sb.Append(" IsQualifyingEarnings: ").Append(IsQualifyingEarnings).Append("\n"); sb.Append(" NumberOfUnits: ").Append(NumberOfUnits).Append("\n"); sb.Append(" AnnualNumberOfUnits: ").Append(AnnualNumberOfUnits).Append("\n"); sb.Append(" FullTimeNumberOfUnitsPerPeriod: ").Append(FullTimeNumberOfUnitsPerPeriod).Append("\n"); @@ -153,6 +161,11 @@ public bool Equals(LeaveLine input) (this.IncludeSuperannuationGuaranteeContribution != null && this.IncludeSuperannuationGuaranteeContribution.Equals(input.IncludeSuperannuationGuaranteeContribution)) ) && + ( + this.IsQualifyingEarnings == input.IsQualifyingEarnings || + (this.IsQualifyingEarnings != null && + this.IsQualifyingEarnings.Equals(input.IsQualifyingEarnings)) + ) && ( this.NumberOfUnits == input.NumberOfUnits || (this.NumberOfUnits != null && @@ -186,6 +199,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.EmploymentTerminationPaymentType.GetHashCode(); if (this.IncludeSuperannuationGuaranteeContribution != null) hashCode = hashCode * 59 + this.IncludeSuperannuationGuaranteeContribution.GetHashCode(); + if (this.IsQualifyingEarnings != null) + hashCode = hashCode * 59 + this.IsQualifyingEarnings.GetHashCode(); if (this.NumberOfUnits != null) hashCode = hashCode * 59 + this.NumberOfUnits.GetHashCode(); if (this.AnnualNumberOfUnits != null) diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveType.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveType.cs index 92b1b475..3540e273 100644 --- a/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveType.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/LeaveType.cs @@ -106,6 +106,13 @@ public partial class LeaveType : IEquatable, IValidatableObject [DataMember(Name="SGCExempt", EmitDefaultValue=false)] public bool? SGCExempt { get; set; } + /// + /// Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings + /// + /// Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings + [DataMember(Name="IsQualifyingEarnings", EmitDefaultValue=false)] + public bool? IsQualifyingEarnings { get; set; } + /// /// Returns the string presentation of the object /// @@ -125,6 +132,7 @@ public override string ToString() sb.Append(" CurrentRecord: ").Append(CurrentRecord).Append("\n"); sb.Append(" LeaveCategoryCode: ").Append(LeaveCategoryCode).Append("\n"); sb.Append(" SGCExempt: ").Append(SGCExempt).Append("\n"); + sb.Append(" IsQualifyingEarnings: ").Append(IsQualifyingEarnings).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -212,6 +220,11 @@ public bool Equals(LeaveType input) this.SGCExempt == input.SGCExempt || (this.SGCExempt != null && this.SGCExempt.Equals(input.SGCExempt)) + ) && + ( + this.IsQualifyingEarnings == input.IsQualifyingEarnings || + (this.IsQualifyingEarnings != null && + this.IsQualifyingEarnings.Equals(input.IsQualifyingEarnings)) ); } @@ -245,6 +258,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.LeaveCategoryCode.GetHashCode(); if (this.SGCExempt != null) hashCode = hashCode * 59 + this.SGCExempt.GetHashCode(); + if (this.IsQualifyingEarnings != null) + hashCode = hashCode * 59 + this.IsQualifyingEarnings.GetHashCode(); return hashCode; } } diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalanceLeaveLine.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalanceLeaveLine.cs new file mode 100644 index 00000000..a789bf37 --- /dev/null +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalanceLeaveLine.cs @@ -0,0 +1,132 @@ +/* + * Xero Payroll AU API + * + * This is the Xero Payroll API for orgs in Australia region. + * + * Contact: api@xero.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; + +namespace Xero.NetStandard.OAuth2.Model.PayrollAu +{ + /// + /// OpeningBalanceLeaveLine + /// + [DataContract] + public partial class OpeningBalanceLeaveLine : IEquatable, IValidatableObject + { + + /// + /// Xero leave type identifier + /// + /// Xero leave type identifier + [DataMember(Name="LeaveTypeID", EmitDefaultValue=false)] + public Guid? LeaveTypeID { get; set; } + + /// + /// Number of units for leave line. + /// + /// Number of units for leave line. + [DataMember(Name="NumberOfUnits", EmitDefaultValue=false)] + public decimal? NumberOfUnits { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OpeningBalanceLeaveLine {\n"); + sb.Append(" LeaveTypeID: ").Append(LeaveTypeID).Append("\n"); + sb.Append(" NumberOfUnits: ").Append(NumberOfUnits).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OpeningBalanceLeaveLine); + } + + /// + /// Returns true if OpeningBalanceLeaveLine instances are equal + /// + /// Instance of OpeningBalanceLeaveLine to be compared + /// Boolean + public bool Equals(OpeningBalanceLeaveLine input) + { + if (input == null) + return false; + + return + ( + this.LeaveTypeID == input.LeaveTypeID || + (this.LeaveTypeID != null && + this.LeaveTypeID.Equals(input.LeaveTypeID)) + ) && + ( + this.NumberOfUnits == input.NumberOfUnits || + (this.NumberOfUnits != null && + this.NumberOfUnits.Equals(input.NumberOfUnits)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.LeaveTypeID != null) + hashCode = hashCode * 59 + this.LeaveTypeID.GetHashCode(); + if (this.NumberOfUnits != null) + hashCode = hashCode * 59 + this.NumberOfUnits.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalances.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalances.cs index c9ed636e..ff32ed6d 100644 --- a/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalances.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/OpeningBalances.cs @@ -73,7 +73,7 @@ public partial class OpeningBalances : IEquatable, IValidatabl /// Gets or Sets LeaveLines /// [DataMember(Name="LeaveLines", EmitDefaultValue=false)] - public List LeaveLines { get; set; } + public List LeaveLines { get; set; } /// /// Gets or Sets PaidLeaveEarningsLines diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAu/TaxDeclaration.cs b/Xero.NetStandard.OAuth2/Model/PayrollAu/TaxDeclaration.cs index 07050266..8e052a2d 100644 --- a/Xero.NetStandard.OAuth2/Model/PayrollAu/TaxDeclaration.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAu/TaxDeclaration.cs @@ -166,6 +166,13 @@ public partial class TaxDeclaration : IEquatable, IValidatableO [DataMember(Name="UpdatedDateUTC", EmitDefaultValue=false)] public DateTime? UpdatedDateUTC { get; private set; } + /// + /// Optional Boolean to determine if leave loading is considered as qualifying earnings for superannuation guarantee calculations + /// + /// Optional Boolean to determine if leave loading is considered as qualifying earnings for superannuation guarantee calculations + [DataMember(Name="IncludeLeaveLoadingInQualifyingEarnings", EmitDefaultValue=false)] + public bool? IncludeLeaveLoadingInQualifyingEarnings { get; set; } + /// /// Returns the string presentation of the object /// @@ -195,6 +202,7 @@ public override string ToString() sb.Append(" HasStudentStartupLoan: ").Append(HasStudentStartupLoan).Append("\n"); sb.Append(" HasLoanOrStudentDebt: ").Append(HasLoanOrStudentDebt).Append("\n"); sb.Append(" UpdatedDateUTC: ").Append(UpdatedDateUTC).Append("\n"); + sb.Append(" IncludeLeaveLoadingInQualifyingEarnings: ").Append(IncludeLeaveLoadingInQualifyingEarnings).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -327,6 +335,11 @@ public bool Equals(TaxDeclaration input) this.UpdatedDateUTC == input.UpdatedDateUTC || (this.UpdatedDateUTC != null && this.UpdatedDateUTC.Equals(input.UpdatedDateUTC)) + ) && + ( + this.IncludeLeaveLoadingInQualifyingEarnings == input.IncludeLeaveLoadingInQualifyingEarnings || + (this.IncludeLeaveLoadingInQualifyingEarnings != null && + this.IncludeLeaveLoadingInQualifyingEarnings.Equals(input.IncludeLeaveLoadingInQualifyingEarnings)) ); } @@ -375,6 +388,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.HasLoanOrStudentDebt.GetHashCode(); if (this.UpdatedDateUTC != null) hashCode = hashCode * 59 + this.UpdatedDateUTC.GetHashCode(); + if (this.IncludeLeaveLoadingInQualifyingEarnings != null) + hashCode = hashCode * 59 + this.IncludeLeaveLoadingInQualifyingEarnings.GetHashCode(); return hashCode; } } diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAuV2/InvalidField.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/InvalidField.cs new file mode 100644 index 00000000..2b2d6ef7 --- /dev/null +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/InvalidField.cs @@ -0,0 +1,132 @@ +/* + * Xero Payroll AU API 2.0 + * + * This is the Xero Payroll API 2.0 for orgs in Australia region. + * + * Contact: api@xero.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; + +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 +{ + /// + /// InvalidField + /// + [DataContract] + public partial class InvalidField : IEquatable, IValidatableObject + { + + /// + /// The name of the field that caused the error + /// + /// The name of the field that caused the error + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// The reason the error occurred + /// + /// The reason the error occurred + [DataMember(Name="reason", EmitDefaultValue=false)] + public string Reason { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InvalidField {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InvalidField); + } + + /// + /// Returns true if InvalidField instances are equal + /// + /// Instance of InvalidField to be compared + /// Boolean + public bool Equals(InvalidField input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Reason == input.Reason || + (this.Reason != null && + this.Reason.Equals(input.Reason)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Reason != null) + hashCode = hashCode * 59 + this.Reason.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/ReportHistoryModel.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Pagination.cs similarity index 51% rename from Xero.NetStandard.OAuth2/Model/Finance/ReportHistoryModel.cs rename to Xero.NetStandard.OAuth2/Model/PayrollAuV2/Pagination.cs index 0a122d83..b1367008 100644 --- a/Xero.NetStandard.OAuth2/Model/Finance/ReportHistoryModel.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Pagination.cs @@ -1,7 +1,7 @@ /* - * Xero Finance API + * Xero Payroll AU API 2.0 * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + * This is the Xero Payroll API 2.0 for orgs in Australia region. * * Contact: api@xero.com * Generated by: https://github.com/openapitools/openapi-generator.git @@ -22,35 +22,38 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; -namespace Xero.NetStandard.OAuth2.Model.Finance +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 { /// - /// ReportHistoryModel + /// Pagination /// [DataContract] - public partial class ReportHistoryModel : IEquatable, IValidatableObject + public partial class Pagination : IEquatable, IValidatableObject { /// - /// Report code or report title + /// Gets or Sets Page /// - /// Report code or report title - [DataMember(Name="reportName", EmitDefaultValue=false)] - public string ReportName { get; set; } + [DataMember(Name="page", EmitDefaultValue=false)] + public int? Page { get; set; } /// - /// The date or date range of the report + /// Gets or Sets PageSize /// - /// The date or date range of the report - [DataMember(Name="reportDateText", EmitDefaultValue=false)] - public string ReportDateText { get; set; } + [DataMember(Name="pageSize", EmitDefaultValue=false)] + public int? PageSize { get; set; } /// - /// The system date time that the report was published + /// Gets or Sets PageCount /// - /// The system date time that the report was published - [DataMember(Name="publishedDateUtc", EmitDefaultValue=false)] - public DateTime? PublishedDateUtc { get; set; } + [DataMember(Name="pageCount", EmitDefaultValue=false)] + public int? PageCount { get; set; } + + /// + /// Gets or Sets ItemCount + /// + [DataMember(Name="itemCount", EmitDefaultValue=false)] + public int? ItemCount { get; set; } /// /// Returns the string presentation of the object @@ -59,10 +62,11 @@ public partial class ReportHistoryModel : IEquatable, IVali public override string ToString() { var sb = new StringBuilder(); - sb.Append("class ReportHistoryModel {\n"); - sb.Append(" ReportName: ").Append(ReportName).Append("\n"); - sb.Append(" ReportDateText: ").Append(ReportDateText).Append("\n"); - sb.Append(" PublishedDateUtc: ").Append(PublishedDateUtc).Append("\n"); + sb.Append("class Pagination {\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageCount: ").Append(PageCount).Append("\n"); + sb.Append(" ItemCount: ").Append(ItemCount).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -83,34 +87,39 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as ReportHistoryModel); + return this.Equals(input as Pagination); } /// - /// Returns true if ReportHistoryModel instances are equal + /// Returns true if Pagination instances are equal /// - /// Instance of ReportHistoryModel to be compared + /// Instance of Pagination to be compared /// Boolean - public bool Equals(ReportHistoryModel input) + public bool Equals(Pagination input) { if (input == null) return false; return ( - this.ReportName == input.ReportName || - (this.ReportName != null && - this.ReportName.Equals(input.ReportName)) + this.Page == input.Page || + (this.Page != null && + this.Page.Equals(input.Page)) + ) && + ( + this.PageSize == input.PageSize || + (this.PageSize != null && + this.PageSize.Equals(input.PageSize)) ) && ( - this.ReportDateText == input.ReportDateText || - (this.ReportDateText != null && - this.ReportDateText.Equals(input.ReportDateText)) + this.PageCount == input.PageCount || + (this.PageCount != null && + this.PageCount.Equals(input.PageCount)) ) && ( - this.PublishedDateUtc == input.PublishedDateUtc || - (this.PublishedDateUtc != null && - this.PublishedDateUtc.Equals(input.PublishedDateUtc)) + this.ItemCount == input.ItemCount || + (this.ItemCount != null && + this.ItemCount.Equals(input.ItemCount)) ); } @@ -123,12 +132,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ReportName != null) - hashCode = hashCode * 59 + this.ReportName.GetHashCode(); - if (this.ReportDateText != null) - hashCode = hashCode * 59 + this.ReportDateText.GetHashCode(); - if (this.PublishedDateUtc != null) - hashCode = hashCode * 59 + this.PublishedDateUtc.GetHashCode(); + if (this.Page != null) + hashCode = hashCode * 59 + this.Page.GetHashCode(); + if (this.PageSize != null) + hashCode = hashCode * 59 + this.PageSize.GetHashCode(); + if (this.PageCount != null) + hashCode = hashCode * 59 + this.PageCount.GetHashCode(); + if (this.ItemCount != null) + hashCode = hashCode * 59 + this.ItemCount.GetHashCode(); return hashCode; } } diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Problem.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Problem.cs new file mode 100644 index 00000000..22bc694b --- /dev/null +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Problem.cs @@ -0,0 +1,191 @@ +/* + * Xero Payroll AU API 2.0 + * + * This is the Xero Payroll API 2.0 for orgs in Australia region. + * + * Contact: api@xero.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; + +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 +{ + /// + /// The object returned for a bad request + /// + [DataContract] + public partial class Problem : IEquatable, IValidatableObject + { + + /// + /// The type of error format + /// + /// The type of error format + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// The type of the error + /// + /// The type of the error + [DataMember(Name="title", EmitDefaultValue=false)] + public string Title { get; set; } + + /// + /// The error status code + /// + /// The error status code + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// A description of the error + /// + /// A description of the error + [DataMember(Name="detail", EmitDefaultValue=false)] + public string Detail { get; set; } + + /// + /// Gets or Sets Instance + /// + [DataMember(Name="instance", EmitDefaultValue=false)] + public string Instance { get; set; } + + /// + /// Gets or Sets InvalidFields + /// + [DataMember(Name="invalidFields", EmitDefaultValue=false)] + public List InvalidFields { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Problem {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Detail: ").Append(Detail).Append("\n"); + sb.Append(" Instance: ").Append(Instance).Append("\n"); + sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Problem); + } + + /// + /// Returns true if Problem instances are equal + /// + /// Instance of Problem to be compared + /// Boolean + public bool Equals(Problem input) + { + if (input == null) + return false; + + return + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Detail == input.Detail || + (this.Detail != null && + this.Detail.Equals(input.Detail)) + ) && + ( + this.Instance == input.Instance || + (this.Instance != null && + this.Instance.Equals(input.Instance)) + ) && + ( + this.InvalidFields == input.InvalidFields || + this.InvalidFields != null && + input.InvalidFields != null && + this.InvalidFields.SequenceEqual(input.InvalidFields) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Detail != null) + hashCode = hashCode * 59 + this.Detail.GetHashCode(); + if (this.Instance != null) + hashCode = hashCode * 59 + this.Instance.GetHashCode(); + if (this.InvalidFields != null) + hashCode = hashCode * 59 + this.InvalidFields.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Timesheet.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Timesheet.cs new file mode 100644 index 00000000..37ba8a68 --- /dev/null +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Timesheet.cs @@ -0,0 +1,271 @@ +/* + * Xero Payroll AU API 2.0 + * + * This is the Xero Payroll API 2.0 for orgs in Australia region. + * + * Contact: api@xero.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; + +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 +{ + /// + /// Timesheet + /// + [DataContract] + public partial class Timesheet : IEquatable, IValidatableObject + { + /// + /// Status of the timesheet + /// + /// Status of the timesheet + [JsonConverter(typeof(Client.CustomStringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum Draft for value: Draft + /// + [EnumMember(Value = "Draft")] + Draft = 1, + + /// + /// Enum Approved for value: Approved + /// + [EnumMember(Value = "Approved")] + Approved = 2, + + /// + /// Enum Completed for value: Completed + /// + [EnumMember(Value = "Completed")] + Completed = 3 + + } + + /// + /// Status of the timesheet + /// + /// Status of the timesheet + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public Timesheet() + { + TimesheetLines = new List(); + } + + /// + /// The Xero identifier for a Timesheet + /// + /// The Xero identifier for a Timesheet + [DataMember(Name="timesheetID", EmitDefaultValue=false)] + public Guid? TimesheetID { get; set; } + + /// + /// The Xero identifier for the Payroll Calendar that the Timesheet applies to + /// + /// The Xero identifier for the Payroll Calendar that the Timesheet applies to + [DataMember(Name="payrollCalendarID", EmitDefaultValue=false)] + public Guid? PayrollCalendarID { get; set; } + + /// + /// The Xero identifier for the Employee that the Timesheet is for + /// + /// The Xero identifier for the Employee that the Timesheet is for + [DataMember(Name="employeeID", EmitDefaultValue=false)] + public Guid? EmployeeID { get; set; } + + /// + /// The Start Date of the Timesheet period (YYYY-MM-DD) + /// + /// The Start Date of the Timesheet period (YYYY-MM-DD) + [DataMember(Name="startDate", EmitDefaultValue=false)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime? StartDate { get; set; } + + /// + /// The End Date of the Timesheet period (YYYY-MM-DD) + /// + /// The End Date of the Timesheet period (YYYY-MM-DD) + [DataMember(Name="endDate", EmitDefaultValue=false)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime? EndDate { get; set; } + + /// + /// The Total Hours of the Timesheet + /// + /// The Total Hours of the Timesheet + [DataMember(Name="totalHours", EmitDefaultValue=false)] + public double? TotalHours { get; set; } + + /// + /// The UTC date time that the Timesheet was last updated + /// + /// The UTC date time that the Timesheet was last updated + [DataMember(Name="updatedDateUTC", EmitDefaultValue=false)] + public DateTime? UpdatedDateUTC { get; set; } + + /// + /// Gets or Sets TimesheetLines + /// + [DataMember(Name="timesheetLines", EmitDefaultValue=false)] + public List TimesheetLines { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Timesheet {\n"); + sb.Append(" TimesheetID: ").Append(TimesheetID).Append("\n"); + sb.Append(" PayrollCalendarID: ").Append(PayrollCalendarID).Append("\n"); + sb.Append(" EmployeeID: ").Append(EmployeeID).Append("\n"); + sb.Append(" StartDate: ").Append(StartDate).Append("\n"); + sb.Append(" EndDate: ").Append(EndDate).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TotalHours: ").Append(TotalHours).Append("\n"); + sb.Append(" UpdatedDateUTC: ").Append(UpdatedDateUTC).Append("\n"); + sb.Append(" TimesheetLines: ").Append(TimesheetLines).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Timesheet); + } + + /// + /// Returns true if Timesheet instances are equal + /// + /// Instance of Timesheet to be compared + /// Boolean + public bool Equals(Timesheet input) + { + if (input == null) + return false; + + return + ( + this.TimesheetID == input.TimesheetID || + (this.TimesheetID != null && + this.TimesheetID.Equals(input.TimesheetID)) + ) && + ( + this.PayrollCalendarID == input.PayrollCalendarID || + (this.PayrollCalendarID != null && + this.PayrollCalendarID.Equals(input.PayrollCalendarID)) + ) && + ( + this.EmployeeID == input.EmployeeID || + (this.EmployeeID != null && + this.EmployeeID.Equals(input.EmployeeID)) + ) && + ( + this.StartDate == input.StartDate || + (this.StartDate != null && + this.StartDate.Equals(input.StartDate)) + ) && + ( + this.EndDate == input.EndDate || + (this.EndDate != null && + this.EndDate.Equals(input.EndDate)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.TotalHours == input.TotalHours || + (this.TotalHours != null && + this.TotalHours.Equals(input.TotalHours)) + ) && + ( + this.UpdatedDateUTC == input.UpdatedDateUTC || + (this.UpdatedDateUTC != null && + this.UpdatedDateUTC.Equals(input.UpdatedDateUTC)) + ) && + ( + this.TimesheetLines == input.TimesheetLines || + this.TimesheetLines != null && + input.TimesheetLines != null && + this.TimesheetLines.SequenceEqual(input.TimesheetLines) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TimesheetID != null) + hashCode = hashCode * 59 + this.TimesheetID.GetHashCode(); + if (this.PayrollCalendarID != null) + hashCode = hashCode * 59 + this.PayrollCalendarID.GetHashCode(); + if (this.EmployeeID != null) + hashCode = hashCode * 59 + this.EmployeeID.GetHashCode(); + if (this.StartDate != null) + hashCode = hashCode * 59 + this.StartDate.GetHashCode(); + if (this.EndDate != null) + hashCode = hashCode * 59 + this.EndDate.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.TotalHours != null) + hashCode = hashCode * 59 + this.TotalHours.GetHashCode(); + if (this.UpdatedDateUTC != null) + hashCode = hashCode * 59 + this.UpdatedDateUTC.GetHashCode(); + if (this.TimesheetLines != null) + hashCode = hashCode * 59 + this.TimesheetLines.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetLine.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetLine.cs new file mode 100644 index 00000000..62b809c1 --- /dev/null +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetLine.cs @@ -0,0 +1,185 @@ +/* + * Xero Payroll AU API 2.0 + * + * This is the Xero Payroll API 2.0 for orgs in Australia region. + * + * Contact: api@xero.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; + +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 +{ + /// + /// TimesheetLine + /// + [DataContract] + public partial class TimesheetLine : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public TimesheetLine() + { + } + + /// + /// The Xero identifier for a Timesheet Line + /// + /// The Xero identifier for a Timesheet Line + [DataMember(Name="timesheetLineID", EmitDefaultValue=false)] + public Guid? TimesheetLineID { get; set; } + + /// + /// The Date that this Timesheet Line is for (YYYY-MM-DD) + /// + /// The Date that this Timesheet Line is for (YYYY-MM-DD) + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime? Date { get; set; } + + /// + /// The Xero identifier for the Earnings Rate that the Timesheet is for + /// + /// The Xero identifier for the Earnings Rate that the Timesheet is for + [DataMember(Name="earningsRateID", EmitDefaultValue=false)] + public Guid? EarningsRateID { get; set; } + + /// + /// The Xero identifier for the Tracking Item that the Timesheet is for + /// + /// The Xero identifier for the Tracking Item that the Timesheet is for + [DataMember(Name="trackingItemID", EmitDefaultValue=false)] + public Guid? TrackingItemID { get; set; } + + /// + /// The Number of Units of the Timesheet Line + /// + /// The Number of Units of the Timesheet Line + [DataMember(Name="numberOfUnits", EmitDefaultValue=false)] + public double? NumberOfUnits { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TimesheetLine {\n"); + sb.Append(" TimesheetLineID: ").Append(TimesheetLineID).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" EarningsRateID: ").Append(EarningsRateID).Append("\n"); + sb.Append(" TrackingItemID: ").Append(TrackingItemID).Append("\n"); + sb.Append(" NumberOfUnits: ").Append(NumberOfUnits).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as TimesheetLine); + } + + /// + /// Returns true if TimesheetLine instances are equal + /// + /// Instance of TimesheetLine to be compared + /// Boolean + public bool Equals(TimesheetLine input) + { + if (input == null) + return false; + + return + ( + this.TimesheetLineID == input.TimesheetLineID || + (this.TimesheetLineID != null && + this.TimesheetLineID.Equals(input.TimesheetLineID)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.EarningsRateID == input.EarningsRateID || + (this.EarningsRateID != null && + this.EarningsRateID.Equals(input.EarningsRateID)) + ) && + ( + this.TrackingItemID == input.TrackingItemID || + (this.TrackingItemID != null && + this.TrackingItemID.Equals(input.TrackingItemID)) + ) && + ( + this.NumberOfUnits == input.NumberOfUnits || + (this.NumberOfUnits != null && + this.NumberOfUnits.Equals(input.NumberOfUnits)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TimesheetLineID != null) + hashCode = hashCode * 59 + this.TimesheetLineID.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.EarningsRateID != null) + hashCode = hashCode * 59 + this.EarningsRateID.GetHashCode(); + if (this.TrackingItemID != null) + hashCode = hashCode * 59 + this.TrackingItemID.GetHashCode(); + if (this.NumberOfUnits != null) + hashCode = hashCode * 59 + this.NumberOfUnits.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Xero.NetStandard.OAuth2/Model/Finance/LockHistoryResponse.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetLineObject.cs similarity index 52% rename from Xero.NetStandard.OAuth2/Model/Finance/LockHistoryResponse.cs rename to Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetLineObject.cs index 4e41b0c2..6bebf82a 100644 --- a/Xero.NetStandard.OAuth2/Model/Finance/LockHistoryResponse.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetLineObject.cs @@ -1,7 +1,7 @@ /* - * Xero Finance API + * Xero Payroll AU API 2.0 * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + * This is the Xero Payroll API 2.0 for orgs in Australia region. * * Contact: api@xero.com * Generated by: https://github.com/openapitools/openapi-generator.git @@ -22,35 +22,32 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; -namespace Xero.NetStandard.OAuth2.Model.Finance +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 { /// - /// LockHistoryResponse + /// TimesheetLineObject /// [DataContract] - public partial class LockHistoryResponse : IEquatable, IValidatableObject + public partial class TimesheetLineObject : IEquatable, IValidatableObject { /// - /// The requested Organisation to which the data pertains + /// Gets or Sets Pagination /// - /// The requested Organisation to which the data pertains - [DataMember(Name="organisationId", EmitDefaultValue=false)] - public Guid? OrganisationId { get; set; } + [DataMember(Name="pagination", EmitDefaultValue=false)] + public Pagination Pagination { get; set; } /// - /// The end date of the report + /// Gets or Sets Problem /// - /// The end date of the report - [DataMember(Name="endDate", EmitDefaultValue=false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? EndDate { get; set; } + [DataMember(Name="problem", EmitDefaultValue=false)] + public Problem Problem { get; set; } /// - /// Gets or Sets LockDates + /// Gets or Sets TimesheetLine /// - [DataMember(Name="lockDates", EmitDefaultValue=false)] - public List LockDates { get; set; } + [DataMember(Name="timesheetLine", EmitDefaultValue=false)] + public TimesheetLine TimesheetLine { get; set; } /// /// Returns the string presentation of the object @@ -59,10 +56,10 @@ public partial class LockHistoryResponse : IEquatable, IVa public override string ToString() { var sb = new StringBuilder(); - sb.Append("class LockHistoryResponse {\n"); - sb.Append(" OrganisationId: ").Append(OrganisationId).Append("\n"); - sb.Append(" EndDate: ").Append(EndDate).Append("\n"); - sb.Append(" LockDates: ").Append(LockDates).Append("\n"); + sb.Append("class TimesheetLineObject {\n"); + sb.Append(" Pagination: ").Append(Pagination).Append("\n"); + sb.Append(" Problem: ").Append(Problem).Append("\n"); + sb.Append(" TimesheetLine: ").Append(TimesheetLine).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -83,35 +80,34 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as LockHistoryResponse); + return this.Equals(input as TimesheetLineObject); } /// - /// Returns true if LockHistoryResponse instances are equal + /// Returns true if TimesheetLineObject instances are equal /// - /// Instance of LockHistoryResponse to be compared + /// Instance of TimesheetLineObject to be compared /// Boolean - public bool Equals(LockHistoryResponse input) + public bool Equals(TimesheetLineObject input) { if (input == null) return false; return ( - this.OrganisationId == input.OrganisationId || - (this.OrganisationId != null && - this.OrganisationId.Equals(input.OrganisationId)) + this.Pagination == input.Pagination || + (this.Pagination != null && + this.Pagination.Equals(input.Pagination)) ) && ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) + this.Problem == input.Problem || + (this.Problem != null && + this.Problem.Equals(input.Problem)) ) && ( - this.LockDates == input.LockDates || - this.LockDates != null && - input.LockDates != null && - this.LockDates.SequenceEqual(input.LockDates) + this.TimesheetLine == input.TimesheetLine || + (this.TimesheetLine != null && + this.TimesheetLine.Equals(input.TimesheetLine)) ); } @@ -124,12 +120,12 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.OrganisationId != null) - hashCode = hashCode * 59 + this.OrganisationId.GetHashCode(); - if (this.EndDate != null) - hashCode = hashCode * 59 + this.EndDate.GetHashCode(); - if (this.LockDates != null) - hashCode = hashCode * 59 + this.LockDates.GetHashCode(); + if (this.Pagination != null) + hashCode = hashCode * 59 + this.Pagination.GetHashCode(); + if (this.Problem != null) + hashCode = hashCode * 59 + this.Problem.GetHashCode(); + if (this.TimesheetLine != null) + hashCode = hashCode * 59 + this.TimesheetLine.GetHashCode(); return hashCode; } } diff --git a/Xero.NetStandard.OAuth2/Model/Finance/UserActivitiesResponse.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetObject.cs similarity index 52% rename from Xero.NetStandard.OAuth2/Model/Finance/UserActivitiesResponse.cs rename to Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetObject.cs index b41d1a51..21ecbe58 100644 --- a/Xero.NetStandard.OAuth2/Model/Finance/UserActivitiesResponse.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/TimesheetObject.cs @@ -1,7 +1,7 @@ /* - * Xero Finance API + * Xero Payroll AU API 2.0 * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + * This is the Xero Payroll API 2.0 for orgs in Australia region. * * Contact: api@xero.com * Generated by: https://github.com/openapitools/openapi-generator.git @@ -22,34 +22,32 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; -namespace Xero.NetStandard.OAuth2.Model.Finance +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 { /// - /// UserActivitiesResponse + /// TimesheetObject /// [DataContract] - public partial class UserActivitiesResponse : IEquatable, IValidatableObject + public partial class TimesheetObject : IEquatable, IValidatableObject { /// - /// The requested Organisation to which the data pertains + /// Gets or Sets Pagination /// - /// The requested Organisation to which the data pertains - [DataMember(Name="organisationId", EmitDefaultValue=false)] - public Guid? OrganisationId { get; set; } + [DataMember(Name="pagination", EmitDefaultValue=false)] + public Pagination Pagination { get; set; } /// - /// The month of the report + /// Gets or Sets Problem /// - /// The month of the report - [DataMember(Name="dataMonth", EmitDefaultValue=false)] - public string DataMonth { get; set; } + [DataMember(Name="problem", EmitDefaultValue=false)] + public Problem Problem { get; set; } /// - /// Gets or Sets Users + /// Gets or Sets Timesheet /// - [DataMember(Name="users", EmitDefaultValue=false)] - public List Users { get; set; } + [DataMember(Name="timesheet", EmitDefaultValue=false)] + public Timesheet Timesheet { get; set; } /// /// Returns the string presentation of the object @@ -58,10 +56,10 @@ public partial class UserActivitiesResponse : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as UserActivitiesResponse); + return this.Equals(input as TimesheetObject); } /// - /// Returns true if UserActivitiesResponse instances are equal + /// Returns true if TimesheetObject instances are equal /// - /// Instance of UserActivitiesResponse to be compared + /// Instance of TimesheetObject to be compared /// Boolean - public bool Equals(UserActivitiesResponse input) + public bool Equals(TimesheetObject input) { if (input == null) return false; return ( - this.OrganisationId == input.OrganisationId || - (this.OrganisationId != null && - this.OrganisationId.Equals(input.OrganisationId)) + this.Pagination == input.Pagination || + (this.Pagination != null && + this.Pagination.Equals(input.Pagination)) ) && ( - this.DataMonth == input.DataMonth || - (this.DataMonth != null && - this.DataMonth.Equals(input.DataMonth)) + this.Problem == input.Problem || + (this.Problem != null && + this.Problem.Equals(input.Problem)) ) && ( - this.Users == input.Users || - this.Users != null && - input.Users != null && - this.Users.SequenceEqual(input.Users) + this.Timesheet == input.Timesheet || + (this.Timesheet != null && + this.Timesheet.Equals(input.Timesheet)) ); } @@ -123,12 +120,12 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.OrganisationId != null) - hashCode = hashCode * 59 + this.OrganisationId.GetHashCode(); - if (this.DataMonth != null) - hashCode = hashCode * 59 + this.DataMonth.GetHashCode(); - if (this.Users != null) - hashCode = hashCode * 59 + this.Users.GetHashCode(); + if (this.Pagination != null) + hashCode = hashCode * 59 + this.Pagination.GetHashCode(); + if (this.Problem != null) + hashCode = hashCode * 59 + this.Problem.GetHashCode(); + if (this.Timesheet != null) + hashCode = hashCode * 59 + this.Timesheet.GetHashCode(); return hashCode; } } diff --git a/Xero.NetStandard.OAuth2/Model/Finance/ReportHistoryResponse.cs b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Timesheets.cs similarity index 52% rename from Xero.NetStandard.OAuth2/Model/Finance/ReportHistoryResponse.cs rename to Xero.NetStandard.OAuth2/Model/PayrollAuV2/Timesheets.cs index 062115ce..78f0edca 100644 --- a/Xero.NetStandard.OAuth2/Model/Finance/ReportHistoryResponse.cs +++ b/Xero.NetStandard.OAuth2/Model/PayrollAuV2/Timesheets.cs @@ -1,7 +1,7 @@ /* - * Xero Finance API + * Xero Payroll AU API 2.0 * - * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + * This is the Xero Payroll API 2.0 for orgs in Australia region. * * Contact: api@xero.com * Generated by: https://github.com/openapitools/openapi-generator.git @@ -22,35 +22,32 @@ using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Xero.NetStandard.OAuth2.Client.OpenAPIDateConverter; -namespace Xero.NetStandard.OAuth2.Model.Finance +namespace Xero.NetStandard.OAuth2.Model.PayrollAuV2 { /// - /// ReportHistoryResponse + /// Timesheets /// [DataContract] - public partial class ReportHistoryResponse : IEquatable, IValidatableObject + public partial class Timesheets : IEquatable, IValidatableObject { /// - /// The requested Organisation to which the data pertains + /// Gets or Sets Pagination /// - /// The requested Organisation to which the data pertains - [DataMember(Name="organisationId", EmitDefaultValue=false)] - public Guid? OrganisationId { get; set; } + [DataMember(Name="pagination", EmitDefaultValue=false)] + public Pagination Pagination { get; set; } /// - /// The end date of the report + /// Gets or Sets Problem /// - /// The end date of the report - [DataMember(Name="endDate", EmitDefaultValue=false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? EndDate { get; set; } + [DataMember(Name="problem", EmitDefaultValue=false)] + public Problem Problem { get; set; } /// - /// Gets or Sets Reports + /// Gets or Sets _Timesheets /// - [DataMember(Name="reports", EmitDefaultValue=false)] - public List Reports { get; set; } + [DataMember(Name="timesheets", EmitDefaultValue=false)] + public List _Timesheets { get; set; } /// /// Returns the string presentation of the object @@ -59,10 +56,10 @@ public partial class ReportHistoryResponse : IEquatable, public override string ToString() { var sb = new StringBuilder(); - sb.Append("class ReportHistoryResponse {\n"); - sb.Append(" OrganisationId: ").Append(OrganisationId).Append("\n"); - sb.Append(" EndDate: ").Append(EndDate).Append("\n"); - sb.Append(" Reports: ").Append(Reports).Append("\n"); + sb.Append("class Timesheets {\n"); + sb.Append(" Pagination: ").Append(Pagination).Append("\n"); + sb.Append(" Problem: ").Append(Problem).Append("\n"); + sb.Append(" _Timesheets: ").Append(_Timesheets).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -83,35 +80,35 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as ReportHistoryResponse); + return this.Equals(input as Timesheets); } /// - /// Returns true if ReportHistoryResponse instances are equal + /// Returns true if Timesheets instances are equal /// - /// Instance of ReportHistoryResponse to be compared + /// Instance of Timesheets to be compared /// Boolean - public bool Equals(ReportHistoryResponse input) + public bool Equals(Timesheets input) { if (input == null) return false; return ( - this.OrganisationId == input.OrganisationId || - (this.OrganisationId != null && - this.OrganisationId.Equals(input.OrganisationId)) + this.Pagination == input.Pagination || + (this.Pagination != null && + this.Pagination.Equals(input.Pagination)) ) && ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) + this.Problem == input.Problem || + (this.Problem != null && + this.Problem.Equals(input.Problem)) ) && ( - this.Reports == input.Reports || - this.Reports != null && - input.Reports != null && - this.Reports.SequenceEqual(input.Reports) + this._Timesheets == input._Timesheets || + this._Timesheets != null && + input._Timesheets != null && + this._Timesheets.SequenceEqual(input._Timesheets) ); } @@ -124,12 +121,12 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.OrganisationId != null) - hashCode = hashCode * 59 + this.OrganisationId.GetHashCode(); - if (this.EndDate != null) - hashCode = hashCode * 59 + this.EndDate.GetHashCode(); - if (this.Reports != null) - hashCode = hashCode * 59 + this.Reports.GetHashCode(); + if (this.Pagination != null) + hashCode = hashCode * 59 + this.Pagination.GetHashCode(); + if (this.Problem != null) + hashCode = hashCode * 59 + this.Problem.GetHashCode(); + if (this._Timesheets != null) + hashCode = hashCode * 59 + this._Timesheets.GetHashCode(); return hashCode; } } diff --git a/Xero.NetStandard.OAuth2/Xero.NetStandard.OAuth2.csproj b/Xero.NetStandard.OAuth2/Xero.NetStandard.OAuth2.csproj index 58c77a26..97e19f1a 100644 --- a/Xero.NetStandard.OAuth2/Xero.NetStandard.OAuth2.csproj +++ b/Xero.NetStandard.OAuth2/Xero.NetStandard.OAuth2.csproj @@ -16,7 +16,7 @@ true true Xero.NetStandard.OAuth2 - 12.5.0 + 13.0.0 bin\$(Configuration)\$(TargetFramework)\Xero.NetStandard.OAuth2.xml https://github.com/XeroAPI/Xero-NetStandard/ https://en.gravatar.com/userimage/180557955/74b3a957d886bc921b0d1455beed9dab.png diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 21cc2549..717e9daf 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -6304,6 +6304,7 @@ + @@ -6350,7 +6351,7 @@