Closed portbury closed 1 year ago
Hi @portbury can you share a Xero-Correlation-Id
for the request error? There were new EarningsTypes
added in 2.15.0 release to reflect new options in AU Payroll API
Hi @RettBehrens
I have appended WithHttpInfo
to the getPayItems
function to get the Xero-Correlation-Id
but the variable is returning null. I also tried wrapping the logic in a try/catch block, but $resultPayItems
is being reported as undefined in the catch exception.
@portbury what's your app Client ID? I can check the logs to confirm but I suspect the response body contains a newly added Earnings Type not present in 2.9.0 and you'll need to update to the latest SDK version to capture new Earnings Type options
Hi @RettBehrens
My goodness, I feel very silly... I didn't realise I was running an SDK build so old. I updated my composer to 2.16.0 and everything's working perfectly now.
I appreciate your help here!
Mark
SDK you're using:
Describe the bug When attempting to access a list of pay items for a tenant, an unhandled exception is thrown.
Uncaught InvalidArgumentException: Invalid value for enum '\XeroAPI\XeroPHP\Models\PayrollAu\EarningsType', must be one of: 'FIXED', 'ORDINARYTIMEEARNINGS', 'OVERTIMEEARNINGS', 'ALLOWANCE', 'LUMPSUMD', 'EMPLOYMENTTERMINATIONPAYMENT', 'LUMPSUMA', 'LUMPSUMB', 'BONUSESANDCOMMISSIONS', 'LUMPSUME', 'LUMPSUMW', 'DIRECTORSFEES' in ...../vendor/xeroapi/xero-php-oauth2/lib/PayrollAuObjectSerializer.php:335
To Reproduce Steps to reproduce the behavior:
PayrollAuApi
getPayItems
requestRefer screenshot code snipped below. Exception occurs on final line where
$resultPayItems
is declared.Expected behavior List of pay items is returned
Screenshots Sample code:
Notes It looks like this issue occurred previous in issue #101.