Class: Bamboozled::API::Report
- Inherits:
-
Base
- Object
- Base
- Bamboozled::API::Report
show all
- Defined in:
- lib/bamboozled/api/report.rb
Instance Attribute Summary
Attributes inherited from Base
#api_key, #subdomain
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#custom(fields, format = "JSON", only_current = false) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/bamboozled/api/report.rb', line 10
def custom(fields, format = "JSON", only_current = false)
options = {
body: "<report>#{FieldCollection.wrap(fields).to_xml}</report>"
}
response = request(:post, "reports/custom?format=#{format.upcase}&onlyCurrent=#{only_current}", options)
response["employees"]
end
|
#find(number, format = "JSON", fd_param = true) ⇒ Object
5
6
7
8
|
# File 'lib/bamboozled/api/report.rb', line 5
def find(number, format = "JSON", fd_param = true)
response = request(:get, "reports/#{number}?format=#{format.upcase}&fd=#{fd_param.yesno}")
response["employees"]
end
|