Closed eliissc closed 2 years ago
Thanks for reporting this, I've just submitted a PR on our Open API specification here: https://github.com/XeroAPI/Xero-OpenAPI/pull/489 to add the missing type. Once this has been merged, the change will flow through to the SDKs (including this one) the next time they are auto-generated. In the meantime you might like to add the missing type manually.
SDK you're using (please complete the following information):
Describe the bug SDK throws an exception when I do a getTaxRates method call and it tries to set the tax rate type to "BADDEBTRELIEF". This seems to be a tax rate type on Singapore accounts.
Expected behavior I believe "BADDEBTRELIEF" should be added as a constant like all other tax rate types and it should be possible to create a TaxRate object with this type.
Additional context Stacktrace:
0 /../vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(358): XeroAPI\XeroPHP\Models\Accounting\TaxRate->setReportTaxType('BADDEBTRELIEF')
1 /../vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(277): XeroAPI\XeroPHP\AccountingObjectSerializer::deserialize(Object(stdClass), '\XeroAPI\XeroPH...', NULL)
2 /../vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(358): XeroAPI\XeroPHP\AccountingObjectSerializer::deserialize(Array, '\XeroAPI\XeroPH...', NULL)
3 /../vendor/xeroapi/xero-php-oauth2/lib/Api/AccountingApi.php(49210): XeroAPI\XeroPHP\AccountingObjectSerializer::deserialize(Object(stdClass), '\XeroAPI\XeroPH...', Array)
4 /../vendor/xeroapi/xero-php-oauth2/lib/Api/AccountingApi.php(49159): XeroAPI\XeroPHP\Api\AccountingApi->getTaxRatesWithHttpInfo('ce95ae9e-19af-4...', NULL, NULL, NULL)
5 /..: XeroAPI\XeroPHP\Api\AccountingApi->getTaxRates('ce95ae9e-19af-4...')