Closed ishan-biztech closed 3 years ago
@ishan-biztech - I've updated the readme to improve the visibility of the new SDK documentation we started to rollout.
We have runnable code examples for all Accounting API endpoints here https://xeroapi.github.io/xero-php-oauth2/docs/v2/accounting/index.html
Okay, thanks for your prompt response @SidneyAllen. So I assume that you guys recommend using SDK methods over using json payload directly.
Good question @ishan-biztech - the PHP SDK does not support raw JSON payloads and expects objects to be populated and passed into methods for serialization into JSON.
Currently there is no consistency on how to use/call the API via this SDK. It differs from place to place, somewhere in example(like Github Home page, API Documentation) it uses package methods(
setName
,setFirstName
,setLastName
, etc.) and in other place(like github docs folder, etc) it says to directly pass json({ ... "Name": "John Doe" ... }
).Is there any recommendation from Xero team on what method to use and will be supported? Currently I haven't found any recommendation or proper comments that says which method(directly pass JSON payload or use package methods) to use.