-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python SDK development for tollfree verification
- Loading branch information
1 parent
489edb8
commit 8dc3abb
Showing
4 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
from ..utils.validators import * | ||
|
||
from ..base import ListResponseObject, PlivoResource, PlivoResourceInterface, ListTollfreeRequestResponseObject, \ | ||
ListSessionResponseObject | ||
from ..exceptions import * | ||
from ..utils import * | ||
|
||
|
||
class TollFreeVerificationRequest(PlivoResource): | ||
_name = 'TollFreeVerificationRequest' | ||
_identifier_string = 'uuid' | ||
|
||
def delete(self): | ||
return self.client.tollfree_verification.delete(self.uuid) | ||
|
||
def update(self, | ||
profile_uuid=None, | ||
usecase=None, | ||
usecase_summary=None, | ||
message_sample=None, | ||
optin_image_url=None, | ||
volume=None, | ||
additional_information=None, | ||
extra_data=None, | ||
optin_type=None, | ||
callback_url=None, | ||
callback_method=None): | ||
return self.client.tollfree_verification.update(self.uuid, profile_uuid=profile_uuid, usecase=usecase, | ||
usecase_summary=usecase_summary, message_sample=message_sample, | ||
optin_image_url=optin_image_url, volume=volume, | ||
additional_information=additional_information, | ||
extra_data=extra_data, optin_type=optin_type, | ||
callback_url=callback_url, callback_method=callback_method) | ||
|
||
class TollFreeVerificationRequests(PlivoResourceInterface): | ||
def __init__(self, client): | ||
self._resource_type = TollFreeVerificationRequest | ||
super(TollFreeVerificationRequests, self).__init__(client) | ||
|
||
def create(self, | ||
profile_uuid=None, | ||
usecase=None, | ||
usecase_summary=None, | ||
message_sample=None, | ||
optin_image_url=None, | ||
volume=None, | ||
number=None, | ||
additional_information=None, | ||
extra_data=None, | ||
optin_type=None, | ||
callback_url=None, | ||
callback_method=None): | ||
return self.client.request( | ||
'POST', ('TollfreeVerification',), to_param_dict(self.create, locals())) | ||
|
||
def get(self, tollfree_verification_uuid=None): | ||
return self.client.request( | ||
'GET', ('TollfreeVerification', tollfree_verification_uuid), response_type=TollFreeVerificationRequest) | ||
|
||
def list(self, | ||
number=None, | ||
status=None, | ||
profile_uuid=None, | ||
created_gt=None, | ||
created_gte=None, | ||
created_lt=None, | ||
created_lte=None, | ||
usecase=None, | ||
limit=20, | ||
offset=0): | ||
return self.client.request( | ||
'GET', ('TollfreeVerification',), to_param_dict(self.list, locals()), | ||
objects_type=TollFreeVerificationRequest, response_type=ListTollfreeRequestResponseObject, ) | ||
|
||
def update(self, tollfree_verification_uuid=None, | ||
profile_uuid=None, | ||
usecase=None, | ||
usecase_summary=None, | ||
message_sample=None, | ||
optin_image_url=None, | ||
volume=None, | ||
additional_information=None, | ||
extra_data=None, | ||
optin_type=None, | ||
callback_url=None, | ||
callback_method=None): | ||
return self.client.request( | ||
'POST', ('TollfreeVerification', tollfree_verification_uuid), to_param_dict(self.update, locals())) | ||
|
||
def delete(self, tollfree_verification_uuid): | ||
return self.client.request('DELETE', ('TollfreeVerification', tollfree_verification_uuid)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters