Merge branch 'master' into reinstate-new-rate-api

Conflicts:
	app/main/views/dashboard.py
This commit is contained in:
Martyn Inglis
2017-06-07 14:44:27 +01:00
44 changed files with 1079 additions and 186 deletions

View File

@@ -1,4 +1,5 @@
from __future__ import unicode_literals
from flask import url_for
from app.utils import BrowsableItem
from app.notify_client import _attach_current_user, NotifyAdminAPIClient
@@ -94,6 +95,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
'organisation',
'letter_contact_block',
'dvla_organisation',
'permissions'
}
if disallowed_attributes:
raise TypeError('Not allowed to update service attributes: {}'.format(
@@ -242,6 +244,16 @@ class ServiceAPIClient(NotifyAdminAPIClient):
params=dict(year=year)
)
def get_inbound_sms(self, service_id):
return self.get(
'/service/{}/inbound-sms'.format(service_id)
)['data']
def get_inbound_sms_summary(self, service_id):
return self.get(
'/service/{}/inbound-sms/summary'.format(service_id)
)
class ServicesBrowsableItem(BrowsableItem):
@property