@@ -183,4 +183,48 @@ public function createWithAttachment(array $data)
183183 {
184184 return $ this ->api ()->requestMultipart ('POST ' , $ this ->endpoint (), $ data );
185185 }
186+
187+ /**
188+ * Create a satisfaction rating
189+ *
190+ * @param int $id The ticket id
191+ * @param array $data
192+ * @return mixed|null
193+ * @throws \Freshdesk\Exceptions\AccessDeniedException
194+ * @throws \Freshdesk\Exceptions\ApiException
195+ * @throws \Freshdesk\Exceptions\AuthenticationException
196+ * @throws \Freshdesk\Exceptions\ConflictingStateException
197+ * @throws \Freshdesk\Exceptions\NotFoundException
198+ * @throws \Freshdesk\Exceptions\RateLimitExceededException
199+ * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException
200+ * @throws \Freshdesk\Exceptions\MethodNotAllowedException
201+ * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException
202+ * @throws \Freshdesk\Exceptions\ValidationException
203+ */
204+ public function survey ($ id , array $ query = null )
205+ {
206+ return $ this ->api ()->request ('POST ' , $ this ->endpoint ($ id .'/satisfaction_ratings ' ), $ query );
207+ }
208+
209+ /**
210+ * List all satisfaction ratings on ticket
211+ *
212+ * @param int $id The ticket id
213+ * @param array $data
214+ * @return mixed|null
215+ * @throws \Freshdesk\Exceptions\AccessDeniedException
216+ * @throws \Freshdesk\Exceptions\ApiException
217+ * @throws \Freshdesk\Exceptions\AuthenticationException
218+ * @throws \Freshdesk\Exceptions\ConflictingStateException
219+ * @throws \Freshdesk\Exceptions\NotFoundException
220+ * @throws \Freshdesk\Exceptions\RateLimitExceededException
221+ * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException
222+ * @throws \Freshdesk\Exceptions\MethodNotAllowedException
223+ * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException
224+ * @throws \Freshdesk\Exceptions\ValidationException
225+ */
226+ public function listSurvey ($ id , array $ query = null )
227+ {
228+ return $ this ->api ()->request ('GET ' , $ this ->endpoint ($ id .'/satisfaction_ratings ' ), $ query );
229+ }
186230}
0 commit comments