30
December
2011

Kashflow API Gem

Tagged: Work Gems Ruby
Comments
Facebook_share Twitter_share Reddit_share
A while ago I forked the Kashflow Gem written by Pogodan, the purpose of my fork was to fix the data sending part so that a system I was writing could send purchase and sales orders unto Kashflow.

The original gem was rather "unstructured" and all its output was an OpenStruct hash which was a pain to work with. Ideally I wanted to work with something which works like Active Record returning custom models for each Kashflow object, which leads neatly into one of my current work projects, a new Kashflow gem.

The Kashflow API has a lot of great documentation at www.accountingapi.com (why api.kashflow.com wasn't good enough I don't know...) which helped a lot when using the original gem. My gem is still a work in progress, but so far its already a lot easier to use in an application, for example:


1KashflowApi::Customer.find("CUSTCODE")




Returns an instance KashflowApi::Customer which acts like an ActiveRecord model, with a .save method to send the data up to Kashflow. This means that you can have models in rails which inherit from KashflowApi::X. I already have a customer and supplier model which use this inheritance, this removes the need for local data and syncing.

The code is on github under the banner of the company I work for at Ed-ITSolutions/KashflowAPI. I hope to have a working gem available soon.
blog comments powered by Disqus
Html5-badge-h-css3-graphics-semantics
CSS Based on Twitters Bootstrap

88x31
All Content is written by Adam Laycock (Arcath) unless otherwise stated.

A little bit About Me

I am an IT Technician working in Primary Schools, I spend my time outside work writing programs, normally they end up bieng bots and other web based dodads