Skip to content
Browse files

Documents invoice#all options

  • Loading branch information...
1 parent 8e83564 commit dedf7d0a51d7297423f656e623fa041d8cab4a4b @zmoazeni committed Oct 23, 2012
Showing with 15 additions and 0 deletions.
  1. +2 −0 Gemfile
  2. +13 −0 lib/harvest/api/invoices.rb
View
2 Gemfile
@@ -3,6 +3,8 @@ source :rubygems
gem 'httparty'
gem 'hashie', '~> 1'
gem 'json'
+gem 'yard'
+gem 'redcarpet'
group :development, :test do
gem 'rspec', '~> 2'
View
13 lib/harvest/api/invoices.rb
@@ -4,6 +4,19 @@ class Invoices < Base
api_model Harvest::Invoice
include Harvest::Behavior::Crud
+ # == Retrieves invoices
+ #
+ # == Available options
+ # - :status - invoices by status
+ # - :page
+ # - :updated_since
+ # - :timeframe (must be a nested hash with :to and :from)
+ #
+ # @overload all()
+ # @overload all(options)
+ # @param [Hash] filtering options
+ #
+ # @return [Array<Harvest::Invoice>] an array of invoices
def all(options = {})
query = {}
query[:status] = options[:status] if options[:status]

0 comments on commit dedf7d0

Please sign in to comment.
Something went wrong with that request. Please try again.