-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to retrieve LEAVES for employee? #896
Comments
Hi @pdolinaj, it looks like this might need to be added to the model. Have a look at the Employee/Employment model as a guide (it uses the same api structure) and feel free to make a PR. Sing out if you have any issues. |
Thanks, I'll have a look at it. On another note, I was trying to create a Leave for employee but I'm facing 2 issues:
Any ideas please? |
This one would need an update to make it work I reckon since you actually need to send to a different URL, and I'm not sure how the codebase handles this. POST https://api.xero.com/payroll.xro/2.0/employees/35cdd697-c9fc-4931-b579-a18cb8b6fe14/leave So it might need a change to getAPIStem() to add the employee ID to the URL if one exists? |
I am retrieving list of all employees:
$data = $xero->load(\XeroPHP\Models\Accounting\Employee::class)->execute();
How can I retrieve all leaves for this employee?
vendor/calcinai/xero-php/src/XeroPHP/Models/PayrollUK/Employee/Leave.php
Is there a way to retrieve more data about employee, e.g. email address? I can only access the user ID + First Name + Last Name.
The text was updated successfully, but these errors were encountered: