neovintage/zoho_invoice — pull request #13 by rept (2014-10-23 23:45:47+00:00)
Title: Updated Alex Sherstinsky pull request with fixes to get it working with current Zoho API

- Fixed error in build_attributes build_attributes refl_h => refl_a
- Removed InvoiceItem class since it doesn't exist (anymore) in Zoho, and replaced it with LineItem
- Fixed error in to_hash that forced any class into ZohoInvoice::Invoice, this now checks the class
- Fixed error (probably due to change by Zoho) in save of base object result.body => result.env.body
- Expanded the mapping after an object is saved to Zoho so all values that are returned in the response (result.env.body) are mapped back to the known attributes. This will lower the number of calls needed to the API. After you save an invoice, it will now automatically fill the invoice_number from Zoho (as well as other values).
- Changed the attributes of LineItem so they match the ones returned by Zoho. Used READ_ATTRIBUTES (similar as Alex Sherstinsky did).
- Updated Contact so it matches definition of Zoho, and used READ_ATTRIBUTES similar to other classes.