voipms-python/voipms/api/voicemail/__init__.py

30 lines
838 B
Python
Raw Permalink Normal View History

from voipms.api.voicemail.messages import Messages
2020-03-17 02:58:09 +00:00
2019-08-18 02:02:44 +00:00
class Voicemail():
2019-08-18 02:34:44 +00:00
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"
2020-03-17 02:58:09 +00:00
return self.base.request(self.method, params=params)