3.12.0
Xero NetStandard main SDK version 3.12.0 generated against OpenAPI Spec version 2.7.0
Xero NetStandard OAuth2Client SDK version updated to 1.3.0
Accounting
Split Address enum
Address object will be used by Contact and the DELIVERY enum was removed from AddressType
AddressForOrganisation added for use in the Organisation object.
Linked transactions
GET LinkedTransactions query params are strings but not formatted as UUID
Add missing format on query params for GET LinkedTransactions
Added format:UUID to the following query params
LinkedTransactionID
SourceTransactionID
ContactID
TargetTransactionID
Payroll NZ
PayrollNZ.SalaryAndWage.DaysPerWeek
Change from int? to decimal? to match API response
Other
Enum deserialisation
Added a new class, CustomStringEnumConverter.
Enums were being deserialised differently depending on whether they are missing from the JSON or explicitly set to null:
{
"Property": null
}--> throws an exception, meaning that the model is not returned
{}--> enum set to 0, model returned
This change normalises deserialisation of enums so that both cases are set to 0.
Other types are unaffected.
If code was previously expecting an exception in the null case, it will no longer receive that exception.
Xero.NetStandard.OAuth2Client Changes
Added overload method to BuildLoginUri() and BuildLoginUriPkce() to allow passing in state and/or scope:
- BuildLoginUri(string state)
- BuildLoginUri(string state, string scope)
- BuildLoginUriPkce(string codeVerifier, string state)
- BuildLoginUriPkce(string codeVerifier, string state, string scope)
An example:
public IActionResult Index()
{
var client = new XeroClient(XeroConfig.Value);
string state = "a_encoded_client_session";
string scope = "openid profile email accounting.transactions accounting.settings";
return Redirect(BuildLoginUri(state, scope));
}