@@ -6118,6 +6118,90 @@ def post_conversations_cobrowsesession_participant_replace(self, conversation_id
61186118 callback = params .get ('callback' ))
61196119 return response
61206120
6121+ def post_conversations_email_inboundmessages (self , conversation_id , body , ** kwargs ):
6122+ """
6123+ Send an email to an external conversation. An external conversation is one where the provider is not PureCloud based.This endpoint allows the sender of the external email to reply or send a new message to the existing conversation. The new message will be treated as part of the existing conversation and chained to it.
6124+
6125+
6126+ This method makes a synchronous HTTP request by default. To make an
6127+ asynchronous HTTP request, please define a `callback` function
6128+ to be invoked when receiving the response.
6129+ >>> def callback_function(response):
6130+ >>> pprint(response)
6131+ >>>
6132+ >>> thread = api.post_conversations_email_inboundmessages(conversation_id, body, callback=callback_function)
6133+
6134+ :param callback function: The callback function
6135+ for asynchronous request. (optional)
6136+ :param str conversation_id: conversationId (required)
6137+ :param InboundMessageRequest body: Send external email reply (required)
6138+ :return: EmailConversation
6139+ If the method is called asynchronously,
6140+ returns the request thread.
6141+ """
6142+
6143+ all_params = ['conversation_id' , 'body' ]
6144+ all_params .append ('callback' )
6145+
6146+ params = locals ()
6147+ for key , val in iteritems (params ['kwargs' ]):
6148+ if key not in all_params :
6149+ raise TypeError (
6150+ "Got an unexpected keyword argument '%s'"
6151+ " to method post_conversations_email_inboundmessages" % key
6152+ )
6153+ params [key ] = val
6154+ del params ['kwargs' ]
6155+
6156+ # verify the required parameter 'conversation_id' is set
6157+ if ('conversation_id' not in params ) or (params ['conversation_id' ] is None ):
6158+ raise ValueError ("Missing the required parameter `conversation_id` when calling `post_conversations_email_inboundmessages`" )
6159+ # verify the required parameter 'body' is set
6160+ if ('body' not in params ) or (params ['body' ] is None ):
6161+ raise ValueError ("Missing the required parameter `body` when calling `post_conversations_email_inboundmessages`" )
6162+
6163+
6164+ resource_path = '/api/v2/conversations/emails/{conversationId}/inboundmessages' .replace ('{format}' , 'json' )
6165+ path_params = {}
6166+ if 'conversation_id' in params :
6167+ path_params ['conversationId' ] = params ['conversation_id' ]
6168+
6169+ query_params = {}
6170+
6171+ header_params = {}
6172+
6173+ form_params = []
6174+ local_var_files = {}
6175+
6176+ body_params = None
6177+ if 'body' in params :
6178+ body_params = params ['body' ]
6179+
6180+ # HTTP header `Accept`
6181+ header_params ['Accept' ] = self .api_client .\
6182+ select_header_accept (['application/json' ])
6183+ if not header_params ['Accept' ]:
6184+ del header_params ['Accept' ]
6185+
6186+ # HTTP header `Content-Type`
6187+ header_params ['Content-Type' ] = self .api_client .\
6188+ select_header_content_type (['application/json' ])
6189+
6190+ # Authentication setting
6191+ auth_settings = ['PureCloud Auth' ]
6192+
6193+ response = self .api_client .call_api (resource_path , 'POST' ,
6194+ path_params ,
6195+ query_params ,
6196+ header_params ,
6197+ body = body_params ,
6198+ post_params = form_params ,
6199+ files = local_var_files ,
6200+ response_type = 'EmailConversation' ,
6201+ auth_settings = auth_settings ,
6202+ callback = params .get ('callback' ))
6203+ return response
6204+
61216205 def post_conversations_email_messages (self , conversation_id , body , ** kwargs ):
61226206 """
61236207 Send an email reply
0 commit comments