7
7
* Generated by: https://github.com/openapitools/openapi-generator.git
8
8
*/
9
9
10
- // The version of the OpenAPI document: 3.0.1
10
+ // The version of the OpenAPI document: 3.0.3
11
11
12
12
13
13
using System;
@@ -5787,6 +5787,33 @@ public interface IAccountingApiAsync : IApiAccessor
5787
5787
/// <returns>Task of ApiResponse (ReportWithRows)</returns>
5788
5788
System.Threading.Tasks.Task<ApiResponse<ReportWithRows>> GetReportsListAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default);
5789
5789
/// <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>
5790
5817
/// Retrieves tax rates
5791
5818
/// </summary>
5792
5819
/// <remarks>
@@ -5797,10 +5824,9 @@ public interface IAccountingApiAsync : IApiAccessor
5797
5824
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
5798
5825
/// <param name="where">Filter by an any element (optional)</param>
5799
5826
/// <param name="order">Order by an any element (optional)</param>
5800
- /// <param name="taxType">Filter by tax type (optional)</param>
5801
5827
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
5802
5828
/// <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);
5804
5830
5805
5831
/// <summary>
5806
5832
/// Retrieves tax rates
@@ -5813,10 +5839,9 @@ public interface IAccountingApiAsync : IApiAccessor
5813
5839
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
5814
5840
/// <param name="where">Filter by an any element (optional)</param>
5815
5841
/// <param name="order">Order by an any element (optional)</param>
5816
- /// <param name="taxType">Filter by tax type (optional)</param>
5817
5842
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
5818
5843
/// <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);
5820
5845
/// <summary>
5821
5846
/// Retrieves tracking categories and options
5822
5847
/// </summary>
@@ -25056,6 +25081,85 @@ public async System.Threading.Tasks.Task<ReportWithRows> GetReportsListAsync (st
25056
25081
}
25057
25082
25058
25083
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
+
25059
25163
/// <summary>
25060
25164
/// Retrieves tax rates
25061
25165
/// </summary>
@@ -25064,12 +25168,11 @@ public async System.Threading.Tasks.Task<ReportWithRows> GetReportsListAsync (st
25064
25168
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
25065
25169
/// <param name="where">Filter by an any element (optional)</param>
25066
25170
/// <param name="order">Order by an any element (optional)</param>
25067
- /// <param name="taxType">Filter by tax type (optional)</param>
25068
25171
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
25069
25172
/// <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)
25071
25174
{
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);
25073
25176
return localVarResponse.Data;
25074
25177
25075
25178
}
@@ -25082,10 +25185,9 @@ public async System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string acce
25082
25185
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
25083
25186
/// <param name="where">Filter by an any element (optional)</param>
25084
25187
/// <param name="order">Order by an any element (optional)</param>
25085
- /// <param name="taxType">Filter by tax type (optional)</param>
25086
25188
/// <param name="cancellationToken">Cancellation token enables cancellation between threads. Defaults to CancellationToken.None</param>
25087
25189
/// <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)
25089
25191
{
25090
25192
// verify the required parameter 'xeroTenantId' is set
25091
25193
if (xeroTenantId == null)
@@ -25130,17 +25232,6 @@ public async System.Threading.Tasks.Task<TaxRates> GetTaxRatesAsync (string acce
25130
25232
}
25131
25233
}
25132
25234
}
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
- }
25144
25235
if (xeroTenantId != null)
25145
25236
requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter
25146
25237
0 commit comments