Class: Xero::Models::Item
- Defined in:
- lib/xero/models/item.rb
Instance Attribute Summary
Attributes inherited from BaseModel
Instance Method Summary collapse
Methods inherited from BaseModel
#attributes=, #cleanup_hash, #initialize, #persisted?, #save, #xero_attributes
Constructor Details
This class inherits a constructor from Xero::Models::BaseModel
Instance Method Details
#to_xero_xml ⇒ Object
18 19 20 21 22 23 |
# File 'lib/xero/models/item.rb', line 18 def to_xero_xml xero_attributes(attributes.clone).tap do |attrs| merge_purchase_details(attrs) unless purchase_details.blank? merge_sales_details(attrs) unless sales_details.blank? end.to_xml(root: 'Item') end |