A Ruby lib for speaking with the german accounting software collmex.
While collmex sends and receives only strings via csv, we treat the data as ruby object.
Its represented as a string in ruby. There is no length restriction. So you have to care for yourself that collmex can handle all the contents of a Char field.
Collmex floats are represented as floats in ruby too. You can give it a string or a integer too. When we send something to collmex in a float field, it is limited to 2 decimals.
Collmex has Currency as its own datatype. In ruby we use the smallest unit (cent in €) and take the amount as an integer. We have put some special parsing methods when a string should represent the alue of a currency field. Jus take a look at the spec/lib/collmex/api_spec.rb to see how we handle it.
Integers are the simples datatype and transparent between ruby and collmex. There is just some special handling that cares for delimiters in numbers to represent the correct value
This lib was originally written for palabea by roman l.