Class: ZohoInvoiceResource::Invoice
- Defined in:
- lib/zoho_invoice_resource/invoice.rb
Class Method Summary collapse
-
.format ⇒ Object
schema do integer :invoice_id.
Instance Method Summary collapse
Methods inherited from Base
cached_resource, collection_path, connection, #create_resource_for, element_path, #encode, find_all_recursively, #update, #update_element_path
Methods included from UnderscoreKeys
Class Method Details
Instance Method Details
#invoice_items_attributes=(attributes_collection) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/zoho_invoice_resource/invoice.rb', line 14 def invoice_items_attributes=(attributes_collection) attributes_collection.each do |attributes| attributes = attributes.with_indifferent_access if existing_item = self.invoice_items.find{|item| item.item_id == attributes[:item_id]} existing_item.assign_attributes(attributes) else # TODO: raise error end end end |