1 | <?php |
||
21 | class TimeEntry extends AbstractResource |
||
22 | { |
||
23 | |||
24 | use ViewTrait, UpdateTrait, DeleteTrait; |
||
25 | |||
26 | /** |
||
27 | * The time entries resource endpoint |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $endpoint = '/time_entries'; |
||
32 | |||
33 | /** |
||
34 | * The tickets resource endpoint |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | private $ticketsEndpoint = '/tickets'; |
||
39 | |||
40 | /** |
||
41 | * Creates the forums endpoint |
||
42 | * @param null $id |
||
43 | * @return string |
||
44 | */ |
||
45 | protected function ticketsEndpoint($id = null) |
||
49 | |||
50 | /** |
||
51 | * |
||
52 | * Create a time entry for a ticket |
||
53 | * |
||
54 | * @param int $id |
||
55 | * @param array $data |
||
56 | * @return array|null |
||
57 | * @throws \Freshdesk\Exceptions\AccessDeniedException |
||
58 | * @throws \Freshdesk\Exceptions\ApiException |
||
59 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
60 | * @throws \Freshdesk\Exceptions\ConflictingStateException |
||
61 | * @throws \Freshdesk\Exceptions\NotFoundException |
||
62 | * @throws \Freshdesk\Exceptions\RateLimitExceededException |
||
63 | * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException |
||
64 | * @throws \Freshdesk\Exceptions\MethodNotAllowedException |
||
65 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
||
66 | * @throws \Freshdesk\Exceptions\ValidationException |
||
67 | */ |
||
68 | public function create($id, array $data) |
||
72 | |||
73 | /** |
||
74 | * |
||
75 | * List time entries for a ticket |
||
76 | * |
||
77 | * @param int $id |
||
78 | * @param array|null $query |
||
79 | * @return array|null |
||
80 | * @throws \Freshdesk\Exceptions\AccessDeniedException |
||
81 | * @throws \Freshdesk\Exceptions\ApiException |
||
82 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
83 | * @throws \Freshdesk\Exceptions\ConflictingStateException |
||
84 | * @throws \Freshdesk\Exceptions\NotFoundException |
||
85 | * @throws \Freshdesk\Exceptions\RateLimitExceededException |
||
86 | * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException |
||
87 | * @throws \Freshdesk\Exceptions\MethodNotAllowedException |
||
88 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
||
89 | * @throws \Freshdesk\Exceptions\ValidationException |
||
90 | */ |
||
91 | public function all($id, array $query = null) |
||
95 | |||
96 | /** |
||
97 | * |
||
98 | * Start / stop the timer |
||
99 | * |
||
100 | * @param int $id |
||
101 | * @return array|null |
||
102 | * @throws \Freshdesk\Exceptions\AccessDeniedException |
||
103 | * @throws \Freshdesk\Exceptions\ApiException |
||
104 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
105 | * @throws \Freshdesk\Exceptions\ConflictingStateException |
||
106 | * @throws \Freshdesk\Exceptions\NotFoundException |
||
107 | * @throws \Freshdesk\Exceptions\RateLimitExceededException |
||
108 | * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException |
||
109 | * @throws \Freshdesk\Exceptions\MethodNotAllowedException |
||
110 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
||
111 | * @throws \Freshdesk\Exceptions\ValidationException |
||
112 | */ |
||
113 | public function toggle($id) |
||
117 | |||
118 | } |
||
119 |