Based on the work by Softlabs https://github.com/Softlabs/xero-laravel