-
Notifications
You must be signed in to change notification settings - Fork 140
Description
This started as an issue on our PHP SDK
XeroAPI/xero-php-oauth2#53
To summarize, at this time all Accounting endpoints are tagged "Accounting" in the yaml file and when code is generated all operations (methods) are put into the same AccountingApi class. With so many endpoints and actions you can perform the AccountingApi class is large.
Changing how operations are tagged is fairly simple, but will have ripple effects across SDKs, documentation and sample code. So, this is not a change that we will be implementing at this time but will consider along with other requests that result in major refactoring of assets.
I'd like to hear what ppl think about this idea? Do you like creating a singleton (AccountingApi) and working with that or would you like to create an instance of AccountApi, ContactApi, InvoiceApi, etc?
Alternatively, we could group based on scope and not endpoint.
https://developer.xero.com/documentation/oauth2/scopes
- transactions, reports, settings, contacts, journals
In the above scenerio 'TransactionsApi class would have all the banktransactions, banktransfer,creditnote, invoice, overpayment, payment, etc together.
Look forward to hearing ppl's thoughts.