ruckus/quickbooks-ruby — pull request #115 by nikz (2014-05-16 03:43:35+00:00)
Title: Support preferences endpoint

Hey Guys!

I've added support for the Preferences endpoint in this PR.

There may be case for a little bit of discussion around how I've done it. In order to prevent a Cambrian explosion :volcano: of model objects, I chucked just a little teensy pinch of anonymous classes :smile:

It seems like ROXML has a way to just represent those against the top level object, i.e I could do:

```ruby
xml_reader :home_currency, :from => 'HomeCurrency', :in => 'CurrencyPrefs'
```

But that would mean the client API would be something like

```ruby
preferences.home_currency #=> "NZD"
```

as opposed to what I've got here (which I feel reflects the way the QB API is laid out a bit better) which is:

```ruby
preferences.currency.home_currency #=> "NZD"
```

I've supported everything from the [reference docs]( https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/030_entity_services_reference/preferences), but my sample responses came back with a few `` elements which don't seem to be documented. I've left them *in* the test xml, but *out* of the actual API for now, as I thought that would be the safest way to do things.

Anyway, keen to hear what you think, and let me know if there's something else you'd like me to change.

Cheers!

Nik