Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 358 lines (222 sloc) 13.5 kb
d431493 @tlconnor first commit
tlconnor authored
1 h1. Xero API wrapper
2
3 h2. Introduction
4
7d3184c @tlconnor This can be used as a rails plugin too
tlconnor authored
5 This library is designed to help ruby / rails based applications communicate with the publicly available API for Xero. If you are unfamiliar with the API, you should first read the documentation, located here "http://blog.xero.com/developer/":http://blog.xero.com/developer/
d431493 @tlconnor first commit
tlconnor authored
6
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
7 h2. Usage
d431493 @tlconnor first commit
tlconnor authored
8
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
9 <pre><code> require 'xero_gateway'
10 gateway = XeroGateway::Gateway.new(YOUR_OAUTH_CONSUMER_KEY, YOUR_OAUTH_CONSUMER_SECRET)
11 </code></pre>
d431493 @tlconnor first commit
tlconnor authored
12
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
13 h2. Authenticating with OAuth
14
15 OAuth is built into this library in a very similar manner to the Twitter gem by John Nunemaker ("http://github.com/jnunemaker/twitter":http://github.com/jnunemaker/twitter). So if you've used that before this will all seem familiar.
16
17 h3. Consumer Key & Secret
18
19 First off, you'll need to get a Consumer Key/Secret pair for your application from Xero.
20 Head to "http://api.xero.com":http://api.xero.com, log in and then click My Applications > Add Application.
21
71958b8 @tlconnor update documentation for private apps and update gemspec
tlconnor authored
22 If you want to create a private application (that accesses your own Xero account rather than your users), you'll need to generate an RSA keypair and an X509 certificate. This can be done with OpenSSL as below:
23 <pre><code> openssl genrsa –out privatekey.pem 1024
24 openssl req –newkey rsa:1024 –x509 –key privatekey.pem –out publickey.cer –days 365
25 openssl pkcs12 –export –out public_privatekey.pfx –inkey privatekey.pem –in publickey.cer
26 </code></pre>
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
27
28 On the right-hand-side of your application's page there's a box titled "OAuth Credentials". Use the Key and Secret from this box in order to set up a new Gateway instance.
d431493 @tlconnor first commit
tlconnor authored
29
71958b8 @tlconnor update documentation for private apps and update gemspec
tlconnor authored
30 (If you're unsure about the Callback URL, specify nothing - it will become clear a bit later)
31
f8192a0 @tlconnor Add support for private apps and fix retrieving invoices by number
tlconnor authored
32 h3. Xero Gateway Initialization
71958b8 @tlconnor update documentation for private apps and update gemspec
tlconnor authored
33
3751058 @tlconnor update readme
tlconnor authored
34 <pre><code> require 'xero_gateway'
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
35 gateway = XeroGateway::Gateway.new(YOUR_OAUTH_CONSUMER_KEY, YOUR_OAUTH_CONSUMER_SECRET)
36 </code></pre>
d431493 @tlconnor first commit
tlconnor authored
37
71958b8 @tlconnor update documentation for private apps and update gemspec
tlconnor authored
38 or for private applications
39
40 <pre><code> require 'xero_gateway'
f8192a0 @tlconnor Add support for private apps and fix retrieving invoices by number
tlconnor authored
41 gateway = XeroGateway::PrivateApp.new(YOUR_OAUTH_CONSUMER_KEY, YOUR_OAUTH_CONSUMER_SECRET, PATH_TO_YOUR_PRIVATE_KEY)
71958b8 @tlconnor update documentation for private apps and update gemspec
tlconnor authored
42 </code></pre>
43
44
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
45 h3. Request Token
d431493 @tlconnor first commit
tlconnor authored
46
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
47 You'll then need to get a Request Token from Xero.
48
49 <pre><code>
50 request_token = gateway.request_token
51 </code></pre>
52
53 You should keep this around - you'll need it to exchange for an Access Token later. (If you're using Rails, this means storing it in the session or something similar)
54
55 Next, you need to redirect your user to the authorisation url for this request token. In Rails, that looks something like this:
56
57 <pre><code>
58 redirect_to request_token.authorize_url
59 </code></pre>
60
d153311 @bjhess Fixed typos in last README commit.
bjhess authored
61 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.
4f37af3 @bjhess Updated README to recognize that oauth_callback is now available in t…
bjhess authored
62
63 <pre><code>
d153311 @bjhess Fixed typos in last README commit.
bjhess authored
64 redirect_to request_token.authorize_url(:oauth_callback => "http://www.something.com/xero/complete")
4f37af3 @bjhess Updated README to recognize that oauth_callback is now available in t…
bjhess authored
65 </code></pre>
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
66
67 h3. Retrieving an Access Token
68
4f37af3 @bjhess Updated README to recognize that oauth_callback is now available in t…
bjhess authored
69 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):
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
70
71 <pre><code>
72 gateway.authorize_from_request(request_token.token, request_token.secret, :oauth_verifier => params[:oauth_verifier])
73 </code></pre>
74
75 (If you haven't specified a Callback URL, the user will be presented with a numeric verifier which they must copy+paste into your application; see examples/oauth.rb for an example)
76
77 Now you can access Xero API methods:
78
79 <pre><code>
80 gateway.get_contacts
81 </code></pre>
82
83 h3. Storing Access Tokens
84
85 You can also store the Access Token/Secret pair so that you can access the API without user intervention. Currently, these access tokens are only valid for 30 minutes, and will raise a XeroGateway::OAuth::TokenExpired exception if you attempt to access the API beyond the token's expiry time.
d431493 @tlconnor first commit
tlconnor authored
86
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
87 <pre><code>
88 access_token, access_secret = gateway.access_token
89 </code></pre>
db2fa8a @tlconnor update readme documentation
tlconnor authored
90
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
91 h3. Examples
92
93 Open examples/oauth.rb and change CONSUMER_KEY and CONSUMER_SECRET to the values for a Test OAuth Application in order to see an example of OAuth at work.
94
95 If you're working with Rails, a controller similar to this might come in handy:
96
97 <pre><code>
98
99 class XeroSessionsController < ApplicationController
100
101 before_filter :get_xero_gateway
102
103 def new
104 session[:request_token] = @xero_gateway.request_token.token
105 session[:request_secret] = @xero_gateway.request_token.secret
106
107 redirect_to @xero_gateway.request_token.authorize_url
108 end
109
110 def create
111 @xero_gateway.authorize_from_request(session[:request_token], session[:request_secret],
112 :oauth_verifier => params[:oauth_verifier])
113
114 session[:xero_auth] = { :access_token => @xero_gateway.access_token.token,
115 :access_secret => @xero_gateway.access_token.secret }
116
117 session.data.delete(:request_token); session.data.delete(:request_secret)
118 end
119
120 def destroy
121 session.data.delete(:xero_auth)
122 end
123
124 private
125
126 def get_xero_gateway
127 @xero_gateway = XeroGateway::Gateway.new(YOUR_OAUTH_CONSUMER_KEY, YOUR_OAUTH_CONSUMER_SECRET)
128 end
129
130 end
131
132 </code></pre>
133
134 Note that I'm just storing the Access Token + Secret in the session here - you could equally store them in the database if you felt like refreshing them every 30 minutes ;)
135
136 h2. Implemented interface methods
137
138 h3. GET /api.xro/2.0/contact (get_contact_by_id)
d431493 @tlconnor first commit
tlconnor authored
139
db2fa8a @tlconnor update readme documentation
tlconnor authored
140 Gets a contact record for a specific Xero organisation
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
141 <pre><code> result = gateway.get_contact_by_id(contact_id)
142 contact = result.contact if result.success?</code></pre>
db2fa8a @tlconnor update readme documentation
tlconnor authored
143
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
144 h3. GET /api.xro/2.0/contact (get_contact_by_number)
d431493 @tlconnor first commit
tlconnor authored
145
db2fa8a @tlconnor update readme documentation
tlconnor authored
146 Gets a contact record for a specific Xero organisation
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
147 <pre><code> gateway.get_contact_by_number(contact_number)</code></pre>
db2fa8a @tlconnor update readme documentation
tlconnor authored
148
149
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
150 h3. GET /api.xro/2.0/contacts (get_contacts)
d431493 @tlconnor first commit
tlconnor authored
151
db2fa8a @tlconnor update readme documentation
tlconnor authored
152 Gets all contact records for a particular Xero customer.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
153 <pre><code> gateway.get_contacts(:type => :all, :sort => :name, :direction => :desc)
14613da @malclocke Rename :updated_after to :modified_since
malclocke authored
154 gateway.get_contacts(:type => :all, :modified_since => 1.month.ago) # modified since 1 month ago</code></pre>
d431493 @tlconnor first commit
tlconnor authored
155
db2fa8a @tlconnor update readme documentation
tlconnor authored
156
157
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
158 h3. PUT /api.xro/2.0/contact
d431493 @tlconnor first commit
tlconnor authored
159
0db57fb @tlconnor add update_contact to the gateway
tlconnor authored
160 Saves a contact record for a particular Xero customer.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
161 <pre><code> contact = gateway.build_contact
162 contact.name = "The contacts name"
d431493 @tlconnor first commit
tlconnor authored
163 contact.email = "whoever@something.com"
164 contact.phone.number = "555 123 4567"
165 contact.address.line_1 = "LINE 1 OF THE ADDRESS"
166 contact.address.line_2 = "LINE 2 OF THE ADDRESS"
167 contact.address.city = "WELLINGTON"
168 contact.address.region = "WELLINGTON"
169 contact.address.country = "NEW ZEALAND"
170 contact.address.post_code = "6021"
8fa7a3d @waynerobinson Update README with current API way of doing things.
waynerobinson authored
171
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
172 contact.save</code></pre>
d431493 @tlconnor first commit
tlconnor authored
173
db2fa8a @tlconnor update readme documentation
tlconnor authored
174
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
175 h3. POST /api.xro/2.0/contact
0db57fb @tlconnor add update_contact to the gateway
tlconnor authored
176
177 Updates an existing contact record.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
178 <pre><code> contact_retrieved_from_xero.email = "something_new@something.com"
9622f62 @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
179 contact_retrieved_from_xero.save</code></pre>
0db57fb @tlconnor add update_contact to the gateway
tlconnor authored
180
181
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
182 h3. POST /api.xro/2.0/contacts
f8c9bd2 @waynerobinson Add XeroGateway::Gateway.update_contacts to create/update a list of c…
waynerobinson authored
183
184 Creates a list of contacts or updates them if they have a matching contact_id, contact_number or name.
185 This method uses only a single API request to create/update multiple contacts.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
186 <pre><code> contacts = [XeroGateway::Contact.new(:name => 'Joe Bloggs'), XeroGateway::Contact.new(:name => 'Jane Doe')]
187 result = gateway.update_contacts(contacts)</code></pre>
f8c9bd2 @waynerobinson Add XeroGateway::Gateway.update_contacts to create/update a list of c…
waynerobinson authored
188
db2fa8a @tlconnor update readme documentation
tlconnor authored
189
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
190 h3. GET /api.xro/2.0/invoice (get_invoice_by_id)
d431493 @tlconnor first commit
tlconnor authored
191
db2fa8a @tlconnor update readme documentation
tlconnor authored
192 Gets an invoice record for a specific Xero organisation
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
193 <pre><code> gateway.get_invoice_by_id(invoice_id)</code></pre>
db2fa8a @tlconnor update readme documentation
tlconnor authored
194
195
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
196 h3. GET /api.xro/2.0/invoice (get_invoice_by_number)
d431493 @tlconnor first commit
tlconnor authored
197
db2fa8a @tlconnor update readme documentation
tlconnor authored
198 Gets an invoice record for a specific Xero organisation
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
199 <pre><code> gateway.get_invoice_by_number(invoice_number)</code></pre>
d431493 @tlconnor first commit
tlconnor authored
200
db2fa8a @tlconnor update readme documentation
tlconnor authored
201
202
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
203 h3. GET /api.xro/2.0/invoices (get_invoices)
d431493 @tlconnor first commit
tlconnor authored
204
db2fa8a @tlconnor update readme documentation
tlconnor authored
205 Gets all invoice records for a particular Xero customer.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
206 <pre><code> gateway.get_invoices
354c56c @rubydeploydelnz Correcting documentation for get_invoices
rubydeploydelnz authored
207 gateway.get_invoices(:modified_since => 1.month.ago) # modified since 1 month ago</code></pre>
d431493 @tlconnor first commit
tlconnor authored
208
db2fa8a @tlconnor update readme documentation
tlconnor authored
209
210
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
211 h3. PUT /api.xro/2.0/invoice
d431493 @tlconnor first commit
tlconnor authored
212
d548a7f @waynerobinson * Updated LineItem class to calculate line_amount total automatically.
waynerobinson authored
213 Inserts an invoice for a specific organization in Xero (Currently only adding new invoices is allowed).
214
215 Invoice and line item totals are calculated automatically.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
216 <pre><code> invoice = gateway.build_invoice({
d431493 @tlconnor first commit
tlconnor authored
217 :invoice_type => "ACCREC",
218 :due_date => 1.month.from_now,
219 :invoice_number => "YOUR INVOICE NUMBER",
220 :reference => "YOUR REFERENCE (NOT NECESSARILY UNIQUE!)",
bc9670c @malclocke Removes tax_inclusive and includes_tax from README
malclocke authored
221 :line_amount_types => "Inclusive" # "Inclusive", "Exclusive" or "NoTax"
d431493 @tlconnor first commit
tlconnor authored
222 })
cd24643 @waynerobinson Remove inconsistencies in API when adding associated contact to the i…
waynerobinson authored
223 invoice.contact.name = "THE NAME OF THE CONTACT"
d431493 @tlconnor first commit
tlconnor authored
224 invoice.contact.phone.number = "12345"
00943dd @tlconnor Update readme to more accurately reflect how tracking works
tlconnor authored
225 invoice.contact.address.line_1 = "LINE 1 OF THE ADDRESS"
226
227 line_item = XeroGateway::LineItem.new(
d431493 @tlconnor first commit
tlconnor authored
228 :description => "THE DESCRIPTION OF THE LINE ITEM",
00943dd @tlconnor Update readme to more accurately reflect how tracking works
tlconnor authored
229 :account_code => 200,
230 :unit_amount => 1000
231 )
232
233 line_item.tracking << XeroGateway::TrackingCategory.new(:name => "tracking category", :options => "tracking option")
234
235 invoice.line_items << line_item
d431493 @tlconnor first commit
tlconnor authored
236
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
237 invoice.create</code></pre>
aeedc3d @tlconnor inplement GET /accounts request for retrieving the list of accounts
tlconnor authored
238
db2fa8a @tlconnor update readme documentation
tlconnor authored
239
24e9d95 @isaac Adds support for updating invoices via HTTP POST
isaac authored
240
241 h3. POST /api.xro/2.0/invoice
242
243 Updates an existing invoice record.
244 <pre><code> invoice_retrieved_from_xero.due_date = Date.today
245 invoice_retrieved_from_xero.save</code></pre>
246
247
248
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
249 h3. PUT /api.xro/2.0/invoices
53fecfd @waynerobinson Add XeroGateway::create_invoies to create a list of invoices with a s…
waynerobinson authored
250
251 Inserts multiple invoices for a specific organization in Xero (currently only adding new invoices is allowed).
252 This method uses only a single API request to create/update multiple contacts.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
253 <pre><code> invoices = [XeroGateway::Invoice.new(...), XeroGateway::Invoice.new(...)]
254 result = gateway.create_invoices(invoices)</code></pre>
53fecfd @waynerobinson Add XeroGateway::create_invoies to create a list of invoices with a s…
waynerobinson authored
255
f20adc0 @rubydeploydelnz Readme for CreditNote methods
rubydeploydelnz authored
256 h3. GET /api.xro/2.0/credit_note (get_credit_note_by_id)
257
258 Gets an credit_note record for a specific Xero organisation
259 <pre><code> gateway.get_credit_note_by_id(credit_note_id)</code></pre>
260
261
262 h3. GET /api.xro/2.0/credit_note (get_credit_note_by_number)
263
264 Gets a credit note record for a specific Xero organisation
265 <pre><code> gateway.get_credit_note_by_number(credit_note_number)</code></pre>
266
267
268
269 h3. GET /api.xro/2.0/credit_notes (get_credit_notes)
270
271 Gets all credit note records for a particular Xero customer.
272 <pre><code> gateway.get_credit_notes
273 gateway.get_credit_notes(:modified_since => 1.month.ago) # modified since 1 month ago</code></pre>
274
275
276
277 h3. PUT /api.xro/2.0/credit_note
278
279 Inserts a credit note for a specific organization in Xero (Currently only adding new credit notes is allowed).
280
281 CreditNote and line item totals are calculated automatically.
282 <pre><code> credit_note = gateway.build_credit_note({
283 :credit_note_type => "ACCRECCREDIT",
284 :credit_note_number => "YOUR CREDIT NOTE NUMBER",
285 :reference => "YOUR REFERENCE (NOT NECESSARILY UNIQUE!)",
286 :line_amount_types => "Inclusive" # "Inclusive", "Exclusive" or "NoTax"
287 })
288 credit_note.contact.name = "THE NAME OF THE CONTACT"
289 credit_note.contact.phone.number = "12345"
290 credit_note.contact.address.line_1 = "LINE 1 OF THE ADDRESS"
291 credit_note.add_line_item({
292 :description => "THE DESCRIPTION OF THE LINE ITEM",
293 :unit_amount => 1000,
294 :tax_amount => 125,
295 :tracking_category => "THE TRACKING CATEGORY FOR THE LINE ITEM",
296 :tracking_option => "THE TRACKING OPTION FOR THE LINE ITEM"
297 })
298
299 credit_note.create</code></pre>
300
301
302 h3. PUT /api.xro/2.0/credit_notes
303
304 Inserts multiple credit notes for a specific organization in Xero (currently only adding new credit notes is allowed).
305 This method uses only a single API request to create/update multiple contacts.
306 <pre><code> credit_notes = [XeroGateway::CreditNote.new(...), XeroGateway::CreditNote.new(...)]
307 result = gateway.create_credit_notes(credit_notes)</code></pre>
308
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
309 h3. GET /api.xro/2.0/accounts
aeedc3d @tlconnor inplement GET /accounts request for retrieving the list of accounts
tlconnor authored
310
db2fa8a @tlconnor update readme documentation
tlconnor authored
311 Gets all accounts for a specific organization in Xero.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
312 <pre><code> gateway.get_accounts</code></pre>
3814b49 @tlconnor add tracking categories support
tlconnor authored
313
62c66d0 @waynerobinson Modify the README and CHANGELOG with updated info regarding XeroGatew…
waynerobinson authored
314 For more advanced (and cached) access to the accounts list, use the following.
9622f62 @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
315 <pre><code> accounts_list = gateway.get_accounts_list</code></pre>
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
316
9622f62 @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
317 Finds account with code of '200'
318 <pre><code> sales_account = accounts_list.find_by_code(200)</code></pre>
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
319
9622f62 @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
320 Finds all EXPENSE accounts. For a list of valid account types see <code>XeroGateway::Account::TYPE</code>
321 <pre><code> all_expense_accounts = accounts_list.find_all_by_type('EXPENSE')</code></pre>
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
322
9622f62 @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
323 Finds all accounts with tax_type == 'OUTPUT'. For a list of valid tax types see <code>XeroGateway::Account::TAX_TYPE</code>
324 <pre><code> all_output_tax_accounts = accounts_list.find_all_by_tax_type('OUTPUT')</code></pre>
62c66d0 @waynerobinson Modify the README and CHANGELOG with updated info regarding XeroGatew…
waynerobinson authored
325
3814b49 @tlconnor add tracking categories support
tlconnor authored
326
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
327 h3. GET /api.xro/2.0/tracking
3814b49 @tlconnor add tracking categories support
tlconnor authored
328
329 Gets all tracking categories and their options for a specific organization in Xero.
9cf450d @waynerobinson Fix formatting in README (as much as possible).
waynerobinson authored
330 <pre><code> gateway.get_tracking_categories</code></pre>
f9071df @nikz Documentation for the 2.0 API support and OAuth verification
nikz authored
331
332 h3. GET /api.xero/2.0/Organisation
333
334 Retrieves organisation details for the authorised application.
335 <pre><code> gateway.get_organisation.organisation</code></pre>
336
337
338 h3. GET /api.xero/2.0/Currencies
339
340 Retrieves currencies in use for the authorised application.
341 <pre><code> gateway.get_currencies.currencies</code></pre>
342
343
344 h3. GET /api.xero/2.0/TaxRates
345
346 Retrieves Tax Rates in use for the authorised application.
ef6310f @nikz Add logging support to Xero gateway
nikz authored
347 <pre><code> gateway.get_tax_rates.tax_rates</code></pre>
348
349 h2. Logging
350
351 You can specify a logger to use (so you can track down those tricky exceptions) by using:
352
353 <pre>
354 gateway.logger = ActiveSupport::BufferedLogger.new("log_file_name.log")
355 </pre>
356
bc9670c @malclocke Removes tax_inclusive and includes_tax from README
malclocke authored
357 It doesn't have to be a buffered logger - anything that responds to "info" will do just fine.
Something went wrong with that request. Please try again.