@@ -1061,6 +1061,7 @@ def update_email(
10611061 login_id : str ,
10621062 email : Optional [str ] = None ,
10631063 verified : Optional [bool ] = None ,
1064+ fail_on_conflict : Optional [bool ] = None ,
10641065 ) -> dict :
10651066 """
10661067 Update the email address for an existing user.
@@ -1069,6 +1070,7 @@ def update_email(
10691070 login_id (str): The login ID of the user to update the email for.
10701071 email (str): The user email address. Leave empty to remove.
10711072 verified (bool): Set to true for the user to be able to login with the email address.
1073+ fail_on_conflict (bool): Set to true to raise an error if the email is used as a login id and already exists.
10721074
10731075 Return value (dict):
10741076 Return dict in the format
@@ -1080,7 +1082,7 @@ def update_email(
10801082 """
10811083 response = self ._http .post (
10821084 MgmtV1 .user_update_email_path ,
1083- body = {"loginId" : login_id , "email" : email , "verified" : verified },
1085+ body = {"loginId" : login_id , "email" : email , "verified" : verified , "failOnConflict" : fail_on_conflict },
10841086 )
10851087 return response .json ()
10861088
@@ -1089,6 +1091,7 @@ def update_phone(
10891091 login_id : str ,
10901092 phone : Optional [str ] = None ,
10911093 verified : Optional [bool ] = None ,
1094+ fail_on_conflict : Optional [bool ] = None ,
10921095 ) -> dict :
10931096 """
10941097 Update the phone number for an existing user.
@@ -1097,6 +1100,7 @@ def update_phone(
10971100 login_id (str): The login ID of the user to update the phone for.
10981101 phone (str): The user phone number. Leave empty to remove.
10991102 verified (bool): Set to true for the user to be able to login with the phone number.
1103+ fail_on_conflict (bool): Set to true to raise an error if the phone is used as a login id and already exists.
11001104
11011105 Return value (dict):
11021106 Return dict in the format
@@ -1108,7 +1112,7 @@ def update_phone(
11081112 """
11091113 response = self ._http .post (
11101114 MgmtV1 .user_update_phone_path ,
1111- body = {"loginId" : login_id , "phone" : phone , "verified" : verified },
1115+ body = {"loginId" : login_id , "phone" : phone , "verified" : verified , "failOnConflict" : fail_on_conflict },
11121116 )
11131117 return response .json ()
11141118
0 commit comments