class Bamboozled::API::Report

Public Instance Methods

custom(fields, format = "JSON", only_current = false) click to toggle source
# 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) click to toggle source
# 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