-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
409 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any | ||
|
||
from .base_object import BaseObject | ||
|
||
|
||
class SignTemplate(BaseObject): | ||
""" | ||
Represents a Sign Template used by Box Sign | ||
""" | ||
_item_type = 'sign-template' | ||
|
||
def get_url(self, *args: Any) -> str: | ||
""" | ||
Returns the url for this sign template. | ||
""" | ||
return self._session.get_url('sign_templates', self._object_id, *args) |
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,39 @@ | ||
Sign Templates | ||
============== | ||
|
||
Sign Templates are reusable templates that can be used to create Sign Requests. For now, Sign Templates can only be created through the Box web application. | ||
|
||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
- [Get All Sign Templates](#get-all-sign-templates) | ||
- [Get Sign Template by ID](#get-sign-template-by-id) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
Get All Sign Templates | ||
---------------------- | ||
|
||
Calling the [`client.get_sign_templates()`][get-all-sign-templates] method will return an iterable that will page through all the Sign Templates. This method offers `limit` parameter. The `limit` parameter specifies the maximum number of items to be returned in a single response. | ||
|
||
<!-- sample get_sign_templates --> | ||
```python | ||
sign_templates = client.get_sign_templates() | ||
for sign_template in sign_templates: | ||
print(f'(Sign Template ID: {sign_template.id})') | ||
``` | ||
|
||
[get-all-sign-templates]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.client.html#boxsdk.client.client.Client.get_sign_templates | ||
|
||
Get Sign Template by ID | ||
----------------------- | ||
|
||
Calling the [`client.get_sign_template(template_id)`][get-sign-template] method will return a Sign Template object. | ||
|
||
<!-- sample get_sign_template --> | ||
```python | ||
sign_template = client.get_sign_template('12345') | ||
print(f'(Sign Template ID: {sign_template.id})') | ||
``` | ||
|
||
[get-sign-template]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.client.html#boxsdk.client.client.Client.get_sign_template |
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,8 @@ | ||
from boxsdk.pagination.box_object_collection import BoxObjectCollection | ||
|
||
from test.integration_new import CLIENT | ||
|
||
|
||
def test_get_sign_templates(): | ||
sign_templates = CLIENT.get_sign_templates() | ||
assert isinstance(sign_templates, BoxObjectCollection) |
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
Oops, something went wrong.