FreshBooks.rb Patch
Updated – My patch was accepted, so you don’t need it ;-)
I’m really happy that FreshBooks released a new API because it brings a number of new features that I need to integrate with. I’m also happy that Ben Vinegar updated his ruby wrapper for the API, FreshBooks.rb.
So I gave it a go but had issues with the API Path and also noticed the item delete referred to invoice delete rather than Item::delete
This fixes the two issues and should get your awesome ruby applications talking to FreshBooks, enjoy.
Index: freshbooks.rb
===================================================================
--- freshbooks.rb (revision 42)
+++ freshbooks.rb (working copy)
@@ -31,7 +31,7 @@
include REXML
module FreshBooks
- API_PATH = "/api"
+ API_PATH = "/api/xml-in"
@@auth_key, @@account_url, @@api_url, @@auth_token = ''
@@response = nil
@@ -328,7 +328,7 @@
end
def delete
- Invoice::delete(self.item_id)
+ Item::delete(self.item_id)
end
def self.get(item_id)
Trackbacks
Use the following link to trackback from your own site:
http://www.actsasflinn.com/trackbacks?article_id=freshbooks-rb-patch&day=02&month=07&year=2007


