add inbound sms api

two endpoints:
* get all inbound sms for a service (you can limit to the X most
  recent, or filter by user's phone number [which will be normalised])
* get a summary of inbound sms for a service - returns the count of
  inbound sms in the database, and the date that the most recent was
  sent
This commit is contained in:
Leo Hemsted
2017-05-31 14:49:14 +01:00
parent d89cb2c120
commit ef52337d85
9 changed files with 255 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ def register_blueprint(application):
from app.organisation.rest import organisation_blueprint
from app.dvla_organisation.rest import dvla_organisation_blueprint
from app.delivery.rest import delivery_blueprint
from app.inbound_sms.rest import inbound_sms as inbound_sms_blueprint
from app.notifications.receive_notifications import receive_notifications_blueprint
from app.notifications.notifications_ses_callback import ses_callback_blueprint
from app.notifications.notifications_sms_callback import sms_callback_blueprint
@@ -133,6 +134,9 @@ def register_blueprint(application):
delivery_blueprint.before_request(requires_admin_auth)
application.register_blueprint(delivery_blueprint)
inbound_sms_blueprint.before_request(requires_admin_auth)
application.register_blueprint(inbound_sms_blueprint)
accept_invite.before_request(requires_admin_auth)
application.register_blueprint(accept_invite, url_prefix='/invite')