Skip to content

Commit e25e3fa

Browse files
authored
Merge pull request #511 from XeroAPI/5.0.0
Build from OAS 3.0.3
2 parents 54ed2da + 514c4c9 commit e25e3fa

28 files changed

+307
-86
lines changed

Xero.NetStandard.OAuth2.Test/Api/AccountingApiTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@ public async Task GetTaxRatesTest()
24262426
string where = AutoFaker.Generate<string>();
24272427
string order = AutoFaker.Generate<string>();
24282428
string taxType = AutoFaker.Generate<string>();
2429-
var response = await instance.GetTaxRatesAsync(accessToken, xeroTenantId, where, order, taxType).ConfigureAwait(false);
2429+
var response = await instance.GetTaxRatesAsync(accessToken, xeroTenantId, where, order).ConfigureAwait(false);
24302430
Assert.IsType<TaxRates>(response);
24312431
}
24322432

Xero.NetStandard.OAuth2.Test/Model/PayrollAu/EarningsRateTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public void EmploymentTerminationPaymentTypeTest(string input, EmploymentTermina
127127
/// </summary>
128128
[Theory]
129129
[InlineData("CAR", AllowanceType.CAR)]
130-
[InlineData("JOBKEEPER", AllowanceType.JOBKEEPER)]
131130
[InlineData("LAUNDRY", AllowanceType.LAUNDRY)]
132131
[InlineData("MEALS", AllowanceType.MEALS)]
133132
[InlineData("OTHER", AllowanceType.OTHER)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"XeroConfiguration": {
3-
"AccountingBaseUrl": "https://xero-accounting.getsandbox.com:443/api.xro/2.0",
4-
"BankfeedsBaseUrl": "https://xero-bank-feeds.getsandbox.com:443/bankfeeds.xro/1.0",
5-
"PayrollAuBaseUrl": "https://xero-payroll-au.getsandbox.com:443/payroll.xro/1.0"
3+
"AccountingBaseUrl": "https://25faf04a-c71e-40e7-b7ce-f1fae0149465.mock.pstmn.io/api.xro/2.0",
4+
"BankfeedsBaseUrl": "https://3e140044-4914-47dd-b4e1-df0cc040a44f.mock.pstmn.io/bankfeeds.xro/1.0",
5+
"PayrollAuBaseUrl": "https://5f9f95f1-25c8-40dd-8b10-8192c658dd79.mock.pstmn.io/payroll.xro/1.0"
66
}
77
}

Xero.NetStandard.OAuth2/Api/AccountingApi.cs

+112-21
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using 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

Xero.NetStandard.OAuth2/Api/AppStoreApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/AssetApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/FilesApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/FinanceApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/IdentityApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Api/ProjectApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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

1313
using System;

Xero.NetStandard.OAuth2/Client/Configuration.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class Configuration : IReadableConfiguration
3131
/// Version of the package.
3232
/// </summary>
3333
/// <value>Version of the package.</value>
34-
public const string Version = "4.0.1";
34+
public const string Version = "5.0.0";
3535

3636
/// <summary>
3737
/// Identifier for ISO 8601 DateTime Format
@@ -103,7 +103,7 @@ public class Configuration : IReadableConfiguration
103103
[System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
104104
public Configuration()
105105
{
106-
UserAgent = "xero-netstandard-4.0.1";
106+
UserAgent = "xero-netstandard-5.0.0";
107107
BasePath = "https://api.xero.com/api.xro/2.0";
108108
DefaultHeader = new ConcurrentDictionary<string, string>();
109109
ApiKey = new ConcurrentDictionary<string, string>();
@@ -341,8 +341,8 @@ public static String ToDebugReport()
341341
{
342342
String report = "C# SDK (Xero.NetStandard.OAuth2) Debug Report:\n";
343343
report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";
344-
report += " Version of the API: 3.0.1\n";
345-
report += " SDK Package Version: 4.0.1\n";
344+
report += " Version of the API: 3.0.3\n";
345+
report += " SDK Package Version: 5.0.0\n";
346346

347347
return report;
348348
}

Xero.NetStandard.OAuth2/Model/Accounting/TaxRate.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,13 @@ public enum ReportTaxTypeEnum
662662
/// Enum USSALESTAX for value: USSALESTAX
663663
/// </summary>
664664
[EnumMember(Value = "USSALESTAX")]
665-
USSALESTAX = 98
665+
USSALESTAX = 98,
666+
667+
/// <summary>
668+
/// Enum BLINPUT3 for value: BLINPUT3
669+
/// </summary>
670+
[EnumMember(Value = "BLINPUT3")]
671+
BLINPUT3 = 99
666672

667673
}
668674

Xero.NetStandard.OAuth2/Model/Accounting/TaxType.cs

+19-1
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,25 @@ public enum TaxType
751751
/// Enum OSOUTPUT2 for value: OSOUTPUT2
752752
/// </summary>
753753
[EnumMember(Value = "OSOUTPUT2")]
754-
OSOUTPUT2 = 120
754+
OSOUTPUT2 = 120,
755+
756+
/// <summary>
757+
/// Enum BLINPUT3 for value: BLINPUT3
758+
/// </summary>
759+
[EnumMember(Value = "BLINPUT3")]
760+
BLINPUT3 = 121,
761+
762+
/// <summary>
763+
/// Enum BLINPUT3Y23 for value: BLINPUT3Y23
764+
/// </summary>
765+
[EnumMember(Value = "BLINPUT3Y23")]
766+
BLINPUT3Y23 = 122,
767+
768+
/// <summary>
769+
/// Enum BLINPUT3Y24 for value: BLINPUT3Y24
770+
/// </summary>
771+
[EnumMember(Value = "BLINPUT3Y24")]
772+
BLINPUT3Y24 = 123
755773

756774
}
757775

0 commit comments

Comments
 (0)