mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Remove the abstract ClientResponses class. Refactor aws_ses not to require the class.
All three client now use a response_map for the delivery receipt processing.
This commit is contained in:
@@ -16,23 +16,3 @@ class Client(object):
|
||||
STATISTICS_REQUESTED = 'requested'
|
||||
STATISTICS_DELIVERED = 'delivered'
|
||||
STATISTICS_FAILURE = 'failure'
|
||||
|
||||
|
||||
class ClientResponse:
|
||||
def __init__(self):
|
||||
self.__response_model__ = None
|
||||
|
||||
def response_code_to_object(self, response_code):
|
||||
return self.__response_model__[response_code]
|
||||
|
||||
def response_code_to_message(self, response_code):
|
||||
return self.response_code_to_object(response_code)['message']
|
||||
|
||||
def response_code_to_notification_status(self, response_code):
|
||||
return self.response_code_to_object(response_code)['notification_status']
|
||||
|
||||
def response_code_to_notification_statistics_status(self, response_code):
|
||||
return self.response_code_to_object(response_code)['notification_statistics_status']
|
||||
|
||||
def response_code_to_notification_success(self, response_code):
|
||||
return self.response_code_to_object(response_code)['success']
|
||||
|
||||
Reference in New Issue
Block a user