Files
notifications-admin/app/notify_client/inbound_number_client.py
Chris Hill-Scott 9e798506c5 Initialise clients outside the app
This avoids the annoying problem where you can’t import a client unless
the app has already been initialised.
2018-10-30 14:59:24 +00:00

20 lines
552 B
Python

from app.notify_client import NotifyAdminAPIClient
class InboundNumberClient(NotifyAdminAPIClient):
def __init__(self):
super().__init__("a" * 73, "b")
def get_available_inbound_sms_numbers(self):
return self.get(url='/inbound-number/available')
def get_all_inbound_sms_number_service(self):
return self.get('/inbound-number')
def get_inbound_sms_number_for_service(self, service_id):
return self.get('/inbound-number/service/{}'.format(service_id))
inbound_number_client = InboundNumberClient()