@@ -700,6 +700,84 @@ def delete_conversations_messaging_integrations_twitter_integration_id(self, int
700700 callback = params .get ('callback' ))
701701 return response
702702
703+ def delete_conversations_messaging_integrations_whatsapp_integration_id (self , integration_id , ** kwargs ):
704+ """
705+ Delete a WhatsApp messaging integration
706+
707+
708+ This method makes a synchronous HTTP request by default. To make an
709+ asynchronous HTTP request, please define a `callback` function
710+ to be invoked when receiving the response.
711+ >>> def callback_function(response):
712+ >>> pprint(response)
713+ >>>
714+ >>> thread = api.delete_conversations_messaging_integrations_whatsapp_integration_id(integration_id, callback=callback_function)
715+
716+ :param callback function: The callback function
717+ for asynchronous request. (optional)
718+ :param str integration_id: Integration ID (required)
719+ :return: WhatsAppIntegration
720+ If the method is called asynchronously,
721+ returns the request thread.
722+ """
723+
724+ all_params = ['integration_id' ]
725+ all_params .append ('callback' )
726+
727+ params = locals ()
728+ for key , val in iteritems (params ['kwargs' ]):
729+ if key not in all_params :
730+ raise TypeError (
731+ "Got an unexpected keyword argument '%s'"
732+ " to method delete_conversations_messaging_integrations_whatsapp_integration_id" % key
733+ )
734+ params [key ] = val
735+ del params ['kwargs' ]
736+
737+ # verify the required parameter 'integration_id' is set
738+ if ('integration_id' not in params ) or (params ['integration_id' ] is None ):
739+ raise ValueError ("Missing the required parameter `integration_id` when calling `delete_conversations_messaging_integrations_whatsapp_integration_id`" )
740+
741+
742+ resource_path = '/api/v2/conversations/messaging/integrations/whatsapp/{integrationId}' .replace ('{format}' , 'json' )
743+ path_params = {}
744+ if 'integration_id' in params :
745+ path_params ['integrationId' ] = params ['integration_id' ]
746+
747+ query_params = {}
748+
749+ header_params = {}
750+
751+ form_params = []
752+ local_var_files = {}
753+
754+ body_params = None
755+
756+ # HTTP header `Accept`
757+ header_params ['Accept' ] = self .api_client .\
758+ select_header_accept (['application/json' ])
759+ if not header_params ['Accept' ]:
760+ del header_params ['Accept' ]
761+
762+ # HTTP header `Content-Type`
763+ header_params ['Content-Type' ] = self .api_client .\
764+ select_header_content_type (['application/json' ])
765+
766+ # Authentication setting
767+ auth_settings = ['PureCloud OAuth' ]
768+
769+ response = self .api_client .call_api (resource_path , 'DELETE' ,
770+ path_params ,
771+ query_params ,
772+ header_params ,
773+ body = body_params ,
774+ post_params = form_params ,
775+ files = local_var_files ,
776+ response_type = 'WhatsAppIntegration' ,
777+ auth_settings = auth_settings ,
778+ callback = params .get ('callback' ))
779+ return response
780+
703781 def get_analytics_conversation_details (self , conversation_id , ** kwargs ):
704782 """
705783 Get a conversation by id
@@ -10159,6 +10237,84 @@ def post_conversations_messages(self, body, **kwargs):
1015910237 callback = params .get ('callback' ))
1016010238 return response
1016110239
10240+ def post_conversations_messages_agentless (self , body , ** kwargs ):
10241+ """
10242+ Send an agentless outbound message
10243+ Send an agentlesss (api participant) outbound message using a client credential grant. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will generate a new Conversation, if there is an existing active Conversation between the fromAddress and toAddress already, then this POST will fail.
10244+
10245+ This method makes a synchronous HTTP request by default. To make an
10246+ asynchronous HTTP request, please define a `callback` function
10247+ to be invoked when receiving the response.
10248+ >>> def callback_function(response):
10249+ >>> pprint(response)
10250+ >>>
10251+ >>> thread = api.post_conversations_messages_agentless(body, callback=callback_function)
10252+
10253+ :param callback function: The callback function
10254+ for asynchronous request. (optional)
10255+ :param SendAgentlessOutboundMessageRequest body: Create agentless outbound messaging request (required)
10256+ :return: SendAgentlessOutboundMessageResponse
10257+ If the method is called asynchronously,
10258+ returns the request thread.
10259+ """
10260+
10261+ all_params = ['body' ]
10262+ all_params .append ('callback' )
10263+
10264+ params = locals ()
10265+ for key , val in iteritems (params ['kwargs' ]):
10266+ if key not in all_params :
10267+ raise TypeError (
10268+ "Got an unexpected keyword argument '%s'"
10269+ " to method post_conversations_messages_agentless" % key
10270+ )
10271+ params [key ] = val
10272+ del params ['kwargs' ]
10273+
10274+ # verify the required parameter 'body' is set
10275+ if ('body' not in params ) or (params ['body' ] is None ):
10276+ raise ValueError ("Missing the required parameter `body` when calling `post_conversations_messages_agentless`" )
10277+
10278+
10279+ resource_path = '/api/v2/conversations/messages/agentless' .replace ('{format}' , 'json' )
10280+ path_params = {}
10281+
10282+ query_params = {}
10283+
10284+ header_params = {}
10285+
10286+ form_params = []
10287+ local_var_files = {}
10288+
10289+ body_params = None
10290+ if 'body' in params :
10291+ body_params = params ['body' ]
10292+
10293+ # HTTP header `Accept`
10294+ header_params ['Accept' ] = self .api_client .\
10295+ select_header_accept (['application/json' ])
10296+ if not header_params ['Accept' ]:
10297+ del header_params ['Accept' ]
10298+
10299+ # HTTP header `Content-Type`
10300+ header_params ['Content-Type' ] = self .api_client .\
10301+ select_header_content_type (['application/json' ])
10302+
10303+ # Authentication setting
10304+ auth_settings = ['PureCloud OAuth' ]
10305+
10306+ response = self .api_client .call_api (resource_path , 'POST' ,
10307+ path_params ,
10308+ query_params ,
10309+ header_params ,
10310+ body = body_params ,
10311+ post_params = form_params ,
10312+ files = local_var_files ,
10313+ response_type = 'SendAgentlessOutboundMessageResponse' ,
10314+ auth_settings = auth_settings ,
10315+ callback = params .get ('callback' ))
10316+ return response
10317+
1016210318 def post_conversations_messaging_integrations_facebook (self , body , ** kwargs ):
1016310319 """
1016410320 Create a Facebook Integration
@@ -10393,6 +10549,84 @@ def post_conversations_messaging_integrations_twitter(self, body, **kwargs):
1039310549 callback = params .get ('callback' ))
1039410550 return response
1039510551
10552+ def post_conversations_messaging_integrations_whatsapp (self , body , ** kwargs ):
10553+ """
10554+ Create a WhatsApp Integration
10555+
10556+
10557+ This method makes a synchronous HTTP request by default. To make an
10558+ asynchronous HTTP request, please define a `callback` function
10559+ to be invoked when receiving the response.
10560+ >>> def callback_function(response):
10561+ >>> pprint(response)
10562+ >>>
10563+ >>> thread = api.post_conversations_messaging_integrations_whatsapp(body, callback=callback_function)
10564+
10565+ :param callback function: The callback function
10566+ for asynchronous request. (optional)
10567+ :param WhatsAppIntegrationRequest body: WhatsAppIntegrationRequest (required)
10568+ :return: WhatsAppIntegration
10569+ If the method is called asynchronously,
10570+ returns the request thread.
10571+ """
10572+
10573+ all_params = ['body' ]
10574+ all_params .append ('callback' )
10575+
10576+ params = locals ()
10577+ for key , val in iteritems (params ['kwargs' ]):
10578+ if key not in all_params :
10579+ raise TypeError (
10580+ "Got an unexpected keyword argument '%s'"
10581+ " to method post_conversations_messaging_integrations_whatsapp" % key
10582+ )
10583+ params [key ] = val
10584+ del params ['kwargs' ]
10585+
10586+ # verify the required parameter 'body' is set
10587+ if ('body' not in params ) or (params ['body' ] is None ):
10588+ raise ValueError ("Missing the required parameter `body` when calling `post_conversations_messaging_integrations_whatsapp`" )
10589+
10590+
10591+ resource_path = '/api/v2/conversations/messaging/integrations/whatsapp' .replace ('{format}' , 'json' )
10592+ path_params = {}
10593+
10594+ query_params = {}
10595+
10596+ header_params = {}
10597+
10598+ form_params = []
10599+ local_var_files = {}
10600+
10601+ body_params = None
10602+ if 'body' in params :
10603+ body_params = params ['body' ]
10604+
10605+ # HTTP header `Accept`
10606+ header_params ['Accept' ] = self .api_client .\
10607+ select_header_accept (['application/json' ])
10608+ if not header_params ['Accept' ]:
10609+ del header_params ['Accept' ]
10610+
10611+ # HTTP header `Content-Type`
10612+ header_params ['Content-Type' ] = self .api_client .\
10613+ select_header_content_type (['application/json' ])
10614+
10615+ # Authentication setting
10616+ auth_settings = ['PureCloud OAuth' ]
10617+
10618+ response = self .api_client .call_api (resource_path , 'POST' ,
10619+ path_params ,
10620+ query_params ,
10621+ header_params ,
10622+ body = body_params ,
10623+ post_params = form_params ,
10624+ files = local_var_files ,
10625+ response_type = 'WhatsAppIntegration' ,
10626+ auth_settings = auth_settings ,
10627+ callback = params .get ('callback' ))
10628+ return response
10629+
1039610630 def put_conversation_participant_flaggedreason (self , conversation_id , participant_id , ** kwargs ):
1039710631 """
1039810632 Set flagged reason on conversation participant to indicate bad conversation quality.
0 commit comments