77 * Generated by: https://github.com/openapitools/openapi-generator.git
88 */
99
10- // The version of the OpenAPI document: 3.0.1
10+ // The version of the OpenAPI document: 3.0.3
1111
1212
1313using System;
@@ -5787,6 +5787,33 @@ public interface IAccountingApiAsync : IApiAccessor
57875787 /// <returns>Task of ApiResponse (ReportWithRows)</returns>
57885788 System.Threading.Tasks.Task<ApiResponse<ReportWithRows>> GetReportsListAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default);
57895789 /// <summary>
5790+ /// Retrieves a specific tax rate according to given TaxType code
5791+ /// </summary>
5792+ /// <remarks>
5793+ ///
5794+ /// </remarks>
5795+ /// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
5796+ /// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
5797+ /// <param name="xeroTenantId">Xero identifier for Tenant</param>
5798+ /// <param name="taxType">A valid TaxType code</param>
5799+ /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
5800+ /// <returns>Task of TaxRates</returns>
5801+ System.Threading.Tasks.Task<TaxRates> GetTaxRateByTaxTypeAsync (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default);
5802+
5803+ /// <summary>
5804+ /// Retrieves a specific tax rate according to given TaxType code
5805+ /// </summary>
5806+ /// <remarks>
5807+ ///
5808+ /// </remarks>
5809+ /// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
5810+ /// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
5811+ /// <param name="xeroTenantId">Xero identifier for Tenant</param>
5812+ /// <param name="taxType">A valid TaxType code</param>
5813+ /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
5814+ /// <returns>Task of ApiResponse (TaxRates)</returns>
5815+ System.Threading.Tasks.Task<ApiResponse<TaxRates>> GetTaxRateByTaxTypeAsyncWithHttpInfo (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default);
5816+ /// <summary>
57905817 /// Retrieves tax rates
57915818 /// </summary>
57925819 /// <remarks>
@@ -5797,10 +5824,9 @@ public interface IAccountingApiAsync : IApiAccessor
57975824 /// <param name="xeroTenantId">Xero identifier for Tenant</param>
57985825 /// <param name="where">Filter by an any element (optional)</param>
57995826 /// <param name="order">Order by an any element (optional)</param>
5800- /// <param name="taxType">Filter by tax type (optional)</param>
58015827 /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
58025828 /// <returns>Task of TaxRates</returns>
5803- System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, string taxType = null, CancellationToken cancellationToken = default);
5829+ System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default);
58045830
58055831 /// <summary>
58065832 /// Retrieves tax rates
@@ -5813,10 +5839,9 @@ public interface IAccountingApiAsync : IApiAccessor
58135839 /// <param name="xeroTenantId">Xero identifier for Tenant</param>
58145840 /// <param name="where">Filter by an any element (optional)</param>
58155841 /// <param name="order">Order by an any element (optional)</param>
5816- /// <param name="taxType">Filter by tax type (optional)</param>
58175842 /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
58185843 /// <returns>Task of ApiResponse (TaxRates)</returns>
5819- System.Threading.Tasks.Task<ApiResponse<TaxRates>> GetTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, string taxType = null, CancellationToken cancellationToken = default);
5844+ System.Threading.Tasks.Task<ApiResponse<TaxRates>> GetTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default);
58205845 /// <summary>
58215846 /// Retrieves tracking categories and options
58225847 /// </summary>
@@ -25056,6 +25081,85 @@ public async System.Threading.Tasks.Task<ReportWithRows> GetReportsListAsync (st
2505625081 }
2505725082
2505825083
25084+ /// <summary>
25085+ /// Retrieves a specific tax rate according to given TaxType code
25086+ /// </summary>
25087+ /// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
25088+ /// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
25089+ /// <param name="xeroTenantId">Xero identifier for Tenant</param>
25090+ /// <param name="taxType">A valid TaxType code</param>
25091+ /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
25092+ /// <returns>Task of TaxRates</returns>
25093+ public async System.Threading.Tasks.Task<TaxRates> GetTaxRateByTaxTypeAsync (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default)
25094+ {
25095+ Xero.NetStandard.OAuth2.Client.ApiResponse<TaxRates> localVarResponse = await GetTaxRateByTaxTypeAsyncWithHttpInfo(accessToken, xeroTenantId, taxType, cancellationToken);
25096+ return localVarResponse.Data;
25097+
25098+ }
25099+
25100+ /// <summary>
25101+ /// Retrieves a specific tax rate according to given TaxType code
25102+ /// </summary>
25103+ /// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
25104+ /// <param name="accessToken">Xero API OAuth 2.0 accessToken</param>
25105+ /// <param name="xeroTenantId">Xero identifier for Tenant</param>
25106+ /// <param name="taxType">A valid TaxType code</param>
25107+ /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
25108+ /// <returns>Task of ApiResponse (TaxRates)</returns>
25109+ public async System.Threading.Tasks.Task<Xero.NetStandard.OAuth2.Client.ApiResponse<TaxRates>> GetTaxRateByTaxTypeAsyncWithHttpInfo (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default)
25110+ {
25111+ // verify the required parameter 'xeroTenantId' is set
25112+ if (xeroTenantId == null)
25113+ throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetTaxRateByTaxType");
25114+
25115+ // verify the required parameter 'taxType' is set
25116+ if (taxType == null)
25117+ throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'taxType' when calling AccountingApi->GetTaxRateByTaxType");
25118+
25119+
25120+ Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions();
25121+
25122+ String[] @contentTypes = new String[] {
25123+ };
25124+
25125+ // to determine the Accept header
25126+ String[] @accepts = new String[] {
25127+ "application/json"
25128+ };
25129+
25130+ foreach (var cType in @contentTypes)
25131+ requestOptions.HeaderParameters.Add("Content-Type", cType);
25132+
25133+ foreach (var accept in @accepts)
25134+ requestOptions.HeaderParameters.Add("Accept", accept);
25135+
25136+ if (taxType != null)
25137+ requestOptions.PathParameters.Add("TaxType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(taxType)); // path parameter
25138+ if (xeroTenantId != null)
25139+ requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter
25140+
25141+ // authentication (OAuth2) required
25142+ // oauth required
25143+ if (!String.IsNullOrEmpty(accessToken))
25144+ {
25145+ requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
25146+ }
25147+ // make the HTTP request
25148+
25149+
25150+
25151+ var response = await this.AsynchronousClient.GetAsync<TaxRates>("/TaxRates/{TaxType}", requestOptions, this.Configuration, cancellationToken);
25152+
25153+ if (this.ExceptionFactory != null)
25154+ {
25155+ Exception exception = this.ExceptionFactory("GetTaxRateByTaxType", response);
25156+ if (exception != null) throw exception;
25157+ }
25158+
25159+ return response;
25160+ }
25161+
25162+
2505925163 /// <summary>
2506025164 /// Retrieves tax rates
2506125165 /// </summary>
@@ -25064,12 +25168,11 @@ public async System.Threading.Tasks.Task<ReportWithRows> GetReportsListAsync (st
2506425168 /// <param name="xeroTenantId">Xero identifier for Tenant</param>
2506525169 /// <param name="where">Filter by an any element (optional)</param>
2506625170 /// <param name="order">Order by an any element (optional)</param>
25067- /// <param name="taxType">Filter by tax type (optional)</param>
2506825171 /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
2506925172 /// <returns>Task of TaxRates</returns>
25070- public async System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, string taxType = null, CancellationToken cancellationToken = default)
25173+ public async System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default)
2507125174 {
25072- Xero.NetStandard.OAuth2.Client.ApiResponse<TaxRates> localVarResponse = await GetTaxRatesAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, taxType, cancellationToken);
25175+ Xero.NetStandard.OAuth2.Client.ApiResponse<TaxRates> localVarResponse = await GetTaxRatesAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, cancellationToken);
2507325176 return localVarResponse.Data;
2507425177
2507525178 }
@@ -25082,10 +25185,9 @@ public async System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string acce
2508225185 /// <param name="xeroTenantId">Xero identifier for Tenant</param>
2508325186 /// <param name="where">Filter by an any element (optional)</param>
2508425187 /// <param name="order">Order by an any element (optional)</param>
25085- /// <param name="taxType">Filter by tax type (optional)</param>
2508625188 /// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
2508725189 /// <returns>Task of ApiResponse (TaxRates)</returns>
25088- public async System.Threading.Tasks.Task<Xero.NetStandard.OAuth2.Client.ApiResponse<TaxRates>> GetTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, string taxType = null, CancellationToken cancellationToken = default)
25190+ public async System.Threading.Tasks.Task<Xero.NetStandard.OAuth2.Client.ApiResponse<TaxRates>> GetTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default)
2508925191 {
2509025192 // verify the required parameter 'xeroTenantId' is set
2509125193 if (xeroTenantId == null)
@@ -25130,17 +25232,6 @@ public async System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string acce
2513025232 }
2513125233 }
2513225234 }
25133-
25134- if (taxType != null)
25135- {
25136- foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "TaxType", taxType))
25137- {
25138- foreach (var value in kvp.Value)
25139- {
25140- requestOptions.QueryParameters.Add(kvp.Key, value);
25141- }
25142- }
25143- }
2514425235 if (xeroTenantId != null)
2514525236 requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter
2514625237
0 commit comments