Skip to content

Instantly share code, notes, and snippets.

@mdornseif
Created March 30, 2011 09:36
Show Gist options
  • Save mdornseif/894127 to your computer and use it in GitHub Desktop.
Save mdornseif/894127 to your computer and use it in GitHub Desktop.
for incoice in ecommerce_invoices_created_in_the_last_48_hours:
results = xero.search_by_invoice_number(incoice.number)
if len(results) == 0:
# There is a race condition between these two calls.
xero.insert_new_invoice(incoice.number, incoice)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment