mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Change organisations to email branding
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from app.notify_client import NotifyAdminAPIClient
|
||||
|
||||
|
||||
class OrganisationsClient(NotifyAdminAPIClient):
|
||||
class EmailBrandingClient(NotifyAdminAPIClient):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("a" * 73, "b")
|
||||
@@ -11,27 +11,27 @@ class OrganisationsClient(NotifyAdminAPIClient):
|
||||
self.service_id = app.config['ADMIN_CLIENT_USER_NAME']
|
||||
self.api_key = app.config['ADMIN_CLIENT_SECRET']
|
||||
|
||||
def get_organisation(self, id):
|
||||
return self.get(url='/organisation/{}'.format(id))
|
||||
def get_email_branding(self, branding_id):
|
||||
return self.get(url='/email-branding/{}'.format(branding_id))
|
||||
|
||||
def get_organisations(self):
|
||||
return self.get(url='/organisation')['organisations']
|
||||
def get_all_email_branding(self):
|
||||
return self.get(url='/email-branding')['email_branding']
|
||||
|
||||
def get_letter_organisations(self):
|
||||
def get_letter_email_branding(self):
|
||||
return self.get(url='/dvla_organisations')
|
||||
|
||||
def create_organisation(self, logo, name, colour):
|
||||
def create_email_branding(self, logo, name, colour):
|
||||
data = {
|
||||
"logo": logo,
|
||||
"name": name,
|
||||
"colour": colour
|
||||
}
|
||||
return self.post(url="/organisation", data=data)
|
||||
return self.post(url="/email-branding", data=data)
|
||||
|
||||
def update_organisation(self, org_id, logo, name, colour):
|
||||
def update_email_branding(self, branding_id, logo, name, colour):
|
||||
data = {
|
||||
"logo": logo,
|
||||
"name": name,
|
||||
"colour": colour
|
||||
}
|
||||
return self.post(url="/organisation/{}".format(org_id), data=data)
|
||||
return self.post(url="/email-branding/{}".format(branding_id), data=data)
|
||||
@@ -99,7 +99,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
'sms_sender',
|
||||
'created_by',
|
||||
'branding',
|
||||
'organisation',
|
||||
'email_branding',
|
||||
'letter_contact_block',
|
||||
'dvla_organisation',
|
||||
'permissions',
|
||||
|
||||
Reference in New Issue
Block a user