@@ -2830,6 +2830,90 @@ def post_user_invite(self, user_id, **kwargs):
28302830 callback = params .get ('callback' ))
28312831 return response
28322832
2833+ def post_user_password (self , user_id , body , ** kwargs ):
2834+ """
2835+ Change a users password
2836+
2837+
2838+ This method makes a synchronous HTTP request by default. To make an
2839+ asynchronous HTTP request, please define a `callback` function
2840+ to be invoked when receiving the response.
2841+ >>> def callback_function(response):
2842+ >>> pprint(response)
2843+ >>>
2844+ >>> thread = api.post_user_password(user_id, body, callback=callback_function)
2845+
2846+ :param callback function: The callback function
2847+ for asynchronous request. (optional)
2848+ :param str user_id: User ID (required)
2849+ :param ChangePasswordRequest body: Password (required)
2850+ :return: None
2851+ If the method is called asynchronously,
2852+ returns the request thread.
2853+ """
2854+
2855+ all_params = ['user_id' , 'body' ]
2856+ all_params .append ('callback' )
2857+
2858+ params = locals ()
2859+ for key , val in iteritems (params ['kwargs' ]):
2860+ if key not in all_params :
2861+ raise TypeError (
2862+ "Got an unexpected keyword argument '%s'"
2863+ " to method post_user_password" % key
2864+ )
2865+ params [key ] = val
2866+ del params ['kwargs' ]
2867+
2868+ # verify the required parameter 'user_id' is set
2869+ if ('user_id' not in params ) or (params ['user_id' ] is None ):
2870+ raise ValueError ("Missing the required parameter `user_id` when calling `post_user_password`" )
2871+ # verify the required parameter 'body' is set
2872+ if ('body' not in params ) or (params ['body' ] is None ):
2873+ raise ValueError ("Missing the required parameter `body` when calling `post_user_password`" )
2874+
2875+
2876+ resource_path = '/api/v2/users/{userId}/password' .replace ('{format}' , 'json' )
2877+ path_params = {}
2878+ if 'user_id' in params :
2879+ path_params ['userId' ] = params ['user_id' ]
2880+
2881+ query_params = {}
2882+
2883+ header_params = {}
2884+
2885+ form_params = []
2886+ local_var_files = {}
2887+
2888+ body_params = None
2889+ if 'body' in params :
2890+ body_params = params ['body' ]
2891+
2892+ # HTTP header `Accept`
2893+ header_params ['Accept' ] = self .api_client .\
2894+ select_header_accept (['application/json' ])
2895+ if not header_params ['Accept' ]:
2896+ del header_params ['Accept' ]
2897+
2898+ # HTTP header `Content-Type`
2899+ header_params ['Content-Type' ] = self .api_client .\
2900+ select_header_content_type (['application/json' ])
2901+
2902+ # Authentication setting
2903+ auth_settings = ['PureCloud Auth' ]
2904+
2905+ response = self .api_client .call_api (resource_path , 'POST' ,
2906+ path_params ,
2907+ query_params ,
2908+ header_params ,
2909+ body = body_params ,
2910+ post_params = form_params ,
2911+ files = local_var_files ,
2912+ response_type = None ,
2913+ auth_settings = auth_settings ,
2914+ callback = params .get ('callback' ))
2915+ return response
2916+
28332917 def post_user_routingskills (self , user_id , body , ** kwargs ):
28342918 """
28352919 Add routing skill to user
@@ -2992,6 +3076,84 @@ def post_users(self, body, **kwargs):
29923076 callback = params .get ('callback' ))
29933077 return response
29943078
3079+ def post_users_me_password (self , body , ** kwargs ):
3080+ """
3081+ Change your password
3082+
3083+
3084+ This method makes a synchronous HTTP request by default. To make an
3085+ asynchronous HTTP request, please define a `callback` function
3086+ to be invoked when receiving the response.
3087+ >>> def callback_function(response):
3088+ >>> pprint(response)
3089+ >>>
3090+ >>> thread = api.post_users_me_password(body, callback=callback_function)
3091+
3092+ :param callback function: The callback function
3093+ for asynchronous request. (optional)
3094+ :param ChangeMyPasswordRequest body: Password (required)
3095+ :return: None
3096+ If the method is called asynchronously,
3097+ returns the request thread.
3098+ """
3099+
3100+ all_params = ['body' ]
3101+ all_params .append ('callback' )
3102+
3103+ params = locals ()
3104+ for key , val in iteritems (params ['kwargs' ]):
3105+ if key not in all_params :
3106+ raise TypeError (
3107+ "Got an unexpected keyword argument '%s'"
3108+ " to method post_users_me_password" % key
3109+ )
3110+ params [key ] = val
3111+ del params ['kwargs' ]
3112+
3113+ # verify the required parameter 'body' is set
3114+ if ('body' not in params ) or (params ['body' ] is None ):
3115+ raise ValueError ("Missing the required parameter `body` when calling `post_users_me_password`" )
3116+
3117+
3118+ resource_path = '/api/v2/users/me/password' .replace ('{format}' , 'json' )
3119+ path_params = {}
3120+
3121+ query_params = {}
3122+
3123+ header_params = {}
3124+
3125+ form_params = []
3126+ local_var_files = {}
3127+
3128+ body_params = None
3129+ if 'body' in params :
3130+ body_params = params ['body' ]
3131+
3132+ # HTTP header `Accept`
3133+ header_params ['Accept' ] = self .api_client .\
3134+ select_header_accept (['application/json' ])
3135+ if not header_params ['Accept' ]:
3136+ del header_params ['Accept' ]
3137+
3138+ # HTTP header `Content-Type`
3139+ header_params ['Content-Type' ] = self .api_client .\
3140+ select_header_content_type (['application/json' ])
3141+
3142+ # Authentication setting
3143+ auth_settings = ['PureCloud Auth' ]
3144+
3145+ response = self .api_client .call_api (resource_path , 'POST' ,
3146+ path_params ,
3147+ query_params ,
3148+ header_params ,
3149+ body = body_params ,
3150+ post_params = form_params ,
3151+ files = local_var_files ,
3152+ response_type = None ,
3153+ auth_settings = auth_settings ,
3154+ callback = params .get ('callback' ))
3155+ return response
3156+
29953157 def post_users_search (self , body , ** kwargs ):
29963158 """
29973159 Search users
0 commit comments