@@ -370,6 +370,84 @@ def delete_externalcontacts_organization_note(self, external_organization_id, no
370370 callback = params .get ('callback' ))
371371 return response
372372
373+ def delete_externalcontacts_organization_trustor (self , external_organization_id , ** kwargs ):
374+ """
375+ Unlink the Trustor for this External Organization
376+
377+
378+ This method makes a synchronous HTTP request by default. To make an
379+ asynchronous HTTP request, please define a `callback` function
380+ to be invoked when receiving the response.
381+ >>> def callback_function(response):
382+ >>> pprint(response)
383+ >>>
384+ >>> thread = api.delete_externalcontacts_organization_trustor(external_organization_id, callback=callback_function)
385+
386+ :param callback function: The callback function
387+ for asynchronous request. (optional)
388+ :param str external_organization_id: External Organization ID (required)
389+ :return: None
390+ If the method is called asynchronously,
391+ returns the request thread.
392+ """
393+
394+ all_params = ['external_organization_id' ]
395+ all_params .append ('callback' )
396+
397+ params = locals ()
398+ for key , val in iteritems (params ['kwargs' ]):
399+ if key not in all_params :
400+ raise TypeError (
401+ "Got an unexpected keyword argument '%s'"
402+ " to method delete_externalcontacts_organization_trustor" % key
403+ )
404+ params [key ] = val
405+ del params ['kwargs' ]
406+
407+ # verify the required parameter 'external_organization_id' is set
408+ if ('external_organization_id' not in params ) or (params ['external_organization_id' ] is None ):
409+ raise ValueError ("Missing the required parameter `external_organization_id` when calling `delete_externalcontacts_organization_trustor`" )
410+
411+
412+ resource_path = '/api/v2/externalcontacts/organizations/{externalOrganizationId}/trustor' .replace ('{format}' , 'json' )
413+ path_params = {}
414+ if 'external_organization_id' in params :
415+ path_params ['externalOrganizationId' ] = params ['external_organization_id' ]
416+
417+ query_params = {}
418+
419+ header_params = {}
420+
421+ form_params = []
422+ local_var_files = {}
423+
424+ body_params = None
425+
426+ # HTTP header `Accept`
427+ header_params ['Accept' ] = self .api_client .\
428+ select_header_accept (['application/json' ])
429+ if not header_params ['Accept' ]:
430+ del header_params ['Accept' ]
431+
432+ # HTTP header `Content-Type`
433+ header_params ['Content-Type' ] = self .api_client .\
434+ select_header_content_type (['application/json' ])
435+
436+ # Authentication setting
437+ auth_settings = ['PureCloud Auth' ]
438+
439+ response = self .api_client .call_api (resource_path , 'DELETE' ,
440+ path_params ,
441+ query_params ,
442+ header_params ,
443+ body = body_params ,
444+ post_params = form_params ,
445+ files = local_var_files ,
446+ response_type = None ,
447+ auth_settings = auth_settings ,
448+ callback = params .get ('callback' ))
449+ return response
450+
373451 def delete_externalcontacts_relationship (self , relationship_id , ** kwargs ):
374452 """
375453 Delete a relationship
@@ -809,13 +887,14 @@ def get_externalcontacts_organization(self, external_organization_id, **kwargs):
809887 :param callback function: The callback function
810888 for asynchronous request. (optional)
811889 :param str external_organization_id: External Organization ID (required)
812- :param list[str] expand: which fields, if any, to expand (externalDataSources)
890+ :param str expand: which fields, if any, to expand (externalDataSources)
891+ :param bool include_trustors: (true or false) whether or not to include trustor information embedded in the externalOrganization
813892 :return: ExternalOrganization
814893 If the method is called asynchronously,
815894 returns the request thread.
816895 """
817896
818- all_params = ['external_organization_id' , 'expand' ]
897+ all_params = ['external_organization_id' , 'expand' , 'include_trustors' ]
819898 all_params .append ('callback' )
820899
821900 params = locals ()
@@ -841,6 +920,8 @@ def get_externalcontacts_organization(self, external_organization_id, **kwargs):
841920 query_params = {}
842921 if 'expand' in params :
843922 query_params ['expand' ] = params ['expand' ]
923+ if 'include_trustors' in params :
924+ query_params ['includeTrustors' ] = params ['include_trustors' ]
844925
845926 header_params = {}
846927
@@ -1253,13 +1334,14 @@ def get_externalcontacts_organizations(self, **kwargs):
12531334 :param int page_number: Page number
12541335 :param str q: Search query
12551336 :param str sort_order: Sort order
1256- :param str expand: which fields, if any, to expand
1337+ :param list[str] expand: which fields, if any, to expand
1338+ :param bool include_trustors: (true or false) whether or not to include trustor information embedded in the externalOrganization
12571339 :return: ExternalOrganizationListing
12581340 If the method is called asynchronously,
12591341 returns the request thread.
12601342 """
12611343
1262- all_params = ['page_size' , 'page_number' , 'q' , 'sort_order' , 'expand' ]
1344+ all_params = ['page_size' , 'page_number' , 'q' , 'sort_order' , 'expand' , 'include_trustors' ]
12631345 all_params .append ('callback' )
12641346
12651347 params = locals ()
@@ -1288,6 +1370,8 @@ def get_externalcontacts_organizations(self, **kwargs):
12881370 query_params ['sortOrder' ] = params ['sort_order' ]
12891371 if 'expand' in params :
12901372 query_params ['expand' ] = params ['expand' ]
1373+ if 'include_trustors' in params :
1374+ query_params ['includeTrustors' ] = params ['include_trustors' ]
12911375
12921376 header_params = {}
12931377
@@ -2287,6 +2371,90 @@ def put_externalcontacts_organization_note(self, external_organization_id, note_
22872371 callback = params .get ('callback' ))
22882372 return response
22892373
2374+ def put_externalcontacts_organization_trustor_trustor_id (self , external_organization_id , trustor_id , ** kwargs ):
2375+ """
2376+ Links a Trustor with an Extenral Organization
2377+
2378+
2379+ This method makes a synchronous HTTP request by default. To make an
2380+ asynchronous HTTP request, please define a `callback` function
2381+ to be invoked when receiving the response.
2382+ >>> def callback_function(response):
2383+ >>> pprint(response)
2384+ >>>
2385+ >>> thread = api.put_externalcontacts_organization_trustor_trustor_id(external_organization_id, trustor_id, callback=callback_function)
2386+
2387+ :param callback function: The callback function
2388+ for asynchronous request. (optional)
2389+ :param str external_organization_id: External Organization ID (required)
2390+ :param str trustor_id: Trustor ID (required)
2391+ :return: ExternalOrganization
2392+ If the method is called asynchronously,
2393+ returns the request thread.
2394+ """
2395+
2396+ all_params = ['external_organization_id' , 'trustor_id' ]
2397+ all_params .append ('callback' )
2398+
2399+ params = locals ()
2400+ for key , val in iteritems (params ['kwargs' ]):
2401+ if key not in all_params :
2402+ raise TypeError (
2403+ "Got an unexpected keyword argument '%s'"
2404+ " to method put_externalcontacts_organization_trustor_trustor_id" % key
2405+ )
2406+ params [key ] = val
2407+ del params ['kwargs' ]
2408+
2409+ # verify the required parameter 'external_organization_id' is set
2410+ if ('external_organization_id' not in params ) or (params ['external_organization_id' ] is None ):
2411+ raise ValueError ("Missing the required parameter `external_organization_id` when calling `put_externalcontacts_organization_trustor_trustor_id`" )
2412+ # verify the required parameter 'trustor_id' is set
2413+ if ('trustor_id' not in params ) or (params ['trustor_id' ] is None ):
2414+ raise ValueError ("Missing the required parameter `trustor_id` when calling `put_externalcontacts_organization_trustor_trustor_id`" )
2415+
2416+
2417+ resource_path = '/api/v2/externalcontacts/organizations/{externalOrganizationId}/trustor/{trustorId}' .replace ('{format}' , 'json' )
2418+ path_params = {}
2419+ if 'external_organization_id' in params :
2420+ path_params ['externalOrganizationId' ] = params ['external_organization_id' ]
2421+ if 'trustor_id' in params :
2422+ path_params ['trustorId' ] = params ['trustor_id' ]
2423+
2424+ query_params = {}
2425+
2426+ header_params = {}
2427+
2428+ form_params = []
2429+ local_var_files = {}
2430+
2431+ body_params = None
2432+
2433+ # HTTP header `Accept`
2434+ header_params ['Accept' ] = self .api_client .\
2435+ select_header_accept (['application/json' ])
2436+ if not header_params ['Accept' ]:
2437+ del header_params ['Accept' ]
2438+
2439+ # HTTP header `Content-Type`
2440+ header_params ['Content-Type' ] = self .api_client .\
2441+ select_header_content_type (['application/json' ])
2442+
2443+ # Authentication setting
2444+ auth_settings = ['PureCloud Auth' ]
2445+
2446+ response = self .api_client .call_api (resource_path , 'PUT' ,
2447+ path_params ,
2448+ query_params ,
2449+ header_params ,
2450+ body = body_params ,
2451+ post_params = form_params ,
2452+ files = local_var_files ,
2453+ response_type = 'ExternalOrganization' ,
2454+ auth_settings = auth_settings ,
2455+ callback = params .get ('callback' ))
2456+ return response
2457+
22902458 def put_externalcontacts_relationship (self , relationship_id , ** kwargs ):
22912459 """
22922460 Update a relationship
0 commit comments