| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WebService::Toggl::API::Task; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 1072 | use WebService::Toggl::Role::Item as => 'JsonItem'; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 1 |  |  | 1 |  | 34 | use Moo; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 4 |  | 
| 6 |  |  |  |  |  |  | with 'WebService::Toggl::Role::API'; | 
| 7 | 1 |  |  | 1 |  | 313 | use namespace::clean; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 4 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | with JsonItem( | 
| 10 |  |  |  |  |  |  | bools      => [ qw(active) ], | 
| 11 |  |  |  |  |  |  | strings    => [ qw(name)   ], | 
| 12 |  |  |  |  |  |  | integers   => [ qw(pid wid uid estimated_seconds tracked_seconds) ], | 
| 13 |  |  |  |  |  |  | timestamps => [ qw(at)     ], | 
| 14 |  |  |  |  |  |  | floats     => [ qw()       ], | 
| 15 |  |  |  |  |  |  | ); | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 0 |  |  | 0 |  |  | sub api_path { 'tasks' } | 
| 19 | 0 |  |  | 0 |  |  | sub api_id   { shift->id } | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | 1; | 
| 24 |  |  |  |  |  |  | __END__ | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | Tasks are available only for pro workspaces. | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | Task has the following properties | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | name: The name of the task (string, required, unique in project) | 
| 32 |  |  |  |  |  |  | pid: project ID for the task (integer, required) | 
| 33 |  |  |  |  |  |  | wid: workspace ID, where the task will be saved (integer, project's workspace id is used when not supplied) | 
| 34 |  |  |  |  |  |  | uid: user ID, to whom the task is assigned to (integer, not required) | 
| 35 |  |  |  |  |  |  | estimated_seconds: estimated duration of task in seconds (integer, not required) | 
| 36 |  |  |  |  |  |  | active: whether the task is done or not (boolean, by default true) | 
| 37 |  |  |  |  |  |  | at: timestamp that is sent in the response for PUT, indicates the time task was last updated | 
| 38 |  |  |  |  |  |  | tracked_seconds: total time tracked (in seconds) for the task | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | Workspace id (wid) and project id (pid) can't be changed on update. |