- Implemented persist_notification and send_notification_to_queue in the process_notifications module

- Not sure I want to create a new classmethod on Notifications to create from v2 request. Will take another look at that.
This commit is contained in:
Rebecca Law
2016-10-27 17:34:54 +01:00
parent c2eecdae36
commit 6e4bad135a
6 changed files with 158 additions and 24 deletions

View File

@@ -54,3 +54,14 @@ post_sms_response = {
},
"required": ["id", "content", "uri", "template"]
}
def create_post_sms_response_from_notification(notification, content):
return {"id": notification.id,
"reference": None, # not yet implemented
"content": content,
"uri": "v2/notifications/{}".format(notification.id),
"template": {"id": notification.template_id,
"version": notification.template_version,
"uri": "v2/templates/{}".format(notification.template_id)}
}