mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-20 18:34:34 -05:00
Add get and update service inbound api
This commit is contained in:
@@ -266,13 +266,21 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
'/service/{}/inbound-sms/summary'.format(service_id)
|
||||
)
|
||||
|
||||
def update_service_inbound_api(self, service_id, url, bearer_token, user_id):
|
||||
def update_service_inbound_api(self, service_id, url, bearer_token, user_id, inbound_api_id):
|
||||
data = {
|
||||
"url":url,
|
||||
"url": url,
|
||||
"bearer_token": bearer_token,
|
||||
"updated_by_id": user_id
|
||||
}
|
||||
return self.post("/service/{}/inbound-api".format(service_id), data)
|
||||
update_inbound_api_path = '/{}'.format(inbound_api_id) if inbound_api_id else ''
|
||||
return self.post("/service/{}/inbound-api{}".format(service_id, update_inbound_api_path), data)
|
||||
|
||||
def get_service_inbound_api(self, service_id, inbound_sms_api_id):
|
||||
return self.get(
|
||||
"/service/{}/inbound-api/{}".format(
|
||||
service_id, inbound_sms_api_id
|
||||
)
|
||||
)['data']
|
||||
|
||||
|
||||
class ServicesBrowsableItem(BrowsableItem):
|
||||
|
||||
Reference in New Issue
Block a user