Class: Versafleet::RunsheetsResource
- Defined in:
- lib/versafleet/resources/runsheets.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#drivers_tasks(driver_id:, **params) ⇒ Runsheet
View Driver Info and related Tasks.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Versafleet::Resource
Instance Method Details
#drivers_tasks(driver_id:, **params) ⇒ Runsheet
View Driver Info and related Tasks
Examples:
client.runsheets.drivers_tasks(driver_id: 1)
# filter runsheets by date
client.runsheets.drivers_tasks(driver_id: 1, date: "2021-10-14")
# filter by date and state of the tasks
client.runsheets.drivers_tasks(driver_id: 1, date: "2021-10-14", state: "successful")
18 19 20 |
# File 'lib/versafleet/resources/runsheets.rb', line 18 def drivers_tasks(driver_id:, **params) Runsheet.new get_request("runsheets/drivers/#{driver_id}", params: params).body.dig("driver") end |