Files
notifications-api/app/clients/sms/__init__.py

35 lines
734 B
Python
Raw Normal View History

from abc import abstractmethod, abstractproperty
from typing import final
2021-03-10 13:55:06 +00:00
from app.clients import Client, ClientException
class SmsClientResponseException(ClientException):
2022-06-17 11:16:23 -07:00
"""
Base Exception for SmsClientsResponses
2022-06-17 11:16:23 -07:00
"""
def __init__(self, message):
self.message = message
def __str__(self):
return f"Message {self.message}"
class SmsClient(Client):
2022-06-17 11:16:23 -07:00
"""
Base Sms client for sending smss.
2022-06-17 11:16:23 -07:00
"""
@abstractmethod
def send_sms(self, *args, **kwargs):
raise NotImplementedError("TODO Need to implement.")
@abstractproperty
def name(self):
2022-06-17 11:16:23 -07:00
raise NotImplementedError("TODO Need to implement.")
@final
2022-06-17 11:16:23 -07:00
def get_name(self):
return self.name