Class: Economic::CurrentInvoiceProxy
- Inherits:
-
EntityProxy
- Object
- EntityProxy
- Economic::CurrentInvoiceProxy
- Includes:
- FindByDateInterval
- Defined in:
- lib/economic/proxies/current_invoice_proxy.rb
Instance Attribute Summary
Attributes inherited from EntityProxy
Instance Method Summary collapse
-
#all ⇒ Object
Fetches all entities from the API.
Methods included from FindByDateInterval
Methods inherited from EntityProxy
#append, #build, entity_class, #entity_class, entity_class_name, #entity_class_name, #find, #get_data, #initialize, #session
Constructor Details
This class inherits a constructor from Economic::EntityProxy
Instance Method Details
#all ⇒ Object
Fetches all entities from the API.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/economic/proxies/current_invoice_proxy.rb', line 11 def all if owner.is_a?(Economic::Debtor) owner.get_current_invoices else response = request(:get_all) handles = response.values.flatten.collect { |handle| Entity::Handle.build(handle) } get_data_for_handles(handles) self end end |