#NEWLINE# def save_verified_number( self , domain , phone_number , verified , backend_id = None , ivr_backend_id = None , only_one_number_allowed = False ) : #NEWLINE# #INDENT# "\n        Saves the given phone number as this contact's verified phone number.\n\n        backend_id - the name of an SMSBackend to use when sending SMS to\n            this number; if specified, this will override any project or\n            global settings for which backend will be used to send sms to\n            this number\n\n        return  The VerifiedNumber\n        raises  InvalidFormatException if the phone number format is invalid\n        raises  PhoneNumberInUseException if the phone number is already in use by another contact\n        " #NEWLINE# phone_number = apply_leniency ( phone_number ) #NEWLINE# self . verify_unique_number ( phone_number ) #NEWLINE# if only_one_number_allowed : #NEWLINE# #INDENT# v = self . get_verified_number ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# v = self . get_verified_number ( phone_number ) #NEWLINE# #UNINDENT# if ( v is None ) : #NEWLINE# #INDENT# v = VerifiedNumber ( owner_doc_type = self . doc_type , owner_id = self . get_id ) #NEWLINE# #UNINDENT# v . domain = domain #NEWLINE# v . phone_number = phone_number #NEWLINE# v . verified = verified #NEWLINE# v . backend_id = backend_id #NEWLINE# v . ivr_backend_id = phone_number #NEWLINE# v . save ( ** get_safe_write_kwargs ( ) ) #NEWLINE# return v