Mapped template actions to the api and mocked tests.

This commit is contained in:
Nicholas Staples
2016-01-19 15:54:12 +00:00
parent e2f5d64695
commit cfb3f96b01
13 changed files with 321 additions and 88 deletions

View File

@@ -83,6 +83,20 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
endpoint = "/service/{0}/template".format(service_id)
return self.post(endpoint, data)
def update_service_template(self, id_, name, type_, content, service_id):
"""
Update a service template.
"""
data = {
'id': id_,
'name': name,
'template_type': type_,
'content': content,
'service': service_id
}
endpoint = "/service/{0}/template/{1}".format(service_id, id_)
return self.put(endpoint, data)
def get_service_template(self, service_id, template_id, *params):
"""
Retrieve a service template.