You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly I just want to say THANK YOU for this amazing package. At the startup I work at we've been using xero-php fairly extensively for the last ~2 years and it's been great. I'm usually able to find solutions to the problems I'd had by just reading the docs or issue threads.
While I've only ever previously used the Accounting API, I now have a need to use the Assets API.
I assumed that I would be able to do something as simple as:
When I try something similar with AssetType I get the error Invalid API passed to XeroPHP\URL::__construct(). Must be XeroPHP\URL::API_*
It appears that the api stem for AssetType (Remote\URL::API_ASSET) doesn't have a matching case in the switch statement near the bottom of XeroPHP\Remote\URL.php
Are you able to offer any help? An examples you can provide would be fantastic as there don't appear to be any.
Many thanks,
Tim
The text was updated successfully, but these errors were encountered:
I've not actually used or tested the Assets API so excuse me if this is a little unhelpful.
This project originally scraped the documentation website, and created models in folders that corresponded to the page structure. Since the docs have now significantly changed, they're updated manually.
The Assets API was added (afaik) during this transition, so is likely incomplete. It could be as simple as adding that constant as you suggest and maybe a model for the Asset itself. I know that early on, Assets were in the Accounting API, so this is probably why it goy messy...
Hello,
Firstly I just want to say THANK YOU for this amazing package. At the startup I work at we've been using xero-php fairly extensively for the last ~2 years and it's been great. I'm usually able to find solutions to the problems I'd had by just reading the docs or issue threads.
While I've only ever previously used the Accounting API, I now have a need to use the Assets API.
I assumed that I would be able to do something as simple as:
in order to retrieve assets (as per https://developer.xero.com/documentation/assets-api/assets) but this class doesn't exist. What's the correct way of doing this?
When I try something similar with
AssetType
I get the errorInvalid API passed to XeroPHP\URL::__construct(). Must be XeroPHP\URL::API_*
It appears that the api stem for AssetType (Remote\URL::API_ASSET) doesn't have a matching case in the switch statement near the bottom of XeroPHP\Remote\URL.php
Are you able to offer any help? An examples you can provide would be fantastic as there don't appear to be any.
Many thanks,
Tim
The text was updated successfully, but these errors were encountered: