Private applications use 2-legged OAuth and bypass the user authorisation workflow in the standard OAuth process. Private applications are linked to a single Xero organisation which is chosen when you register your application. Access tokens for private applications don’t expire unless the application is deleted or disconnected from within the Xero organisation.
Public applications use the standard 3-legged OAuth process where a user can authorise your application to have access to their Xero organisation. Public applications can either be web-based or installed on desktop/mobile. Access tokens expire after 30 minutes.
Partner applications are public applications that have been upgraded to support long-term access tokens.
allows connecting with Private, Public and Partner APIs,
allows using the full functionality of API.
requires SSL certificate (generated by OpenSSL).
Xero Gateway gem
allows connecting with Private, Public and Partner APIs.
not all methods are implemented.
Take a look at Xero Getting Started Guide where you can find useful information and a simple guide which allows you to go through an implementation process easily. We are going to use a Xero demo company example because it is a free solution and it's possible to reset it. You can also use the trial version of Xero.com. Here is a link which allows a developer to configure a Xero demo company app: https://developer.xero.com/documentation/getting-started/development-accounts/.
Here is a piece of code with allows a developer to connect with API and return the whole list with which it is rendered inside the view.
Step 7: Example Request with Xero Gateway
Here is a piece of code with allows a developer to connect with API and return the whole list with which it is rendered inside a view
The examples above are very simple and show a simple request along with the returned data transformation. The main logic of it is very straightforward and both gems can be used interchangeably. Among these two gems, I recommend Xeroizer because it allows a developer to work with Xero API easily and has got a nice syntax to invoke different parts of it. Also, it maps every Xero API method into Ruby classes which could be manipulated easily with other things. It's worth to mention that xero_gateway is a wrapper for API.