You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDK you're using (please complete the following information):
Xero.NetStandard.OAuth2 3.32.0
Xero.NetStandard.OAuth2Client 1.6.0
Describe the bug
Calling GetPrepaymentsAsync throws a JSONSerializationException stating:
Error converting value "RECEIVE-OVERPAYMENT" to type 'Xero.NetStandard.OAuth2.Model.Accounting.Prepayment+TypeEnum'. Path 'Prepayments[0].Type', line 10, position 35.
and a null value is returned.
To Reproduce
Steps to reproduce the behavior:
Call await api.GetPrepaymentsAsync(accessToken, xeroTenantId, fromDate, page: page); with correct parameters that work for other API endpoints.
Expected behavior
The results to serialize correctly and not return a null value.
The text was updated successfully, but these errors were encountered:
Currently in response to GetPrepayments request Xero API returns extra records with types SPEND-OVERPAYMENT and RECEIVE-OVERPAYMENT. Those records can't be deserialized by the library which results in entire recordset being null.
The workaround that seems to work for now is to use where parameter with value Type=="RECEIVE-PREPAYMENT"||Type=="SPEND-PREPAYMENT"
SDK you're using (please complete the following information):
Describe the bug
Calling GetPrepaymentsAsync throws a JSONSerializationException stating:
and a null value is returned.
To Reproduce
Steps to reproduce the behavior:
await api.GetPrepaymentsAsync(accessToken, xeroTenantId, fromDate, page: page);
with correct parameters that work for other API endpoints.Expected behavior
The results to serialize correctly and not return a null value.
The text was updated successfully, but these errors were encountered: