@@ -280,6 +280,96 @@ def delete_analytics_users_details_job(self, job_id, **kwargs):
280280 callback = params .get ('callback' ))
281281 return response
282282
283+ def get_analytics_botflow_reportingturns (self , bot_flow_id , ** kwargs ):
284+ """
285+ Get Reporting Turns.
286+
287+
288+ This method makes a synchronous HTTP request by default. To make an
289+ asynchronous HTTP request, please define a `callback` function
290+ to be invoked when receiving the response.
291+ >>> def callback_function(response):
292+ >>> pprint(response)
293+ >>>
294+ >>> thread = api.get_analytics_botflow_reportingturns(bot_flow_id, callback=callback_function)
295+
296+ :param callback function: The callback function
297+ for asynchronous request. (optional)
298+ :param str bot_flow_id: ID of the bot flow. (required)
299+ :param str after: The cursor that points to the ID of the last item in the list of entities that has been returned.
300+ :param str page_size: Max number of entities to return. Maximum of 250
301+ :param str action_id: Optional action ID to get the reporting turns associated to a particular flow action
302+ :param str session_id: Optional session ID to get the reporting turns for a particular session
303+ :return: ReportingTurnsResponse
304+ If the method is called asynchronously,
305+ returns the request thread.
306+ """
307+
308+ all_params = ['bot_flow_id' , 'after' , 'page_size' , 'action_id' , 'session_id' ]
309+ all_params .append ('callback' )
310+
311+ params = locals ()
312+ for key , val in iteritems (params ['kwargs' ]):
313+ if key not in all_params :
314+ raise TypeError (
315+ "Got an unexpected keyword argument '%s'"
316+ " to method get_analytics_botflow_reportingturns" % key
317+ )
318+ params [key ] = val
319+ del params ['kwargs' ]
320+
321+ # verify the required parameter 'bot_flow_id' is set
322+ if ('bot_flow_id' not in params ) or (params ['bot_flow_id' ] is None ):
323+ raise ValueError ("Missing the required parameter `bot_flow_id` when calling `get_analytics_botflow_reportingturns`" )
324+
325+
326+ resource_path = '/api/v2/analytics/botflows/{botFlowId}/reportingturns' .replace ('{format}' , 'json' )
327+ path_params = {}
328+ if 'bot_flow_id' in params :
329+ path_params ['botFlowId' ] = params ['bot_flow_id' ]
330+
331+ query_params = {}
332+ if 'after' in params :
333+ query_params ['after' ] = params ['after' ]
334+ if 'page_size' in params :
335+ query_params ['pageSize' ] = params ['page_size' ]
336+ if 'action_id' in params :
337+ query_params ['actionId' ] = params ['action_id' ]
338+ if 'session_id' in params :
339+ query_params ['sessionId' ] = params ['session_id' ]
340+
341+ header_params = {}
342+
343+ form_params = []
344+ local_var_files = {}
345+
346+ body_params = None
347+
348+ # HTTP header `Accept`
349+ header_params ['Accept' ] = self .api_client .\
350+ select_header_accept (['application/json' ])
351+ if not header_params ['Accept' ]:
352+ del header_params ['Accept' ]
353+
354+ # HTTP header `Content-Type`
355+ header_params ['Content-Type' ] = self .api_client .\
356+ select_header_content_type (['application/json' ])
357+
358+ # Authentication setting
359+ auth_settings = ['PureCloud OAuth' ]
360+
361+ response = self .api_client .call_api (resource_path , 'GET' ,
362+ path_params ,
363+ query_params ,
364+ header_params ,
365+ body = body_params ,
366+ post_params = form_params ,
367+ files = local_var_files ,
368+ response_type = 'ReportingTurnsResponse' ,
369+ auth_settings = auth_settings ,
370+ callback = params .get ('callback' ))
371+ return response
372+
283373 def get_analytics_conversation_details (self , conversation_id , ** kwargs ):
284374 """
285375 Get a conversation by id
0 commit comments