Class: Xero::Models::Invoice
- Defined in:
- lib/xero/models/invoice.rb
Constant Summary collapse
- TYPES =
['ACCPAY', 'ACCREC']
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
41 42 43 44 45 46 47 |
# File 'lib/xero/models/invoice.rb', line 41 def to_xero_xml xero_attributes(attributes.clone).tap do |attrs| merge_contact(attrs) unless contact.blank? merge_line_items(attrs) unless line_items.blank? merge_payments(attrs) unless payments.blank? end.to_xml(root: 'Invoice') end |