Class: Economic::CurrentInvoiceLine
- Defined in:
- lib/economic/current_invoice_line.rb
Overview
Represents a current invoice line.
API documentation: www.e-conomic.com/apidocs/Documentation/T_Economic_Api_ICurrentInvoiceLine.html
See Economic::CurrentInvoice for usage example
Instance Attribute Summary
Attributes inherited from Entity
#id, #number, #partial, #persisted, #session
Instance Method Summary collapse
Methods inherited from Entity
#==, default_values, defaults, #destroy, #get, #get_data, #handle=, handle_writer, has_properties, #initialize, #inspect, key, #partial?, #persisted?, properties, properties_not_triggering_full_load, property_reader, property_writer, proxy, #proxy, #save, #update_properties
Constructor Details
This class inherits a constructor from Economic::Entity
Instance Method Details
#handle ⇒ Object
34 35 36 |
# File 'lib/economic/current_invoice_line.rb', line 34 def handle @handle || Handle.build(:number => number) end |
#invoice ⇒ Object
38 39 40 41 |
# File 'lib/economic/current_invoice_line.rb', line 38 def invoice return nil if invoice_handle.blank? @invoice ||= session.current_invoices.find(invoice_handle) end |
#invoice=(invoice) ⇒ Object
43 44 45 46 |
# File 'lib/economic/current_invoice_line.rb', line 43 def invoice=(invoice) self.invoice_handle = invoice.handle @invoice = invoice end |
#invoice_handle=(handle) ⇒ Object
48 49 50 51 |
# File 'lib/economic/current_invoice_line.rb', line 48 def invoice_handle=(handle) @invoice = nil unless handle == @invoice_handle @invoice_handle = handle end |