mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Add multiple letter contact blocks for services from Admin app
This commit is contained in:
@@ -318,6 +318,42 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
}
|
||||
)
|
||||
|
||||
def get_letter_contacts(self, service_id):
|
||||
return self.get(
|
||||
"/service/{}/letter-contact".format(
|
||||
service_id
|
||||
)
|
||||
)
|
||||
|
||||
def get_letter_contact(self, service_id, letter_contact_id):
|
||||
return self.get(
|
||||
"/service/{}/letter-contact/{}".format(
|
||||
service_id,
|
||||
letter_contact_id
|
||||
)
|
||||
)
|
||||
|
||||
def add_letter_contact(self, service_id, contact_block, is_default=False):
|
||||
return self.post(
|
||||
"/service/{}/letter-contact".format(service_id),
|
||||
data={
|
||||
"contact_block": contact_block,
|
||||
"is_default": is_default
|
||||
}
|
||||
)
|
||||
|
||||
def update_letter_contact(self, service_id, letter_contact_id, contact_block, is_default=False):
|
||||
return self.post(
|
||||
"/service/{}/letter-contact/{}".format(
|
||||
service_id,
|
||||
letter_contact_id,
|
||||
),
|
||||
data={
|
||||
"contact_block": contact_block,
|
||||
"is_default": is_default
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class ServicesBrowsableItem(BrowsableItem):
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user