mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
35 lines
742 B
Python
35 lines
742 B
Python
from abc import abstractmethod, abstractproperty
|
|
from typing import final
|
|
|
|
from app.clients import Client, ClientException
|
|
|
|
|
|
class SmsClientResponseException(ClientException):
|
|
"""
|
|
Base Exception for SmsClientsResponses
|
|
"""
|
|
|
|
def __init__(self, message):
|
|
self.message = message
|
|
|
|
def __str__(self):
|
|
return "Message {}".format(self.message)
|
|
|
|
|
|
class SmsClient(Client):
|
|
"""
|
|
Base Sms client for sending smss.
|
|
"""
|
|
|
|
@abstractmethod
|
|
def send_sms(self, *args, **kwargs):
|
|
raise NotImplementedError("TODO Need to implement.")
|
|
|
|
@abstractproperty
|
|
def name(self):
|
|
raise NotImplementedError("TODO Need to implement.")
|
|
|
|
@final
|
|
def get_name(self):
|
|
return self.name
|