Class: Paymo::Reports

Inherits:
Object
  • Object
show all
Defined in:
lib/paymo/resources/reports.rb

Instance Method Summary collapse

Instance Method Details

#create(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/paymo/resources/reports.rb', line 4

def create(options = {})
  if options[:start]
    options[:start] = options[:start].strftime('%Y-%m-%d')
  end
  if options[:end]
    options[:end] = options[:end].strftime('%Y-%m-%d')
  end
  result = Paymo::API.post :reports, :create, options
  if result['status'] == 'ok'
    result
  end
end