Class: FreeAgent::Project

Inherits:
Base
  • Object
show all
Defined in:
lib/free_agent/project.rb

Overview

Represents a Project in FreeAgent.

Instance Method Summary collapse

Methods inherited from Base

#respond_to?

Instance Method Details

#invoices(options = {}) ⇒ Array<FreeAgent::Invoice>

Gets all the invoices associated to this project.

Examples:

Simple query

project.invoices
# => [...]

Query with custom find params

project.invoices(:params => { :foo => 'bar' }
# => [...]

Gets all the invoices for this project.

Parameters:

  • options (Hash) (defaults to: {})

    Hash of options to customize the finder behavior.

Returns:



20
21
22
23
# File 'lib/free_agent/project.rb', line 20

def invoices(*args)
  options = args.extract_options!
  Invoice.all(options.merge!(:from => "/projects/#{id}/invoices.xml"))
end