mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 05:31:44 -04:00
Add form to set service broadcast account type
Note, no option at the moment to set the service broadcast account type as None, or back to without the broadcast permission. This has been done for speed of development given the chance of us needing this is very low. We can add it later if we need to.
This commit is contained in:
@@ -616,5 +616,22 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
def get_returned_letters(self, service_id, reported_at):
|
||||
return self.get("service/{}/returned-letters?reported_at={}".format(service_id, reported_at))
|
||||
|
||||
@cache.delete('service-{service_id}')
|
||||
def set_service_broadcast_settings(
|
||||
self, service_id, service_mode, broadcast_channel, provider_restriction
|
||||
):
|
||||
"""
|
||||
service_mode is one of "training" or "live"
|
||||
broadcast channel is one of "test" or "severe"
|
||||
provider_restriction is one of None, "three", "o2", "vodafone", "ee"
|
||||
"""
|
||||
data = {
|
||||
"service_mode": service_mode,
|
||||
"broadcast_channel": broadcast_channel,
|
||||
"provider_restriction": provider_restriction
|
||||
}
|
||||
|
||||
return self.post("/service/{}/set-as-broadcast-service".format(service_id), data)
|
||||
|
||||
|
||||
service_api_client = ServiceAPIClient()
|
||||
|
||||
Reference in New Issue
Block a user