voipms-python/voipms/api/voicemail/__init__.py
2020-03-16 22:58:09 -04:00

30 lines
838 B
Python

from voipms.api.voicemail.messages import Messages
class Voicemail():
def __init__(self, base):
self._messages = None
self.base = base
@property
def messages(self):
if self._messages is None:
self._messages = Messages(self.base)
return self._messages
def create(self, params={}):
self.method = "createVoicemail"
return self.base.request(self.method, params=params)
def delete(self, params={}):
self.method = "delVoicemail"
return self.base.request(self.method, params=params)
def fetch(self, params={}):
self.method = "getVoicemails"
return self.base.request(self.method, params=params)
def set(self, params={}):
self.method = "setVoicemail"
return self.base.request(self.method, params=params)