QuickBooks Integration with Ruby is now easier than ever!
Version 1.0.4: I just now updated the QuickBooks rubygem (http://behindlogic.com) with faster speed and new features.
Speed
The xml parsing has been moved from REXML (ugh) to LibXML, and the benchmarks claim almost 3x improvement in speed! This means faster initializing time (the gem has to read the QBXML specs so that it can build your SDK on-the-fly), and faster parsing of QuickBooks responses. Where previously it took about half a second to parse and instantiate Quickbooks ruby objects for a response that contained a hundred customers (on my machine, that is); now it takes only 0.2 seconds.Feature #1: Associations
Associations have been added to the QuickBooks gem. This means you can forget all about those CustomerRef's and ItemRef's, and just think about the objects you are associating. See the following example:invoice = QB::Invoice.new(:Customer => QB::Customer.first)Of course, that'll take some time to grab the customer, but you probably have to anyway. If you already have the customer's ListID or FullName, you can just set it this way too:invoice = QB::Invoice.new(:Customer => {:FullName => "Mike Anon"})Feature #2: IRB Development Tips
Since there are 114 object types (or Models, for ActiveRecord users) and 829 different property names, I've added a little treat: when you generate new objects in IRB, you will see a helpful message printed out that lists the properties available on the object you just created. Example:>> c = QB::Customer.new
Customer.new -> Available properties: [:AccountNumber, :AltContact,
:AltPhone, :Balance, :BillAddress, :BillAddressBlock, :CompanyName,
:Contact, :CreditCardInfo, :CreditLimit, :CurrencyRef, :CustomerTypeRef,
:DataExt, :DeliveryMethod, :EditSequence, :Email, :ExternalGUID, :Fax,
:FirstName, :FullName, :IsActive, :IsStatementWithParent, :ItemSalesTaxRef,
:JobDesc, :JobEndDate, :JobProjectedEndDate, :JobStartDate, :JobStatus,
:JobTypeRef, :LastName, :ListID, :MiddleName, :Mobile, :Name, :Notes,
:OpenBalance, :OpenBalanceDate, :Pager, :ParentRef, :Phone,
:PreferredPaymentMethodRef, :PriceLevelRef, :PrintAs, :ResaleNumber,
:SalesRepRef, :SalesTaxCodeRef, :SalesTaxCountry, :Salutation, :ShipAddress,
:ShipAddressBlock, :Sublevel, :Suffix, :TaxRegistrationNumber, :TermsRef,
:TimeCreated, :TimeModified, :TotalBalance]
=> >
>>
More of these helpful IRB tips are on their way.As always, head over to http://behindlogic.com to get your hands on the rubygem.