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
32 33 34 |
# File 'lib/economic/current_invoice_line.rb', line 32 def handle @handle || Handle.build(:number => number) end |
#invoice ⇒ Object
36 37 38 39 |
# File 'lib/economic/current_invoice_line.rb', line 36 def invoice return nil if invoice_handle.blank? @invoice ||= session.current_invoices.find(invoice_handle) end |
#invoice=(invoice) ⇒ Object
41 42 43 44 |
# File 'lib/economic/current_invoice_line.rb', line 41 def invoice=(invoice) self.invoice_handle = invoice.handle @invoice = invoice end |
#invoice_handle=(handle) ⇒ Object
46 47 48 49 |
# File 'lib/economic/current_invoice_line.rb', line 46 def invoice_handle=(handle) @invoice = nil unless handle == @invoice_handle @invoice_handle = handle end |