mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Merge branch 'master' into reinstate-new-rate-api
Conflicts: app/main/views/dashboard.py
This commit is contained in:
@@ -21,7 +21,8 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
limit_days=None,
|
||||
include_jobs=None,
|
||||
include_from_test_key=None,
|
||||
format_for_csv=None
|
||||
format_for_csv=None,
|
||||
to=None,
|
||||
):
|
||||
params = {}
|
||||
if page is not None:
|
||||
@@ -38,6 +39,8 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
params['include_from_test_key'] = include_from_test_key
|
||||
if format_for_csv is not None:
|
||||
params['format_for_csv'] = format_for_csv
|
||||
if to is not None:
|
||||
params['to'] = to
|
||||
if job_id:
|
||||
return self.get(
|
||||
url='/service/{}/job/{}/notifications'.format(service_id, job_id),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user