(cls, phone_number, domain=None)
return True
Opts a phone number in to receive SMS.
        Returns True if the number was actually opted-in, False if not.
Opts a phone number in to receive SMS.
        Returns True if the number was actually opted-in, False if not.
Opts a phone number in to receive SMS . Returns True if the number was actually opted - in False if not .
def opt_in_sms(cls, phone_number, domain=None):
        """
        Opts a phone number in to receive SMS.
        Returns True if the number was actually opted-in, False if not.
        """
        phone_obj = cls.get_or_create(phone_number)[0]
        if not phone_obj.can_opt_in:
            return False

        phone_obj.domain = domain
        phone_obj.send_sms = True
        phone_obj.last_sms_opt_in_timestamp = datetime.utcnow()
        phone_obj.save()
        return True
def opt_in_sms ( cls , phone_number , domain = None ) : phone_obj = cls . get_or_create ( phone_number ) [ 0 ] if not phone_obj . can_opt_in : return False phone_obj . domain = domain phone_obj . send_sms = True phone_obj . last_sms_opt_in_timestamp = datetime . utcnow ( ) phone_obj . save ( ) return True