README.textile in xero_gateway-2.0.11 vs README.textile in xero_gateway-2.0.12
- old
+ new
@@ -56,15 +56,19 @@
<pre><code>
redirect_to request_token.authorize_url
</code></pre>
-(Note that Xero doesn't support the OAuth Callback parameter here)
+You may also provide a callback parameter, which is the URL within your app the user will be redirected to. See next section for more information on what parameters Xero sends with this request.
+<pre><code>
+ redirect_to request_token.authorize_url(:oauth_callback => "http://www.something.com/xero/complete")
+</code></pre>
+
h3. Retrieving an Access Token
-If you've specified a Callback URL when setting up your application, your user will be redirected to that URL with an OAuth Verifier as a GET parameter. You can then exchange your Request Token for an Access Token like this (assuming Rails, once again):
+If you've specified a Callback URL when setting up your application or provided an oauth_callback parameter on your request token, your user will be redirected to that URL with an OAuth Verifier as a GET parameter. You can then exchange your Request Token for an Access Token like this (assuming Rails, once again):
<pre><code>
gateway.authorize_from_request(request_token.token, request_token.secret, :oauth_verifier => params[:oauth_verifier])
</code></pre>
@@ -226,9 +230,18 @@
:tracking_category => "THE TRACKING CATEGORY FOR THE LINE ITEM",
:tracking_option => "THE TRACKING OPTION FOR THE LINE ITEM"
})
invoice.create</code></pre>
+
+
+
+h3. POST /api.xro/2.0/invoice
+
+Updates an existing invoice record.
+<pre><code> invoice_retrieved_from_xero.due_date = Date.today
+ invoice_retrieved_from_xero.save</code></pre>
+
h3. PUT /api.xro/2.0/invoices
Inserts multiple invoices for a specific organization in Xero (currently only adding new invoices is allowed).