Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/freshbooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ def api_url # :nodoc:
# note: we only need to provide a #post method because the
# FreshBooks API is POST only
def post(method, params={}) # :nodoc:
Response.new Client.post(api_url,
resp = Client.post(api_url,
:headers => auth,
:body => Client.xml_body(method, params))

if resp['response'].class == Hash
return Response.new resp
end

resp.bytes
end

# takes nested Hash/Array combos and generates isomorphic
Expand Down