XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
92 stars 66 forks source link

Bank transactions Import Issue- InvalidArgumentException #285

Open mansibhavya opened 2 years ago

mansibhavya commented 2 years ago

Upon importing the Bank transactions from XERO, I'm getting the following error.

Invalid value for 'type', must be one of 'RECEIVE', 'RECEIVE-OVERPAYMENT', 'RECEIVE-PREPAYMENT', 'SPEND', 'SPEND-OVERPAYMENT', 'SPEND-PREPAYMENT', 'RECEIVE-TRANSFER', 'SPEND-TRANSFER'

Error Back-Trace is : /vendor/xeroapi/xero-php-oauth2/lib/Models/Accounting/BankTransaction.php(line - 422) /vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(line - 358,function-setType) /vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(line - 277,function-deserialize) /vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(line - 358,function-deserialize) /vendor/xeroapi/xero-php-oauth2/lib/Api/AccountingApi.php (line - 1303,function-deserialize)

it worked fine first but now this issue started coming up.

We have seen in the code that we do import only such transactions which types are 'RECEIVE', 'RECEIVE-OVERPAYMENT', 'RECEIVE-PREPAYMENT', 'SPEND', 'SPEND-OVERPAYMENT', 'SPEND-PREPAYMENT'.

Is there a way to fix this error ?

Thanks

RettBehrens commented 2 years ago

Hi @mansibhavya please email api@xero.com with your app Client ID so we can check your api logs for the source of the error, thanks.

RettBehrens commented 2 years ago

Following up @mansibhavya is this issue ongoing?

IanSimpson commented 2 years ago

@RettBehrens obviously impossible to say without seeing the source data, but possibly experiencing the same issue I raised a couple of weeks ago: https://github.com/XeroAPI/xero-php-oauth2/issues/291