mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
initial sms provider cleanup
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from celery import current_app
|
||||
|
||||
class ClientException(Exception):
|
||||
'''
|
||||
Base Exceptions for sending notifications that fail
|
||||
@@ -36,7 +38,7 @@ class NotificationProviderClients(object):
|
||||
|
||||
def get_client_by_name_and_type(self, name, notification_type):
|
||||
assert notification_type in ['email', 'sms']
|
||||
|
||||
|
||||
if notification_type == 'email':
|
||||
return self.get_email_client(name)
|
||||
|
||||
|
||||
@@ -20,11 +20,14 @@ class AwsSnsClient(SmsClient):
|
||||
self.current_app = current_app
|
||||
self.statsd_client = statsd_client
|
||||
self.long_code_regex = re.compile(r"^\+1\d{10}$")
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return 'sns'
|
||||
|
||||
def get_name(self):
|
||||
return 'sns'
|
||||
|
||||
def send_sms(self, to, content, reference, sender=None, international=False):
|
||||
matched = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user