Updates to fire text integration:

- client updated to raise errors with fire text error codes/messages

New endpoint
- /notifications/sms/firetext
For delivery notifications to be sent to.
This commit is contained in:
Martyn Inglis
2016-03-10 15:40:41 +00:00
parent c580b9c084
commit 1f22f2b7cc
9 changed files with 299 additions and 5 deletions

View File

@@ -9,6 +9,24 @@ from requests import request, RequestException, HTTPError
logger = logging.getLogger(__name__)
firetext_response_status = {
'0': {
"firetext_message": 'delivered',
"success": True,
"notify_status": 'delivered'
},
'1': {
"firetext_message": 'declined',
"success": False,
"notify_status": 'failed'
},
'2': {
"firetext_message": 'Undelivered (Pending with Network)',
"success": False,
"notify_status": 'sent'
}
}
class FiretextClientException(SmsClientException):
def __init__(self, response):