diff --git a/.gitignore b/.gitignore index 6c475db..a655050 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] +*$py.class # C extensions *.so @@ -13,9 +14,8 @@ develop-eggs/ dist/ downloads/ eggs/ +.eggs/ lib/ -bin/ -include/ lib64/ parts/ sdist/ @@ -38,9 +38,14 @@ pip-delete-this-directory.txt htmlcov/ .tox/ .coverage +.coverage.* .cache nosetests.xml coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version # Translations *.mo @@ -54,3 +59,6 @@ docs/_build/ # PyBuilder target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..a625450 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.3.1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..86211e2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/README b/README deleted file mode 100644 index 8390967..0000000 --- a/README +++ /dev/null @@ -1,4 +0,0 @@ -signrequest-python-client -========================= - -**WARNING:** Not officially supported, use at your own risk. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3bc5da6 --- /dev/null +++ b/README.md @@ -0,0 +1,165 @@ +# SignRequest API Client +API for SignRequest.com + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +```sh +pip install signrequest-python-client +``` +(you may need to run `pip` with root permission: `sudo pip install signrequest_python_client`) + +Then import the package: +```python +import signrequest_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import signrequest_client +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +signrequest_client.configuration = signrequest_client.Configuration() +signrequest_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY' +signrequest_client.configuration.api_key_prefix['Authorization'] = 'Token' +# create an instance of the API class +api_instance = signrequest_client.DocumentsApi() +data = signrequest_client.Document( + file_from_url='https://docs.google.com/document/d/1oI2R1SxfMNZXiz3jCQvorpoklF9xq_dCJnOpkI-zo80/edit?usp=sharing' +) + + +try: + # Create a Document + api_response = api_instance.documents_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentsApi->documents_create: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://signrequest.com/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ApiTokensApi* | [**api_tokens_create**](docs/ApiTokensApi.md#api_tokens_create) | **POST** /api-tokens/ | Create an API token +*ApiTokensApi* | [**api_tokens_delete**](docs/ApiTokensApi.md#api_tokens_delete) | **DELETE** /api-tokens/{key}/ | Delete an API token +*ApiTokensApi* | [**api_tokens_list**](docs/ApiTokensApi.md#api_tokens_list) | **GET** /api-tokens/ | Retrieve a list of API tokens +*ApiTokensApi* | [**api_tokens_read**](docs/ApiTokensApi.md#api_tokens_read) | **GET** /api-tokens/{key}/ | Retrieve an API token +*DocumentAttachmentsApi* | [**document_attachments_create**](docs/DocumentAttachmentsApi.md#document_attachments_create) | **POST** /document-attachments/ | Create a Document Attachment +*DocumentAttachmentsApi* | [**document_attachments_list**](docs/DocumentAttachmentsApi.md#document_attachments_list) | **GET** /document-attachments/ | Retrieve a list of Document Attachments +*DocumentAttachmentsApi* | [**document_attachments_read**](docs/DocumentAttachmentsApi.md#document_attachments_read) | **GET** /document-attachments/{uuid}/ | Retrieve a Document Attachment +*DocumentsApi* | [**documents_create**](docs/DocumentsApi.md#documents_create) | **POST** /documents/ | Create a Document +*DocumentsApi* | [**documents_delete**](docs/DocumentsApi.md#documents_delete) | **DELETE** /documents/{uuid}/ | Delete a Document +*DocumentsApi* | [**documents_list**](docs/DocumentsApi.md#documents_list) | **GET** /documents/ | Retrieve a list of Documents +*DocumentsApi* | [**documents_read**](docs/DocumentsApi.md#documents_read) | **GET** /documents/{uuid}/ | Retrieve a Document +*DocumentsSearchApi* | [**documents_search_list**](docs/DocumentsSearchApi.md#documents_search_list) | **GET** /documents-search/ | Search documents +*EventsApi* | [**events_list**](docs/EventsApi.md#events_list) | **GET** /events/ | Retrieve a list of Events +*EventsApi* | [**events_read**](docs/EventsApi.md#events_read) | **GET** /events/{id}/ | Retrieve an Event +*SignrequestQuickCreateApi* | [**signrequest_quick_create_create**](docs/SignrequestQuickCreateApi.md#signrequest_quick_create_create) | **POST** /signrequest-quick-create/ | Quick create a SignRequest +*SignrequestsApi* | [**signrequests_cancel_signrequest**](docs/SignrequestsApi.md#signrequests_cancel_signrequest) | **POST** /signrequests/{uuid}/cancel_signrequest/ | Cancel a SignRequest +*SignrequestsApi* | [**signrequests_create**](docs/SignrequestsApi.md#signrequests_create) | **POST** /signrequests/ | Create a SignRequest +*SignrequestsApi* | [**signrequests_list**](docs/SignrequestsApi.md#signrequests_list) | **GET** /signrequests/ | Retrieve a list of SignRequests +*SignrequestsApi* | [**signrequests_read**](docs/SignrequestsApi.md#signrequests_read) | **GET** /signrequests/{uuid}/ | Retrieve a SignRequest +*SignrequestsApi* | [**signrequests_resend_signrequest_email**](docs/SignrequestsApi.md#signrequests_resend_signrequest_email) | **POST** /signrequests/{uuid}/resend_signrequest_email/ | Resend a SignRequest +*TeamMembersApi* | [**team_members_list**](docs/TeamMembersApi.md#team_members_list) | **GET** /team-members/ | Retrieve a list of Team Members +*TeamMembersApi* | [**team_members_read**](docs/TeamMembersApi.md#team_members_read) | **GET** /team-members/{uuid}/ | Retrieve a Team Member +*TeamsApi* | [**teams_create**](docs/TeamsApi.md#teams_create) | **POST** /teams/ | Create a Team +*TeamsApi* | [**teams_invite_member**](docs/TeamsApi.md#teams_invite_member) | **POST** /teams/{subdomain}/invite_member/ | Invite a Team Member +*TeamsApi* | [**teams_list**](docs/TeamsApi.md#teams_list) | **GET** /teams/ | Retrieve a list of Teams +*TeamsApi* | [**teams_partial_update**](docs/TeamsApi.md#teams_partial_update) | **PATCH** /teams/{subdomain}/ | Update a Team +*TeamsApi* | [**teams_read**](docs/TeamsApi.md#teams_read) | **GET** /teams/{subdomain}/ | Retrieve a Team +*TemplatesApi* | [**templates_list**](docs/TemplatesApi.md#templates_list) | **GET** /templates/ | Retrieve a list of Templates +*TemplatesApi* | [**templates_read**](docs/TemplatesApi.md#templates_read) | **GET** /templates/{uuid}/ | Retrieve a Template +*WebhooksApi* | [**webhooks_create**](docs/WebhooksApi.md#webhooks_create) | **POST** /webhooks/ | Create a Webhook +*WebhooksApi* | [**webhooks_delete**](docs/WebhooksApi.md#webhooks_delete) | **DELETE** /webhooks/{uuid}/ | Delete a Webhook +*WebhooksApi* | [**webhooks_list**](docs/WebhooksApi.md#webhooks_list) | **GET** /webhooks/ | Retrieve a list of Webhooks +*WebhooksApi* | [**webhooks_partial_update**](docs/WebhooksApi.md#webhooks_partial_update) | **PATCH** /webhooks/{uuid}/ | Partially update a Webhook +*WebhooksApi* | [**webhooks_read**](docs/WebhooksApi.md#webhooks_read) | **GET** /webhooks/{uuid}/ | Retrieve a Webhook +*WebhooksApi* | [**webhooks_update**](docs/WebhooksApi.md#webhooks_update) | **PUT** /webhooks/{uuid}/ | Update a Webhook + + +## Documentation For Models + + - [AuthToken](docs/AuthToken.md) + - [Document](docs/Document.md) + - [DocumentAttachment](docs/DocumentAttachment.md) + - [DocumentSearch](docs/DocumentSearch.md) + - [DocumentSignerTemplateConf](docs/DocumentSignerTemplateConf.md) + - [Event](docs/Event.md) + - [FileFromSf](docs/FileFromSf.md) + - [InlineDocumentSignerIntegrationData](docs/InlineDocumentSignerIntegrationData.md) + - [InlineIntegrationData](docs/InlineIntegrationData.md) + - [InlinePrefillTags](docs/InlinePrefillTags.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse2002](docs/InlineResponse2002.md) + - [InlineResponse2003](docs/InlineResponse2003.md) + - [InlineResponse2004](docs/InlineResponse2004.md) + - [InlineResponse2005](docs/InlineResponse2005.md) + - [InlineResponse2006](docs/InlineResponse2006.md) + - [InlineResponse2007](docs/InlineResponse2007.md) + - [InlineResponse2008](docs/InlineResponse2008.md) + - [InlineResponse2009](docs/InlineResponse2009.md) + - [InlineResponse201](docs/InlineResponse201.md) + - [InlineResponse2011](docs/InlineResponse2011.md) + - [InlineSignRequest](docs/InlineSignRequest.md) + - [InlineTeam](docs/InlineTeam.md) + - [InlineTeamMember](docs/InlineTeamMember.md) + - [InviteMember](docs/InviteMember.md) + - [Placeholder](docs/Placeholder.md) + - [RequiredAttachment](docs/RequiredAttachment.md) + - [SignRequest](docs/SignRequest.md) + - [SignRequestQuickCreate](docs/SignRequestQuickCreate.md) + - [Signer](docs/Signer.md) + - [SignerAttachment](docs/SignerAttachment.md) + - [SignerInputs](docs/SignerInputs.md) + - [SigningLog](docs/SigningLog.md) + - [Team](docs/Team.md) + - [TeamMember](docs/TeamMember.md) + - [Template](docs/Template.md) + - [User](docs/User.md) + - [WebhookSubscription](docs/WebhookSubscription.md) + + +## Documentation For Authorization + + +## Token + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + + +## Author + +tech-support@signrequest.com + diff --git a/docs/ApiTokensApi.md b/docs/ApiTokensApi.md new file mode 100644 index 0000000..86978ec --- /dev/null +++ b/docs/ApiTokensApi.md @@ -0,0 +1,225 @@ +# signrequest_client.ApiTokensApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_tokens_create**](ApiTokensApi.md#api_tokens_create) | **POST** /api-tokens/ | Create an API token +[**api_tokens_delete**](ApiTokensApi.md#api_tokens_delete) | **DELETE** /api-tokens/{key}/ | Delete an API token +[**api_tokens_list**](ApiTokensApi.md#api_tokens_list) | **GET** /api-tokens/ | Retrieve a list of API tokens +[**api_tokens_read**](ApiTokensApi.md#api_tokens_read) | **GET** /api-tokens/{key}/ | Retrieve an API token + + +# **api_tokens_create** +> AuthToken api_tokens_create(data) + +Create an API token + +You can create an API token in the [team api settings page](/#/teams). It is also possible to get or create a token using the REST api with your login credentials. + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.ApiTokensApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.AuthToken() # AuthToken | + +try: + # Create an API token + api_response = api_instance.api_tokens_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokensApi->api_tokens_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**AuthToken**](AuthToken.md)| | + +### Return type + +[**AuthToken**](AuthToken.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_tokens_delete** +> api_tokens_delete(key) + +Delete an API token + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.ApiTokensApi(signrequest_client.ApiClient(configuration)) +key = 'key_example' # str | A unique value identifying this api token. + +try: + # Delete an API token + api_instance.api_tokens_delete(key) +except ApiException as e: + print("Exception when calling ApiTokensApi->api_tokens_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **key** | **str**| A unique value identifying this api token. | + +### Return type + +void (empty response body) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_tokens_list** +> InlineResponse200 api_tokens_list(page=page, limit=limit) + +Retrieve a list of API tokens + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.ApiTokensApi(signrequest_client.ApiClient(configuration)) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of API tokens + api_response = api_instance.api_tokens_list(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokensApi->api_tokens_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_tokens_read** +> AuthToken api_tokens_read(key) + +Retrieve an API token + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.ApiTokensApi(signrequest_client.ApiClient(configuration)) +key = 'key_example' # str | A unique value identifying this api token. + +try: + # Retrieve an API token + api_response = api_instance.api_tokens_read(key) + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokensApi->api_tokens_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **key** | **str**| A unique value identifying this api token. | + +### Return type + +[**AuthToken**](AuthToken.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AuthToken.md b/docs/AuthToken.md new file mode 100644 index 0000000..29373e6 --- /dev/null +++ b/docs/AuthToken.md @@ -0,0 +1,15 @@ +# AuthToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**password** | **str** | | [optional] +**subdomain** | **str** | | +**name** | **str** | | [optional] +**key** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Document.md b/docs/Document.md new file mode 100644 index 0000000..0ec5357 --- /dev/null +++ b/docs/Document.md @@ -0,0 +1,32 @@ +# Document + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**uuid** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] +**file_as_pdf** | **str** | Temporary URL to original file as PDF, expires in five minutes | [optional] +**name** | **str** | Defaults to filename, including extension | [optional] +**external_id** | **str** | ID used to reference document in external system | [optional] +**frontend_id** | **str** | Shared secret used in conjunction with <a href=\"#section/Frontend-API/SignRequest-js-client-(beta)\">SignRequest-js client</a> to grant user access to a document that's not a member of the document's team | [optional] +**file** | **str** | Temporary URL to original file, expires in five minutes | [optional] +**file_from_url** | **str** | Publicly accessible URL of document to be downloaded by SignRequest | [optional] +**events_callback_url** | **str** | URL at which to receive [event callbacks](#section/Events/Events-callback) for this document | [optional] +**file_from_content** | **str** | Base64 encoded document content | [optional] +**file_from_content_name** | **str** | Filename, including extension. Required when using `file_from_content`. | [optional] +**template** | **str** | | [optional] +**prefill_tags** | [**list[InlinePrefillTags]**](InlinePrefillTags.md) | Prefill signer input data, see [prefill tags](#section/Preparing-a-document/Prefill-tags-templates) | [optional] +**integrations** | [**list[InlineIntegrationData]**](InlineIntegrationData.md) | | [optional] +**file_from_sf** | [**FileFromSf**](FileFromSf.md) | | [optional] +**auto_delete_days** | **int** | Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted | [optional] +**pdf** | **str** | Temporary URL to signed document as PDF, expires in five minutes | [optional] +**status** | **str** | `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired | [optional] +**api_used** | **bool** | Indicates whether document was created using the API | [optional] +**security_hash** | **str** | SHA256 hash of PDF contents | [optional] +**attachments** | [**list[DocumentAttachment]**](DocumentAttachment.md) | | [optional] +**auto_delete_after** | **datetime** | Date and time calculated using `auto_delete_days` after which a finished document (signed/cancelled/declined) will be automatically deleted | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DocumentAttachment.md b/docs/DocumentAttachment.md new file mode 100644 index 0000000..f7d1f15 --- /dev/null +++ b/docs/DocumentAttachment.md @@ -0,0 +1,17 @@ +# DocumentAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**uuid** | **str** | | [optional] +**name** | **str** | Defaults to filename | [optional] +**file** | **str** | Temporary URL to document attachment, expires in five minutes | [optional] +**file_from_content** | **str** | Base64 encoded document content | [optional] +**file_from_content_name** | **str** | Filename, including extension. Required when using `file_from_content`. | [optional] +**file_from_url** | **str** | Publicly accessible URL of document to be downloaded by SignRequest | [optional] +**document** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DocumentAttachmentsApi.md b/docs/DocumentAttachmentsApi.md new file mode 100644 index 0000000..8d988e2 --- /dev/null +++ b/docs/DocumentAttachmentsApi.md @@ -0,0 +1,178 @@ +# signrequest_client.DocumentAttachmentsApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**document_attachments_create**](DocumentAttachmentsApi.md#document_attachments_create) | **POST** /document-attachments/ | Create a Document Attachment +[**document_attachments_list**](DocumentAttachmentsApi.md#document_attachments_list) | **GET** /document-attachments/ | Retrieve a list of Document Attachments +[**document_attachments_read**](DocumentAttachmentsApi.md#document_attachments_read) | **GET** /document-attachments/{uuid}/ | Retrieve a Document Attachment + + +# **document_attachments_create** +> DocumentAttachment document_attachments_create(data) + +Create a Document Attachment + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentAttachmentsApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.DocumentAttachment() # DocumentAttachment | + +try: + # Create a Document Attachment + api_response = api_instance.document_attachments_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentAttachmentsApi->document_attachments_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**DocumentAttachment**](DocumentAttachment.md)| | + +### Return type + +[**DocumentAttachment**](DocumentAttachment.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **document_attachments_list** +> InlineResponse2001 document_attachments_list(document__uuid=document__uuid, document__external_id=document__external_id, created=created, page=page, limit=limit) + +Retrieve a list of Document Attachments + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentAttachmentsApi(signrequest_client.ApiClient(configuration)) +document__uuid = 'document__uuid_example' # str | (optional) +document__external_id = 'document__external_id_example' # str | (optional) +created = 'created_example' # str | (optional) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Document Attachments + api_response = api_instance.document_attachments_list(document__uuid=document__uuid, document__external_id=document__external_id, created=created, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentAttachmentsApi->document_attachments_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **document__uuid** | **str**| | [optional] + **document__external_id** | **str**| | [optional] + **created** | **str**| | [optional] + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2001**](InlineResponse2001.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **document_attachments_read** +> DocumentAttachment document_attachments_read(uuid) + +Retrieve a Document Attachment + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentAttachmentsApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Retrieve a Document Attachment + api_response = api_instance.document_attachments_read(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentAttachmentsApi->document_attachments_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**DocumentAttachment**](DocumentAttachment.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DocumentSearch.md b/docs/DocumentSearch.md new file mode 100644 index 0000000..61f6faf --- /dev/null +++ b/docs/DocumentSearch.md @@ -0,0 +1,24 @@ +# DocumentSearch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired | [optional] +**name** | **str** | Defaults to filename | [optional] +**who** | **str** | | +**nr_extra_docs** | **int** | | +**from_email** | **str** | | +**uuid** | **str** | | [optional] +**created** | **datetime** | | [optional] +**autocomplete** | **str** | | +**signer_emails** | **list[str]** | | [optional] +**status_display** | **str** | | [optional] +**created_timestamp** | **int** | | [optional] +**finished_on_timestamp** | **int** | | [optional] +**parent_doc** | **str** | | [optional] +**finished_on** | **datetime** | | [optional] +**subdomain** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DocumentSignerTemplateConf.md b/docs/DocumentSignerTemplateConf.md new file mode 100644 index 0000000..2a28d89 --- /dev/null +++ b/docs/DocumentSignerTemplateConf.md @@ -0,0 +1,16 @@ +# DocumentSignerTemplateConf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signer_index** | **int** | | [optional] +**needs_to_sign** | **bool** | | [optional] +**approve_only** | **bool** | | [optional] +**notify_only** | **bool** | | [optional] +**in_person** | **bool** | | [optional] +**order** | **int** | | [optional] +**placeholders** | [**list[Placeholder]**](Placeholder.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DocumentsApi.md b/docs/DocumentsApi.md new file mode 100644 index 0000000..a4032e2 --- /dev/null +++ b/docs/DocumentsApi.md @@ -0,0 +1,243 @@ +# signrequest_client.DocumentsApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**documents_create**](DocumentsApi.md#documents_create) | **POST** /documents/ | Create a Document +[**documents_delete**](DocumentsApi.md#documents_delete) | **DELETE** /documents/{uuid}/ | Delete a Document +[**documents_list**](DocumentsApi.md#documents_list) | **GET** /documents/ | Retrieve a list of Documents +[**documents_read**](DocumentsApi.md#documents_read) | **GET** /documents/{uuid}/ | Retrieve a Document + + +# **documents_create** +> Document documents_create(data) + +Create a Document + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentsApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.Document() # Document | + +try: + # Create a Document + api_response = api_instance.documents_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentsApi->documents_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**Document**](Document.md)| | + +### Return type + +[**Document**](Document.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **documents_delete** +> documents_delete(uuid) + +Delete a Document + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentsApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Delete a Document + api_instance.documents_delete(uuid) +except ApiException as e: + print("Exception when calling DocumentsApi->documents_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **documents_list** +> InlineResponse2003 documents_list(external_id=external_id, signrequest__who=signrequest__who, signrequest__from_email=signrequest__from_email, status=status, user__email=user__email, user__first_name=user__first_name, user__last_name=user__last_name, created=created, modified=modified, page=page, limit=limit) + +Retrieve a list of Documents + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentsApi(signrequest_client.ApiClient(configuration)) +external_id = 'external_id_example' # str | (optional) +signrequest__who = 'signrequest__who_example' # str | (optional) +signrequest__from_email = 'signrequest__from_email_example' # str | (optional) +status = 'status_example' # str | (optional) +user__email = 'user__email_example' # str | (optional) +user__first_name = 'user__first_name_example' # str | (optional) +user__last_name = 'user__last_name_example' # str | (optional) +created = 'created_example' # str | (optional) +modified = 'modified_example' # str | (optional) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Documents + api_response = api_instance.documents_list(external_id=external_id, signrequest__who=signrequest__who, signrequest__from_email=signrequest__from_email, status=status, user__email=user__email, user__first_name=user__first_name, user__last_name=user__last_name, created=created, modified=modified, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentsApi->documents_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **external_id** | **str**| | [optional] + **signrequest__who** | **str**| | [optional] + **signrequest__from_email** | **str**| | [optional] + **status** | **str**| | [optional] + **user__email** | **str**| | [optional] + **user__first_name** | **str**| | [optional] + **user__last_name** | **str**| | [optional] + **created** | **str**| | [optional] + **modified** | **str**| | [optional] + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2003**](InlineResponse2003.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **documents_read** +> Document documents_read(uuid) + +Retrieve a Document + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentsApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Retrieve a Document + api_response = api_instance.documents_read(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentsApi->documents_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**Document**](Document.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DocumentsSearchApi.md b/docs/DocumentsSearchApi.md new file mode 100644 index 0000000..4f4b7ad --- /dev/null +++ b/docs/DocumentsSearchApi.md @@ -0,0 +1,82 @@ +# signrequest_client.DocumentsSearchApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**documents_search_list**](DocumentsSearchApi.md#documents_search_list) | **GET** /documents-search/ | Search documents + + +# **documents_search_list** +> InlineResponse2002 documents_search_list(page=page, limit=limit, q=q, autocomplete=autocomplete, name=name, subdomain=subdomain, signer_emails=signer_emails, status=status, who=who, format=format, signer_data=signer_data) + +Search documents + +Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?**q**={{query}} *Autocomplete search:* - ?**autocomplete**={{partial query}} *Search in document name:* - ?**name**={{query}} *Available (extra) filters:* - ?**subdomain**={{ team_subdomain }} or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?**signer_emails**={{ signer@email.com }} (will filter documents that an email needed to sign/approve) - ?**status**={{ si }} - ?**who**={{ mo }} To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). *Pagination:* - ?**page**={{ page_number: default 1 }} - ?**limit**={{ limit results: default 10, max 100 }} *Format:* By default json is returned, to export data as csv or xls use the format parameter. - ?**format**=csv - ?**format**=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an *external_id* specified on a tag will be exported. All external_id's found will be exported as columns. To use this mode add the **signer_data** parameter. - ?**format**=csv&**signer_data**=1 - ?**format**=xls&**signer_data**=1 Note that all documents are only ordered by **created** (newest first) when **q**, **autocomplete** or **name** are not used, else they are ordered by the strenght of the match. + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.DocumentsSearchApi(signrequest_client.ApiClient(configuration)) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) +q = 'q_example' # str | Normal search query (optional) +autocomplete = 'autocomplete_example' # str | Partial search query (optional) +name = 'name_example' # str | Document name (optional) +subdomain = 'subdomain_example' # str | (optional) +signer_emails = 'signer_emails_example' # str | Email needed to sign/approve (optional) +status = 'status_example' # str | `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired (optional) +who = 'who_example' # str | `m`: only me, `mo`: me and others, `o`: only others (optional) +format = 'format_example' # str | Export format, can be `json` (default), `csv`, or `xls` (optional) +signer_data = 8.14 # float | Set to `1` to export with each signer on a separate row (optional) + +try: + # Search documents + api_response = api_instance.documents_search_list(page=page, limit=limit, q=q, autocomplete=autocomplete, name=name, subdomain=subdomain, signer_emails=signer_emails, status=status, who=who, format=format, signer_data=signer_data) + pprint(api_response) +except ApiException as e: + print("Exception when calling DocumentsSearchApi->documents_search_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + **q** | **str**| Normal search query | [optional] + **autocomplete** | **str**| Partial search query | [optional] + **name** | **str**| Document name | [optional] + **subdomain** | **str**| | [optional] + **signer_emails** | **str**| Email needed to sign/approve | [optional] + **status** | **str**| `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired | [optional] + **who** | **str**| `m`: only me, `mo`: me and others, `o`: only others | [optional] + **format** | **str**| Export format, can be `json` (default), `csv`, or `xls` | [optional] + **signer_data** | **float**| Set to `1` to export with each signer on a separate row | [optional] + +### Return type + +[**InlineResponse2002**](InlineResponse2002.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, text/csv, application/vnd.ms-excel + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Event.md b/docs/Event.md new file mode 100644 index 0000000..69d13e9 --- /dev/null +++ b/docs/Event.md @@ -0,0 +1,18 @@ +# Event + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**status** | **str** | | [optional] +**event_type** | **str** | | [optional] +**delivered** | **bool** | | [optional] +**delivered_on** | **datetime** | | [optional] +**callback_status_code** | **int** | | [optional] +**timestamp** | **datetime** | | [optional] +**document** | [**Document**](Document.md) | | [optional] +**signer** | [**Signer**](Signer.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventsApi.md b/docs/EventsApi.md new file mode 100644 index 0000000..517c254 --- /dev/null +++ b/docs/EventsApi.md @@ -0,0 +1,144 @@ +# signrequest_client.EventsApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**events_list**](EventsApi.md#events_list) | **GET** /events/ | Retrieve a list of Events +[**events_read**](EventsApi.md#events_read) | **GET** /events/{id}/ | Retrieve an Event + + +# **events_list** +> InlineResponse2004 events_list(document__uuid=document__uuid, document__external_id=document__external_id, document__signrequest__who=document__signrequest__who, document__signrequest__from_email=document__signrequest__from_email, document__status=document__status, document__user__email=document__user__email, document__user__first_name=document__user__first_name, document__user__last_name=document__user__last_name, delivered=delivered, delivered_on=delivered_on, timestamp=timestamp, status=status, event_type=event_type, page=page, limit=limit) + +Retrieve a list of Events + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.EventsApi(signrequest_client.ApiClient(configuration)) +document__uuid = 'document__uuid_example' # str | (optional) +document__external_id = 'document__external_id_example' # str | (optional) +document__signrequest__who = 'document__signrequest__who_example' # str | (optional) +document__signrequest__from_email = 'document__signrequest__from_email_example' # str | (optional) +document__status = 'document__status_example' # str | (optional) +document__user__email = 'document__user__email_example' # str | (optional) +document__user__first_name = 'document__user__first_name_example' # str | (optional) +document__user__last_name = 'document__user__last_name_example' # str | (optional) +delivered = 'delivered_example' # str | (optional) +delivered_on = 'delivered_on_example' # str | (optional) +timestamp = 'timestamp_example' # str | (optional) +status = 'status_example' # str | (optional) +event_type = 'event_type_example' # str | (optional) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Events + api_response = api_instance.events_list(document__uuid=document__uuid, document__external_id=document__external_id, document__signrequest__who=document__signrequest__who, document__signrequest__from_email=document__signrequest__from_email, document__status=document__status, document__user__email=document__user__email, document__user__first_name=document__user__first_name, document__user__last_name=document__user__last_name, delivered=delivered, delivered_on=delivered_on, timestamp=timestamp, status=status, event_type=event_type, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling EventsApi->events_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **document__uuid** | **str**| | [optional] + **document__external_id** | **str**| | [optional] + **document__signrequest__who** | **str**| | [optional] + **document__signrequest__from_email** | **str**| | [optional] + **document__status** | **str**| | [optional] + **document__user__email** | **str**| | [optional] + **document__user__first_name** | **str**| | [optional] + **document__user__last_name** | **str**| | [optional] + **delivered** | **str**| | [optional] + **delivered_on** | **str**| | [optional] + **timestamp** | **str**| | [optional] + **status** | **str**| | [optional] + **event_type** | **str**| | [optional] + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2004**](InlineResponse2004.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **events_read** +> Event events_read(id) + +Retrieve an Event + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.EventsApi(signrequest_client.ApiClient(configuration)) +id = 56 # int | A unique integer value identifying this event. + +try: + # Retrieve an Event + api_response = api_instance.events_read(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling EventsApi->events_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| A unique integer value identifying this event. | + +### Return type + +[**Event**](Event.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FileFromSf.md b/docs/FileFromSf.md new file mode 100644 index 0000000..bf49342 --- /dev/null +++ b/docs/FileFromSf.md @@ -0,0 +1,11 @@ +# FileFromSf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | | +**object_id** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineDocumentSignerIntegrationData.md b/docs/InlineDocumentSignerIntegrationData.md new file mode 100644 index 0000000..81c644a --- /dev/null +++ b/docs/InlineDocumentSignerIntegrationData.md @@ -0,0 +1,11 @@ +# InlineDocumentSignerIntegrationData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integration** | **str** | | [optional] +**integration_data** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineIntegrationData.md b/docs/InlineIntegrationData.md new file mode 100644 index 0000000..81ece44 --- /dev/null +++ b/docs/InlineIntegrationData.md @@ -0,0 +1,11 @@ +# InlineIntegrationData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integration** | **str** | | [optional] +**integration_data** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlinePrefillTags.md b/docs/InlinePrefillTags.md new file mode 100644 index 0000000..2458988 --- /dev/null +++ b/docs/InlinePrefillTags.md @@ -0,0 +1,13 @@ +# InlinePrefillTags + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_id** | **str** | | [optional] +**text** | **str** | | [optional] +**checkbox_value** | **bool** | | [optional] +**date_value** | **date** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..3da8d95 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,13 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[AuthToken]**](AuthToken.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 0000000..1c40ccd --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,13 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[DocumentAttachment]**](DocumentAttachment.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2002.md b/docs/InlineResponse2002.md new file mode 100644 index 0000000..6cfdc22 --- /dev/null +++ b/docs/InlineResponse2002.md @@ -0,0 +1,13 @@ +# InlineResponse2002 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[DocumentSearch]**](DocumentSearch.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md new file mode 100644 index 0000000..1746f75 --- /dev/null +++ b/docs/InlineResponse2003.md @@ -0,0 +1,13 @@ +# InlineResponse2003 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[Document]**](Document.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2004.md b/docs/InlineResponse2004.md new file mode 100644 index 0000000..c2f0a14 --- /dev/null +++ b/docs/InlineResponse2004.md @@ -0,0 +1,13 @@ +# InlineResponse2004 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[Event]**](Event.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2005.md b/docs/InlineResponse2005.md new file mode 100644 index 0000000..916c0c1 --- /dev/null +++ b/docs/InlineResponse2005.md @@ -0,0 +1,13 @@ +# InlineResponse2005 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[SignRequest]**](SignRequest.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2006.md b/docs/InlineResponse2006.md new file mode 100644 index 0000000..95b0603 --- /dev/null +++ b/docs/InlineResponse2006.md @@ -0,0 +1,13 @@ +# InlineResponse2006 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[TeamMember]**](TeamMember.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2007.md b/docs/InlineResponse2007.md new file mode 100644 index 0000000..1926382 --- /dev/null +++ b/docs/InlineResponse2007.md @@ -0,0 +1,13 @@ +# InlineResponse2007 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[Team]**](Team.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2008.md b/docs/InlineResponse2008.md new file mode 100644 index 0000000..3f4c7a8 --- /dev/null +++ b/docs/InlineResponse2008.md @@ -0,0 +1,13 @@ +# InlineResponse2008 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[Template]**](Template.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2009.md b/docs/InlineResponse2009.md new file mode 100644 index 0000000..137e5c9 --- /dev/null +++ b/docs/InlineResponse2009.md @@ -0,0 +1,13 @@ +# InlineResponse2009 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[WebhookSubscription]**](WebhookSubscription.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md new file mode 100644 index 0000000..a06e82a --- /dev/null +++ b/docs/InlineResponse201.md @@ -0,0 +1,11 @@ +# InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancelled** | **bool** | | +**detail** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md new file mode 100644 index 0000000..fb48f1d --- /dev/null +++ b/docs/InlineResponse2011.md @@ -0,0 +1,10 @@ +# InlineResponse2011 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineSignRequest.md b/docs/InlineSignRequest.md new file mode 100644 index 0000000..930c4a9 --- /dev/null +++ b/docs/InlineSignRequest.md @@ -0,0 +1,27 @@ +# InlineSignRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_email** | **str** | Email of user sending the SignRequest (must be a validated email) | [optional] +**from_email_name** | **str** | Name to be used in the `From` email header, e.g. `{from_email_name} <no-reply@signrequest.com>` | [optional] +**is_being_prepared** | **bool** | Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) | [optional] +**prepare_url** | **str** | | [optional] +**redirect_url** | **str** | URL at which SignRequest will redirect to when a document is signed | [optional] +**required_attachments** | [**list[RequiredAttachment]**](RequiredAttachment.md) | | [optional] +**disable_attachments** | **bool** | Disable uploading/adding of attachments | [optional] +**disable_text_signatures** | **bool** | Disable usage of signatures generated by typing (text) | [optional] +**disable_text** | **bool** | Disable adding of text | [optional] +**disable_date** | **bool** | Disable adding of dates | [optional] +**disable_emails** | **bool** | Disable all SignRequest status emails as well as the email that contains the signed documents | [optional] +**disable_upload_signatures** | **bool** | Disable usage of uploaded signatures (images) | [optional] +**subject** | **str** | Subject of SignRequest email | [optional] +**message** | **str** | Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` | [optional] +**who** | **str** | `m`: only me, `mo`: me and others, `o`: only others | [optional] +**send_reminders** | **bool** | Automatically remind signers to sign a document | [optional] +**signers** | [**list[Signer]**](Signer.md) | | [optional] +**uuid** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineTeam.md b/docs/InlineTeam.md new file mode 100644 index 0000000..2da3fdf --- /dev/null +++ b/docs/InlineTeam.md @@ -0,0 +1,12 @@ +# InlineTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**subdomain** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineTeamMember.md b/docs/InlineTeamMember.md new file mode 100644 index 0000000..96dbdfc --- /dev/null +++ b/docs/InlineTeamMember.md @@ -0,0 +1,15 @@ +# InlineTeamMember + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] +**is_admin** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**is_owner** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteMember.md b/docs/InviteMember.md new file mode 100644 index 0000000..e4554e2 --- /dev/null +++ b/docs/InviteMember.md @@ -0,0 +1,12 @@ +# InviteMember + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**is_admin** | **bool** | | [optional] [default to False] +**is_owner** | **bool** | | [optional] [default to False] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Placeholder.md b/docs/Placeholder.md new file mode 100644 index 0000000..e2319f3 --- /dev/null +++ b/docs/Placeholder.md @@ -0,0 +1,17 @@ +# Placeholder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**type** | **str** | | [optional] +**page_index** | **int** | | +**prefill** | **bool** | | +**text** | **str** | | [optional] +**checkbox_value** | **bool** | | [optional] +**date_value** | **date** | | [optional] +**external_id** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequiredAttachment.md b/docs/RequiredAttachment.md new file mode 100644 index 0000000..c5fb963 --- /dev/null +++ b/docs/RequiredAttachment.md @@ -0,0 +1,11 @@ +# RequiredAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**uuid** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignRequest.md b/docs/SignRequest.md new file mode 100644 index 0000000..6cd76d4 --- /dev/null +++ b/docs/SignRequest.md @@ -0,0 +1,31 @@ +# SignRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_email** | **str** | Email of user sending the SignRequest (must be a validated email) | [optional] +**from_email_name** | **str** | Name to be used in the `From` email header, e.g. `{from_email_name} <no-reply@signrequest.com>` | [optional] +**is_being_prepared** | **bool** | Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) | [optional] +**prepare_url** | **str** | | [optional] +**redirect_url** | **str** | URL at which SignRequest will redirect to when a document is signed | [optional] +**required_attachments** | [**list[RequiredAttachment]**](RequiredAttachment.md) | Attachments that signers are required to upload | [optional] +**disable_attachments** | **bool** | Disable uploading/adding of attachments | [optional] +**disable_text_signatures** | **bool** | Disable usage of signatures generated by typing (text) | [optional] +**disable_text** | **bool** | Disable adding of text | [optional] +**disable_date** | **bool** | Disable adding of dates | [optional] +**disable_emails** | **bool** | Disable all SignRequest status emails as well as the email that contains the signed documents | [optional] +**disable_upload_signatures** | **bool** | Disable usage of uploaded signatures (images) | [optional] +**subject** | **str** | Subject of SignRequest email | [optional] +**message** | **str** | Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` | [optional] +**who** | **str** | `m`: only me, `mo`: me and others, `o`: only others | [optional] [default to 'o'] +**send_reminders** | **bool** | Automatically remind signers to sign a document | [optional] +**signers** | [**list[Signer]**](Signer.md) | | +**uuid** | **str** | | [optional] +**url** | **str** | | [optional] +**document** | **str** | | +**integration** | **str** | | [optional] +**integration_data** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignRequestQuickCreate.md b/docs/SignRequestQuickCreate.md new file mode 100644 index 0000000..57f1ac3 --- /dev/null +++ b/docs/SignRequestQuickCreate.md @@ -0,0 +1,44 @@ +# SignRequestQuickCreate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_email** | **str** | Email of user sending the SignRequest (must be a validated email) | [optional] +**from_email_name** | **str** | Name to be used in the `From` email header, e.g. `{from_email_name} <no-reply@signrequest.com>` | [optional] +**is_being_prepared** | **bool** | Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) | [optional] +**prepare_url** | **str** | | [optional] +**redirect_url** | **str** | URL at which SignRequest will redirect to when a document is signed | [optional] +**required_attachments** | [**list[RequiredAttachment]**](RequiredAttachment.md) | Attachments that signers are required to upload | [optional] +**disable_attachments** | **bool** | Disable uploading/adding of attachments | [optional] +**disable_text_signatures** | **bool** | Disable usage of signatures generated by typing (text) | [optional] +**disable_text** | **bool** | Disable adding of text | [optional] +**disable_date** | **bool** | Disable adding of dates | [optional] +**disable_emails** | **bool** | Disable all SignRequest status emails as well as the email that contains the signed documents | [optional] +**disable_upload_signatures** | **bool** | Disable usage of uploaded signatures (images) | [optional] +**subject** | **str** | Subject of SignRequest email | [optional] +**message** | **str** | Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` | [optional] +**who** | **str** | `m`: only me, `mo`: me and others, `o`: only others | [optional] [default to 'o'] +**send_reminders** | **bool** | Automatically remind signers to sign a document | [optional] +**signers** | [**list[Signer]**](Signer.md) | | +**uuid** | **str** | | [optional] +**url** | **str** | | [optional] +**document** | **str** | | [optional] +**integration** | **str** | | [optional] +**integration_data** | **str** | | [optional] +**name** | **str** | Defaults to filename, including extension | [optional] +**external_id** | **str** | ID used to reference document in external system | [optional] +**frontend_id** | **str** | Shared secret used in conjunction with <a href=\"#section/Frontend-API/SignRequest-js-client-(beta)\">SignRequest-js client</a> to grant user access to a document that's not a member of the document's team | [optional] +**file** | **str** | Temporary URL to original file, expires in five minutes | [optional] +**file_from_url** | **str** | Publicly accessible URL of document to be downloaded by SignRequest | [optional] +**events_callback_url** | **str** | URL at which to receive [event callbacks](#section/Events/Events-callback) for this document | [optional] +**file_from_content** | **str** | Base64 encoded document content | [optional] +**file_from_content_name** | **str** | Filename, including extension. Required when using `file_from_content`. | [optional] +**template** | **str** | | [optional] +**prefill_tags** | [**list[InlinePrefillTags]**](InlinePrefillTags.md) | Prefill signer input data, see [prefill tags](#section/Preparing-a-document/Prefill-tags-templates) | [optional] +**integrations** | [**list[InlineIntegrationData]**](InlineIntegrationData.md) | | [optional] +**file_from_sf** | [**FileFromSf**](FileFromSf.md) | | [optional] +**auto_delete_days** | **int** | Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Signer.md b/docs/Signer.md new file mode 100644 index 0000000..2016aac --- /dev/null +++ b/docs/Signer.md @@ -0,0 +1,42 @@ +# Signer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**display_name** | **str** | | [optional] +**first_name** | **str** | | [optional] +**last_name** | **str** | | [optional] +**email_viewed** | **bool** | | [optional] +**viewed** | **bool** | | [optional] +**signed** | **bool** | | [optional] +**downloaded** | **bool** | | [optional] +**signed_on** | **datetime** | | [optional] +**needs_to_sign** | **bool** | | [optional] [default to True] +**approve_only** | **bool** | | [optional] +**notify_only** | **bool** | | [optional] +**in_person** | **bool** | | [optional] +**order** | **int** | | [optional] +**language** | **str** | | [optional] +**force_language** | **bool** | | [optional] +**emailed** | **bool** | | [optional] +**verify_phone_number** | **str** | | [optional] +**verify_bank_account** | **str** | | [optional] +**declined** | **bool** | | [optional] +**declined_on** | **datetime** | | [optional] +**forwarded** | **str** | | [optional] +**forwarded_on** | **datetime** | | [optional] +**forwarded_to_email** | **str** | | [optional] +**forwarded_reason** | **str** | | [optional] +**message** | **str** | | [optional] +**embed_url_user_id** | **str** | | [optional] +**inputs** | [**list[SignerInputs]**](SignerInputs.md) | | [optional] +**embed_url** | **str** | | [optional] +**attachments** | [**list[SignerAttachment]**](SignerAttachment.md) | | [optional] +**redirect_url** | **str** | | [optional] +**after_document** | **str** | | [optional] +**integrations** | [**list[InlineDocumentSignerIntegrationData]**](InlineDocumentSignerIntegrationData.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignerAttachment.md b/docs/SignerAttachment.md new file mode 100644 index 0000000..6491d56 --- /dev/null +++ b/docs/SignerAttachment.md @@ -0,0 +1,13 @@ +# SignerAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**name** | **str** | Defaults to filename | [optional] +**file** | **str** | | [optional] +**for_attachment** | [**RequiredAttachment**](RequiredAttachment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignerInputs.md b/docs/SignerInputs.md new file mode 100644 index 0000000..e2455f2 --- /dev/null +++ b/docs/SignerInputs.md @@ -0,0 +1,16 @@ +# SignerInputs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] +**page_index** | **int** | | +**text** | **str** | | [optional] +**checkbox_value** | **bool** | | [optional] +**date_value** | **date** | | [optional] +**external_id** | **str** | | [optional] +**placeholder_uuid** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SigningLog.md b/docs/SigningLog.md new file mode 100644 index 0000000..0f7a690 --- /dev/null +++ b/docs/SigningLog.md @@ -0,0 +1,11 @@ +# SigningLog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pdf** | **str** | Temporary URL to signing log, expires in five minutes | [optional] +**security_hash** | **str** | SHA256 hash of PDF contents | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignrequestQuickCreateApi.md b/docs/SignrequestQuickCreateApi.md new file mode 100644 index 0000000..5192b6b --- /dev/null +++ b/docs/SignrequestQuickCreateApi.md @@ -0,0 +1,62 @@ +# signrequest_client.SignrequestQuickCreateApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**signrequest_quick_create_create**](SignrequestQuickCreateApi.md#signrequest_quick_create_create) | **POST** /signrequest-quick-create/ | Quick create a SignRequest + + +# **signrequest_quick_create_create** +> SignRequestQuickCreate signrequest_quick_create_create(data) + +Quick create a SignRequest + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.SignrequestQuickCreateApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.SignRequestQuickCreate() # SignRequestQuickCreate | + +try: + # Quick create a SignRequest + api_response = api_instance.signrequest_quick_create_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling SignrequestQuickCreateApi->signrequest_quick_create_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**SignRequestQuickCreate**](SignRequestQuickCreate.md)| | + +### Return type + +[**SignRequestQuickCreate**](SignRequestQuickCreate.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SignrequestsApi.md b/docs/SignrequestsApi.md new file mode 100644 index 0000000..da81237 --- /dev/null +++ b/docs/SignrequestsApi.md @@ -0,0 +1,284 @@ +# signrequest_client.SignrequestsApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**signrequests_cancel_signrequest**](SignrequestsApi.md#signrequests_cancel_signrequest) | **POST** /signrequests/{uuid}/cancel_signrequest/ | Cancel a SignRequest +[**signrequests_create**](SignrequestsApi.md#signrequests_create) | **POST** /signrequests/ | Create a SignRequest +[**signrequests_list**](SignrequestsApi.md#signrequests_list) | **GET** /signrequests/ | Retrieve a list of SignRequests +[**signrequests_read**](SignrequestsApi.md#signrequests_read) | **GET** /signrequests/{uuid}/ | Retrieve a SignRequest +[**signrequests_resend_signrequest_email**](SignrequestsApi.md#signrequests_resend_signrequest_email) | **POST** /signrequests/{uuid}/resend_signrequest_email/ | Resend a SignRequest + + +# **signrequests_cancel_signrequest** +> InlineResponse201 signrequests_cancel_signrequest(uuid) + +Cancel a SignRequest + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.SignrequestsApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Cancel a SignRequest + api_response = api_instance.signrequests_cancel_signrequest(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling SignrequestsApi->signrequests_cancel_signrequest: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **signrequests_create** +> SignRequest signrequests_create(data) + +Create a SignRequest + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.SignrequestsApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.SignRequest() # SignRequest | + +try: + # Create a SignRequest + api_response = api_instance.signrequests_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling SignrequestsApi->signrequests_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**SignRequest**](SignRequest.md)| | + +### Return type + +[**SignRequest**](SignRequest.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **signrequests_list** +> InlineResponse2005 signrequests_list(who=who, from_email=from_email, page=page, limit=limit) + +Retrieve a list of SignRequests + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.SignrequestsApi(signrequest_client.ApiClient(configuration)) +who = 'who_example' # str | (optional) +from_email = 'from_email_example' # str | (optional) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of SignRequests + api_response = api_instance.signrequests_list(who=who, from_email=from_email, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling SignrequestsApi->signrequests_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **who** | **str**| | [optional] + **from_email** | **str**| | [optional] + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2005**](InlineResponse2005.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **signrequests_read** +> SignRequest signrequests_read(uuid) + +Retrieve a SignRequest + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.SignrequestsApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Retrieve a SignRequest + api_response = api_instance.signrequests_read(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling SignrequestsApi->signrequests_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**SignRequest**](SignRequest.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **signrequests_resend_signrequest_email** +> InlineResponse2011 signrequests_resend_signrequest_email(uuid) + +Resend a SignRequest + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.SignrequestsApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Resend a SignRequest + api_response = api_instance.signrequests_resend_signrequest_email(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling SignrequestsApi->signrequests_resend_signrequest_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Team.md b/docs/Team.md new file mode 100644 index 0000000..85caa58 --- /dev/null +++ b/docs/Team.md @@ -0,0 +1,17 @@ +# Team + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**subdomain** | **str** | | +**url** | **str** | | [optional] +**logo** | **str** | | [optional] +**phone** | **str** | | [optional] +**primary_color** | **str** | | [optional] +**events_callback_url** | **str** | | [optional] +**members** | [**list[InlineTeamMember]**](InlineTeamMember.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamMember.md b/docs/TeamMember.md new file mode 100644 index 0000000..29edabd --- /dev/null +++ b/docs/TeamMember.md @@ -0,0 +1,15 @@ +# TeamMember + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] +**is_admin** | **bool** | | [optional] +**is_active** | **bool** | | [optional] +**is_owner** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamMembersApi.md b/docs/TeamMembersApi.md new file mode 100644 index 0000000..0c51e9f --- /dev/null +++ b/docs/TeamMembersApi.md @@ -0,0 +1,130 @@ +# signrequest_client.TeamMembersApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**team_members_list**](TeamMembersApi.md#team_members_list) | **GET** /team-members/ | Retrieve a list of Team Members +[**team_members_read**](TeamMembersApi.md#team_members_read) | **GET** /team-members/{uuid}/ | Retrieve a Team Member + + +# **team_members_list** +> InlineResponse2006 team_members_list(is_active=is_active, is_owner=is_owner, is_admin=is_admin, user__email=user__email, user__first_name=user__first_name, user__last_name=user__last_name, page=page, limit=limit) + +Retrieve a list of Team Members + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamMembersApi(signrequest_client.ApiClient(configuration)) +is_active = 'is_active_example' # str | (optional) +is_owner = 'is_owner_example' # str | (optional) +is_admin = 'is_admin_example' # str | (optional) +user__email = 'user__email_example' # str | (optional) +user__first_name = 'user__first_name_example' # str | (optional) +user__last_name = 'user__last_name_example' # str | (optional) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Team Members + api_response = api_instance.team_members_list(is_active=is_active, is_owner=is_owner, is_admin=is_admin, user__email=user__email, user__first_name=user__first_name, user__last_name=user__last_name, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamMembersApi->team_members_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **is_active** | **str**| | [optional] + **is_owner** | **str**| | [optional] + **is_admin** | **str**| | [optional] + **user__email** | **str**| | [optional] + **user__first_name** | **str**| | [optional] + **user__last_name** | **str**| | [optional] + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2006**](InlineResponse2006.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **team_members_read** +> TeamMember team_members_read(uuid) + +Retrieve a Team Member + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamMembersApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Retrieve a Team Member + api_response = api_instance.team_members_read(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamMembersApi->team_members_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**TeamMember**](TeamMember.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TeamsApi.md b/docs/TeamsApi.md new file mode 100644 index 0000000..b744f30 --- /dev/null +++ b/docs/TeamsApi.md @@ -0,0 +1,284 @@ +# signrequest_client.TeamsApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**teams_create**](TeamsApi.md#teams_create) | **POST** /teams/ | Create a Team +[**teams_invite_member**](TeamsApi.md#teams_invite_member) | **POST** /teams/{subdomain}/invite_member/ | Invite a Team Member +[**teams_list**](TeamsApi.md#teams_list) | **GET** /teams/ | Retrieve a list of Teams +[**teams_partial_update**](TeamsApi.md#teams_partial_update) | **PATCH** /teams/{subdomain}/ | Update a Team +[**teams_read**](TeamsApi.md#teams_read) | **GET** /teams/{subdomain}/ | Retrieve a Team + + +# **teams_create** +> Team teams_create(data) + +Create a Team + +Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamsApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.Team() # Team | + +try: + # Create a Team + api_response = api_instance.teams_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamsApi->teams_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**Team**](Team.md)| | + +### Return type + +[**Team**](Team.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **teams_invite_member** +> InviteMember teams_invite_member(subdomain, data) + +Invite a Team Member + +Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamsApi(signrequest_client.ApiClient(configuration)) +subdomain = 'subdomain_example' # str | +data = signrequest_client.InviteMember() # InviteMember | + +try: + # Invite a Team Member + api_response = api_instance.teams_invite_member(subdomain, data) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamsApi->teams_invite_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subdomain** | **str**| | + **data** | [**InviteMember**](InviteMember.md)| | + +### Return type + +[**InviteMember**](InviteMember.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **teams_list** +> InlineResponse2007 teams_list(page=page, limit=limit) + +Retrieve a list of Teams + +Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamsApi(signrequest_client.ApiClient(configuration)) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Teams + api_response = api_instance.teams_list(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamsApi->teams_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2007**](InlineResponse2007.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **teams_partial_update** +> Team teams_partial_update(subdomain, data) + +Update a Team + +Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamsApi(signrequest_client.ApiClient(configuration)) +subdomain = 'subdomain_example' # str | +data = signrequest_client.Team() # Team | + +try: + # Update a Team + api_response = api_instance.teams_partial_update(subdomain, data) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamsApi->teams_partial_update: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subdomain** | **str**| | + **data** | [**Team**](Team.md)| | + +### Return type + +[**Team**](Team.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **teams_read** +> Team teams_read(subdomain) + +Retrieve a Team + +Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TeamsApi(signrequest_client.ApiClient(configuration)) +subdomain = 'subdomain_example' # str | + +try: + # Retrieve a Team + api_response = api_instance.teams_read(subdomain) + pprint(api_response) +except ApiException as e: + print("Exception when calling TeamsApi->teams_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subdomain** | **str**| | + +### Return type + +[**Team**](Team.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Template.md b/docs/Template.md new file mode 100644 index 0000000..191c705 --- /dev/null +++ b/docs/Template.md @@ -0,0 +1,15 @@ +# Template + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**name** | **str** | Defaults to filename | [optional] +**uuid** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] +**who** | **str** | `m`: only me, `mo`: me and others, `o`: only others | [optional] +**signers** | [**list[DocumentSignerTemplateConf]**](DocumentSignerTemplateConf.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplatesApi.md b/docs/TemplatesApi.md new file mode 100644 index 0000000..9192aea --- /dev/null +++ b/docs/TemplatesApi.md @@ -0,0 +1,118 @@ +# signrequest_client.TemplatesApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**templates_list**](TemplatesApi.md#templates_list) | **GET** /templates/ | Retrieve a list of Templates +[**templates_read**](TemplatesApi.md#templates_read) | **GET** /templates/{uuid}/ | Retrieve a Template + + +# **templates_list** +> InlineResponse2008 templates_list(page=page, limit=limit) + +Retrieve a list of Templates + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TemplatesApi(signrequest_client.ApiClient(configuration)) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Templates + api_response = api_instance.templates_list(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling TemplatesApi->templates_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2008**](InlineResponse2008.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **templates_read** +> Template templates_read(uuid) + +Retrieve a Template + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.TemplatesApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Retrieve a Template + api_response = api_instance.templates_read(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling TemplatesApi->templates_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**Template**](Template.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/User.md b/docs/User.md new file mode 100644 index 0000000..5da0930 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,13 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**first_name** | **str** | | [optional] +**last_name** | **str** | | [optional] +**display_name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookSubscription.md b/docs/WebhookSubscription.md new file mode 100644 index 0000000..55fa57f --- /dev/null +++ b/docs/WebhookSubscription.md @@ -0,0 +1,16 @@ +# WebhookSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | [optional] +**uuid** | **str** | | [optional] +**name** | **str** | Optional name to easily identify what webhook is used for | [optional] +**event_type** | **str** | | +**callback_url** | **str** | | +**integration** | **str** | | [optional] +**created** | **datetime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md new file mode 100644 index 0000000..0af3e4c --- /dev/null +++ b/docs/WebhooksApi.md @@ -0,0 +1,337 @@ +# signrequest_client.WebhooksApi + +All URIs are relative to *https://signrequest.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**webhooks_create**](WebhooksApi.md#webhooks_create) | **POST** /webhooks/ | Create a Webhook +[**webhooks_delete**](WebhooksApi.md#webhooks_delete) | **DELETE** /webhooks/{uuid}/ | Delete a Webhook +[**webhooks_list**](WebhooksApi.md#webhooks_list) | **GET** /webhooks/ | Retrieve a list of Webhooks +[**webhooks_partial_update**](WebhooksApi.md#webhooks_partial_update) | **PATCH** /webhooks/{uuid}/ | Partially update a Webhook +[**webhooks_read**](WebhooksApi.md#webhooks_read) | **GET** /webhooks/{uuid}/ | Retrieve a Webhook +[**webhooks_update**](WebhooksApi.md#webhooks_update) | **PUT** /webhooks/{uuid}/ | Update a Webhook + + +# **webhooks_create** +> WebhookSubscription webhooks_create(data) + +Create a Webhook + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.WebhooksApi(signrequest_client.ApiClient(configuration)) +data = signrequest_client.WebhookSubscription() # WebhookSubscription | + +try: + # Create a Webhook + api_response = api_instance.webhooks_create(data) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_create: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**WebhookSubscription**](WebhookSubscription.md)| | + +### Return type + +[**WebhookSubscription**](WebhookSubscription.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_delete** +> webhooks_delete(uuid) + +Delete a Webhook + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.WebhooksApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Delete a Webhook + api_instance.webhooks_delete(uuid) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_list** +> InlineResponse2009 webhooks_list(page=page, limit=limit) + +Retrieve a list of Webhooks + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.WebhooksApi(signrequest_client.ApiClient(configuration)) +page = 56 # int | A page number within the paginated result set. (optional) +limit = 56 # int | Number of results to return per page. (optional) + +try: + # Retrieve a list of Webhooks + api_response = api_instance.webhooks_list(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| A page number within the paginated result set. | [optional] + **limit** | **int**| Number of results to return per page. | [optional] + +### Return type + +[**InlineResponse2009**](InlineResponse2009.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_partial_update** +> WebhookSubscription webhooks_partial_update(uuid, data) + +Partially update a Webhook + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.WebhooksApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | +data = signrequest_client.WebhookSubscription() # WebhookSubscription | + +try: + # Partially update a Webhook + api_response = api_instance.webhooks_partial_update(uuid, data) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_partial_update: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + **data** | [**WebhookSubscription**](WebhookSubscription.md)| | + +### Return type + +[**WebhookSubscription**](WebhookSubscription.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_read** +> WebhookSubscription webhooks_read(uuid) + +Retrieve a Webhook + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.WebhooksApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | + +try: + # Retrieve a Webhook + api_response = api_instance.webhooks_read(uuid) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + +### Return type + +[**WebhookSubscription**](WebhookSubscription.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **webhooks_update** +> WebhookSubscription webhooks_update(uuid, data) + +Update a Webhook + + + +### Example +```python +from __future__ import print_function +import time +import signrequest_client +from signrequest_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Token +configuration = signrequest_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Token' + +# create an instance of the API class +api_instance = signrequest_client.WebhooksApi(signrequest_client.ApiClient(configuration)) +uuid = 'uuid_example' # str | +data = signrequest_client.WebhookSubscription() # WebhookSubscription | + +try: + # Update a Webhook + api_response = api_instance.webhooks_update(uuid, data) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_update: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uuid** | **str**| | + **data** | [**WebhookSubscription**](WebhookSubscription.md)| | + +### Return type + +[**WebhookSubscription**](WebhookSubscription.md) + +### Authorization + +[Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bafdc07 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5e40900..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[wheel] -universal = 1 diff --git a/setup.py b/setup.py index 232179b..33a1e37 100644 --- a/setup.py +++ b/setup.py @@ -1,34 +1,46 @@ -# -*- coding: utf-8 -*- -__author__ = "Michaël Krens" -__copyright__ = "Copyright 2015, SignRequest B.V." +# coding: utf-8 +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages # noqa: H301 import os -from setuptools import setup -from signrequest_client import __version__ as version +NAME = "signrequest-client" +VERSION = "1.0.0" def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -# helpfull: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ -# distribute using: python setup.py sdist bdist_wheel upload + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] setup( - name="signrequest-python-client", - version=version, + name=NAME, + version=VERSION, author="Michaël Krens", author_email="michael@signrequest.com", description="A python client to use the SignRequest REST api", - keywords="signrequest sign request", - url="https://github.com/SignRequest/signrequest-python-client", - packages=['signrequest_client'], - long_description=read('README'), - classifiers=[ - "Development Status :: 3 - Alpha", - "Topic :: Utilities", - ], - install_requires=[ - "requests", - ], + url="https://github.com/SignRequest/signrequest-python-client/", + keywords=["SignRequest", "SignRequest API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description=read("README.md") ) diff --git a/signrequest_client/__init__.py b/signrequest_client/__init__.py index 59793c0..fb85ea3 100644 --- a/signrequest_client/__init__.py +++ b/signrequest_client/__init__.py @@ -1,8 +1,73 @@ -# -*- coding: utf-8 -*- -__author__ = 'Michaël Krens' -__copyright__ = "Copyright 2015, SignRequest B.V." -__version__ = '0.0.8' +# coding: utf-8 -from .client import SignRequestClient, SignRequestClientException +# flake8: noqa -__all__ = ['SignRequestClient', 'SignRequestClientException'] +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from signrequest_client.api.api_tokens_api import ApiTokensApi +from signrequest_client.api.document_attachments_api import DocumentAttachmentsApi +from signrequest_client.api.documents_api import DocumentsApi +from signrequest_client.api.documents_search_api import DocumentsSearchApi +from signrequest_client.api.events_api import EventsApi +from signrequest_client.api.signrequest_quick_create_api import SignrequestQuickCreateApi +from signrequest_client.api.signrequests_api import SignrequestsApi +from signrequest_client.api.team_members_api import TeamMembersApi +from signrequest_client.api.teams_api import TeamsApi +from signrequest_client.api.templates_api import TemplatesApi +from signrequest_client.api.webhooks_api import WebhooksApi + +# import ApiClient +from signrequest_client.api_client import ApiClient +from signrequest_client.configuration import Configuration +# import models into sdk package +from signrequest_client.models.auth_token import AuthToken +from signrequest_client.models.document import Document +from signrequest_client.models.document_attachment import DocumentAttachment +from signrequest_client.models.document_search import DocumentSearch +from signrequest_client.models.document_signer_template_conf import DocumentSignerTemplateConf +from signrequest_client.models.event import Event +from signrequest_client.models.file_from_sf import FileFromSf +from signrequest_client.models.inline_document_signer_integration_data import InlineDocumentSignerIntegrationData +from signrequest_client.models.inline_integration_data import InlineIntegrationData +from signrequest_client.models.inline_prefill_tags import InlinePrefillTags +from signrequest_client.models.inline_response_200 import InlineResponse200 +from signrequest_client.models.inline_response_200_1 import InlineResponse2001 +from signrequest_client.models.inline_response_200_2 import InlineResponse2002 +from signrequest_client.models.inline_response_200_3 import InlineResponse2003 +from signrequest_client.models.inline_response_200_4 import InlineResponse2004 +from signrequest_client.models.inline_response_200_5 import InlineResponse2005 +from signrequest_client.models.inline_response_200_6 import InlineResponse2006 +from signrequest_client.models.inline_response_200_7 import InlineResponse2007 +from signrequest_client.models.inline_response_200_8 import InlineResponse2008 +from signrequest_client.models.inline_response_200_9 import InlineResponse2009 +from signrequest_client.models.inline_response_201 import InlineResponse201 +from signrequest_client.models.inline_response_201_1 import InlineResponse2011 +from signrequest_client.models.inline_sign_request import InlineSignRequest +from signrequest_client.models.inline_team import InlineTeam +from signrequest_client.models.inline_team_member import InlineTeamMember +from signrequest_client.models.invite_member import InviteMember +from signrequest_client.models.placeholder import Placeholder +from signrequest_client.models.required_attachment import RequiredAttachment +from signrequest_client.models.sign_request import SignRequest +from signrequest_client.models.sign_request_quick_create import SignRequestQuickCreate +from signrequest_client.models.signer import Signer +from signrequest_client.models.signer_attachment import SignerAttachment +from signrequest_client.models.signer_inputs import SignerInputs +from signrequest_client.models.signing_log import SigningLog +from signrequest_client.models.team import Team +from signrequest_client.models.team_member import TeamMember +from signrequest_client.models.template import Template +from signrequest_client.models.user import User +from signrequest_client.models.webhook_subscription import WebhookSubscription diff --git a/signrequest_client/api/__init__.py b/signrequest_client/api/__init__.py new file mode 100644 index 0000000..7e870fa --- /dev/null +++ b/signrequest_client/api/__init__.py @@ -0,0 +1,16 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from signrequest_client.api.api_tokens_api import ApiTokensApi +from signrequest_client.api.document_attachments_api import DocumentAttachmentsApi +from signrequest_client.api.documents_api import DocumentsApi +from signrequest_client.api.documents_search_api import DocumentsSearchApi +from signrequest_client.api.events_api import EventsApi +from signrequest_client.api.signrequest_quick_create_api import SignrequestQuickCreateApi +from signrequest_client.api.signrequests_api import SignrequestsApi +from signrequest_client.api.team_members_api import TeamMembersApi +from signrequest_client.api.teams_api import TeamsApi +from signrequest_client.api.templates_api import TemplatesApi +from signrequest_client.api.webhooks_api import WebhooksApi diff --git a/signrequest_client/api/api_tokens_api.py b/signrequest_client/api/api_tokens_api.py new file mode 100644 index 0000000..58fdc9a --- /dev/null +++ b/signrequest_client/api/api_tokens_api.py @@ -0,0 +1,430 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class ApiTokensApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def api_tokens_create(self, data, **kwargs): # noqa: E501 + """Create an API token # noqa: E501 + + You can create an API token in the [team api settings page](/#/teams). It is also possible to get or create a token using the REST api with your login credentials. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param AuthToken data: (required) + :return: AuthToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.api_tokens_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.api_tokens_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def api_tokens_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Create an API token # noqa: E501 + + You can create an API token in the [team api settings page](/#/teams). It is also possible to get or create a token using the REST api with your login credentials. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param AuthToken data: (required) + :return: AuthToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method api_tokens_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `api_tokens_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/api-tokens/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuthToken', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def api_tokens_delete(self, key, **kwargs): # noqa: E501 + """Delete an API token # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_delete(key, async=True) + >>> result = thread.get() + + :param async bool + :param str key: A unique value identifying this api token. (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.api_tokens_delete_with_http_info(key, **kwargs) # noqa: E501 + else: + (data) = self.api_tokens_delete_with_http_info(key, **kwargs) # noqa: E501 + return data + + def api_tokens_delete_with_http_info(self, key, **kwargs): # noqa: E501 + """Delete an API token # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_delete_with_http_info(key, async=True) + >>> result = thread.get() + + :param async bool + :param str key: A unique value identifying this api token. (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['key'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method api_tokens_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'key' is set + if ('key' not in params or + params['key'] is None): + raise ValueError("Missing the required parameter `key` when calling `api_tokens_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'key' in params: + path_params['key'] = params['key'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/api-tokens/{key}/', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def api_tokens_list(self, **kwargs): # noqa: E501 + """Retrieve a list of API tokens # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_list(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.api_tokens_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.api_tokens_list_with_http_info(**kwargs) # noqa: E501 + return data + + def api_tokens_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of API tokens # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method api_tokens_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/api-tokens/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def api_tokens_read(self, key, **kwargs): # noqa: E501 + """Retrieve an API token # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_read(key, async=True) + >>> result = thread.get() + + :param async bool + :param str key: A unique value identifying this api token. (required) + :return: AuthToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.api_tokens_read_with_http_info(key, **kwargs) # noqa: E501 + else: + (data) = self.api_tokens_read_with_http_info(key, **kwargs) # noqa: E501 + return data + + def api_tokens_read_with_http_info(self, key, **kwargs): # noqa: E501 + """Retrieve an API token # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.api_tokens_read_with_http_info(key, async=True) + >>> result = thread.get() + + :param async bool + :param str key: A unique value identifying this api token. (required) + :return: AuthToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['key'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method api_tokens_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'key' is set + if ('key' not in params or + params['key'] is None): + raise ValueError("Missing the required parameter `key` when calling `api_tokens_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'key' in params: + path_params['key'] = params['key'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/api-tokens/{key}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuthToken', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/document_attachments_api.py b/signrequest_client/api/document_attachments_api.py new file mode 100644 index 0000000..2240157 --- /dev/null +++ b/signrequest_client/api/document_attachments_api.py @@ -0,0 +1,343 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class DocumentAttachmentsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def document_attachments_create(self, data, **kwargs): # noqa: E501 + """Create a Document Attachment # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.document_attachments_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param DocumentAttachment data: (required) + :return: DocumentAttachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.document_attachments_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.document_attachments_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def document_attachments_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Create a Document Attachment # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.document_attachments_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param DocumentAttachment data: (required) + :return: DocumentAttachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method document_attachments_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `document_attachments_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/document-attachments/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DocumentAttachment', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def document_attachments_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Document Attachments # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.document_attachments_list(async=True) + >>> result = thread.get() + + :param async bool + :param str document__uuid: + :param str document__external_id: + :param str created: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2001 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.document_attachments_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.document_attachments_list_with_http_info(**kwargs) # noqa: E501 + return data + + def document_attachments_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Document Attachments # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.document_attachments_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str document__uuid: + :param str document__external_id: + :param str created: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2001 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['document__uuid', 'document__external_id', 'created', 'page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method document_attachments_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'document__uuid' in params: + query_params.append(('document__uuid', params['document__uuid'])) # noqa: E501 + if 'document__external_id' in params: + query_params.append(('document__external_id', params['document__external_id'])) # noqa: E501 + if 'created' in params: + query_params.append(('created', params['created'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/document-attachments/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2001', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def document_attachments_read(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Document Attachment # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.document_attachments_read(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: DocumentAttachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.document_attachments_read_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.document_attachments_read_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def document_attachments_read_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Document Attachment # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.document_attachments_read_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: DocumentAttachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method document_attachments_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `document_attachments_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/document-attachments/{uuid}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DocumentAttachment', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/documents_api.py b/signrequest_client/api/documents_api.py new file mode 100644 index 0000000..42f9e12 --- /dev/null +++ b/signrequest_client/api/documents_api.py @@ -0,0 +1,466 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class DocumentsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def documents_create(self, data, **kwargs): # noqa: E501 + """Create a Document # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param Document data: (required) + :return: Document + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.documents_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.documents_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def documents_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Create a Document # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param Document data: (required) + :return: Document + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method documents_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `documents_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/documents/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Document', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def documents_delete(self, uuid, **kwargs): # noqa: E501 + """Delete a Document # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_delete(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.documents_delete_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.documents_delete_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def documents_delete_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Delete a Document # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_delete_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method documents_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `documents_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/documents/{uuid}/', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def documents_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Documents # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_list(async=True) + >>> result = thread.get() + + :param async bool + :param str external_id: + :param str signrequest__who: + :param str signrequest__from_email: + :param str status: + :param str user__email: + :param str user__first_name: + :param str user__last_name: + :param str created: + :param str modified: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2003 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.documents_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.documents_list_with_http_info(**kwargs) # noqa: E501 + return data + + def documents_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Documents # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str external_id: + :param str signrequest__who: + :param str signrequest__from_email: + :param str status: + :param str user__email: + :param str user__first_name: + :param str user__last_name: + :param str created: + :param str modified: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2003 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['external_id', 'signrequest__who', 'signrequest__from_email', 'status', 'user__email', 'user__first_name', 'user__last_name', 'created', 'modified', 'page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method documents_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'external_id' in params: + query_params.append(('external_id', params['external_id'])) # noqa: E501 + if 'signrequest__who' in params: + query_params.append(('signrequest__who', params['signrequest__who'])) # noqa: E501 + if 'signrequest__from_email' in params: + query_params.append(('signrequest__from_email', params['signrequest__from_email'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'user__email' in params: + query_params.append(('user__email', params['user__email'])) # noqa: E501 + if 'user__first_name' in params: + query_params.append(('user__first_name', params['user__first_name'])) # noqa: E501 + if 'user__last_name' in params: + query_params.append(('user__last_name', params['user__last_name'])) # noqa: E501 + if 'created' in params: + query_params.append(('created', params['created'])) # noqa: E501 + if 'modified' in params: + query_params.append(('modified', params['modified'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/documents/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2003', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def documents_read(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Document # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_read(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: Document + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.documents_read_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.documents_read_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def documents_read_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Document # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_read_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: Document + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method documents_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `documents_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/documents/{uuid}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Document', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/documents_search_api.py b/signrequest_client/api/documents_search_api.py new file mode 100644 index 0000000..9845c90 --- /dev/null +++ b/signrequest_client/api/documents_search_api.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class DocumentsSearchApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def documents_search_list(self, **kwargs): # noqa: E501 + """Search documents # noqa: E501 + + Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?**q**={{query}} *Autocomplete search:* - ?**autocomplete**={{partial query}} *Search in document name:* - ?**name**={{query}} *Available (extra) filters:* - ?**subdomain**={{ team_subdomain }} or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?**signer_emails**={{ signer@email.com }} (will filter documents that an email needed to sign/approve) - ?**status**={{ si }} - ?**who**={{ mo }} To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). *Pagination:* - ?**page**={{ page_number: default 1 }} - ?**limit**={{ limit results: default 10, max 100 }} *Format:* By default json is returned, to export data as csv or xls use the format parameter. - ?**format**=csv - ?**format**=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an *external_id* specified on a tag will be exported. All external_id's found will be exported as columns. To use this mode add the **signer_data** parameter. - ?**format**=csv&**signer_data**=1 - ?**format**=xls&**signer_data**=1 Note that all documents are only ordered by **created** (newest first) when **q**, **autocomplete** or **name** are not used, else they are ordered by the strenght of the match. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_search_list(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :param str q: Normal search query + :param str autocomplete: Partial search query + :param str name: Document name + :param str subdomain: + :param str signer_emails: Email needed to sign/approve + :param str status: `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired + :param str who: `m`: only me, `mo`: me and others, `o`: only others + :param str format: Export format, can be `json` (default), `csv`, or `xls` + :param float signer_data: Set to `1` to export with each signer on a separate row + :return: InlineResponse2002 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.documents_search_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.documents_search_list_with_http_info(**kwargs) # noqa: E501 + return data + + def documents_search_list_with_http_info(self, **kwargs): # noqa: E501 + """Search documents # noqa: E501 + + Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?**q**={{query}} *Autocomplete search:* - ?**autocomplete**={{partial query}} *Search in document name:* - ?**name**={{query}} *Available (extra) filters:* - ?**subdomain**={{ team_subdomain }} or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?**signer_emails**={{ signer@email.com }} (will filter documents that an email needed to sign/approve) - ?**status**={{ si }} - ?**who**={{ mo }} To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). *Pagination:* - ?**page**={{ page_number: default 1 }} - ?**limit**={{ limit results: default 10, max 100 }} *Format:* By default json is returned, to export data as csv or xls use the format parameter. - ?**format**=csv - ?**format**=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an *external_id* specified on a tag will be exported. All external_id's found will be exported as columns. To use this mode add the **signer_data** parameter. - ?**format**=csv&**signer_data**=1 - ?**format**=xls&**signer_data**=1 Note that all documents are only ordered by **created** (newest first) when **q**, **autocomplete** or **name** are not used, else they are ordered by the strenght of the match. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.documents_search_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :param str q: Normal search query + :param str autocomplete: Partial search query + :param str name: Document name + :param str subdomain: + :param str signer_emails: Email needed to sign/approve + :param str status: `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired + :param str who: `m`: only me, `mo`: me and others, `o`: only others + :param str format: Export format, can be `json` (default), `csv`, or `xls` + :param float signer_data: Set to `1` to export with each signer on a separate row + :return: InlineResponse2002 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit', 'q', 'autocomplete', 'name', 'subdomain', 'signer_emails', 'status', 'who', 'format', 'signer_data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method documents_search_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'autocomplete' in params: + query_params.append(('autocomplete', params['autocomplete'])) # noqa: E501 + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + if 'subdomain' in params: + query_params.append(('subdomain', params['subdomain'])) # noqa: E501 + if 'signer_emails' in params: + query_params.append(('signer_emails', params['signer_emails'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'who' in params: + query_params.append(('who', params['who'])) # noqa: E501 + if 'format' in params: + query_params.append(('format', params['format'])) # noqa: E501 + if 'signer_data' in params: + query_params.append(('signer_data', params['signer_data'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/csv', 'application/vnd.ms-excel']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/documents-search/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2002', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/events_api.py b/signrequest_client/api/events_api.py new file mode 100644 index 0000000..dd15748 --- /dev/null +++ b/signrequest_client/api/events_api.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class EventsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def events_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Events # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.events_list(async=True) + >>> result = thread.get() + + :param async bool + :param str document__uuid: + :param str document__external_id: + :param str document__signrequest__who: + :param str document__signrequest__from_email: + :param str document__status: + :param str document__user__email: + :param str document__user__first_name: + :param str document__user__last_name: + :param str delivered: + :param str delivered_on: + :param str timestamp: + :param str status: + :param str event_type: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2004 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.events_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.events_list_with_http_info(**kwargs) # noqa: E501 + return data + + def events_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Events # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.events_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str document__uuid: + :param str document__external_id: + :param str document__signrequest__who: + :param str document__signrequest__from_email: + :param str document__status: + :param str document__user__email: + :param str document__user__first_name: + :param str document__user__last_name: + :param str delivered: + :param str delivered_on: + :param str timestamp: + :param str status: + :param str event_type: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2004 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['document__uuid', 'document__external_id', 'document__signrequest__who', 'document__signrequest__from_email', 'document__status', 'document__user__email', 'document__user__first_name', 'document__user__last_name', 'delivered', 'delivered_on', 'timestamp', 'status', 'event_type', 'page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method events_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'document__uuid' in params: + query_params.append(('document__uuid', params['document__uuid'])) # noqa: E501 + if 'document__external_id' in params: + query_params.append(('document__external_id', params['document__external_id'])) # noqa: E501 + if 'document__signrequest__who' in params: + query_params.append(('document__signrequest__who', params['document__signrequest__who'])) # noqa: E501 + if 'document__signrequest__from_email' in params: + query_params.append(('document__signrequest__from_email', params['document__signrequest__from_email'])) # noqa: E501 + if 'document__status' in params: + query_params.append(('document__status', params['document__status'])) # noqa: E501 + if 'document__user__email' in params: + query_params.append(('document__user__email', params['document__user__email'])) # noqa: E501 + if 'document__user__first_name' in params: + query_params.append(('document__user__first_name', params['document__user__first_name'])) # noqa: E501 + if 'document__user__last_name' in params: + query_params.append(('document__user__last_name', params['document__user__last_name'])) # noqa: E501 + if 'delivered' in params: + query_params.append(('delivered', params['delivered'])) # noqa: E501 + if 'delivered_on' in params: + query_params.append(('delivered_on', params['delivered_on'])) # noqa: E501 + if 'timestamp' in params: + query_params.append(('timestamp', params['timestamp'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'event_type' in params: + query_params.append(('event_type', params['event_type'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/events/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2004', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def events_read(self, id, **kwargs): # noqa: E501 + """Retrieve an Event # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.events_read(id, async=True) + >>> result = thread.get() + + :param async bool + :param int id: A unique integer value identifying this event. (required) + :return: Event + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.events_read_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.events_read_with_http_info(id, **kwargs) # noqa: E501 + return data + + def events_read_with_http_info(self, id, **kwargs): # noqa: E501 + """Retrieve an Event # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.events_read_with_http_info(id, async=True) + >>> result = thread.get() + + :param async bool + :param int id: A unique integer value identifying this event. (required) + :return: Event + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method events_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `events_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/events/{id}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Event', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/signrequest_quick_create_api.py b/signrequest_client/api/signrequest_quick_create_api.py new file mode 100644 index 0000000..4d3f355 --- /dev/null +++ b/signrequest_client/api/signrequest_quick_create_api.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class SignrequestQuickCreateApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def signrequest_quick_create_create(self, data, **kwargs): # noqa: E501 + """Quick create a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequest_quick_create_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param SignRequestQuickCreate data: (required) + :return: SignRequestQuickCreate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.signrequest_quick_create_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.signrequest_quick_create_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def signrequest_quick_create_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Quick create a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequest_quick_create_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param SignRequestQuickCreate data: (required) + :return: SignRequestQuickCreate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method signrequest_quick_create_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `signrequest_quick_create_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/signrequest-quick-create/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignRequestQuickCreate', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/signrequests_api.py b/signrequest_client/api/signrequests_api.py new file mode 100644 index 0000000..2528b09 --- /dev/null +++ b/signrequest_client/api/signrequests_api.py @@ -0,0 +1,537 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class SignrequestsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def signrequests_cancel_signrequest(self, uuid, **kwargs): # noqa: E501 + """Cancel a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_cancel_signrequest(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: InlineResponse201 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.signrequests_cancel_signrequest_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.signrequests_cancel_signrequest_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def signrequests_cancel_signrequest_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Cancel a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_cancel_signrequest_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: InlineResponse201 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method signrequests_cancel_signrequest" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `signrequests_cancel_signrequest`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/signrequests/{uuid}/cancel_signrequest/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse201', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def signrequests_create(self, data, **kwargs): # noqa: E501 + """Create a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param SignRequest data: (required) + :return: SignRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.signrequests_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.signrequests_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def signrequests_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Create a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param SignRequest data: (required) + :return: SignRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method signrequests_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `signrequests_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/signrequests/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignRequest', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def signrequests_list(self, **kwargs): # noqa: E501 + """Retrieve a list of SignRequests # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_list(async=True) + >>> result = thread.get() + + :param async bool + :param str who: + :param str from_email: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2005 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.signrequests_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.signrequests_list_with_http_info(**kwargs) # noqa: E501 + return data + + def signrequests_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of SignRequests # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str who: + :param str from_email: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2005 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['who', 'from_email', 'page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method signrequests_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'who' in params: + query_params.append(('who', params['who'])) # noqa: E501 + if 'from_email' in params: + query_params.append(('from_email', params['from_email'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/signrequests/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2005', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def signrequests_read(self, uuid, **kwargs): # noqa: E501 + """Retrieve a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_read(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: SignRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.signrequests_read_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.signrequests_read_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def signrequests_read_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Retrieve a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_read_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: SignRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method signrequests_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `signrequests_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/signrequests/{uuid}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignRequest', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def signrequests_resend_signrequest_email(self, uuid, **kwargs): # noqa: E501 + """Resend a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_resend_signrequest_email(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: InlineResponse2011 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.signrequests_resend_signrequest_email_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.signrequests_resend_signrequest_email_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def signrequests_resend_signrequest_email_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Resend a SignRequest # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.signrequests_resend_signrequest_email_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: InlineResponse2011 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method signrequests_resend_signrequest_email" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `signrequests_resend_signrequest_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/signrequests/{uuid}/resend_signrequest_email/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2011', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/team_members_api.py b/signrequest_client/api/team_members_api.py new file mode 100644 index 0000000..debe973 --- /dev/null +++ b/signrequest_client/api/team_members_api.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class TeamMembersApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def team_members_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Team Members # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.team_members_list(async=True) + >>> result = thread.get() + + :param async bool + :param str is_active: + :param str is_owner: + :param str is_admin: + :param str user__email: + :param str user__first_name: + :param str user__last_name: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2006 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.team_members_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.team_members_list_with_http_info(**kwargs) # noqa: E501 + return data + + def team_members_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Team Members # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.team_members_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str is_active: + :param str is_owner: + :param str is_admin: + :param str user__email: + :param str user__first_name: + :param str user__last_name: + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2006 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['is_active', 'is_owner', 'is_admin', 'user__email', 'user__first_name', 'user__last_name', 'page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method team_members_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'is_active' in params: + query_params.append(('is_active', params['is_active'])) # noqa: E501 + if 'is_owner' in params: + query_params.append(('is_owner', params['is_owner'])) # noqa: E501 + if 'is_admin' in params: + query_params.append(('is_admin', params['is_admin'])) # noqa: E501 + if 'user__email' in params: + query_params.append(('user__email', params['user__email'])) # noqa: E501 + if 'user__first_name' in params: + query_params.append(('user__first_name', params['user__first_name'])) # noqa: E501 + if 'user__last_name' in params: + query_params.append(('user__last_name', params['user__last_name'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/team-members/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2006', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def team_members_read(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Team Member # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.team_members_read(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: TeamMember + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.team_members_read_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.team_members_read_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def team_members_read_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Team Member # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.team_members_read_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: TeamMember + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method team_members_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `team_members_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/team-members/{uuid}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TeamMember', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/teams_api.py b/signrequest_client/api/teams_api.py new file mode 100644 index 0000000..3834e44 --- /dev/null +++ b/signrequest_client/api/teams_api.py @@ -0,0 +1,545 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class TeamsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def teams_create(self, data, **kwargs): # noqa: E501 + """Create a Team # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param Team data: (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.teams_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.teams_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def teams_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Create a Team # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param Team data: (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method teams_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `teams_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def teams_invite_member(self, subdomain, data, **kwargs): # noqa: E501 + """Invite a Team Member # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_invite_member(subdomain, data, async=True) + >>> result = thread.get() + + :param async bool + :param str subdomain: (required) + :param InviteMember data: (required) + :return: InviteMember + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.teams_invite_member_with_http_info(subdomain, data, **kwargs) # noqa: E501 + else: + (data) = self.teams_invite_member_with_http_info(subdomain, data, **kwargs) # noqa: E501 + return data + + def teams_invite_member_with_http_info(self, subdomain, data, **kwargs): # noqa: E501 + """Invite a Team Member # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_invite_member_with_http_info(subdomain, data, async=True) + >>> result = thread.get() + + :param async bool + :param str subdomain: (required) + :param InviteMember data: (required) + :return: InviteMember + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['subdomain', 'data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method teams_invite_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'subdomain' is set + if ('subdomain' not in params or + params['subdomain'] is None): + raise ValueError("Missing the required parameter `subdomain` when calling `teams_invite_member`") # noqa: E501 + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `teams_invite_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'subdomain' in params: + path_params['subdomain'] = params['subdomain'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{subdomain}/invite_member/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InviteMember', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def teams_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Teams # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_list(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2007 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.teams_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.teams_list_with_http_info(**kwargs) # noqa: E501 + return data + + def teams_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Teams # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2007 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method teams_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2007', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def teams_partial_update(self, subdomain, data, **kwargs): # noqa: E501 + """Update a Team # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_partial_update(subdomain, data, async=True) + >>> result = thread.get() + + :param async bool + :param str subdomain: (required) + :param Team data: (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.teams_partial_update_with_http_info(subdomain, data, **kwargs) # noqa: E501 + else: + (data) = self.teams_partial_update_with_http_info(subdomain, data, **kwargs) # noqa: E501 + return data + + def teams_partial_update_with_http_info(self, subdomain, data, **kwargs): # noqa: E501 + """Update a Team # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_partial_update_with_http_info(subdomain, data, async=True) + >>> result = thread.get() + + :param async bool + :param str subdomain: (required) + :param Team data: (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['subdomain', 'data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method teams_partial_update" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'subdomain' is set + if ('subdomain' not in params or + params['subdomain'] is None): + raise ValueError("Missing the required parameter `subdomain` when calling `teams_partial_update`") # noqa: E501 + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `teams_partial_update`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'subdomain' in params: + path_params['subdomain'] = params['subdomain'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{subdomain}/', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def teams_read(self, subdomain, **kwargs): # noqa: E501 + """Retrieve a Team # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_read(subdomain, async=True) + >>> result = thread.get() + + :param async bool + :param str subdomain: (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.teams_read_with_http_info(subdomain, **kwargs) # noqa: E501 + else: + (data) = self.teams_read_with_http_info(subdomain, **kwargs) # noqa: E501 + return data + + def teams_read_with_http_info(self, subdomain, **kwargs): # noqa: E501 + """Retrieve a Team # noqa: E501 + + Required fields are **name** and **subdomain** where the subdomain is globally unique. Use **POST** to create a Team. To update a field on a Team use **PATCH**. To use the API on behalf of a particular team change the endpoint to: *https://**{{ subdomain }}**.signrequest.com/api/v1/...* To invite new team members you can use **POST** {\"email\":\"**email-of-member-to-invite@example.com**\",\"is_admin\":false,\"is_owner\":false} to: *https://signrequest.com/api/v1/teams/**{{ subdomain }}**/invite_member/* # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.teams_read_with_http_info(subdomain, async=True) + >>> result = thread.get() + + :param async bool + :param str subdomain: (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['subdomain'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method teams_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'subdomain' is set + if ('subdomain' not in params or + params['subdomain'] is None): + raise ValueError("Missing the required parameter `subdomain` when calling `teams_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'subdomain' in params: + path_params['subdomain'] = params['subdomain'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{subdomain}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/templates_api.py b/signrequest_client/api/templates_api.py new file mode 100644 index 0000000..ade6888 --- /dev/null +++ b/signrequest_client/api/templates_api.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class TemplatesApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def templates_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Templates # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.templates_list(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2008 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.templates_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.templates_list_with_http_info(**kwargs) # noqa: E501 + return data + + def templates_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Templates # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.templates_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2008 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method templates_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/templates/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2008', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def templates_read(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Template # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.templates_read(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: Template + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.templates_read_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.templates_read_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def templates_read_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Template # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.templates_read_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: Template + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method templates_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `templates_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/templates/{uuid}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Template', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api/webhooks_api.py b/signrequest_client/api/webhooks_api.py new file mode 100644 index 0000000..dcfbd0c --- /dev/null +++ b/signrequest_client/api/webhooks_api.py @@ -0,0 +1,644 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from signrequest_client.api_client import ApiClient + + +class WebhooksApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def webhooks_create(self, data, **kwargs): # noqa: E501 + """Create a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_create(data, async=True) + >>> result = thread.get() + + :param async bool + :param WebhookSubscription data: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.webhooks_create_with_http_info(data, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_create_with_http_info(data, **kwargs) # noqa: E501 + return data + + def webhooks_create_with_http_info(self, data, **kwargs): # noqa: E501 + """Create a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_create_with_http_info(data, async=True) + >>> result = thread.get() + + :param async bool + :param WebhookSubscription data: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhooks_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `webhooks_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookSubscription', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhooks_delete(self, uuid, **kwargs): # noqa: E501 + """Delete a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_delete(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.webhooks_delete_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_delete_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def webhooks_delete_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Delete a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_delete_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhooks_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `webhooks_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{uuid}/', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhooks_list(self, **kwargs): # noqa: E501 + """Retrieve a list of Webhooks # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_list(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2009 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.webhooks_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.webhooks_list_with_http_info(**kwargs) # noqa: E501 + return data + + def webhooks_list_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve a list of Webhooks # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_list_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param int page: A page number within the paginated result set. + :param int limit: Number of results to return per page. + :return: InlineResponse2009 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhooks_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2009', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhooks_partial_update(self, uuid, data, **kwargs): # noqa: E501 + """Partially update a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_partial_update(uuid, data, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :param WebhookSubscription data: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.webhooks_partial_update_with_http_info(uuid, data, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_partial_update_with_http_info(uuid, data, **kwargs) # noqa: E501 + return data + + def webhooks_partial_update_with_http_info(self, uuid, data, **kwargs): # noqa: E501 + """Partially update a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_partial_update_with_http_info(uuid, data, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :param WebhookSubscription data: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid', 'data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhooks_partial_update" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `webhooks_partial_update`") # noqa: E501 + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `webhooks_partial_update`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{uuid}/', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookSubscription', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhooks_read(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_read(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.webhooks_read_with_http_info(uuid, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_read_with_http_info(uuid, **kwargs) # noqa: E501 + return data + + def webhooks_read_with_http_info(self, uuid, **kwargs): # noqa: E501 + """Retrieve a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_read_with_http_info(uuid, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhooks_read" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `webhooks_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{uuid}/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookSubscription', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def webhooks_update(self, uuid, data, **kwargs): # noqa: E501 + """Update a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_update(uuid, data, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :param WebhookSubscription data: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.webhooks_update_with_http_info(uuid, data, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_update_with_http_info(uuid, data, **kwargs) # noqa: E501 + return data + + def webhooks_update_with_http_info(self, uuid, data, **kwargs): # noqa: E501 + """Update a Webhook # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.webhooks_update_with_http_info(uuid, data, async=True) + >>> result = thread.get() + + :param async bool + :param str uuid: (required) + :param WebhookSubscription data: (required) + :return: WebhookSubscription + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['uuid', 'data'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method webhooks_update" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'uuid' is set + if ('uuid' not in params or + params['uuid'] is None): + raise ValueError("Missing the required parameter `uuid` when calling `webhooks_update`") # noqa: E501 + # verify the required parameter 'data' is set + if ('data' not in params or + params['data'] is None): + raise ValueError("Missing the required parameter `data` when calling `webhooks_update`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'uuid' in params: + path_params['uuid'] = params['uuid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in params: + body_params = params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Token'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{uuid}/', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookSubscription', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/signrequest_client/api_client.py b/signrequest_client/api_client.py new file mode 100644 index 0000000..57b58d3 --- /dev/null +++ b/signrequest_client/api_client.py @@ -0,0 +1,621 @@ +# coding: utf-8 +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from signrequest_client.configuration import Configuration +import signrequest_client.models +from signrequest_client import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + self.pool = ThreadPool() + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/1.0.0/python' + + def __del__(self): + self.pool.close() + self.pool.join() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match('list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(signrequest_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async is False or missing, + then the method will return the response directly. + """ + if not async: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.u(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.swagger_types and not hasattr(klass, + 'get_real_child_model'): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/signrequest_client/client.py b/signrequest_client/client.py deleted file mode 100644 index a48e11e..0000000 --- a/signrequest_client/client.py +++ /dev/null @@ -1,146 +0,0 @@ -# -*- coding: utf-8 -*- -import hashlib -import hmac -from signrequest_client import __version__ as version - -__author__ = "Michaël Krens" -__copyright__ = "Copyright 2015, SignRequest B.V." -import json -try: - import requests -except ImportError: - pass - - -class SignRequestClientException(Exception): - pass - - -class SignRequestClient(object): - - def __init__(self, subdomain, token=None, api_base_endpoint='https://signrequest.com/api/v1/', - username=None, password=None): - self.subdomain = subdomain - self.token = token - self.api_base_endpoint = api_base_endpoint - if username and password: - self.authenticate(username, password) - if not self.token: - raise SignRequestClientException( - "Please authenticate by providing a valid token or by username and password") - - def get_headers(self, is_json=False): - headers = {'Authorization': 'Token %s' % self.token, 'X-Client-Version': version} - if is_json: - headers['Content-Type'] = 'application/json' - return headers - - def authenticate(self, username, password): - resp = requests.post( - self.api_base_endpoint + 'api-tokens/', - data={'subdomain': self.subdomain}, auth=(username, password) - ) - if resp.ok: - self.token = json.loads(resp.content)['token'] - else: - raise SignRequestClientException("Could not authenticate, response: %s " % resp.content) - return self.token - - def create_document_from_file(self, file_object): - resp = requests.post( - self.api_base_endpoint + 'documents/', files={'file': file_object}, - headers=self.get_headers()) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not create document, response: %s " % resp.content) - - def create_document_from_url(self, url): - resp = requests.post( - self.api_base_endpoint + 'documents/', data={'file_from_url': url}, - headers=self.get_headers(is_json=True)) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not create document, response: %s " % resp.content) - - def create_signrequest(self, uuid, from_email, signers=None, who='o', message='', subject='', - required_attachments=None, disable_attachments=False, disable_text=False): - signers = signers or [] - required_attachments = required_attachments or [] - if not isinstance(signers, list): - raise SignRequestClientException("`signers` must be a list") - if not isinstance(required_attachments, list): - raise SignRequestClientException("`required_attachments` must be a list") - # all other invalid posts will be returned by the API with an error - data = { - 'document': self.api_base_endpoint + 'documents/' + uuid + '/', - 'from_email': from_email, - 'who': who, - 'message': message, - 'subject': subject, - 'disable_attachments': disable_attachments, - 'disable_text': disable_text, - 'required_attachments': required_attachments, - 'signers': signers, - } - resp = requests.post( - self.api_base_endpoint + 'signrequests/', - data=json.dumps(data), - headers=self.get_headers(is_json=True)) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not create document, response: %s " % resp.content) - - def resend_signrequest_email(self, signrequest_uuid): - resp = requests.post( - self.api_base_endpoint + 'signrequests/' + signrequest_uuid + '/resend_signrequest_email/', - headers=self.get_headers()) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not resend email, response: %s " % resp.content) - - def get_document(self, uuid): - resp = requests.get( - self.api_base_endpoint + 'documents/' + uuid + '/', - headers=self.get_headers()) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not get document, response: %s " % resp.content) - - def get_documents(self, filter_params=''): - filter_params = filter_params.strip('?').strip('&') - endpoint = self.api_base_endpoint + 'documents/?' + filter_params - resp = requests.get( - endpoint, - headers=self.get_headers()) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not get documents, response: %s " % resp.content) - - def get_events(self, doc_uuid=None, filter_params=''): - endpoint = self.api_base_endpoint + 'events/' - filter_params = filter_params.strip('?').strip('&') - if doc_uuid or filter_params: - endpoint += '?' - if filter_params: - endpoint += filter_params - if doc_uuid: - if not endpoint.endswith('?'): - endpoint += '&' if not endpoint.endswith('&') else '' - endpoint += 'document__uuid=' + doc_uuid - resp = requests.get( - endpoint, - headers=self.get_headers()) - if resp.ok: - return json.loads(resp.content) - else: - raise SignRequestClientException("Could not get event(s), response: %s " % resp.content) - - def confirm_callback_authenticity(self, event_time, event_type, event_hash): - return event_hash == hmac.new(self.token, (event_time + event_type), - hashlib.sha256).hexdigest() diff --git a/signrequest_client/configuration.py b/signrequest_client/configuration.py new file mode 100644 index 0000000..cb29b7e --- /dev/null +++ b/signrequest_client/configuration.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + def __init__(self): + """Constructor""" + # Default Base url + self.host = "https://signrequest.com/api/v1" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("signrequest_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'Token': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix('Authorization') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: v1\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/signrequest_client/models/__init__.py b/signrequest_client/models/__init__.py new file mode 100644 index 0000000..3ee1854 --- /dev/null +++ b/signrequest_client/models/__init__.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +# flake8: noqa +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from signrequest_client.models.auth_token import AuthToken +from signrequest_client.models.document import Document +from signrequest_client.models.document_attachment import DocumentAttachment +from signrequest_client.models.document_search import DocumentSearch +from signrequest_client.models.document_signer_template_conf import DocumentSignerTemplateConf +from signrequest_client.models.event import Event +from signrequest_client.models.file_from_sf import FileFromSf +from signrequest_client.models.inline_document_signer_integration_data import InlineDocumentSignerIntegrationData +from signrequest_client.models.inline_integration_data import InlineIntegrationData +from signrequest_client.models.inline_prefill_tags import InlinePrefillTags +from signrequest_client.models.inline_response_200 import InlineResponse200 +from signrequest_client.models.inline_response_200_1 import InlineResponse2001 +from signrequest_client.models.inline_response_200_2 import InlineResponse2002 +from signrequest_client.models.inline_response_200_3 import InlineResponse2003 +from signrequest_client.models.inline_response_200_4 import InlineResponse2004 +from signrequest_client.models.inline_response_200_5 import InlineResponse2005 +from signrequest_client.models.inline_response_200_6 import InlineResponse2006 +from signrequest_client.models.inline_response_200_7 import InlineResponse2007 +from signrequest_client.models.inline_response_200_8 import InlineResponse2008 +from signrequest_client.models.inline_response_200_9 import InlineResponse2009 +from signrequest_client.models.inline_response_201 import InlineResponse201 +from signrequest_client.models.inline_response_201_1 import InlineResponse2011 +from signrequest_client.models.inline_sign_request import InlineSignRequest +from signrequest_client.models.inline_team import InlineTeam +from signrequest_client.models.inline_team_member import InlineTeamMember +from signrequest_client.models.invite_member import InviteMember +from signrequest_client.models.placeholder import Placeholder +from signrequest_client.models.required_attachment import RequiredAttachment +from signrequest_client.models.sign_request import SignRequest +from signrequest_client.models.sign_request_quick_create import SignRequestQuickCreate +from signrequest_client.models.signer import Signer +from signrequest_client.models.signer_attachment import SignerAttachment +from signrequest_client.models.signer_inputs import SignerInputs +from signrequest_client.models.signing_log import SigningLog +from signrequest_client.models.team import Team +from signrequest_client.models.team_member import TeamMember +from signrequest_client.models.template import Template +from signrequest_client.models.user import User +from signrequest_client.models.webhook_subscription import WebhookSubscription diff --git a/signrequest_client/models/auth_token.py b/signrequest_client/models/auth_token.py new file mode 100644 index 0000000..613a34f --- /dev/null +++ b/signrequest_client/models/auth_token.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AuthToken(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'password': 'str', + 'subdomain': 'str', + 'name': 'str', + 'key': 'str', + 'url': 'str' + } + + attribute_map = { + 'email': 'email', + 'password': 'password', + 'subdomain': 'subdomain', + 'name': 'name', + 'key': 'key', + 'url': 'url' + } + + def __init__(self, email=None, password=None, subdomain=None, name=None, key=None, url=None): # noqa: E501 + """AuthToken - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._password = None + self._subdomain = None + self._name = None + self._key = None + self._url = None + self.discriminator = None + + if email is not None: + self.email = email + if password is not None: + self.password = password + self.subdomain = subdomain + if name is not None: + self.name = name + if key is not None: + self.key = key + if url is not None: + self.url = url + + @property + def email(self): + """Gets the email of this AuthToken. # noqa: E501 + + + :return: The email of this AuthToken. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this AuthToken. + + + :param email: The email of this AuthToken. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def password(self): + """Gets the password of this AuthToken. # noqa: E501 + + + :return: The password of this AuthToken. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this AuthToken. + + + :param password: The password of this AuthToken. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def subdomain(self): + """Gets the subdomain of this AuthToken. # noqa: E501 + + + :return: The subdomain of this AuthToken. # noqa: E501 + :rtype: str + """ + return self._subdomain + + @subdomain.setter + def subdomain(self, subdomain): + """Sets the subdomain of this AuthToken. + + + :param subdomain: The subdomain of this AuthToken. # noqa: E501 + :type: str + """ + if subdomain is None: + raise ValueError("Invalid value for `subdomain`, must not be `None`") # noqa: E501 + if subdomain is not None and len(subdomain) < 1: + raise ValueError("Invalid value for `subdomain`, length must be greater than or equal to `1`") # noqa: E501 + if subdomain is not None and not re.search('^[-a-zA-Z0-9_]+$', subdomain): # noqa: E501 + raise ValueError("Invalid value for `subdomain`, must be a follow pattern or equal to `/^[-a-zA-Z0-9_]+$/`") # noqa: E501 + + self._subdomain = subdomain + + @property + def name(self): + """Gets the name of this AuthToken. # noqa: E501 + + + :return: The name of this AuthToken. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AuthToken. + + + :param name: The name of this AuthToken. # noqa: E501 + :type: str + """ + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def key(self): + """Gets the key of this AuthToken. # noqa: E501 + + + :return: The key of this AuthToken. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this AuthToken. + + + :param key: The key of this AuthToken. # noqa: E501 + :type: str + """ + if key is not None and len(key) < 1: + raise ValueError("Invalid value for `key`, length must be greater than or equal to `1`") # noqa: E501 + + self._key = key + + @property + def url(self): + """Gets the url of this AuthToken. # noqa: E501 + + + :return: The url of this AuthToken. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AuthToken. + + + :param url: The url of this AuthToken. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuthToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/document.py b/signrequest_client/models/document.py new file mode 100644 index 0000000..6a8a0fa --- /dev/null +++ b/signrequest_client/models/document.py @@ -0,0 +1,748 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.document_attachment import DocumentAttachment # noqa: F401,E501 +from signrequest_client.models.file_from_sf import FileFromSf # noqa: F401,E501 +from signrequest_client.models.inline_integration_data import InlineIntegrationData # noqa: F401,E501 +from signrequest_client.models.inline_prefill_tags import InlinePrefillTags # noqa: F401,E501 +from signrequest_client.models.user import User # noqa: F401,E501 + + +class Document(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'url': 'str', + 'uuid': 'str', + 'user': 'User', + 'file_as_pdf': 'str', + 'name': 'str', + 'external_id': 'str', + 'frontend_id': 'str', + 'file': 'str', + 'file_from_url': 'str', + 'events_callback_url': 'str', + 'file_from_content': 'str', + 'file_from_content_name': 'str', + 'template': 'str', + 'prefill_tags': 'list[InlinePrefillTags]', + 'integrations': 'list[InlineIntegrationData]', + 'file_from_sf': 'FileFromSf', + 'auto_delete_days': 'int', + 'pdf': 'str', + 'status': 'str', + 'api_used': 'bool', + 'security_hash': 'str', + 'attachments': 'list[DocumentAttachment]', + 'auto_delete_after': 'datetime' + } + + attribute_map = { + 'url': 'url', + 'uuid': 'uuid', + 'user': 'user', + 'file_as_pdf': 'file_as_pdf', + 'name': 'name', + 'external_id': 'external_id', + 'frontend_id': 'frontend_id', + 'file': 'file', + 'file_from_url': 'file_from_url', + 'events_callback_url': 'events_callback_url', + 'file_from_content': 'file_from_content', + 'file_from_content_name': 'file_from_content_name', + 'template': 'template', + 'prefill_tags': 'prefill_tags', + 'integrations': 'integrations', + 'file_from_sf': 'file_from_sf', + 'auto_delete_days': 'auto_delete_days', + 'pdf': 'pdf', + 'status': 'status', + 'api_used': 'api_used', + 'security_hash': 'security_hash', + 'attachments': 'attachments', + 'auto_delete_after': 'auto_delete_after' + } + + def __init__(self, url=None, uuid=None, user=None, file_as_pdf=None, name=None, external_id=None, frontend_id=None, file=None, file_from_url=None, events_callback_url=None, file_from_content=None, file_from_content_name=None, template=None, prefill_tags=None, integrations=None, file_from_sf=None, auto_delete_days=None, pdf=None, status=None, api_used=None, security_hash=None, attachments=None, auto_delete_after=None): # noqa: E501 + """Document - a model defined in Swagger""" # noqa: E501 + + self._url = None + self._uuid = None + self._user = None + self._file_as_pdf = None + self._name = None + self._external_id = None + self._frontend_id = None + self._file = None + self._file_from_url = None + self._events_callback_url = None + self._file_from_content = None + self._file_from_content_name = None + self._template = None + self._prefill_tags = None + self._integrations = None + self._file_from_sf = None + self._auto_delete_days = None + self._pdf = None + self._status = None + self._api_used = None + self._security_hash = None + self._attachments = None + self._auto_delete_after = None + self.discriminator = None + + if url is not None: + self.url = url + if uuid is not None: + self.uuid = uuid + if user is not None: + self.user = user + if file_as_pdf is not None: + self.file_as_pdf = file_as_pdf + if name is not None: + self.name = name + if external_id is not None: + self.external_id = external_id + if frontend_id is not None: + self.frontend_id = frontend_id + if file is not None: + self.file = file + if file_from_url is not None: + self.file_from_url = file_from_url + if events_callback_url is not None: + self.events_callback_url = events_callback_url + if file_from_content is not None: + self.file_from_content = file_from_content + if file_from_content_name is not None: + self.file_from_content_name = file_from_content_name + if template is not None: + self.template = template + if prefill_tags is not None: + self.prefill_tags = prefill_tags + if integrations is not None: + self.integrations = integrations + if file_from_sf is not None: + self.file_from_sf = file_from_sf + if auto_delete_days is not None: + self.auto_delete_days = auto_delete_days + if pdf is not None: + self.pdf = pdf + if status is not None: + self.status = status + if api_used is not None: + self.api_used = api_used + if security_hash is not None: + self.security_hash = security_hash + if attachments is not None: + self.attachments = attachments + if auto_delete_after is not None: + self.auto_delete_after = auto_delete_after + + @property + def url(self): + """Gets the url of this Document. # noqa: E501 + + + :return: The url of this Document. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Document. + + + :param url: The url of this Document. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def uuid(self): + """Gets the uuid of this Document. # noqa: E501 + + + :return: The uuid of this Document. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Document. + + + :param uuid: The uuid of this Document. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def user(self): + """Gets the user of this Document. # noqa: E501 + + + :return: The user of this Document. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Document. + + + :param user: The user of this Document. # noqa: E501 + :type: User + """ + + self._user = user + + @property + def file_as_pdf(self): + """Gets the file_as_pdf of this Document. # noqa: E501 + + Temporary URL to original file as PDF, expires in five minutes # noqa: E501 + + :return: The file_as_pdf of this Document. # noqa: E501 + :rtype: str + """ + return self._file_as_pdf + + @file_as_pdf.setter + def file_as_pdf(self, file_as_pdf): + """Sets the file_as_pdf of this Document. + + Temporary URL to original file as PDF, expires in five minutes # noqa: E501 + + :param file_as_pdf: The file_as_pdf of this Document. # noqa: E501 + :type: str + """ + if file_as_pdf is not None and len(file_as_pdf) < 1: + raise ValueError("Invalid value for `file_as_pdf`, length must be greater than or equal to `1`") # noqa: E501 + + self._file_as_pdf = file_as_pdf + + @property + def name(self): + """Gets the name of this Document. # noqa: E501 + + Defaults to filename, including extension # noqa: E501 + + :return: The name of this Document. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Document. + + Defaults to filename, including extension # noqa: E501 + + :param name: The name of this Document. # noqa: E501 + :type: str + """ + if name is not None and len(name) > 255: + raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 + + self._name = name + + @property + def external_id(self): + """Gets the external_id of this Document. # noqa: E501 + + ID used to reference document in external system # noqa: E501 + + :return: The external_id of this Document. # noqa: E501 + :rtype: str + """ + return self._external_id + + @external_id.setter + def external_id(self, external_id): + """Sets the external_id of this Document. + + ID used to reference document in external system # noqa: E501 + + :param external_id: The external_id of this Document. # noqa: E501 + :type: str + """ + if external_id is not None and len(external_id) > 255: + raise ValueError("Invalid value for `external_id`, length must be less than or equal to `255`") # noqa: E501 + + self._external_id = external_id + + @property + def frontend_id(self): + """Gets the frontend_id of this Document. # noqa: E501 + + Shared secret used in conjunction with SignRequest-js client to grant user access to a document that's not a member of the document's team # noqa: E501 + + :return: The frontend_id of this Document. # noqa: E501 + :rtype: str + """ + return self._frontend_id + + @frontend_id.setter + def frontend_id(self, frontend_id): + """Sets the frontend_id of this Document. + + Shared secret used in conjunction with SignRequest-js client to grant user access to a document that's not a member of the document's team # noqa: E501 + + :param frontend_id: The frontend_id of this Document. # noqa: E501 + :type: str + """ + if frontend_id is not None and len(frontend_id) > 255: + raise ValueError("Invalid value for `frontend_id`, length must be less than or equal to `255`") # noqa: E501 + + self._frontend_id = frontend_id + + @property + def file(self): + """Gets the file of this Document. # noqa: E501 + + Temporary URL to original file, expires in five minutes # noqa: E501 + + :return: The file of this Document. # noqa: E501 + :rtype: str + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this Document. + + Temporary URL to original file, expires in five minutes # noqa: E501 + + :param file: The file of this Document. # noqa: E501 + :type: str + """ + + self._file = file + + @property + def file_from_url(self): + """Gets the file_from_url of this Document. # noqa: E501 + + Publicly accessible URL of document to be downloaded by SignRequest # noqa: E501 + + :return: The file_from_url of this Document. # noqa: E501 + :rtype: str + """ + return self._file_from_url + + @file_from_url.setter + def file_from_url(self, file_from_url): + """Sets the file_from_url of this Document. + + Publicly accessible URL of document to be downloaded by SignRequest # noqa: E501 + + :param file_from_url: The file_from_url of this Document. # noqa: E501 + :type: str + """ + if file_from_url is not None and len(file_from_url) > 2100: + raise ValueError("Invalid value for `file_from_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._file_from_url = file_from_url + + @property + def events_callback_url(self): + """Gets the events_callback_url of this Document. # noqa: E501 + + URL at which to receive [event callbacks](#section/Events/Events-callback) for this document # noqa: E501 + + :return: The events_callback_url of this Document. # noqa: E501 + :rtype: str + """ + return self._events_callback_url + + @events_callback_url.setter + def events_callback_url(self, events_callback_url): + """Sets the events_callback_url of this Document. + + URL at which to receive [event callbacks](#section/Events/Events-callback) for this document # noqa: E501 + + :param events_callback_url: The events_callback_url of this Document. # noqa: E501 + :type: str + """ + if events_callback_url is not None and len(events_callback_url) > 2100: + raise ValueError("Invalid value for `events_callback_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._events_callback_url = events_callback_url + + @property + def file_from_content(self): + """Gets the file_from_content of this Document. # noqa: E501 + + Base64 encoded document content # noqa: E501 + + :return: The file_from_content of this Document. # noqa: E501 + :rtype: str + """ + return self._file_from_content + + @file_from_content.setter + def file_from_content(self, file_from_content): + """Sets the file_from_content of this Document. + + Base64 encoded document content # noqa: E501 + + :param file_from_content: The file_from_content of this Document. # noqa: E501 + :type: str + """ + + self._file_from_content = file_from_content + + @property + def file_from_content_name(self): + """Gets the file_from_content_name of this Document. # noqa: E501 + + Filename, including extension. Required when using `file_from_content`. # noqa: E501 + + :return: The file_from_content_name of this Document. # noqa: E501 + :rtype: str + """ + return self._file_from_content_name + + @file_from_content_name.setter + def file_from_content_name(self, file_from_content_name): + """Sets the file_from_content_name of this Document. + + Filename, including extension. Required when using `file_from_content`. # noqa: E501 + + :param file_from_content_name: The file_from_content_name of this Document. # noqa: E501 + :type: str + """ + + self._file_from_content_name = file_from_content_name + + @property + def template(self): + """Gets the template of this Document. # noqa: E501 + + + :return: The template of this Document. # noqa: E501 + :rtype: str + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this Document. + + + :param template: The template of this Document. # noqa: E501 + :type: str + """ + + self._template = template + + @property + def prefill_tags(self): + """Gets the prefill_tags of this Document. # noqa: E501 + + Prefill signer input data, see [prefill tags](#section/Preparing-a-document/Prefill-tags-templates) # noqa: E501 + + :return: The prefill_tags of this Document. # noqa: E501 + :rtype: list[InlinePrefillTags] + """ + return self._prefill_tags + + @prefill_tags.setter + def prefill_tags(self, prefill_tags): + """Sets the prefill_tags of this Document. + + Prefill signer input data, see [prefill tags](#section/Preparing-a-document/Prefill-tags-templates) # noqa: E501 + + :param prefill_tags: The prefill_tags of this Document. # noqa: E501 + :type: list[InlinePrefillTags] + """ + + self._prefill_tags = prefill_tags + + @property + def integrations(self): + """Gets the integrations of this Document. # noqa: E501 + + + :return: The integrations of this Document. # noqa: E501 + :rtype: list[InlineIntegrationData] + """ + return self._integrations + + @integrations.setter + def integrations(self, integrations): + """Sets the integrations of this Document. + + + :param integrations: The integrations of this Document. # noqa: E501 + :type: list[InlineIntegrationData] + """ + + self._integrations = integrations + + @property + def file_from_sf(self): + """Gets the file_from_sf of this Document. # noqa: E501 + + + :return: The file_from_sf of this Document. # noqa: E501 + :rtype: FileFromSf + """ + return self._file_from_sf + + @file_from_sf.setter + def file_from_sf(self, file_from_sf): + """Sets the file_from_sf of this Document. + + + :param file_from_sf: The file_from_sf of this Document. # noqa: E501 + :type: FileFromSf + """ + + self._file_from_sf = file_from_sf + + @property + def auto_delete_days(self): + """Gets the auto_delete_days of this Document. # noqa: E501 + + Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted # noqa: E501 + + :return: The auto_delete_days of this Document. # noqa: E501 + :rtype: int + """ + return self._auto_delete_days + + @auto_delete_days.setter + def auto_delete_days(self, auto_delete_days): + """Sets the auto_delete_days of this Document. + + Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted # noqa: E501 + + :param auto_delete_days: The auto_delete_days of this Document. # noqa: E501 + :type: int + """ + if auto_delete_days is not None and auto_delete_days > 730: # noqa: E501 + raise ValueError("Invalid value for `auto_delete_days`, must be a value less than or equal to `730`") # noqa: E501 + if auto_delete_days is not None and auto_delete_days < 1: # noqa: E501 + raise ValueError("Invalid value for `auto_delete_days`, must be a value greater than or equal to `1`") # noqa: E501 + + self._auto_delete_days = auto_delete_days + + @property + def pdf(self): + """Gets the pdf of this Document. # noqa: E501 + + Temporary URL to signed document as PDF, expires in five minutes # noqa: E501 + + :return: The pdf of this Document. # noqa: E501 + :rtype: str + """ + return self._pdf + + @pdf.setter + def pdf(self, pdf): + """Sets the pdf of this Document. + + Temporary URL to signed document as PDF, expires in five minutes # noqa: E501 + + :param pdf: The pdf of this Document. # noqa: E501 + :type: str + """ + + self._pdf = pdf + + @property + def status(self): + """Gets the status of this Document. # noqa: E501 + + `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired # noqa: E501 + + :return: The status of this Document. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Document. + + `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired # noqa: E501 + + :param status: The status of this Document. # noqa: E501 + :type: str + """ + allowed_values = ["co", "ne", "se", "vi", "si", "do", "sd", "ca", "de", "ec", "es", "xp"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def api_used(self): + """Gets the api_used of this Document. # noqa: E501 + + Indicates whether document was created using the API # noqa: E501 + + :return: The api_used of this Document. # noqa: E501 + :rtype: bool + """ + return self._api_used + + @api_used.setter + def api_used(self, api_used): + """Sets the api_used of this Document. + + Indicates whether document was created using the API # noqa: E501 + + :param api_used: The api_used of this Document. # noqa: E501 + :type: bool + """ + + self._api_used = api_used + + @property + def security_hash(self): + """Gets the security_hash of this Document. # noqa: E501 + + SHA256 hash of PDF contents # noqa: E501 + + :return: The security_hash of this Document. # noqa: E501 + :rtype: str + """ + return self._security_hash + + @security_hash.setter + def security_hash(self, security_hash): + """Sets the security_hash of this Document. + + SHA256 hash of PDF contents # noqa: E501 + + :param security_hash: The security_hash of this Document. # noqa: E501 + :type: str + """ + if security_hash is not None and len(security_hash) < 1: + raise ValueError("Invalid value for `security_hash`, length must be greater than or equal to `1`") # noqa: E501 + + self._security_hash = security_hash + + @property + def attachments(self): + """Gets the attachments of this Document. # noqa: E501 + + + :return: The attachments of this Document. # noqa: E501 + :rtype: list[DocumentAttachment] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this Document. + + + :param attachments: The attachments of this Document. # noqa: E501 + :type: list[DocumentAttachment] + """ + + self._attachments = attachments + + @property + def auto_delete_after(self): + """Gets the auto_delete_after of this Document. # noqa: E501 + + Date and time calculated using `auto_delete_days` after which a finished document (signed/cancelled/declined) will be automatically deleted # noqa: E501 + + :return: The auto_delete_after of this Document. # noqa: E501 + :rtype: datetime + """ + return self._auto_delete_after + + @auto_delete_after.setter + def auto_delete_after(self, auto_delete_after): + """Sets the auto_delete_after of this Document. + + Date and time calculated using `auto_delete_days` after which a finished document (signed/cancelled/declined) will be automatically deleted # noqa: E501 + + :param auto_delete_after: The auto_delete_after of this Document. # noqa: E501 + :type: datetime + """ + + self._auto_delete_after = auto_delete_after + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Document): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/document_attachment.py b/signrequest_client/models/document_attachment.py new file mode 100644 index 0000000..460af9c --- /dev/null +++ b/signrequest_client/models/document_attachment.py @@ -0,0 +1,311 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class DocumentAttachment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'url': 'str', + 'uuid': 'str', + 'name': 'str', + 'file': 'str', + 'file_from_content': 'str', + 'file_from_content_name': 'str', + 'file_from_url': 'str', + 'document': 'str' + } + + attribute_map = { + 'url': 'url', + 'uuid': 'uuid', + 'name': 'name', + 'file': 'file', + 'file_from_content': 'file_from_content', + 'file_from_content_name': 'file_from_content_name', + 'file_from_url': 'file_from_url', + 'document': 'document' + } + + def __init__(self, url=None, uuid=None, name=None, file=None, file_from_content=None, file_from_content_name=None, file_from_url=None, document=None): # noqa: E501 + """DocumentAttachment - a model defined in Swagger""" # noqa: E501 + + self._url = None + self._uuid = None + self._name = None + self._file = None + self._file_from_content = None + self._file_from_content_name = None + self._file_from_url = None + self._document = None + self.discriminator = None + + if url is not None: + self.url = url + if uuid is not None: + self.uuid = uuid + if name is not None: + self.name = name + if file is not None: + self.file = file + if file_from_content is not None: + self.file_from_content = file_from_content + if file_from_content_name is not None: + self.file_from_content_name = file_from_content_name + if file_from_url is not None: + self.file_from_url = file_from_url + self.document = document + + @property + def url(self): + """Gets the url of this DocumentAttachment. # noqa: E501 + + + :return: The url of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this DocumentAttachment. + + + :param url: The url of this DocumentAttachment. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def uuid(self): + """Gets the uuid of this DocumentAttachment. # noqa: E501 + + + :return: The uuid of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this DocumentAttachment. + + + :param uuid: The uuid of this DocumentAttachment. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def name(self): + """Gets the name of this DocumentAttachment. # noqa: E501 + + Defaults to filename # noqa: E501 + + :return: The name of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DocumentAttachment. + + Defaults to filename # noqa: E501 + + :param name: The name of this DocumentAttachment. # noqa: E501 + :type: str + """ + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def file(self): + """Gets the file of this DocumentAttachment. # noqa: E501 + + Temporary URL to document attachment, expires in five minutes # noqa: E501 + + :return: The file of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this DocumentAttachment. + + Temporary URL to document attachment, expires in five minutes # noqa: E501 + + :param file: The file of this DocumentAttachment. # noqa: E501 + :type: str + """ + + self._file = file + + @property + def file_from_content(self): + """Gets the file_from_content of this DocumentAttachment. # noqa: E501 + + Base64 encoded document content # noqa: E501 + + :return: The file_from_content of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._file_from_content + + @file_from_content.setter + def file_from_content(self, file_from_content): + """Sets the file_from_content of this DocumentAttachment. + + Base64 encoded document content # noqa: E501 + + :param file_from_content: The file_from_content of this DocumentAttachment. # noqa: E501 + :type: str + """ + + self._file_from_content = file_from_content + + @property + def file_from_content_name(self): + """Gets the file_from_content_name of this DocumentAttachment. # noqa: E501 + + Filename, including extension. Required when using `file_from_content`. # noqa: E501 + + :return: The file_from_content_name of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._file_from_content_name + + @file_from_content_name.setter + def file_from_content_name(self, file_from_content_name): + """Sets the file_from_content_name of this DocumentAttachment. + + Filename, including extension. Required when using `file_from_content`. # noqa: E501 + + :param file_from_content_name: The file_from_content_name of this DocumentAttachment. # noqa: E501 + :type: str + """ + + self._file_from_content_name = file_from_content_name + + @property + def file_from_url(self): + """Gets the file_from_url of this DocumentAttachment. # noqa: E501 + + Publicly accessible URL of document to be downloaded by SignRequest # noqa: E501 + + :return: The file_from_url of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._file_from_url + + @file_from_url.setter + def file_from_url(self, file_from_url): + """Sets the file_from_url of this DocumentAttachment. + + Publicly accessible URL of document to be downloaded by SignRequest # noqa: E501 + + :param file_from_url: The file_from_url of this DocumentAttachment. # noqa: E501 + :type: str + """ + if file_from_url is not None and len(file_from_url) > 2100: + raise ValueError("Invalid value for `file_from_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._file_from_url = file_from_url + + @property + def document(self): + """Gets the document of this DocumentAttachment. # noqa: E501 + + + :return: The document of this DocumentAttachment. # noqa: E501 + :rtype: str + """ + return self._document + + @document.setter + def document(self, document): + """Sets the document of this DocumentAttachment. + + + :param document: The document of this DocumentAttachment. # noqa: E501 + :type: str + """ + if document is None: + raise ValueError("Invalid value for `document`, must not be `None`") # noqa: E501 + + self._document = document + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DocumentAttachment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/document_search.py b/signrequest_client/models/document_search.py new file mode 100644 index 0000000..627bede --- /dev/null +++ b/signrequest_client/models/document_search.py @@ -0,0 +1,504 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class DocumentSearch(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'status': 'str', + 'name': 'str', + 'who': 'str', + 'nr_extra_docs': 'int', + 'from_email': 'str', + 'uuid': 'str', + 'created': 'datetime', + 'autocomplete': 'str', + 'signer_emails': 'list[str]', + 'status_display': 'str', + 'created_timestamp': 'int', + 'finished_on_timestamp': 'int', + 'parent_doc': 'str', + 'finished_on': 'datetime', + 'subdomain': 'str' + } + + attribute_map = { + 'status': 'status', + 'name': 'name', + 'who': 'who', + 'nr_extra_docs': 'nr_extra_docs', + 'from_email': 'from_email', + 'uuid': 'uuid', + 'created': 'created', + 'autocomplete': 'autocomplete', + 'signer_emails': 'signer_emails', + 'status_display': 'status_display', + 'created_timestamp': 'created_timestamp', + 'finished_on_timestamp': 'finished_on_timestamp', + 'parent_doc': 'parent_doc', + 'finished_on': 'finished_on', + 'subdomain': 'subdomain' + } + + def __init__(self, status=None, name=None, who=None, nr_extra_docs=None, from_email=None, uuid=None, created=None, autocomplete=None, signer_emails=None, status_display=None, created_timestamp=None, finished_on_timestamp=None, parent_doc=None, finished_on=None, subdomain=None): # noqa: E501 + """DocumentSearch - a model defined in Swagger""" # noqa: E501 + + self._status = None + self._name = None + self._who = None + self._nr_extra_docs = None + self._from_email = None + self._uuid = None + self._created = None + self._autocomplete = None + self._signer_emails = None + self._status_display = None + self._created_timestamp = None + self._finished_on_timestamp = None + self._parent_doc = None + self._finished_on = None + self._subdomain = None + self.discriminator = None + + if status is not None: + self.status = status + if name is not None: + self.name = name + self.who = who + self.nr_extra_docs = nr_extra_docs + self.from_email = from_email + if uuid is not None: + self.uuid = uuid + if created is not None: + self.created = created + self.autocomplete = autocomplete + if signer_emails is not None: + self.signer_emails = signer_emails + if status_display is not None: + self.status_display = status_display + if created_timestamp is not None: + self.created_timestamp = created_timestamp + if finished_on_timestamp is not None: + self.finished_on_timestamp = finished_on_timestamp + if parent_doc is not None: + self.parent_doc = parent_doc + if finished_on is not None: + self.finished_on = finished_on + if subdomain is not None: + self.subdomain = subdomain + + @property + def status(self): + """Gets the status of this DocumentSearch. # noqa: E501 + + `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired # noqa: E501 + + :return: The status of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this DocumentSearch. + + `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired # noqa: E501 + + :param status: The status of this DocumentSearch. # noqa: E501 + :type: str + """ + if status is not None and len(status) > 2: + raise ValueError("Invalid value for `status`, length must be less than or equal to `2`") # noqa: E501 + if status is not None and len(status) < 1: + raise ValueError("Invalid value for `status`, length must be greater than or equal to `1`") # noqa: E501 + + self._status = status + + @property + def name(self): + """Gets the name of this DocumentSearch. # noqa: E501 + + Defaults to filename # noqa: E501 + + :return: The name of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DocumentSearch. + + Defaults to filename # noqa: E501 + + :param name: The name of this DocumentSearch. # noqa: E501 + :type: str + """ + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def who(self): + """Gets the who of this DocumentSearch. # noqa: E501 + + + :return: The who of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._who + + @who.setter + def who(self, who): + """Sets the who of this DocumentSearch. + + + :param who: The who of this DocumentSearch. # noqa: E501 + :type: str + """ + if who is None: + raise ValueError("Invalid value for `who`, must not be `None`") # noqa: E501 + if who is not None and len(who) < 1: + raise ValueError("Invalid value for `who`, length must be greater than or equal to `1`") # noqa: E501 + + self._who = who + + @property + def nr_extra_docs(self): + """Gets the nr_extra_docs of this DocumentSearch. # noqa: E501 + + + :return: The nr_extra_docs of this DocumentSearch. # noqa: E501 + :rtype: int + """ + return self._nr_extra_docs + + @nr_extra_docs.setter + def nr_extra_docs(self, nr_extra_docs): + """Sets the nr_extra_docs of this DocumentSearch. + + + :param nr_extra_docs: The nr_extra_docs of this DocumentSearch. # noqa: E501 + :type: int + """ + if nr_extra_docs is None: + raise ValueError("Invalid value for `nr_extra_docs`, must not be `None`") # noqa: E501 + + self._nr_extra_docs = nr_extra_docs + + @property + def from_email(self): + """Gets the from_email of this DocumentSearch. # noqa: E501 + + + :return: The from_email of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._from_email + + @from_email.setter + def from_email(self, from_email): + """Sets the from_email of this DocumentSearch. + + + :param from_email: The from_email of this DocumentSearch. # noqa: E501 + :type: str + """ + if from_email is None: + raise ValueError("Invalid value for `from_email`, must not be `None`") # noqa: E501 + if from_email is not None and len(from_email) < 1: + raise ValueError("Invalid value for `from_email`, length must be greater than or equal to `1`") # noqa: E501 + + self._from_email = from_email + + @property + def uuid(self): + """Gets the uuid of this DocumentSearch. # noqa: E501 + + + :return: The uuid of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this DocumentSearch. + + + :param uuid: The uuid of this DocumentSearch. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def created(self): + """Gets the created of this DocumentSearch. # noqa: E501 + + + :return: The created of this DocumentSearch. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this DocumentSearch. + + + :param created: The created of this DocumentSearch. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def autocomplete(self): + """Gets the autocomplete of this DocumentSearch. # noqa: E501 + + + :return: The autocomplete of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._autocomplete + + @autocomplete.setter + def autocomplete(self, autocomplete): + """Sets the autocomplete of this DocumentSearch. + + + :param autocomplete: The autocomplete of this DocumentSearch. # noqa: E501 + :type: str + """ + if autocomplete is None: + raise ValueError("Invalid value for `autocomplete`, must not be `None`") # noqa: E501 + if autocomplete is not None and len(autocomplete) < 1: + raise ValueError("Invalid value for `autocomplete`, length must be greater than or equal to `1`") # noqa: E501 + + self._autocomplete = autocomplete + + @property + def signer_emails(self): + """Gets the signer_emails of this DocumentSearch. # noqa: E501 + + + :return: The signer_emails of this DocumentSearch. # noqa: E501 + :rtype: list[str] + """ + return self._signer_emails + + @signer_emails.setter + def signer_emails(self, signer_emails): + """Sets the signer_emails of this DocumentSearch. + + + :param signer_emails: The signer_emails of this DocumentSearch. # noqa: E501 + :type: list[str] + """ + + self._signer_emails = signer_emails + + @property + def status_display(self): + """Gets the status_display of this DocumentSearch. # noqa: E501 + + + :return: The status_display of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._status_display + + @status_display.setter + def status_display(self, status_display): + """Sets the status_display of this DocumentSearch. + + + :param status_display: The status_display of this DocumentSearch. # noqa: E501 + :type: str + """ + if status_display is not None and len(status_display) < 1: + raise ValueError("Invalid value for `status_display`, length must be greater than or equal to `1`") # noqa: E501 + + self._status_display = status_display + + @property + def created_timestamp(self): + """Gets the created_timestamp of this DocumentSearch. # noqa: E501 + + + :return: The created_timestamp of this DocumentSearch. # noqa: E501 + :rtype: int + """ + return self._created_timestamp + + @created_timestamp.setter + def created_timestamp(self, created_timestamp): + """Sets the created_timestamp of this DocumentSearch. + + + :param created_timestamp: The created_timestamp of this DocumentSearch. # noqa: E501 + :type: int + """ + + self._created_timestamp = created_timestamp + + @property + def finished_on_timestamp(self): + """Gets the finished_on_timestamp of this DocumentSearch. # noqa: E501 + + + :return: The finished_on_timestamp of this DocumentSearch. # noqa: E501 + :rtype: int + """ + return self._finished_on_timestamp + + @finished_on_timestamp.setter + def finished_on_timestamp(self, finished_on_timestamp): + """Sets the finished_on_timestamp of this DocumentSearch. + + + :param finished_on_timestamp: The finished_on_timestamp of this DocumentSearch. # noqa: E501 + :type: int + """ + + self._finished_on_timestamp = finished_on_timestamp + + @property + def parent_doc(self): + """Gets the parent_doc of this DocumentSearch. # noqa: E501 + + + :return: The parent_doc of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._parent_doc + + @parent_doc.setter + def parent_doc(self, parent_doc): + """Sets the parent_doc of this DocumentSearch. + + + :param parent_doc: The parent_doc of this DocumentSearch. # noqa: E501 + :type: str + """ + if parent_doc is not None and len(parent_doc) < 1: + raise ValueError("Invalid value for `parent_doc`, length must be greater than or equal to `1`") # noqa: E501 + + self._parent_doc = parent_doc + + @property + def finished_on(self): + """Gets the finished_on of this DocumentSearch. # noqa: E501 + + + :return: The finished_on of this DocumentSearch. # noqa: E501 + :rtype: datetime + """ + return self._finished_on + + @finished_on.setter + def finished_on(self, finished_on): + """Sets the finished_on of this DocumentSearch. + + + :param finished_on: The finished_on of this DocumentSearch. # noqa: E501 + :type: datetime + """ + + self._finished_on = finished_on + + @property + def subdomain(self): + """Gets the subdomain of this DocumentSearch. # noqa: E501 + + + :return: The subdomain of this DocumentSearch. # noqa: E501 + :rtype: str + """ + return self._subdomain + + @subdomain.setter + def subdomain(self, subdomain): + """Sets the subdomain of this DocumentSearch. + + + :param subdomain: The subdomain of this DocumentSearch. # noqa: E501 + :type: str + """ + if subdomain is not None and len(subdomain) < 1: + raise ValueError("Invalid value for `subdomain`, length must be greater than or equal to `1`") # noqa: E501 + + self._subdomain = subdomain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DocumentSearch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/document_signer_template_conf.py b/signrequest_client/models/document_signer_template_conf.py new file mode 100644 index 0000000..978f75e --- /dev/null +++ b/signrequest_client/models/document_signer_template_conf.py @@ -0,0 +1,278 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.placeholder import Placeholder # noqa: F401,E501 + + +class DocumentSignerTemplateConf(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'signer_index': 'int', + 'needs_to_sign': 'bool', + 'approve_only': 'bool', + 'notify_only': 'bool', + 'in_person': 'bool', + 'order': 'int', + 'placeholders': 'list[Placeholder]' + } + + attribute_map = { + 'signer_index': 'signer_index', + 'needs_to_sign': 'needs_to_sign', + 'approve_only': 'approve_only', + 'notify_only': 'notify_only', + 'in_person': 'in_person', + 'order': 'order', + 'placeholders': 'placeholders' + } + + def __init__(self, signer_index=None, needs_to_sign=None, approve_only=None, notify_only=None, in_person=None, order=None, placeholders=None): # noqa: E501 + """DocumentSignerTemplateConf - a model defined in Swagger""" # noqa: E501 + + self._signer_index = None + self._needs_to_sign = None + self._approve_only = None + self._notify_only = None + self._in_person = None + self._order = None + self._placeholders = None + self.discriminator = None + + if signer_index is not None: + self.signer_index = signer_index + if needs_to_sign is not None: + self.needs_to_sign = needs_to_sign + if approve_only is not None: + self.approve_only = approve_only + if notify_only is not None: + self.notify_only = notify_only + if in_person is not None: + self.in_person = in_person + if order is not None: + self.order = order + if placeholders is not None: + self.placeholders = placeholders + + @property + def signer_index(self): + """Gets the signer_index of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The signer_index of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: int + """ + return self._signer_index + + @signer_index.setter + def signer_index(self, signer_index): + """Sets the signer_index of this DocumentSignerTemplateConf. + + + :param signer_index: The signer_index of this DocumentSignerTemplateConf. # noqa: E501 + :type: int + """ + if signer_index is not None and signer_index > 2147483647: # noqa: E501 + raise ValueError("Invalid value for `signer_index`, must be a value less than or equal to `2147483647`") # noqa: E501 + if signer_index is not None and signer_index < -2147483648: # noqa: E501 + raise ValueError("Invalid value for `signer_index`, must be a value greater than or equal to `-2147483648`") # noqa: E501 + + self._signer_index = signer_index + + @property + def needs_to_sign(self): + """Gets the needs_to_sign of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The needs_to_sign of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: bool + """ + return self._needs_to_sign + + @needs_to_sign.setter + def needs_to_sign(self, needs_to_sign): + """Sets the needs_to_sign of this DocumentSignerTemplateConf. + + + :param needs_to_sign: The needs_to_sign of this DocumentSignerTemplateConf. # noqa: E501 + :type: bool + """ + + self._needs_to_sign = needs_to_sign + + @property + def approve_only(self): + """Gets the approve_only of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The approve_only of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: bool + """ + return self._approve_only + + @approve_only.setter + def approve_only(self, approve_only): + """Sets the approve_only of this DocumentSignerTemplateConf. + + + :param approve_only: The approve_only of this DocumentSignerTemplateConf. # noqa: E501 + :type: bool + """ + + self._approve_only = approve_only + + @property + def notify_only(self): + """Gets the notify_only of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The notify_only of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: bool + """ + return self._notify_only + + @notify_only.setter + def notify_only(self, notify_only): + """Sets the notify_only of this DocumentSignerTemplateConf. + + + :param notify_only: The notify_only of this DocumentSignerTemplateConf. # noqa: E501 + :type: bool + """ + + self._notify_only = notify_only + + @property + def in_person(self): + """Gets the in_person of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The in_person of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: bool + """ + return self._in_person + + @in_person.setter + def in_person(self, in_person): + """Sets the in_person of this DocumentSignerTemplateConf. + + + :param in_person: The in_person of this DocumentSignerTemplateConf. # noqa: E501 + :type: bool + """ + + self._in_person = in_person + + @property + def order(self): + """Gets the order of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The order of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: int + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this DocumentSignerTemplateConf. + + + :param order: The order of this DocumentSignerTemplateConf. # noqa: E501 + :type: int + """ + if order is not None and order > 2147483647: # noqa: E501 + raise ValueError("Invalid value for `order`, must be a value less than or equal to `2147483647`") # noqa: E501 + if order is not None and order < 0: # noqa: E501 + raise ValueError("Invalid value for `order`, must be a value greater than or equal to `0`") # noqa: E501 + + self._order = order + + @property + def placeholders(self): + """Gets the placeholders of this DocumentSignerTemplateConf. # noqa: E501 + + + :return: The placeholders of this DocumentSignerTemplateConf. # noqa: E501 + :rtype: list[Placeholder] + """ + return self._placeholders + + @placeholders.setter + def placeholders(self, placeholders): + """Sets the placeholders of this DocumentSignerTemplateConf. + + + :param placeholders: The placeholders of this DocumentSignerTemplateConf. # noqa: E501 + :type: list[Placeholder] + """ + + self._placeholders = placeholders + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DocumentSignerTemplateConf): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/event.py b/signrequest_client/models/event.py new file mode 100644 index 0000000..8bea01b --- /dev/null +++ b/signrequest_client/models/event.py @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.document import Document # noqa: F401,E501 +from signrequest_client.models.signer import Signer # noqa: F401,E501 + + +class Event(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uuid': 'str', + 'status': 'str', + 'event_type': 'str', + 'delivered': 'bool', + 'delivered_on': 'datetime', + 'callback_status_code': 'int', + 'timestamp': 'datetime', + 'document': 'Document', + 'signer': 'Signer' + } + + attribute_map = { + 'uuid': 'uuid', + 'status': 'status', + 'event_type': 'event_type', + 'delivered': 'delivered', + 'delivered_on': 'delivered_on', + 'callback_status_code': 'callback_status_code', + 'timestamp': 'timestamp', + 'document': 'document', + 'signer': 'signer' + } + + def __init__(self, uuid=None, status=None, event_type=None, delivered=None, delivered_on=None, callback_status_code=None, timestamp=None, document=None, signer=None): # noqa: E501 + """Event - a model defined in Swagger""" # noqa: E501 + + self._uuid = None + self._status = None + self._event_type = None + self._delivered = None + self._delivered_on = None + self._callback_status_code = None + self._timestamp = None + self._document = None + self._signer = None + self.discriminator = None + + if uuid is not None: + self.uuid = uuid + if status is not None: + self.status = status + if event_type is not None: + self.event_type = event_type + if delivered is not None: + self.delivered = delivered + if delivered_on is not None: + self.delivered_on = delivered_on + if callback_status_code is not None: + self.callback_status_code = callback_status_code + if timestamp is not None: + self.timestamp = timestamp + if document is not None: + self.document = document + if signer is not None: + self.signer = signer + + @property + def uuid(self): + """Gets the uuid of this Event. # noqa: E501 + + + :return: The uuid of this Event. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Event. + + + :param uuid: The uuid of this Event. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def status(self): + """Gets the status of this Event. # noqa: E501 + + + :return: The status of this Event. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Event. + + + :param status: The status of this Event. # noqa: E501 + :type: str + """ + allowed_values = ["ok", "error"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def event_type(self): + """Gets the event_type of this Event. # noqa: E501 + + + :return: The event_type of this Event. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this Event. + + + :param event_type: The event_type of this Event. # noqa: E501 + :type: str + """ + allowed_values = ["convert_error", "converted", "sending_error", "sent", "declined", "cancelled", "expired", "signed", "viewed", "downloaded", "signer_signed", "signer_email_bounced", "signer_viewed_email", "signer_viewed", "signer_forwarded", "signer_downloaded", "signrequest_received"] # noqa: E501 + if event_type not in allowed_values: + raise ValueError( + "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 + .format(event_type, allowed_values) + ) + + self._event_type = event_type + + @property + def delivered(self): + """Gets the delivered of this Event. # noqa: E501 + + + :return: The delivered of this Event. # noqa: E501 + :rtype: bool + """ + return self._delivered + + @delivered.setter + def delivered(self, delivered): + """Sets the delivered of this Event. + + + :param delivered: The delivered of this Event. # noqa: E501 + :type: bool + """ + + self._delivered = delivered + + @property + def delivered_on(self): + """Gets the delivered_on of this Event. # noqa: E501 + + + :return: The delivered_on of this Event. # noqa: E501 + :rtype: datetime + """ + return self._delivered_on + + @delivered_on.setter + def delivered_on(self, delivered_on): + """Sets the delivered_on of this Event. + + + :param delivered_on: The delivered_on of this Event. # noqa: E501 + :type: datetime + """ + + self._delivered_on = delivered_on + + @property + def callback_status_code(self): + """Gets the callback_status_code of this Event. # noqa: E501 + + + :return: The callback_status_code of this Event. # noqa: E501 + :rtype: int + """ + return self._callback_status_code + + @callback_status_code.setter + def callback_status_code(self, callback_status_code): + """Sets the callback_status_code of this Event. + + + :param callback_status_code: The callback_status_code of this Event. # noqa: E501 + :type: int + """ + + self._callback_status_code = callback_status_code + + @property + def timestamp(self): + """Gets the timestamp of this Event. # noqa: E501 + + + :return: The timestamp of this Event. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this Event. + + + :param timestamp: The timestamp of this Event. # noqa: E501 + :type: datetime + """ + + self._timestamp = timestamp + + @property + def document(self): + """Gets the document of this Event. # noqa: E501 + + + :return: The document of this Event. # noqa: E501 + :rtype: Document + """ + return self._document + + @document.setter + def document(self, document): + """Sets the document of this Event. + + + :param document: The document of this Event. # noqa: E501 + :type: Document + """ + + self._document = document + + @property + def signer(self): + """Gets the signer of this Event. # noqa: E501 + + + :return: The signer of this Event. # noqa: E501 + :rtype: Signer + """ + return self._signer + + @signer.setter + def signer(self, signer): + """Sets the signer of this Event. + + + :param signer: The signer of this Event. # noqa: E501 + :type: Signer + """ + + self._signer = signer + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Event): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/file_from_sf.py b/signrequest_client/models/file_from_sf.py new file mode 100644 index 0000000..7c90998 --- /dev/null +++ b/signrequest_client/models/file_from_sf.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class FileFromSf(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'object_type': 'str', + 'object_id': 'str' + } + + attribute_map = { + 'object_type': 'object_type', + 'object_id': 'object_id' + } + + def __init__(self, object_type=None, object_id=None): # noqa: E501 + """FileFromSf - a model defined in Swagger""" # noqa: E501 + + self._object_type = None + self._object_id = None + self.discriminator = None + + self.object_type = object_type + self.object_id = object_id + + @property + def object_type(self): + """Gets the object_type of this FileFromSf. # noqa: E501 + + + :return: The object_type of this FileFromSf. # noqa: E501 + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """Sets the object_type of this FileFromSf. + + + :param object_type: The object_type of this FileFromSf. # noqa: E501 + :type: str + """ + if object_type is None: + raise ValueError("Invalid value for `object_type`, must not be `None`") # noqa: E501 + if object_type is not None and len(object_type) < 1: + raise ValueError("Invalid value for `object_type`, length must be greater than or equal to `1`") # noqa: E501 + + self._object_type = object_type + + @property + def object_id(self): + """Gets the object_id of this FileFromSf. # noqa: E501 + + + :return: The object_id of this FileFromSf. # noqa: E501 + :rtype: str + """ + return self._object_id + + @object_id.setter + def object_id(self, object_id): + """Sets the object_id of this FileFromSf. + + + :param object_id: The object_id of this FileFromSf. # noqa: E501 + :type: str + """ + if object_id is None: + raise ValueError("Invalid value for `object_id`, must not be `None`") # noqa: E501 + if object_id is not None and len(object_id) < 1: + raise ValueError("Invalid value for `object_id`, length must be greater than or equal to `1`") # noqa: E501 + + self._object_id = object_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileFromSf): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_document_signer_integration_data.py b/signrequest_client/models/inline_document_signer_integration_data.py new file mode 100644 index 0000000..15eeaae --- /dev/null +++ b/signrequest_client/models/inline_document_signer_integration_data.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineDocumentSignerIntegrationData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'integration': 'str', + 'integration_data': 'str' + } + + attribute_map = { + 'integration': 'integration', + 'integration_data': 'integration_data' + } + + def __init__(self, integration=None, integration_data=None): # noqa: E501 + """InlineDocumentSignerIntegrationData - a model defined in Swagger""" # noqa: E501 + + self._integration = None + self._integration_data = None + self.discriminator = None + + if integration is not None: + self.integration = integration + if integration_data is not None: + self.integration_data = integration_data + + @property + def integration(self): + """Gets the integration of this InlineDocumentSignerIntegrationData. # noqa: E501 + + + :return: The integration of this InlineDocumentSignerIntegrationData. # noqa: E501 + :rtype: str + """ + return self._integration + + @integration.setter + def integration(self, integration): + """Sets the integration of this InlineDocumentSignerIntegrationData. + + + :param integration: The integration of this InlineDocumentSignerIntegrationData. # noqa: E501 + :type: str + """ + allowed_values = ["mfiles", "salesforce", "formdesk", "zapier", "txhash"] # noqa: E501 + if integration not in allowed_values: + raise ValueError( + "Invalid value for `integration` ({0}), must be one of {1}" # noqa: E501 + .format(integration, allowed_values) + ) + + self._integration = integration + + @property + def integration_data(self): + """Gets the integration_data of this InlineDocumentSignerIntegrationData. # noqa: E501 + + + :return: The integration_data of this InlineDocumentSignerIntegrationData. # noqa: E501 + :rtype: str + """ + return self._integration_data + + @integration_data.setter + def integration_data(self, integration_data): + """Sets the integration_data of this InlineDocumentSignerIntegrationData. + + + :param integration_data: The integration_data of this InlineDocumentSignerIntegrationData. # noqa: E501 + :type: str + """ + + self._integration_data = integration_data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineDocumentSignerIntegrationData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_integration_data.py b/signrequest_client/models/inline_integration_data.py new file mode 100644 index 0000000..9a3565f --- /dev/null +++ b/signrequest_client/models/inline_integration_data.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineIntegrationData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'integration': 'str', + 'integration_data': 'str' + } + + attribute_map = { + 'integration': 'integration', + 'integration_data': 'integration_data' + } + + def __init__(self, integration=None, integration_data=None): # noqa: E501 + """InlineIntegrationData - a model defined in Swagger""" # noqa: E501 + + self._integration = None + self._integration_data = None + self.discriminator = None + + if integration is not None: + self.integration = integration + if integration_data is not None: + self.integration_data = integration_data + + @property + def integration(self): + """Gets the integration of this InlineIntegrationData. # noqa: E501 + + + :return: The integration of this InlineIntegrationData. # noqa: E501 + :rtype: str + """ + return self._integration + + @integration.setter + def integration(self, integration): + """Sets the integration of this InlineIntegrationData. + + + :param integration: The integration of this InlineIntegrationData. # noqa: E501 + :type: str + """ + allowed_values = ["mfiles", "salesforce", "formdesk", "zapier", "txhash"] # noqa: E501 + if integration not in allowed_values: + raise ValueError( + "Invalid value for `integration` ({0}), must be one of {1}" # noqa: E501 + .format(integration, allowed_values) + ) + + self._integration = integration + + @property + def integration_data(self): + """Gets the integration_data of this InlineIntegrationData. # noqa: E501 + + + :return: The integration_data of this InlineIntegrationData. # noqa: E501 + :rtype: str + """ + return self._integration_data + + @integration_data.setter + def integration_data(self, integration_data): + """Sets the integration_data of this InlineIntegrationData. + + + :param integration_data: The integration_data of this InlineIntegrationData. # noqa: E501 + :type: str + """ + + self._integration_data = integration_data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineIntegrationData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_prefill_tags.py b/signrequest_client/models/inline_prefill_tags.py new file mode 100644 index 0000000..53412db --- /dev/null +++ b/signrequest_client/models/inline_prefill_tags.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlinePrefillTags(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'external_id': 'str', + 'text': 'str', + 'checkbox_value': 'bool', + 'date_value': 'date' + } + + attribute_map = { + 'external_id': 'external_id', + 'text': 'text', + 'checkbox_value': 'checkbox_value', + 'date_value': 'date_value' + } + + def __init__(self, external_id=None, text=None, checkbox_value=None, date_value=None): # noqa: E501 + """InlinePrefillTags - a model defined in Swagger""" # noqa: E501 + + self._external_id = None + self._text = None + self._checkbox_value = None + self._date_value = None + self.discriminator = None + + if external_id is not None: + self.external_id = external_id + if text is not None: + self.text = text + if checkbox_value is not None: + self.checkbox_value = checkbox_value + if date_value is not None: + self.date_value = date_value + + @property + def external_id(self): + """Gets the external_id of this InlinePrefillTags. # noqa: E501 + + + :return: The external_id of this InlinePrefillTags. # noqa: E501 + :rtype: str + """ + return self._external_id + + @external_id.setter + def external_id(self, external_id): + """Sets the external_id of this InlinePrefillTags. + + + :param external_id: The external_id of this InlinePrefillTags. # noqa: E501 + :type: str + """ + if external_id is not None and len(external_id) > 255: + raise ValueError("Invalid value for `external_id`, length must be less than or equal to `255`") # noqa: E501 + + self._external_id = external_id + + @property + def text(self): + """Gets the text of this InlinePrefillTags. # noqa: E501 + + + :return: The text of this InlinePrefillTags. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this InlinePrefillTags. + + + :param text: The text of this InlinePrefillTags. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def checkbox_value(self): + """Gets the checkbox_value of this InlinePrefillTags. # noqa: E501 + + + :return: The checkbox_value of this InlinePrefillTags. # noqa: E501 + :rtype: bool + """ + return self._checkbox_value + + @checkbox_value.setter + def checkbox_value(self, checkbox_value): + """Sets the checkbox_value of this InlinePrefillTags. + + + :param checkbox_value: The checkbox_value of this InlinePrefillTags. # noqa: E501 + :type: bool + """ + + self._checkbox_value = checkbox_value + + @property + def date_value(self): + """Gets the date_value of this InlinePrefillTags. # noqa: E501 + + + :return: The date_value of this InlinePrefillTags. # noqa: E501 + :rtype: date + """ + return self._date_value + + @date_value.setter + def date_value(self, date_value): + """Sets the date_value of this InlinePrefillTags. + + + :param date_value: The date_value of this InlinePrefillTags. # noqa: E501 + :type: date + """ + + self._date_value = date_value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlinePrefillTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200.py b/signrequest_client/models/inline_response_200.py new file mode 100644 index 0000000..d41c2ad --- /dev/null +++ b/signrequest_client/models/inline_response_200.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.auth_token import AuthToken # noqa: F401,E501 + + +class InlineResponse200(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[AuthToken]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse200 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse200. # noqa: E501 + + + :return: The count of this InlineResponse200. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse200. + + + :param count: The count of this InlineResponse200. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse200. # noqa: E501 + + + :return: The next of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse200. + + + :param next: The next of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse200. # noqa: E501 + + + :return: The previous of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse200. + + + :param previous: The previous of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse200. # noqa: E501 + + + :return: The results of this InlineResponse200. # noqa: E501 + :rtype: list[AuthToken] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse200. + + + :param results: The results of this InlineResponse200. # noqa: E501 + :type: list[AuthToken] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse200): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_1.py b/signrequest_client/models/inline_response_200_1.py new file mode 100644 index 0000000..9cde98c --- /dev/null +++ b/signrequest_client/models/inline_response_200_1.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.document_attachment import DocumentAttachment # noqa: F401,E501 + + +class InlineResponse2001(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[DocumentAttachment]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2001. # noqa: E501 + + + :return: The count of this InlineResponse2001. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2001. + + + :param count: The count of this InlineResponse2001. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2001. # noqa: E501 + + + :return: The next of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2001. + + + :param next: The next of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2001. # noqa: E501 + + + :return: The previous of this InlineResponse2001. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2001. + + + :param previous: The previous of this InlineResponse2001. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2001. # noqa: E501 + + + :return: The results of this InlineResponse2001. # noqa: E501 + :rtype: list[DocumentAttachment] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2001. + + + :param results: The results of this InlineResponse2001. # noqa: E501 + :type: list[DocumentAttachment] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2001): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_2.py b/signrequest_client/models/inline_response_200_2.py new file mode 100644 index 0000000..cc431c6 --- /dev/null +++ b/signrequest_client/models/inline_response_200_2.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.document_search import DocumentSearch # noqa: F401,E501 + + +class InlineResponse2002(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[DocumentSearch]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2002 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2002. # noqa: E501 + + + :return: The count of this InlineResponse2002. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2002. + + + :param count: The count of this InlineResponse2002. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2002. # noqa: E501 + + + :return: The next of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2002. + + + :param next: The next of this InlineResponse2002. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2002. # noqa: E501 + + + :return: The previous of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2002. + + + :param previous: The previous of this InlineResponse2002. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2002. # noqa: E501 + + + :return: The results of this InlineResponse2002. # noqa: E501 + :rtype: list[DocumentSearch] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2002. + + + :param results: The results of this InlineResponse2002. # noqa: E501 + :type: list[DocumentSearch] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2002): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_3.py b/signrequest_client/models/inline_response_200_3.py new file mode 100644 index 0000000..2dfba17 --- /dev/null +++ b/signrequest_client/models/inline_response_200_3.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.document import Document # noqa: F401,E501 + + +class InlineResponse2003(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[Document]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2003 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2003. # noqa: E501 + + + :return: The count of this InlineResponse2003. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2003. + + + :param count: The count of this InlineResponse2003. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2003. # noqa: E501 + + + :return: The next of this InlineResponse2003. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2003. + + + :param next: The next of this InlineResponse2003. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2003. # noqa: E501 + + + :return: The previous of this InlineResponse2003. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2003. + + + :param previous: The previous of this InlineResponse2003. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2003. # noqa: E501 + + + :return: The results of this InlineResponse2003. # noqa: E501 + :rtype: list[Document] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2003. + + + :param results: The results of this InlineResponse2003. # noqa: E501 + :type: list[Document] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2003): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_4.py b/signrequest_client/models/inline_response_200_4.py new file mode 100644 index 0000000..3c456cb --- /dev/null +++ b/signrequest_client/models/inline_response_200_4.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.event import Event # noqa: F401,E501 + + +class InlineResponse2004(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[Event]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2004 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2004. # noqa: E501 + + + :return: The count of this InlineResponse2004. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2004. + + + :param count: The count of this InlineResponse2004. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2004. # noqa: E501 + + + :return: The next of this InlineResponse2004. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2004. + + + :param next: The next of this InlineResponse2004. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2004. # noqa: E501 + + + :return: The previous of this InlineResponse2004. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2004. + + + :param previous: The previous of this InlineResponse2004. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2004. # noqa: E501 + + + :return: The results of this InlineResponse2004. # noqa: E501 + :rtype: list[Event] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2004. + + + :param results: The results of this InlineResponse2004. # noqa: E501 + :type: list[Event] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2004): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_5.py b/signrequest_client/models/inline_response_200_5.py new file mode 100644 index 0000000..be9caff --- /dev/null +++ b/signrequest_client/models/inline_response_200_5.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.sign_request import SignRequest # noqa: F401,E501 + + +class InlineResponse2005(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[SignRequest]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2005 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2005. # noqa: E501 + + + :return: The count of this InlineResponse2005. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2005. + + + :param count: The count of this InlineResponse2005. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2005. # noqa: E501 + + + :return: The next of this InlineResponse2005. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2005. + + + :param next: The next of this InlineResponse2005. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2005. # noqa: E501 + + + :return: The previous of this InlineResponse2005. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2005. + + + :param previous: The previous of this InlineResponse2005. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2005. # noqa: E501 + + + :return: The results of this InlineResponse2005. # noqa: E501 + :rtype: list[SignRequest] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2005. + + + :param results: The results of this InlineResponse2005. # noqa: E501 + :type: list[SignRequest] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2005): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_6.py b/signrequest_client/models/inline_response_200_6.py new file mode 100644 index 0000000..934ee44 --- /dev/null +++ b/signrequest_client/models/inline_response_200_6.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.team_member import TeamMember # noqa: F401,E501 + + +class InlineResponse2006(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[TeamMember]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2006 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2006. # noqa: E501 + + + :return: The count of this InlineResponse2006. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2006. + + + :param count: The count of this InlineResponse2006. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2006. # noqa: E501 + + + :return: The next of this InlineResponse2006. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2006. + + + :param next: The next of this InlineResponse2006. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2006. # noqa: E501 + + + :return: The previous of this InlineResponse2006. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2006. + + + :param previous: The previous of this InlineResponse2006. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2006. # noqa: E501 + + + :return: The results of this InlineResponse2006. # noqa: E501 + :rtype: list[TeamMember] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2006. + + + :param results: The results of this InlineResponse2006. # noqa: E501 + :type: list[TeamMember] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2006): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_7.py b/signrequest_client/models/inline_response_200_7.py new file mode 100644 index 0000000..6995f30 --- /dev/null +++ b/signrequest_client/models/inline_response_200_7.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.team import Team # noqa: F401,E501 + + +class InlineResponse2007(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[Team]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2007 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2007. # noqa: E501 + + + :return: The count of this InlineResponse2007. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2007. + + + :param count: The count of this InlineResponse2007. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2007. # noqa: E501 + + + :return: The next of this InlineResponse2007. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2007. + + + :param next: The next of this InlineResponse2007. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2007. # noqa: E501 + + + :return: The previous of this InlineResponse2007. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2007. + + + :param previous: The previous of this InlineResponse2007. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2007. # noqa: E501 + + + :return: The results of this InlineResponse2007. # noqa: E501 + :rtype: list[Team] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2007. + + + :param results: The results of this InlineResponse2007. # noqa: E501 + :type: list[Team] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2007): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_8.py b/signrequest_client/models/inline_response_200_8.py new file mode 100644 index 0000000..62d49ed --- /dev/null +++ b/signrequest_client/models/inline_response_200_8.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.template import Template # noqa: F401,E501 + + +class InlineResponse2008(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[Template]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2008 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2008. # noqa: E501 + + + :return: The count of this InlineResponse2008. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2008. + + + :param count: The count of this InlineResponse2008. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2008. # noqa: E501 + + + :return: The next of this InlineResponse2008. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2008. + + + :param next: The next of this InlineResponse2008. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2008. # noqa: E501 + + + :return: The previous of this InlineResponse2008. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2008. + + + :param previous: The previous of this InlineResponse2008. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2008. # noqa: E501 + + + :return: The results of this InlineResponse2008. # noqa: E501 + :rtype: list[Template] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2008. + + + :param results: The results of this InlineResponse2008. # noqa: E501 + :type: list[Template] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2008): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_200_9.py b/signrequest_client/models/inline_response_200_9.py new file mode 100644 index 0000000..4a6b52b --- /dev/null +++ b/signrequest_client/models/inline_response_200_9.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.webhook_subscription import WebhookSubscription # noqa: F401,E501 + + +class InlineResponse2009(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[WebhookSubscription]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): # noqa: E501 + """InlineResponse2009 - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse2009. # noqa: E501 + + + :return: The count of this InlineResponse2009. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse2009. + + + :param count: The count of this InlineResponse2009. # noqa: E501 + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse2009. # noqa: E501 + + + :return: The next of this InlineResponse2009. # noqa: E501 + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse2009. + + + :param next: The next of this InlineResponse2009. # noqa: E501 + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse2009. # noqa: E501 + + + :return: The previous of this InlineResponse2009. # noqa: E501 + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse2009. + + + :param previous: The previous of this InlineResponse2009. # noqa: E501 + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse2009. # noqa: E501 + + + :return: The results of this InlineResponse2009. # noqa: E501 + :rtype: list[WebhookSubscription] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse2009. + + + :param results: The results of this InlineResponse2009. # noqa: E501 + :type: list[WebhookSubscription] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2009): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_201.py b/signrequest_client/models/inline_response_201.py new file mode 100644 index 0000000..7d8cb87 --- /dev/null +++ b/signrequest_client/models/inline_response_201.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineResponse201(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'cancelled': 'bool', + 'detail': 'str' + } + + attribute_map = { + 'cancelled': 'cancelled', + 'detail': 'detail' + } + + def __init__(self, cancelled=None, detail=None): # noqa: E501 + """InlineResponse201 - a model defined in Swagger""" # noqa: E501 + + self._cancelled = None + self._detail = None + self.discriminator = None + + self.cancelled = cancelled + self.detail = detail + + @property + def cancelled(self): + """Gets the cancelled of this InlineResponse201. # noqa: E501 + + + :return: The cancelled of this InlineResponse201. # noqa: E501 + :rtype: bool + """ + return self._cancelled + + @cancelled.setter + def cancelled(self, cancelled): + """Sets the cancelled of this InlineResponse201. + + + :param cancelled: The cancelled of this InlineResponse201. # noqa: E501 + :type: bool + """ + if cancelled is None: + raise ValueError("Invalid value for `cancelled`, must not be `None`") # noqa: E501 + + self._cancelled = cancelled + + @property + def detail(self): + """Gets the detail of this InlineResponse201. # noqa: E501 + + + :return: The detail of this InlineResponse201. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this InlineResponse201. + + + :param detail: The detail of this InlineResponse201. # noqa: E501 + :type: str + """ + if detail is None: + raise ValueError("Invalid value for `detail`, must not be `None`") # noqa: E501 + allowed_values = ["OK"] # noqa: E501 + if detail not in allowed_values: + raise ValueError( + "Invalid value for `detail` ({0}), must be one of {1}" # noqa: E501 + .format(detail, allowed_values) + ) + + self._detail = detail + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse201): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_response_201_1.py b/signrequest_client/models/inline_response_201_1.py new file mode 100644 index 0000000..dd6782d --- /dev/null +++ b/signrequest_client/models/inline_response_201_1.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineResponse2011(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'detail': 'str' + } + + attribute_map = { + 'detail': 'detail' + } + + def __init__(self, detail=None): # noqa: E501 + """InlineResponse2011 - a model defined in Swagger""" # noqa: E501 + + self._detail = None + self.discriminator = None + + self.detail = detail + + @property + def detail(self): + """Gets the detail of this InlineResponse2011. # noqa: E501 + + + :return: The detail of this InlineResponse2011. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this InlineResponse2011. + + + :param detail: The detail of this InlineResponse2011. # noqa: E501 + :type: str + """ + if detail is None: + raise ValueError("Invalid value for `detail`, must not be `None`") # noqa: E501 + allowed_values = ["OK"] # noqa: E501 + if detail not in allowed_values: + raise ValueError( + "Invalid value for `detail` ({0}), must be one of {1}" # noqa: E501 + .format(detail, allowed_values) + ) + + self._detail = detail + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2011): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_sign_request.py b/signrequest_client/models/inline_sign_request.py new file mode 100644 index 0000000..637c059 --- /dev/null +++ b/signrequest_client/models/inline_sign_request.py @@ -0,0 +1,605 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.required_attachment import RequiredAttachment # noqa: F401,E501 +from signrequest_client.models.signer import Signer # noqa: F401,E501 + + +class InlineSignRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'from_email': 'str', + 'from_email_name': 'str', + 'is_being_prepared': 'bool', + 'prepare_url': 'str', + 'redirect_url': 'str', + 'required_attachments': 'list[RequiredAttachment]', + 'disable_attachments': 'bool', + 'disable_text_signatures': 'bool', + 'disable_text': 'bool', + 'disable_date': 'bool', + 'disable_emails': 'bool', + 'disable_upload_signatures': 'bool', + 'subject': 'str', + 'message': 'str', + 'who': 'str', + 'send_reminders': 'bool', + 'signers': 'list[Signer]', + 'uuid': 'str' + } + + attribute_map = { + 'from_email': 'from_email', + 'from_email_name': 'from_email_name', + 'is_being_prepared': 'is_being_prepared', + 'prepare_url': 'prepare_url', + 'redirect_url': 'redirect_url', + 'required_attachments': 'required_attachments', + 'disable_attachments': 'disable_attachments', + 'disable_text_signatures': 'disable_text_signatures', + 'disable_text': 'disable_text', + 'disable_date': 'disable_date', + 'disable_emails': 'disable_emails', + 'disable_upload_signatures': 'disable_upload_signatures', + 'subject': 'subject', + 'message': 'message', + 'who': 'who', + 'send_reminders': 'send_reminders', + 'signers': 'signers', + 'uuid': 'uuid' + } + + def __init__(self, from_email=None, from_email_name=None, is_being_prepared=None, prepare_url=None, redirect_url=None, required_attachments=None, disable_attachments=None, disable_text_signatures=None, disable_text=None, disable_date=None, disable_emails=None, disable_upload_signatures=None, subject=None, message=None, who=None, send_reminders=None, signers=None, uuid=None): # noqa: E501 + """InlineSignRequest - a model defined in Swagger""" # noqa: E501 + + self._from_email = None + self._from_email_name = None + self._is_being_prepared = None + self._prepare_url = None + self._redirect_url = None + self._required_attachments = None + self._disable_attachments = None + self._disable_text_signatures = None + self._disable_text = None + self._disable_date = None + self._disable_emails = None + self._disable_upload_signatures = None + self._subject = None + self._message = None + self._who = None + self._send_reminders = None + self._signers = None + self._uuid = None + self.discriminator = None + + if from_email is not None: + self.from_email = from_email + if from_email_name is not None: + self.from_email_name = from_email_name + if is_being_prepared is not None: + self.is_being_prepared = is_being_prepared + if prepare_url is not None: + self.prepare_url = prepare_url + if redirect_url is not None: + self.redirect_url = redirect_url + if required_attachments is not None: + self.required_attachments = required_attachments + if disable_attachments is not None: + self.disable_attachments = disable_attachments + if disable_text_signatures is not None: + self.disable_text_signatures = disable_text_signatures + if disable_text is not None: + self.disable_text = disable_text + if disable_date is not None: + self.disable_date = disable_date + if disable_emails is not None: + self.disable_emails = disable_emails + if disable_upload_signatures is not None: + self.disable_upload_signatures = disable_upload_signatures + if subject is not None: + self.subject = subject + if message is not None: + self.message = message + if who is not None: + self.who = who + if send_reminders is not None: + self.send_reminders = send_reminders + if signers is not None: + self.signers = signers + if uuid is not None: + self.uuid = uuid + + @property + def from_email(self): + """Gets the from_email of this InlineSignRequest. # noqa: E501 + + Email of user sending the SignRequest (must be a validated email) # noqa: E501 + + :return: The from_email of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._from_email + + @from_email.setter + def from_email(self, from_email): + """Sets the from_email of this InlineSignRequest. + + Email of user sending the SignRequest (must be a validated email) # noqa: E501 + + :param from_email: The from_email of this InlineSignRequest. # noqa: E501 + :type: str + """ + if from_email is not None and len(from_email) < 1: + raise ValueError("Invalid value for `from_email`, length must be greater than or equal to `1`") # noqa: E501 + + self._from_email = from_email + + @property + def from_email_name(self): + """Gets the from_email_name of this InlineSignRequest. # noqa: E501 + + Name to be used in the `From` email header, e.g. `{from_email_name} ` # noqa: E501 + + :return: The from_email_name of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._from_email_name + + @from_email_name.setter + def from_email_name(self, from_email_name): + """Sets the from_email_name of this InlineSignRequest. + + Name to be used in the `From` email header, e.g. `{from_email_name} ` # noqa: E501 + + :param from_email_name: The from_email_name of this InlineSignRequest. # noqa: E501 + :type: str + """ + if from_email_name is not None and len(from_email_name) < 1: + raise ValueError("Invalid value for `from_email_name`, length must be greater than or equal to `1`") # noqa: E501 + + self._from_email_name = from_email_name + + @property + def is_being_prepared(self): + """Gets the is_being_prepared of this InlineSignRequest. # noqa: E501 + + Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) # noqa: E501 + + :return: The is_being_prepared of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._is_being_prepared + + @is_being_prepared.setter + def is_being_prepared(self, is_being_prepared): + """Sets the is_being_prepared of this InlineSignRequest. + + Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) # noqa: E501 + + :param is_being_prepared: The is_being_prepared of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._is_being_prepared = is_being_prepared + + @property + def prepare_url(self): + """Gets the prepare_url of this InlineSignRequest. # noqa: E501 + + + :return: The prepare_url of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._prepare_url + + @prepare_url.setter + def prepare_url(self, prepare_url): + """Sets the prepare_url of this InlineSignRequest. + + + :param prepare_url: The prepare_url of this InlineSignRequest. # noqa: E501 + :type: str + """ + if prepare_url is not None and len(prepare_url) < 1: + raise ValueError("Invalid value for `prepare_url`, length must be greater than or equal to `1`") # noqa: E501 + + self._prepare_url = prepare_url + + @property + def redirect_url(self): + """Gets the redirect_url of this InlineSignRequest. # noqa: E501 + + URL at which SignRequest will redirect to when a document is signed # noqa: E501 + + :return: The redirect_url of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._redirect_url + + @redirect_url.setter + def redirect_url(self, redirect_url): + """Sets the redirect_url of this InlineSignRequest. + + URL at which SignRequest will redirect to when a document is signed # noqa: E501 + + :param redirect_url: The redirect_url of this InlineSignRequest. # noqa: E501 + :type: str + """ + if redirect_url is not None and len(redirect_url) < 1: + raise ValueError("Invalid value for `redirect_url`, length must be greater than or equal to `1`") # noqa: E501 + + self._redirect_url = redirect_url + + @property + def required_attachments(self): + """Gets the required_attachments of this InlineSignRequest. # noqa: E501 + + + :return: The required_attachments of this InlineSignRequest. # noqa: E501 + :rtype: list[RequiredAttachment] + """ + return self._required_attachments + + @required_attachments.setter + def required_attachments(self, required_attachments): + """Sets the required_attachments of this InlineSignRequest. + + + :param required_attachments: The required_attachments of this InlineSignRequest. # noqa: E501 + :type: list[RequiredAttachment] + """ + + self._required_attachments = required_attachments + + @property + def disable_attachments(self): + """Gets the disable_attachments of this InlineSignRequest. # noqa: E501 + + Disable uploading/adding of attachments # noqa: E501 + + :return: The disable_attachments of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_attachments + + @disable_attachments.setter + def disable_attachments(self, disable_attachments): + """Sets the disable_attachments of this InlineSignRequest. + + Disable uploading/adding of attachments # noqa: E501 + + :param disable_attachments: The disable_attachments of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._disable_attachments = disable_attachments + + @property + def disable_text_signatures(self): + """Gets the disable_text_signatures of this InlineSignRequest. # noqa: E501 + + Disable usage of signatures generated by typing (text) # noqa: E501 + + :return: The disable_text_signatures of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_text_signatures + + @disable_text_signatures.setter + def disable_text_signatures(self, disable_text_signatures): + """Sets the disable_text_signatures of this InlineSignRequest. + + Disable usage of signatures generated by typing (text) # noqa: E501 + + :param disable_text_signatures: The disable_text_signatures of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._disable_text_signatures = disable_text_signatures + + @property + def disable_text(self): + """Gets the disable_text of this InlineSignRequest. # noqa: E501 + + Disable adding of text # noqa: E501 + + :return: The disable_text of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_text + + @disable_text.setter + def disable_text(self, disable_text): + """Sets the disable_text of this InlineSignRequest. + + Disable adding of text # noqa: E501 + + :param disable_text: The disable_text of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._disable_text = disable_text + + @property + def disable_date(self): + """Gets the disable_date of this InlineSignRequest. # noqa: E501 + + Disable adding of dates # noqa: E501 + + :return: The disable_date of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_date + + @disable_date.setter + def disable_date(self, disable_date): + """Sets the disable_date of this InlineSignRequest. + + Disable adding of dates # noqa: E501 + + :param disable_date: The disable_date of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._disable_date = disable_date + + @property + def disable_emails(self): + """Gets the disable_emails of this InlineSignRequest. # noqa: E501 + + Disable all SignRequest status emails as well as the email that contains the signed documents # noqa: E501 + + :return: The disable_emails of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_emails + + @disable_emails.setter + def disable_emails(self, disable_emails): + """Sets the disable_emails of this InlineSignRequest. + + Disable all SignRequest status emails as well as the email that contains the signed documents # noqa: E501 + + :param disable_emails: The disable_emails of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._disable_emails = disable_emails + + @property + def disable_upload_signatures(self): + """Gets the disable_upload_signatures of this InlineSignRequest. # noqa: E501 + + Disable usage of uploaded signatures (images) # noqa: E501 + + :return: The disable_upload_signatures of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_upload_signatures + + @disable_upload_signatures.setter + def disable_upload_signatures(self, disable_upload_signatures): + """Sets the disable_upload_signatures of this InlineSignRequest. + + Disable usage of uploaded signatures (images) # noqa: E501 + + :param disable_upload_signatures: The disable_upload_signatures of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._disable_upload_signatures = disable_upload_signatures + + @property + def subject(self): + """Gets the subject of this InlineSignRequest. # noqa: E501 + + Subject of SignRequest email # noqa: E501 + + :return: The subject of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this InlineSignRequest. + + Subject of SignRequest email # noqa: E501 + + :param subject: The subject of this InlineSignRequest. # noqa: E501 + :type: str + """ + if subject is not None and len(subject) < 1: + raise ValueError("Invalid value for `subject`, length must be greater than or equal to `1`") # noqa: E501 + + self._subject = subject + + @property + def message(self): + """Gets the message of this InlineSignRequest. # noqa: E501 + + Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` # noqa: E501 + + :return: The message of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this InlineSignRequest. + + Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` # noqa: E501 + + :param message: The message of this InlineSignRequest. # noqa: E501 + :type: str + """ + if message is not None and len(message) < 1: + raise ValueError("Invalid value for `message`, length must be greater than or equal to `1`") # noqa: E501 + + self._message = message + + @property + def who(self): + """Gets the who of this InlineSignRequest. # noqa: E501 + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :return: The who of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._who + + @who.setter + def who(self, who): + """Sets the who of this InlineSignRequest. + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :param who: The who of this InlineSignRequest. # noqa: E501 + :type: str + """ + allowed_values = ["m", "mo", "o"] # noqa: E501 + if who not in allowed_values: + raise ValueError( + "Invalid value for `who` ({0}), must be one of {1}" # noqa: E501 + .format(who, allowed_values) + ) + + self._who = who + + @property + def send_reminders(self): + """Gets the send_reminders of this InlineSignRequest. # noqa: E501 + + Automatically remind signers to sign a document # noqa: E501 + + :return: The send_reminders of this InlineSignRequest. # noqa: E501 + :rtype: bool + """ + return self._send_reminders + + @send_reminders.setter + def send_reminders(self, send_reminders): + """Sets the send_reminders of this InlineSignRequest. + + Automatically remind signers to sign a document # noqa: E501 + + :param send_reminders: The send_reminders of this InlineSignRequest. # noqa: E501 + :type: bool + """ + + self._send_reminders = send_reminders + + @property + def signers(self): + """Gets the signers of this InlineSignRequest. # noqa: E501 + + + :return: The signers of this InlineSignRequest. # noqa: E501 + :rtype: list[Signer] + """ + return self._signers + + @signers.setter + def signers(self, signers): + """Sets the signers of this InlineSignRequest. + + + :param signers: The signers of this InlineSignRequest. # noqa: E501 + :type: list[Signer] + """ + + self._signers = signers + + @property + def uuid(self): + """Gets the uuid of this InlineSignRequest. # noqa: E501 + + + :return: The uuid of this InlineSignRequest. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this InlineSignRequest. + + + :param uuid: The uuid of this InlineSignRequest. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineSignRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_team.py b/signrequest_client/models/inline_team.py new file mode 100644 index 0000000..169367e --- /dev/null +++ b/signrequest_client/models/inline_team.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineTeam(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'subdomain': 'str', + 'url': 'str' + } + + attribute_map = { + 'name': 'name', + 'subdomain': 'subdomain', + 'url': 'url' + } + + def __init__(self, name=None, subdomain=None, url=None): # noqa: E501 + """InlineTeam - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._subdomain = None + self._url = None + self.discriminator = None + + if name is not None: + self.name = name + if subdomain is not None: + self.subdomain = subdomain + if url is not None: + self.url = url + + @property + def name(self): + """Gets the name of this InlineTeam. # noqa: E501 + + + :return: The name of this InlineTeam. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this InlineTeam. + + + :param name: The name of this InlineTeam. # noqa: E501 + :type: str + """ + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def subdomain(self): + """Gets the subdomain of this InlineTeam. # noqa: E501 + + + :return: The subdomain of this InlineTeam. # noqa: E501 + :rtype: str + """ + return self._subdomain + + @subdomain.setter + def subdomain(self, subdomain): + """Sets the subdomain of this InlineTeam. + + + :param subdomain: The subdomain of this InlineTeam. # noqa: E501 + :type: str + """ + if subdomain is not None and len(subdomain) < 1: + raise ValueError("Invalid value for `subdomain`, length must be greater than or equal to `1`") # noqa: E501 + if subdomain is not None and not re.search('^[-a-zA-Z0-9_]+$', subdomain): # noqa: E501 + raise ValueError("Invalid value for `subdomain`, must be a follow pattern or equal to `/^[-a-zA-Z0-9_]+$/`") # noqa: E501 + + self._subdomain = subdomain + + @property + def url(self): + """Gets the url of this InlineTeam. # noqa: E501 + + + :return: The url of this InlineTeam. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this InlineTeam. + + + :param url: The url of this InlineTeam. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineTeam): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/inline_team_member.py b/signrequest_client/models/inline_team_member.py new file mode 100644 index 0000000..18bc415 --- /dev/null +++ b/signrequest_client/models/inline_team_member.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.user import User # noqa: F401,E501 + + +class InlineTeamMember(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uuid': 'str', + 'url': 'str', + 'user': 'User', + 'is_admin': 'bool', + 'is_active': 'bool', + 'is_owner': 'bool' + } + + attribute_map = { + 'uuid': 'uuid', + 'url': 'url', + 'user': 'user', + 'is_admin': 'is_admin', + 'is_active': 'is_active', + 'is_owner': 'is_owner' + } + + def __init__(self, uuid=None, url=None, user=None, is_admin=None, is_active=None, is_owner=None): # noqa: E501 + """InlineTeamMember - a model defined in Swagger""" # noqa: E501 + + self._uuid = None + self._url = None + self._user = None + self._is_admin = None + self._is_active = None + self._is_owner = None + self.discriminator = None + + if uuid is not None: + self.uuid = uuid + if url is not None: + self.url = url + if user is not None: + self.user = user + if is_admin is not None: + self.is_admin = is_admin + if is_active is not None: + self.is_active = is_active + if is_owner is not None: + self.is_owner = is_owner + + @property + def uuid(self): + """Gets the uuid of this InlineTeamMember. # noqa: E501 + + + :return: The uuid of this InlineTeamMember. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this InlineTeamMember. + + + :param uuid: The uuid of this InlineTeamMember. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def url(self): + """Gets the url of this InlineTeamMember. # noqa: E501 + + + :return: The url of this InlineTeamMember. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this InlineTeamMember. + + + :param url: The url of this InlineTeamMember. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this InlineTeamMember. # noqa: E501 + + + :return: The user of this InlineTeamMember. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this InlineTeamMember. + + + :param user: The user of this InlineTeamMember. # noqa: E501 + :type: User + """ + + self._user = user + + @property + def is_admin(self): + """Gets the is_admin of this InlineTeamMember. # noqa: E501 + + + :return: The is_admin of this InlineTeamMember. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this InlineTeamMember. + + + :param is_admin: The is_admin of this InlineTeamMember. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def is_active(self): + """Gets the is_active of this InlineTeamMember. # noqa: E501 + + + :return: The is_active of this InlineTeamMember. # noqa: E501 + :rtype: bool + """ + return self._is_active + + @is_active.setter + def is_active(self, is_active): + """Sets the is_active of this InlineTeamMember. + + + :param is_active: The is_active of this InlineTeamMember. # noqa: E501 + :type: bool + """ + + self._is_active = is_active + + @property + def is_owner(self): + """Gets the is_owner of this InlineTeamMember. # noqa: E501 + + + :return: The is_owner of this InlineTeamMember. # noqa: E501 + :rtype: bool + """ + return self._is_owner + + @is_owner.setter + def is_owner(self, is_owner): + """Sets the is_owner of this InlineTeamMember. + + + :param is_owner: The is_owner of this InlineTeamMember. # noqa: E501 + :type: bool + """ + + self._is_owner = is_owner + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineTeamMember): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/invite_member.py b/signrequest_client/models/invite_member.py new file mode 100644 index 0000000..14bf9a6 --- /dev/null +++ b/signrequest_client/models/invite_member.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InviteMember(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'is_admin': 'bool', + 'is_owner': 'bool' + } + + attribute_map = { + 'email': 'email', + 'is_admin': 'is_admin', + 'is_owner': 'is_owner' + } + + def __init__(self, email=None, is_admin=False, is_owner=False): # noqa: E501 + """InviteMember - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._is_admin = None + self._is_owner = None + self.discriminator = None + + self.email = email + if is_admin is not None: + self.is_admin = is_admin + if is_owner is not None: + self.is_owner = is_owner + + @property + def email(self): + """Gets the email of this InviteMember. # noqa: E501 + + + :return: The email of this InviteMember. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this InviteMember. + + + :param email: The email of this InviteMember. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + if email is not None and len(email) < 1: + raise ValueError("Invalid value for `email`, length must be greater than or equal to `1`") # noqa: E501 + + self._email = email + + @property + def is_admin(self): + """Gets the is_admin of this InviteMember. # noqa: E501 + + + :return: The is_admin of this InviteMember. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this InviteMember. + + + :param is_admin: The is_admin of this InviteMember. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def is_owner(self): + """Gets the is_owner of this InviteMember. # noqa: E501 + + + :return: The is_owner of this InviteMember. # noqa: E501 + :rtype: bool + """ + return self._is_owner + + @is_owner.setter + def is_owner(self, is_owner): + """Sets the is_owner of this InviteMember. + + + :param is_owner: The is_owner of this InviteMember. # noqa: E501 + :type: bool + """ + + self._is_owner = is_owner + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InviteMember): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/placeholder.py b/signrequest_client/models/placeholder.py new file mode 100644 index 0000000..1fe7897 --- /dev/null +++ b/signrequest_client/models/placeholder.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Placeholder(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uuid': 'str', + 'type': 'str', + 'page_index': 'int', + 'prefill': 'bool', + 'text': 'str', + 'checkbox_value': 'bool', + 'date_value': 'date', + 'external_id': 'str' + } + + attribute_map = { + 'uuid': 'uuid', + 'type': 'type', + 'page_index': 'page_index', + 'prefill': 'prefill', + 'text': 'text', + 'checkbox_value': 'checkbox_value', + 'date_value': 'date_value', + 'external_id': 'external_id' + } + + def __init__(self, uuid=None, type=None, page_index=None, prefill=None, text=None, checkbox_value=None, date_value=None, external_id=None): # noqa: E501 + """Placeholder - a model defined in Swagger""" # noqa: E501 + + self._uuid = None + self._type = None + self._page_index = None + self._prefill = None + self._text = None + self._checkbox_value = None + self._date_value = None + self._external_id = None + self.discriminator = None + + if uuid is not None: + self.uuid = uuid + if type is not None: + self.type = type + self.page_index = page_index + self.prefill = prefill + if text is not None: + self.text = text + if checkbox_value is not None: + self.checkbox_value = checkbox_value + if date_value is not None: + self.date_value = date_value + if external_id is not None: + self.external_id = external_id + + @property + def uuid(self): + """Gets the uuid of this Placeholder. # noqa: E501 + + + :return: The uuid of this Placeholder. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Placeholder. + + + :param uuid: The uuid of this Placeholder. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def type(self): + """Gets the type of this Placeholder. # noqa: E501 + + + :return: The type of this Placeholder. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Placeholder. + + + :param type: The type of this Placeholder. # noqa: E501 + :type: str + """ + allowed_values = ["s", "i", "n", "d", "t", "c"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def page_index(self): + """Gets the page_index of this Placeholder. # noqa: E501 + + + :return: The page_index of this Placeholder. # noqa: E501 + :rtype: int + """ + return self._page_index + + @page_index.setter + def page_index(self, page_index): + """Sets the page_index of this Placeholder. + + + :param page_index: The page_index of this Placeholder. # noqa: E501 + :type: int + """ + if page_index is None: + raise ValueError("Invalid value for `page_index`, must not be `None`") # noqa: E501 + + self._page_index = page_index + + @property + def prefill(self): + """Gets the prefill of this Placeholder. # noqa: E501 + + + :return: The prefill of this Placeholder. # noqa: E501 + :rtype: bool + """ + return self._prefill + + @prefill.setter + def prefill(self, prefill): + """Sets the prefill of this Placeholder. + + + :param prefill: The prefill of this Placeholder. # noqa: E501 + :type: bool + """ + if prefill is None: + raise ValueError("Invalid value for `prefill`, must not be `None`") # noqa: E501 + + self._prefill = prefill + + @property + def text(self): + """Gets the text of this Placeholder. # noqa: E501 + + + :return: The text of this Placeholder. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this Placeholder. + + + :param text: The text of this Placeholder. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def checkbox_value(self): + """Gets the checkbox_value of this Placeholder. # noqa: E501 + + + :return: The checkbox_value of this Placeholder. # noqa: E501 + :rtype: bool + """ + return self._checkbox_value + + @checkbox_value.setter + def checkbox_value(self, checkbox_value): + """Sets the checkbox_value of this Placeholder. + + + :param checkbox_value: The checkbox_value of this Placeholder. # noqa: E501 + :type: bool + """ + + self._checkbox_value = checkbox_value + + @property + def date_value(self): + """Gets the date_value of this Placeholder. # noqa: E501 + + + :return: The date_value of this Placeholder. # noqa: E501 + :rtype: date + """ + return self._date_value + + @date_value.setter + def date_value(self, date_value): + """Sets the date_value of this Placeholder. + + + :param date_value: The date_value of this Placeholder. # noqa: E501 + :type: date + """ + + self._date_value = date_value + + @property + def external_id(self): + """Gets the external_id of this Placeholder. # noqa: E501 + + + :return: The external_id of this Placeholder. # noqa: E501 + :rtype: str + """ + return self._external_id + + @external_id.setter + def external_id(self, external_id): + """Sets the external_id of this Placeholder. + + + :param external_id: The external_id of this Placeholder. # noqa: E501 + :type: str + """ + if external_id is not None and len(external_id) > 255: + raise ValueError("Invalid value for `external_id`, length must be less than or equal to `255`") # noqa: E501 + + self._external_id = external_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Placeholder): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/required_attachment.py b/signrequest_client/models/required_attachment.py new file mode 100644 index 0000000..57c16dc --- /dev/null +++ b/signrequest_client/models/required_attachment.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class RequiredAttachment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'uuid': 'str' + } + + attribute_map = { + 'name': 'name', + 'uuid': 'uuid' + } + + def __init__(self, name=None, uuid=None): # noqa: E501 + """RequiredAttachment - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._uuid = None + self.discriminator = None + + self.name = name + if uuid is not None: + self.uuid = uuid + + @property + def name(self): + """Gets the name of this RequiredAttachment. # noqa: E501 + + + :return: The name of this RequiredAttachment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RequiredAttachment. + + + :param name: The name of this RequiredAttachment. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if name is not None and len(name) > 255: + raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def uuid(self): + """Gets the uuid of this RequiredAttachment. # noqa: E501 + + + :return: The uuid of this RequiredAttachment. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this RequiredAttachment. + + + :param uuid: The uuid of this RequiredAttachment. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RequiredAttachment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/sign_request.py b/signrequest_client/models/sign_request.py new file mode 100644 index 0000000..a92a42f --- /dev/null +++ b/signrequest_client/models/sign_request.py @@ -0,0 +1,719 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.required_attachment import RequiredAttachment # noqa: F401,E501 +from signrequest_client.models.signer import Signer # noqa: F401,E501 + + +class SignRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'from_email': 'str', + 'from_email_name': 'str', + 'is_being_prepared': 'bool', + 'prepare_url': 'str', + 'redirect_url': 'str', + 'required_attachments': 'list[RequiredAttachment]', + 'disable_attachments': 'bool', + 'disable_text_signatures': 'bool', + 'disable_text': 'bool', + 'disable_date': 'bool', + 'disable_emails': 'bool', + 'disable_upload_signatures': 'bool', + 'subject': 'str', + 'message': 'str', + 'who': 'str', + 'send_reminders': 'bool', + 'signers': 'list[Signer]', + 'uuid': 'str', + 'url': 'str', + 'document': 'str', + 'integration': 'str', + 'integration_data': 'str' + } + + attribute_map = { + 'from_email': 'from_email', + 'from_email_name': 'from_email_name', + 'is_being_prepared': 'is_being_prepared', + 'prepare_url': 'prepare_url', + 'redirect_url': 'redirect_url', + 'required_attachments': 'required_attachments', + 'disable_attachments': 'disable_attachments', + 'disable_text_signatures': 'disable_text_signatures', + 'disable_text': 'disable_text', + 'disable_date': 'disable_date', + 'disable_emails': 'disable_emails', + 'disable_upload_signatures': 'disable_upload_signatures', + 'subject': 'subject', + 'message': 'message', + 'who': 'who', + 'send_reminders': 'send_reminders', + 'signers': 'signers', + 'uuid': 'uuid', + 'url': 'url', + 'document': 'document', + 'integration': 'integration', + 'integration_data': 'integration_data' + } + + def __init__(self, from_email=None, from_email_name=None, is_being_prepared=None, prepare_url=None, redirect_url=None, required_attachments=None, disable_attachments=None, disable_text_signatures=None, disable_text=None, disable_date=None, disable_emails=None, disable_upload_signatures=None, subject=None, message=None, who='o', send_reminders=None, signers=None, uuid=None, url=None, document=None, integration=None, integration_data=None): # noqa: E501 + """SignRequest - a model defined in Swagger""" # noqa: E501 + + self._from_email = None + self._from_email_name = None + self._is_being_prepared = None + self._prepare_url = None + self._redirect_url = None + self._required_attachments = None + self._disable_attachments = None + self._disable_text_signatures = None + self._disable_text = None + self._disable_date = None + self._disable_emails = None + self._disable_upload_signatures = None + self._subject = None + self._message = None + self._who = None + self._send_reminders = None + self._signers = None + self._uuid = None + self._url = None + self._document = None + self._integration = None + self._integration_data = None + self.discriminator = None + + if from_email is not None: + self.from_email = from_email + if from_email_name is not None: + self.from_email_name = from_email_name + if is_being_prepared is not None: + self.is_being_prepared = is_being_prepared + if prepare_url is not None: + self.prepare_url = prepare_url + if redirect_url is not None: + self.redirect_url = redirect_url + if required_attachments is not None: + self.required_attachments = required_attachments + if disable_attachments is not None: + self.disable_attachments = disable_attachments + if disable_text_signatures is not None: + self.disable_text_signatures = disable_text_signatures + if disable_text is not None: + self.disable_text = disable_text + if disable_date is not None: + self.disable_date = disable_date + if disable_emails is not None: + self.disable_emails = disable_emails + if disable_upload_signatures is not None: + self.disable_upload_signatures = disable_upload_signatures + if subject is not None: + self.subject = subject + if message is not None: + self.message = message + if who is not None: + self.who = who + if send_reminders is not None: + self.send_reminders = send_reminders + self.signers = signers + if uuid is not None: + self.uuid = uuid + if url is not None: + self.url = url + self.document = document + if integration is not None: + self.integration = integration + if integration_data is not None: + self.integration_data = integration_data + + @property + def from_email(self): + """Gets the from_email of this SignRequest. # noqa: E501 + + Email of user sending the SignRequest (must be a validated email) # noqa: E501 + + :return: The from_email of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._from_email + + @from_email.setter + def from_email(self, from_email): + """Sets the from_email of this SignRequest. + + Email of user sending the SignRequest (must be a validated email) # noqa: E501 + + :param from_email: The from_email of this SignRequest. # noqa: E501 + :type: str + """ + if from_email is not None and len(from_email) > 255: + raise ValueError("Invalid value for `from_email`, length must be less than or equal to `255`") # noqa: E501 + if from_email is not None and len(from_email) < 1: + raise ValueError("Invalid value for `from_email`, length must be greater than or equal to `1`") # noqa: E501 + + self._from_email = from_email + + @property + def from_email_name(self): + """Gets the from_email_name of this SignRequest. # noqa: E501 + + Name to be used in the `From` email header, e.g. `{from_email_name} ` # noqa: E501 + + :return: The from_email_name of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._from_email_name + + @from_email_name.setter + def from_email_name(self, from_email_name): + """Sets the from_email_name of this SignRequest. + + Name to be used in the `From` email header, e.g. `{from_email_name} ` # noqa: E501 + + :param from_email_name: The from_email_name of this SignRequest. # noqa: E501 + :type: str + """ + if from_email_name is not None and len(from_email_name) > 255: + raise ValueError("Invalid value for `from_email_name`, length must be less than or equal to `255`") # noqa: E501 + + self._from_email_name = from_email_name + + @property + def is_being_prepared(self): + """Gets the is_being_prepared of this SignRequest. # noqa: E501 + + Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) # noqa: E501 + + :return: The is_being_prepared of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._is_being_prepared + + @is_being_prepared.setter + def is_being_prepared(self, is_being_prepared): + """Sets the is_being_prepared of this SignRequest. + + Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) # noqa: E501 + + :param is_being_prepared: The is_being_prepared of this SignRequest. # noqa: E501 + :type: bool + """ + + self._is_being_prepared = is_being_prepared + + @property + def prepare_url(self): + """Gets the prepare_url of this SignRequest. # noqa: E501 + + + :return: The prepare_url of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._prepare_url + + @prepare_url.setter + def prepare_url(self, prepare_url): + """Sets the prepare_url of this SignRequest. + + + :param prepare_url: The prepare_url of this SignRequest. # noqa: E501 + :type: str + """ + if prepare_url is not None and len(prepare_url) < 1: + raise ValueError("Invalid value for `prepare_url`, length must be greater than or equal to `1`") # noqa: E501 + + self._prepare_url = prepare_url + + @property + def redirect_url(self): + """Gets the redirect_url of this SignRequest. # noqa: E501 + + URL at which SignRequest will redirect to when a document is signed # noqa: E501 + + :return: The redirect_url of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._redirect_url + + @redirect_url.setter + def redirect_url(self, redirect_url): + """Sets the redirect_url of this SignRequest. + + URL at which SignRequest will redirect to when a document is signed # noqa: E501 + + :param redirect_url: The redirect_url of this SignRequest. # noqa: E501 + :type: str + """ + if redirect_url is not None and len(redirect_url) > 2100: + raise ValueError("Invalid value for `redirect_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._redirect_url = redirect_url + + @property + def required_attachments(self): + """Gets the required_attachments of this SignRequest. # noqa: E501 + + Attachments that signers are required to upload # noqa: E501 + + :return: The required_attachments of this SignRequest. # noqa: E501 + :rtype: list[RequiredAttachment] + """ + return self._required_attachments + + @required_attachments.setter + def required_attachments(self, required_attachments): + """Sets the required_attachments of this SignRequest. + + Attachments that signers are required to upload # noqa: E501 + + :param required_attachments: The required_attachments of this SignRequest. # noqa: E501 + :type: list[RequiredAttachment] + """ + + self._required_attachments = required_attachments + + @property + def disable_attachments(self): + """Gets the disable_attachments of this SignRequest. # noqa: E501 + + Disable uploading/adding of attachments # noqa: E501 + + :return: The disable_attachments of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_attachments + + @disable_attachments.setter + def disable_attachments(self, disable_attachments): + """Sets the disable_attachments of this SignRequest. + + Disable uploading/adding of attachments # noqa: E501 + + :param disable_attachments: The disable_attachments of this SignRequest. # noqa: E501 + :type: bool + """ + + self._disable_attachments = disable_attachments + + @property + def disable_text_signatures(self): + """Gets the disable_text_signatures of this SignRequest. # noqa: E501 + + Disable usage of signatures generated by typing (text) # noqa: E501 + + :return: The disable_text_signatures of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_text_signatures + + @disable_text_signatures.setter + def disable_text_signatures(self, disable_text_signatures): + """Sets the disable_text_signatures of this SignRequest. + + Disable usage of signatures generated by typing (text) # noqa: E501 + + :param disable_text_signatures: The disable_text_signatures of this SignRequest. # noqa: E501 + :type: bool + """ + + self._disable_text_signatures = disable_text_signatures + + @property + def disable_text(self): + """Gets the disable_text of this SignRequest. # noqa: E501 + + Disable adding of text # noqa: E501 + + :return: The disable_text of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_text + + @disable_text.setter + def disable_text(self, disable_text): + """Sets the disable_text of this SignRequest. + + Disable adding of text # noqa: E501 + + :param disable_text: The disable_text of this SignRequest. # noqa: E501 + :type: bool + """ + + self._disable_text = disable_text + + @property + def disable_date(self): + """Gets the disable_date of this SignRequest. # noqa: E501 + + Disable adding of dates # noqa: E501 + + :return: The disable_date of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_date + + @disable_date.setter + def disable_date(self, disable_date): + """Sets the disable_date of this SignRequest. + + Disable adding of dates # noqa: E501 + + :param disable_date: The disable_date of this SignRequest. # noqa: E501 + :type: bool + """ + + self._disable_date = disable_date + + @property + def disable_emails(self): + """Gets the disable_emails of this SignRequest. # noqa: E501 + + Disable all SignRequest status emails as well as the email that contains the signed documents # noqa: E501 + + :return: The disable_emails of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_emails + + @disable_emails.setter + def disable_emails(self, disable_emails): + """Sets the disable_emails of this SignRequest. + + Disable all SignRequest status emails as well as the email that contains the signed documents # noqa: E501 + + :param disable_emails: The disable_emails of this SignRequest. # noqa: E501 + :type: bool + """ + + self._disable_emails = disable_emails + + @property + def disable_upload_signatures(self): + """Gets the disable_upload_signatures of this SignRequest. # noqa: E501 + + Disable usage of uploaded signatures (images) # noqa: E501 + + :return: The disable_upload_signatures of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._disable_upload_signatures + + @disable_upload_signatures.setter + def disable_upload_signatures(self, disable_upload_signatures): + """Sets the disable_upload_signatures of this SignRequest. + + Disable usage of uploaded signatures (images) # noqa: E501 + + :param disable_upload_signatures: The disable_upload_signatures of this SignRequest. # noqa: E501 + :type: bool + """ + + self._disable_upload_signatures = disable_upload_signatures + + @property + def subject(self): + """Gets the subject of this SignRequest. # noqa: E501 + + Subject of SignRequest email # noqa: E501 + + :return: The subject of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SignRequest. + + Subject of SignRequest email # noqa: E501 + + :param subject: The subject of this SignRequest. # noqa: E501 + :type: str + """ + if subject is not None and len(subject) > 512: + raise ValueError("Invalid value for `subject`, length must be less than or equal to `512`") # noqa: E501 + + self._subject = subject + + @property + def message(self): + """Gets the message of this SignRequest. # noqa: E501 + + Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` # noqa: E501 + + :return: The message of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this SignRequest. + + Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` # noqa: E501 + + :param message: The message of this SignRequest. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def who(self): + """Gets the who of this SignRequest. # noqa: E501 + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :return: The who of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._who + + @who.setter + def who(self, who): + """Sets the who of this SignRequest. + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :param who: The who of this SignRequest. # noqa: E501 + :type: str + """ + allowed_values = ["m", "mo", "o"] # noqa: E501 + if who not in allowed_values: + raise ValueError( + "Invalid value for `who` ({0}), must be one of {1}" # noqa: E501 + .format(who, allowed_values) + ) + + self._who = who + + @property + def send_reminders(self): + """Gets the send_reminders of this SignRequest. # noqa: E501 + + Automatically remind signers to sign a document # noqa: E501 + + :return: The send_reminders of this SignRequest. # noqa: E501 + :rtype: bool + """ + return self._send_reminders + + @send_reminders.setter + def send_reminders(self, send_reminders): + """Sets the send_reminders of this SignRequest. + + Automatically remind signers to sign a document # noqa: E501 + + :param send_reminders: The send_reminders of this SignRequest. # noqa: E501 + :type: bool + """ + + self._send_reminders = send_reminders + + @property + def signers(self): + """Gets the signers of this SignRequest. # noqa: E501 + + + :return: The signers of this SignRequest. # noqa: E501 + :rtype: list[Signer] + """ + return self._signers + + @signers.setter + def signers(self, signers): + """Sets the signers of this SignRequest. + + + :param signers: The signers of this SignRequest. # noqa: E501 + :type: list[Signer] + """ + if signers is None: + raise ValueError("Invalid value for `signers`, must not be `None`") # noqa: E501 + + self._signers = signers + + @property + def uuid(self): + """Gets the uuid of this SignRequest. # noqa: E501 + + + :return: The uuid of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this SignRequest. + + + :param uuid: The uuid of this SignRequest. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def url(self): + """Gets the url of this SignRequest. # noqa: E501 + + + :return: The url of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this SignRequest. + + + :param url: The url of this SignRequest. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def document(self): + """Gets the document of this SignRequest. # noqa: E501 + + + :return: The document of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._document + + @document.setter + def document(self, document): + """Sets the document of this SignRequest. + + + :param document: The document of this SignRequest. # noqa: E501 + :type: str + """ + if document is None: + raise ValueError("Invalid value for `document`, must not be `None`") # noqa: E501 + + self._document = document + + @property + def integration(self): + """Gets the integration of this SignRequest. # noqa: E501 + + + :return: The integration of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._integration + + @integration.setter + def integration(self, integration): + """Sets the integration of this SignRequest. + + + :param integration: The integration of this SignRequest. # noqa: E501 + :type: str + """ + allowed_values = ["mfiles", "salesforce", "formdesk", "zapier", "txhash"] # noqa: E501 + if integration not in allowed_values: + raise ValueError( + "Invalid value for `integration` ({0}), must be one of {1}" # noqa: E501 + .format(integration, allowed_values) + ) + + self._integration = integration + + @property + def integration_data(self): + """Gets the integration_data of this SignRequest. # noqa: E501 + + + :return: The integration_data of this SignRequest. # noqa: E501 + :rtype: str + """ + return self._integration_data + + @integration_data.setter + def integration_data(self, integration_data): + """Sets the integration_data of this SignRequest. + + + :param integration_data: The integration_data of this SignRequest. # noqa: E501 + :type: str + """ + + self._integration_data = integration_data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/sign_request_quick_create.py b/signrequest_client/models/sign_request_quick_create.py new file mode 100644 index 0000000..760d772 --- /dev/null +++ b/signrequest_client/models/sign_request_quick_create.py @@ -0,0 +1,1093 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.file_from_sf import FileFromSf # noqa: F401,E501 +from signrequest_client.models.inline_integration_data import InlineIntegrationData # noqa: F401,E501 +from signrequest_client.models.inline_prefill_tags import InlinePrefillTags # noqa: F401,E501 +from signrequest_client.models.required_attachment import RequiredAttachment # noqa: F401,E501 +from signrequest_client.models.signer import Signer # noqa: F401,E501 + + +class SignRequestQuickCreate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'from_email': 'str', + 'from_email_name': 'str', + 'is_being_prepared': 'bool', + 'prepare_url': 'str', + 'redirect_url': 'str', + 'required_attachments': 'list[RequiredAttachment]', + 'disable_attachments': 'bool', + 'disable_text_signatures': 'bool', + 'disable_text': 'bool', + 'disable_date': 'bool', + 'disable_emails': 'bool', + 'disable_upload_signatures': 'bool', + 'subject': 'str', + 'message': 'str', + 'who': 'str', + 'send_reminders': 'bool', + 'signers': 'list[Signer]', + 'uuid': 'str', + 'url': 'str', + 'document': 'str', + 'integration': 'str', + 'integration_data': 'str', + 'name': 'str', + 'external_id': 'str', + 'frontend_id': 'str', + 'file': 'str', + 'file_from_url': 'str', + 'events_callback_url': 'str', + 'file_from_content': 'str', + 'file_from_content_name': 'str', + 'template': 'str', + 'prefill_tags': 'list[InlinePrefillTags]', + 'integrations': 'list[InlineIntegrationData]', + 'file_from_sf': 'FileFromSf', + 'auto_delete_days': 'int' + } + + attribute_map = { + 'from_email': 'from_email', + 'from_email_name': 'from_email_name', + 'is_being_prepared': 'is_being_prepared', + 'prepare_url': 'prepare_url', + 'redirect_url': 'redirect_url', + 'required_attachments': 'required_attachments', + 'disable_attachments': 'disable_attachments', + 'disable_text_signatures': 'disable_text_signatures', + 'disable_text': 'disable_text', + 'disable_date': 'disable_date', + 'disable_emails': 'disable_emails', + 'disable_upload_signatures': 'disable_upload_signatures', + 'subject': 'subject', + 'message': 'message', + 'who': 'who', + 'send_reminders': 'send_reminders', + 'signers': 'signers', + 'uuid': 'uuid', + 'url': 'url', + 'document': 'document', + 'integration': 'integration', + 'integration_data': 'integration_data', + 'name': 'name', + 'external_id': 'external_id', + 'frontend_id': 'frontend_id', + 'file': 'file', + 'file_from_url': 'file_from_url', + 'events_callback_url': 'events_callback_url', + 'file_from_content': 'file_from_content', + 'file_from_content_name': 'file_from_content_name', + 'template': 'template', + 'prefill_tags': 'prefill_tags', + 'integrations': 'integrations', + 'file_from_sf': 'file_from_sf', + 'auto_delete_days': 'auto_delete_days' + } + + def __init__(self, from_email=None, from_email_name=None, is_being_prepared=None, prepare_url=None, redirect_url=None, required_attachments=None, disable_attachments=None, disable_text_signatures=None, disable_text=None, disable_date=None, disable_emails=None, disable_upload_signatures=None, subject=None, message=None, who='o', send_reminders=None, signers=None, uuid=None, url=None, document=None, integration=None, integration_data=None, name=None, external_id=None, frontend_id=None, file=None, file_from_url=None, events_callback_url=None, file_from_content=None, file_from_content_name=None, template=None, prefill_tags=None, integrations=None, file_from_sf=None, auto_delete_days=None): # noqa: E501 + """SignRequestQuickCreate - a model defined in Swagger""" # noqa: E501 + + self._from_email = None + self._from_email_name = None + self._is_being_prepared = None + self._prepare_url = None + self._redirect_url = None + self._required_attachments = None + self._disable_attachments = None + self._disable_text_signatures = None + self._disable_text = None + self._disable_date = None + self._disable_emails = None + self._disable_upload_signatures = None + self._subject = None + self._message = None + self._who = None + self._send_reminders = None + self._signers = None + self._uuid = None + self._url = None + self._document = None + self._integration = None + self._integration_data = None + self._name = None + self._external_id = None + self._frontend_id = None + self._file = None + self._file_from_url = None + self._events_callback_url = None + self._file_from_content = None + self._file_from_content_name = None + self._template = None + self._prefill_tags = None + self._integrations = None + self._file_from_sf = None + self._auto_delete_days = None + self.discriminator = None + + if from_email is not None: + self.from_email = from_email + if from_email_name is not None: + self.from_email_name = from_email_name + if is_being_prepared is not None: + self.is_being_prepared = is_being_prepared + if prepare_url is not None: + self.prepare_url = prepare_url + if redirect_url is not None: + self.redirect_url = redirect_url + if required_attachments is not None: + self.required_attachments = required_attachments + if disable_attachments is not None: + self.disable_attachments = disable_attachments + if disable_text_signatures is not None: + self.disable_text_signatures = disable_text_signatures + if disable_text is not None: + self.disable_text = disable_text + if disable_date is not None: + self.disable_date = disable_date + if disable_emails is not None: + self.disable_emails = disable_emails + if disable_upload_signatures is not None: + self.disable_upload_signatures = disable_upload_signatures + if subject is not None: + self.subject = subject + if message is not None: + self.message = message + if who is not None: + self.who = who + if send_reminders is not None: + self.send_reminders = send_reminders + self.signers = signers + if uuid is not None: + self.uuid = uuid + if url is not None: + self.url = url + if document is not None: + self.document = document + if integration is not None: + self.integration = integration + if integration_data is not None: + self.integration_data = integration_data + if name is not None: + self.name = name + if external_id is not None: + self.external_id = external_id + if frontend_id is not None: + self.frontend_id = frontend_id + if file is not None: + self.file = file + if file_from_url is not None: + self.file_from_url = file_from_url + if events_callback_url is not None: + self.events_callback_url = events_callback_url + if file_from_content is not None: + self.file_from_content = file_from_content + if file_from_content_name is not None: + self.file_from_content_name = file_from_content_name + if template is not None: + self.template = template + if prefill_tags is not None: + self.prefill_tags = prefill_tags + if integrations is not None: + self.integrations = integrations + if file_from_sf is not None: + self.file_from_sf = file_from_sf + if auto_delete_days is not None: + self.auto_delete_days = auto_delete_days + + @property + def from_email(self): + """Gets the from_email of this SignRequestQuickCreate. # noqa: E501 + + Email of user sending the SignRequest (must be a validated email) # noqa: E501 + + :return: The from_email of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._from_email + + @from_email.setter + def from_email(self, from_email): + """Sets the from_email of this SignRequestQuickCreate. + + Email of user sending the SignRequest (must be a validated email) # noqa: E501 + + :param from_email: The from_email of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if from_email is not None and len(from_email) > 255: + raise ValueError("Invalid value for `from_email`, length must be less than or equal to `255`") # noqa: E501 + if from_email is not None and len(from_email) < 1: + raise ValueError("Invalid value for `from_email`, length must be greater than or equal to `1`") # noqa: E501 + + self._from_email = from_email + + @property + def from_email_name(self): + """Gets the from_email_name of this SignRequestQuickCreate. # noqa: E501 + + Name to be used in the `From` email header, e.g. `{from_email_name} ` # noqa: E501 + + :return: The from_email_name of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._from_email_name + + @from_email_name.setter + def from_email_name(self, from_email_name): + """Sets the from_email_name of this SignRequestQuickCreate. + + Name to be used in the `From` email header, e.g. `{from_email_name} ` # noqa: E501 + + :param from_email_name: The from_email_name of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if from_email_name is not None and len(from_email_name) > 255: + raise ValueError("Invalid value for `from_email_name`, length must be less than or equal to `255`") # noqa: E501 + + self._from_email_name = from_email_name + + @property + def is_being_prepared(self): + """Gets the is_being_prepared of this SignRequestQuickCreate. # noqa: E501 + + Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) # noqa: E501 + + :return: The is_being_prepared of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._is_being_prepared + + @is_being_prepared.setter + def is_being_prepared(self, is_being_prepared): + """Sets the is_being_prepared of this SignRequestQuickCreate. + + Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface) # noqa: E501 + + :param is_being_prepared: The is_being_prepared of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._is_being_prepared = is_being_prepared + + @property + def prepare_url(self): + """Gets the prepare_url of this SignRequestQuickCreate. # noqa: E501 + + + :return: The prepare_url of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._prepare_url + + @prepare_url.setter + def prepare_url(self, prepare_url): + """Sets the prepare_url of this SignRequestQuickCreate. + + + :param prepare_url: The prepare_url of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if prepare_url is not None and len(prepare_url) < 1: + raise ValueError("Invalid value for `prepare_url`, length must be greater than or equal to `1`") # noqa: E501 + + self._prepare_url = prepare_url + + @property + def redirect_url(self): + """Gets the redirect_url of this SignRequestQuickCreate. # noqa: E501 + + URL at which SignRequest will redirect to when a document is signed # noqa: E501 + + :return: The redirect_url of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._redirect_url + + @redirect_url.setter + def redirect_url(self, redirect_url): + """Sets the redirect_url of this SignRequestQuickCreate. + + URL at which SignRequest will redirect to when a document is signed # noqa: E501 + + :param redirect_url: The redirect_url of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if redirect_url is not None and len(redirect_url) > 2100: + raise ValueError("Invalid value for `redirect_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._redirect_url = redirect_url + + @property + def required_attachments(self): + """Gets the required_attachments of this SignRequestQuickCreate. # noqa: E501 + + Attachments that signers are required to upload # noqa: E501 + + :return: The required_attachments of this SignRequestQuickCreate. # noqa: E501 + :rtype: list[RequiredAttachment] + """ + return self._required_attachments + + @required_attachments.setter + def required_attachments(self, required_attachments): + """Sets the required_attachments of this SignRequestQuickCreate. + + Attachments that signers are required to upload # noqa: E501 + + :param required_attachments: The required_attachments of this SignRequestQuickCreate. # noqa: E501 + :type: list[RequiredAttachment] + """ + + self._required_attachments = required_attachments + + @property + def disable_attachments(self): + """Gets the disable_attachments of this SignRequestQuickCreate. # noqa: E501 + + Disable uploading/adding of attachments # noqa: E501 + + :return: The disable_attachments of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._disable_attachments + + @disable_attachments.setter + def disable_attachments(self, disable_attachments): + """Sets the disable_attachments of this SignRequestQuickCreate. + + Disable uploading/adding of attachments # noqa: E501 + + :param disable_attachments: The disable_attachments of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._disable_attachments = disable_attachments + + @property + def disable_text_signatures(self): + """Gets the disable_text_signatures of this SignRequestQuickCreate. # noqa: E501 + + Disable usage of signatures generated by typing (text) # noqa: E501 + + :return: The disable_text_signatures of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._disable_text_signatures + + @disable_text_signatures.setter + def disable_text_signatures(self, disable_text_signatures): + """Sets the disable_text_signatures of this SignRequestQuickCreate. + + Disable usage of signatures generated by typing (text) # noqa: E501 + + :param disable_text_signatures: The disable_text_signatures of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._disable_text_signatures = disable_text_signatures + + @property + def disable_text(self): + """Gets the disable_text of this SignRequestQuickCreate. # noqa: E501 + + Disable adding of text # noqa: E501 + + :return: The disable_text of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._disable_text + + @disable_text.setter + def disable_text(self, disable_text): + """Sets the disable_text of this SignRequestQuickCreate. + + Disable adding of text # noqa: E501 + + :param disable_text: The disable_text of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._disable_text = disable_text + + @property + def disable_date(self): + """Gets the disable_date of this SignRequestQuickCreate. # noqa: E501 + + Disable adding of dates # noqa: E501 + + :return: The disable_date of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._disable_date + + @disable_date.setter + def disable_date(self, disable_date): + """Sets the disable_date of this SignRequestQuickCreate. + + Disable adding of dates # noqa: E501 + + :param disable_date: The disable_date of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._disable_date = disable_date + + @property + def disable_emails(self): + """Gets the disable_emails of this SignRequestQuickCreate. # noqa: E501 + + Disable all SignRequest status emails as well as the email that contains the signed documents # noqa: E501 + + :return: The disable_emails of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._disable_emails + + @disable_emails.setter + def disable_emails(self, disable_emails): + """Sets the disable_emails of this SignRequestQuickCreate. + + Disable all SignRequest status emails as well as the email that contains the signed documents # noqa: E501 + + :param disable_emails: The disable_emails of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._disable_emails = disable_emails + + @property + def disable_upload_signatures(self): + """Gets the disable_upload_signatures of this SignRequestQuickCreate. # noqa: E501 + + Disable usage of uploaded signatures (images) # noqa: E501 + + :return: The disable_upload_signatures of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._disable_upload_signatures + + @disable_upload_signatures.setter + def disable_upload_signatures(self, disable_upload_signatures): + """Sets the disable_upload_signatures of this SignRequestQuickCreate. + + Disable usage of uploaded signatures (images) # noqa: E501 + + :param disable_upload_signatures: The disable_upload_signatures of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._disable_upload_signatures = disable_upload_signatures + + @property + def subject(self): + """Gets the subject of this SignRequestQuickCreate. # noqa: E501 + + Subject of SignRequest email # noqa: E501 + + :return: The subject of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SignRequestQuickCreate. + + Subject of SignRequest email # noqa: E501 + + :param subject: The subject of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if subject is not None and len(subject) > 512: + raise ValueError("Invalid value for `subject`, length must be less than or equal to `512`") # noqa: E501 + + self._subject = subject + + @property + def message(self): + """Gets the message of this SignRequestQuickCreate. # noqa: E501 + + Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` # noqa: E501 + + :return: The message of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this SignRequestQuickCreate. + + Message to include in SignRequest email, may contain the following html tags: `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong` # noqa: E501 + + :param message: The message of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def who(self): + """Gets the who of this SignRequestQuickCreate. # noqa: E501 + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :return: The who of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._who + + @who.setter + def who(self, who): + """Sets the who of this SignRequestQuickCreate. + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :param who: The who of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + allowed_values = ["m", "mo", "o"] # noqa: E501 + if who not in allowed_values: + raise ValueError( + "Invalid value for `who` ({0}), must be one of {1}" # noqa: E501 + .format(who, allowed_values) + ) + + self._who = who + + @property + def send_reminders(self): + """Gets the send_reminders of this SignRequestQuickCreate. # noqa: E501 + + Automatically remind signers to sign a document # noqa: E501 + + :return: The send_reminders of this SignRequestQuickCreate. # noqa: E501 + :rtype: bool + """ + return self._send_reminders + + @send_reminders.setter + def send_reminders(self, send_reminders): + """Sets the send_reminders of this SignRequestQuickCreate. + + Automatically remind signers to sign a document # noqa: E501 + + :param send_reminders: The send_reminders of this SignRequestQuickCreate. # noqa: E501 + :type: bool + """ + + self._send_reminders = send_reminders + + @property + def signers(self): + """Gets the signers of this SignRequestQuickCreate. # noqa: E501 + + + :return: The signers of this SignRequestQuickCreate. # noqa: E501 + :rtype: list[Signer] + """ + return self._signers + + @signers.setter + def signers(self, signers): + """Sets the signers of this SignRequestQuickCreate. + + + :param signers: The signers of this SignRequestQuickCreate. # noqa: E501 + :type: list[Signer] + """ + if signers is None: + raise ValueError("Invalid value for `signers`, must not be `None`") # noqa: E501 + + self._signers = signers + + @property + def uuid(self): + """Gets the uuid of this SignRequestQuickCreate. # noqa: E501 + + + :return: The uuid of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this SignRequestQuickCreate. + + + :param uuid: The uuid of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def url(self): + """Gets the url of this SignRequestQuickCreate. # noqa: E501 + + + :return: The url of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this SignRequestQuickCreate. + + + :param url: The url of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def document(self): + """Gets the document of this SignRequestQuickCreate. # noqa: E501 + + + :return: The document of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._document + + @document.setter + def document(self, document): + """Sets the document of this SignRequestQuickCreate. + + + :param document: The document of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._document = document + + @property + def integration(self): + """Gets the integration of this SignRequestQuickCreate. # noqa: E501 + + + :return: The integration of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._integration + + @integration.setter + def integration(self, integration): + """Sets the integration of this SignRequestQuickCreate. + + + :param integration: The integration of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + allowed_values = ["mfiles", "salesforce", "formdesk", "zapier", "txhash"] # noqa: E501 + if integration not in allowed_values: + raise ValueError( + "Invalid value for `integration` ({0}), must be one of {1}" # noqa: E501 + .format(integration, allowed_values) + ) + + self._integration = integration + + @property + def integration_data(self): + """Gets the integration_data of this SignRequestQuickCreate. # noqa: E501 + + + :return: The integration_data of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._integration_data + + @integration_data.setter + def integration_data(self, integration_data): + """Sets the integration_data of this SignRequestQuickCreate. + + + :param integration_data: The integration_data of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._integration_data = integration_data + + @property + def name(self): + """Gets the name of this SignRequestQuickCreate. # noqa: E501 + + Defaults to filename, including extension # noqa: E501 + + :return: The name of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SignRequestQuickCreate. + + Defaults to filename, including extension # noqa: E501 + + :param name: The name of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if name is not None and len(name) > 255: + raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 + + self._name = name + + @property + def external_id(self): + """Gets the external_id of this SignRequestQuickCreate. # noqa: E501 + + ID used to reference document in external system # noqa: E501 + + :return: The external_id of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._external_id + + @external_id.setter + def external_id(self, external_id): + """Sets the external_id of this SignRequestQuickCreate. + + ID used to reference document in external system # noqa: E501 + + :param external_id: The external_id of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if external_id is not None and len(external_id) > 255: + raise ValueError("Invalid value for `external_id`, length must be less than or equal to `255`") # noqa: E501 + + self._external_id = external_id + + @property + def frontend_id(self): + """Gets the frontend_id of this SignRequestQuickCreate. # noqa: E501 + + Shared secret used in conjunction with SignRequest-js client to grant user access to a document that's not a member of the document's team # noqa: E501 + + :return: The frontend_id of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._frontend_id + + @frontend_id.setter + def frontend_id(self, frontend_id): + """Sets the frontend_id of this SignRequestQuickCreate. + + Shared secret used in conjunction with SignRequest-js client to grant user access to a document that's not a member of the document's team # noqa: E501 + + :param frontend_id: The frontend_id of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if frontend_id is not None and len(frontend_id) > 255: + raise ValueError("Invalid value for `frontend_id`, length must be less than or equal to `255`") # noqa: E501 + + self._frontend_id = frontend_id + + @property + def file(self): + """Gets the file of this SignRequestQuickCreate. # noqa: E501 + + Temporary URL to original file, expires in five minutes # noqa: E501 + + :return: The file of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this SignRequestQuickCreate. + + Temporary URL to original file, expires in five minutes # noqa: E501 + + :param file: The file of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._file = file + + @property + def file_from_url(self): + """Gets the file_from_url of this SignRequestQuickCreate. # noqa: E501 + + Publicly accessible URL of document to be downloaded by SignRequest # noqa: E501 + + :return: The file_from_url of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._file_from_url + + @file_from_url.setter + def file_from_url(self, file_from_url): + """Sets the file_from_url of this SignRequestQuickCreate. + + Publicly accessible URL of document to be downloaded by SignRequest # noqa: E501 + + :param file_from_url: The file_from_url of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if file_from_url is not None and len(file_from_url) > 2100: + raise ValueError("Invalid value for `file_from_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._file_from_url = file_from_url + + @property + def events_callback_url(self): + """Gets the events_callback_url of this SignRequestQuickCreate. # noqa: E501 + + URL at which to receive [event callbacks](#section/Events/Events-callback) for this document # noqa: E501 + + :return: The events_callback_url of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._events_callback_url + + @events_callback_url.setter + def events_callback_url(self, events_callback_url): + """Sets the events_callback_url of this SignRequestQuickCreate. + + URL at which to receive [event callbacks](#section/Events/Events-callback) for this document # noqa: E501 + + :param events_callback_url: The events_callback_url of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + if events_callback_url is not None and len(events_callback_url) > 2100: + raise ValueError("Invalid value for `events_callback_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._events_callback_url = events_callback_url + + @property + def file_from_content(self): + """Gets the file_from_content of this SignRequestQuickCreate. # noqa: E501 + + Base64 encoded document content # noqa: E501 + + :return: The file_from_content of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._file_from_content + + @file_from_content.setter + def file_from_content(self, file_from_content): + """Sets the file_from_content of this SignRequestQuickCreate. + + Base64 encoded document content # noqa: E501 + + :param file_from_content: The file_from_content of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._file_from_content = file_from_content + + @property + def file_from_content_name(self): + """Gets the file_from_content_name of this SignRequestQuickCreate. # noqa: E501 + + Filename, including extension. Required when using `file_from_content`. # noqa: E501 + + :return: The file_from_content_name of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._file_from_content_name + + @file_from_content_name.setter + def file_from_content_name(self, file_from_content_name): + """Sets the file_from_content_name of this SignRequestQuickCreate. + + Filename, including extension. Required when using `file_from_content`. # noqa: E501 + + :param file_from_content_name: The file_from_content_name of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._file_from_content_name = file_from_content_name + + @property + def template(self): + """Gets the template of this SignRequestQuickCreate. # noqa: E501 + + + :return: The template of this SignRequestQuickCreate. # noqa: E501 + :rtype: str + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this SignRequestQuickCreate. + + + :param template: The template of this SignRequestQuickCreate. # noqa: E501 + :type: str + """ + + self._template = template + + @property + def prefill_tags(self): + """Gets the prefill_tags of this SignRequestQuickCreate. # noqa: E501 + + Prefill signer input data, see [prefill tags](#section/Preparing-a-document/Prefill-tags-templates) # noqa: E501 + + :return: The prefill_tags of this SignRequestQuickCreate. # noqa: E501 + :rtype: list[InlinePrefillTags] + """ + return self._prefill_tags + + @prefill_tags.setter + def prefill_tags(self, prefill_tags): + """Sets the prefill_tags of this SignRequestQuickCreate. + + Prefill signer input data, see [prefill tags](#section/Preparing-a-document/Prefill-tags-templates) # noqa: E501 + + :param prefill_tags: The prefill_tags of this SignRequestQuickCreate. # noqa: E501 + :type: list[InlinePrefillTags] + """ + + self._prefill_tags = prefill_tags + + @property + def integrations(self): + """Gets the integrations of this SignRequestQuickCreate. # noqa: E501 + + + :return: The integrations of this SignRequestQuickCreate. # noqa: E501 + :rtype: list[InlineIntegrationData] + """ + return self._integrations + + @integrations.setter + def integrations(self, integrations): + """Sets the integrations of this SignRequestQuickCreate. + + + :param integrations: The integrations of this SignRequestQuickCreate. # noqa: E501 + :type: list[InlineIntegrationData] + """ + + self._integrations = integrations + + @property + def file_from_sf(self): + """Gets the file_from_sf of this SignRequestQuickCreate. # noqa: E501 + + + :return: The file_from_sf of this SignRequestQuickCreate. # noqa: E501 + :rtype: FileFromSf + """ + return self._file_from_sf + + @file_from_sf.setter + def file_from_sf(self, file_from_sf): + """Sets the file_from_sf of this SignRequestQuickCreate. + + + :param file_from_sf: The file_from_sf of this SignRequestQuickCreate. # noqa: E501 + :type: FileFromSf + """ + + self._file_from_sf = file_from_sf + + @property + def auto_delete_days(self): + """Gets the auto_delete_days of this SignRequestQuickCreate. # noqa: E501 + + Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted # noqa: E501 + + :return: The auto_delete_days of this SignRequestQuickCreate. # noqa: E501 + :rtype: int + """ + return self._auto_delete_days + + @auto_delete_days.setter + def auto_delete_days(self, auto_delete_days): + """Sets the auto_delete_days of this SignRequestQuickCreate. + + Number of days after which a finished document (signed/cancelled/declined) will be automatically deleted # noqa: E501 + + :param auto_delete_days: The auto_delete_days of this SignRequestQuickCreate. # noqa: E501 + :type: int + """ + if auto_delete_days is not None and auto_delete_days > 730: # noqa: E501 + raise ValueError("Invalid value for `auto_delete_days`, must be a value less than or equal to `730`") # noqa: E501 + if auto_delete_days is not None and auto_delete_days < 1: # noqa: E501 + raise ValueError("Invalid value for `auto_delete_days`, must be a value greater than or equal to `1`") # noqa: E501 + + self._auto_delete_days = auto_delete_days + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignRequestQuickCreate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/signer.py b/signrequest_client/models/signer.py new file mode 100644 index 0000000..1f3a309 --- /dev/null +++ b/signrequest_client/models/signer.py @@ -0,0 +1,985 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.inline_document_signer_integration_data import InlineDocumentSignerIntegrationData # noqa: F401,E501 +from signrequest_client.models.signer_attachment import SignerAttachment # noqa: F401,E501 +from signrequest_client.models.signer_inputs import SignerInputs # noqa: F401,E501 + + +class Signer(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'display_name': 'str', + 'first_name': 'str', + 'last_name': 'str', + 'email_viewed': 'bool', + 'viewed': 'bool', + 'signed': 'bool', + 'downloaded': 'bool', + 'signed_on': 'datetime', + 'needs_to_sign': 'bool', + 'approve_only': 'bool', + 'notify_only': 'bool', + 'in_person': 'bool', + 'order': 'int', + 'language': 'str', + 'force_language': 'bool', + 'emailed': 'bool', + 'verify_phone_number': 'str', + 'verify_bank_account': 'str', + 'declined': 'bool', + 'declined_on': 'datetime', + 'forwarded': 'str', + 'forwarded_on': 'datetime', + 'forwarded_to_email': 'str', + 'forwarded_reason': 'str', + 'message': 'str', + 'embed_url_user_id': 'str', + 'inputs': 'list[SignerInputs]', + 'embed_url': 'str', + 'attachments': 'list[SignerAttachment]', + 'redirect_url': 'str', + 'after_document': 'str', + 'integrations': 'list[InlineDocumentSignerIntegrationData]' + } + + attribute_map = { + 'email': 'email', + 'display_name': 'display_name', + 'first_name': 'first_name', + 'last_name': 'last_name', + 'email_viewed': 'email_viewed', + 'viewed': 'viewed', + 'signed': 'signed', + 'downloaded': 'downloaded', + 'signed_on': 'signed_on', + 'needs_to_sign': 'needs_to_sign', + 'approve_only': 'approve_only', + 'notify_only': 'notify_only', + 'in_person': 'in_person', + 'order': 'order', + 'language': 'language', + 'force_language': 'force_language', + 'emailed': 'emailed', + 'verify_phone_number': 'verify_phone_number', + 'verify_bank_account': 'verify_bank_account', + 'declined': 'declined', + 'declined_on': 'declined_on', + 'forwarded': 'forwarded', + 'forwarded_on': 'forwarded_on', + 'forwarded_to_email': 'forwarded_to_email', + 'forwarded_reason': 'forwarded_reason', + 'message': 'message', + 'embed_url_user_id': 'embed_url_user_id', + 'inputs': 'inputs', + 'embed_url': 'embed_url', + 'attachments': 'attachments', + 'redirect_url': 'redirect_url', + 'after_document': 'after_document', + 'integrations': 'integrations' + } + + def __init__(self, email=None, display_name=None, first_name=None, last_name=None, email_viewed=None, viewed=None, signed=None, downloaded=None, signed_on=None, needs_to_sign=True, approve_only=None, notify_only=None, in_person=None, order=None, language=None, force_language=None, emailed=None, verify_phone_number=None, verify_bank_account=None, declined=None, declined_on=None, forwarded=None, forwarded_on=None, forwarded_to_email=None, forwarded_reason=None, message=None, embed_url_user_id=None, inputs=None, embed_url=None, attachments=None, redirect_url=None, after_document=None, integrations=None): # noqa: E501 + """Signer - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._display_name = None + self._first_name = None + self._last_name = None + self._email_viewed = None + self._viewed = None + self._signed = None + self._downloaded = None + self._signed_on = None + self._needs_to_sign = None + self._approve_only = None + self._notify_only = None + self._in_person = None + self._order = None + self._language = None + self._force_language = None + self._emailed = None + self._verify_phone_number = None + self._verify_bank_account = None + self._declined = None + self._declined_on = None + self._forwarded = None + self._forwarded_on = None + self._forwarded_to_email = None + self._forwarded_reason = None + self._message = None + self._embed_url_user_id = None + self._inputs = None + self._embed_url = None + self._attachments = None + self._redirect_url = None + self._after_document = None + self._integrations = None + self.discriminator = None + + self.email = email + if display_name is not None: + self.display_name = display_name + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + if email_viewed is not None: + self.email_viewed = email_viewed + if viewed is not None: + self.viewed = viewed + if signed is not None: + self.signed = signed + if downloaded is not None: + self.downloaded = downloaded + if signed_on is not None: + self.signed_on = signed_on + if needs_to_sign is not None: + self.needs_to_sign = needs_to_sign + if approve_only is not None: + self.approve_only = approve_only + if notify_only is not None: + self.notify_only = notify_only + if in_person is not None: + self.in_person = in_person + if order is not None: + self.order = order + if language is not None: + self.language = language + if force_language is not None: + self.force_language = force_language + if emailed is not None: + self.emailed = emailed + if verify_phone_number is not None: + self.verify_phone_number = verify_phone_number + if verify_bank_account is not None: + self.verify_bank_account = verify_bank_account + if declined is not None: + self.declined = declined + if declined_on is not None: + self.declined_on = declined_on + if forwarded is not None: + self.forwarded = forwarded + if forwarded_on is not None: + self.forwarded_on = forwarded_on + if forwarded_to_email is not None: + self.forwarded_to_email = forwarded_to_email + if forwarded_reason is not None: + self.forwarded_reason = forwarded_reason + if message is not None: + self.message = message + if embed_url_user_id is not None: + self.embed_url_user_id = embed_url_user_id + if inputs is not None: + self.inputs = inputs + if embed_url is not None: + self.embed_url = embed_url + if attachments is not None: + self.attachments = attachments + if redirect_url is not None: + self.redirect_url = redirect_url + if after_document is not None: + self.after_document = after_document + if integrations is not None: + self.integrations = integrations + + @property + def email(self): + """Gets the email of this Signer. # noqa: E501 + + + :return: The email of this Signer. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Signer. + + + :param email: The email of this Signer. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + if email is not None and len(email) > 255: + raise ValueError("Invalid value for `email`, length must be less than or equal to `255`") # noqa: E501 + if email is not None and len(email) < 1: + raise ValueError("Invalid value for `email`, length must be greater than or equal to `1`") # noqa: E501 + + self._email = email + + @property + def display_name(self): + """Gets the display_name of this Signer. # noqa: E501 + + + :return: The display_name of this Signer. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this Signer. + + + :param display_name: The display_name of this Signer. # noqa: E501 + :type: str + """ + if display_name is not None and len(display_name) < 1: + raise ValueError("Invalid value for `display_name`, length must be greater than or equal to `1`") # noqa: E501 + + self._display_name = display_name + + @property + def first_name(self): + """Gets the first_name of this Signer. # noqa: E501 + + + :return: The first_name of this Signer. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this Signer. + + + :param first_name: The first_name of this Signer. # noqa: E501 + :type: str + """ + if first_name is not None and len(first_name) > 255: + raise ValueError("Invalid value for `first_name`, length must be less than or equal to `255`") # noqa: E501 + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this Signer. # noqa: E501 + + + :return: The last_name of this Signer. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this Signer. + + + :param last_name: The last_name of this Signer. # noqa: E501 + :type: str + """ + if last_name is not None and len(last_name) > 255: + raise ValueError("Invalid value for `last_name`, length must be less than or equal to `255`") # noqa: E501 + + self._last_name = last_name + + @property + def email_viewed(self): + """Gets the email_viewed of this Signer. # noqa: E501 + + + :return: The email_viewed of this Signer. # noqa: E501 + :rtype: bool + """ + return self._email_viewed + + @email_viewed.setter + def email_viewed(self, email_viewed): + """Sets the email_viewed of this Signer. + + + :param email_viewed: The email_viewed of this Signer. # noqa: E501 + :type: bool + """ + + self._email_viewed = email_viewed + + @property + def viewed(self): + """Gets the viewed of this Signer. # noqa: E501 + + + :return: The viewed of this Signer. # noqa: E501 + :rtype: bool + """ + return self._viewed + + @viewed.setter + def viewed(self, viewed): + """Sets the viewed of this Signer. + + + :param viewed: The viewed of this Signer. # noqa: E501 + :type: bool + """ + + self._viewed = viewed + + @property + def signed(self): + """Gets the signed of this Signer. # noqa: E501 + + + :return: The signed of this Signer. # noqa: E501 + :rtype: bool + """ + return self._signed + + @signed.setter + def signed(self, signed): + """Sets the signed of this Signer. + + + :param signed: The signed of this Signer. # noqa: E501 + :type: bool + """ + + self._signed = signed + + @property + def downloaded(self): + """Gets the downloaded of this Signer. # noqa: E501 + + + :return: The downloaded of this Signer. # noqa: E501 + :rtype: bool + """ + return self._downloaded + + @downloaded.setter + def downloaded(self, downloaded): + """Sets the downloaded of this Signer. + + + :param downloaded: The downloaded of this Signer. # noqa: E501 + :type: bool + """ + + self._downloaded = downloaded + + @property + def signed_on(self): + """Gets the signed_on of this Signer. # noqa: E501 + + + :return: The signed_on of this Signer. # noqa: E501 + :rtype: datetime + """ + return self._signed_on + + @signed_on.setter + def signed_on(self, signed_on): + """Sets the signed_on of this Signer. + + + :param signed_on: The signed_on of this Signer. # noqa: E501 + :type: datetime + """ + + self._signed_on = signed_on + + @property + def needs_to_sign(self): + """Gets the needs_to_sign of this Signer. # noqa: E501 + + + :return: The needs_to_sign of this Signer. # noqa: E501 + :rtype: bool + """ + return self._needs_to_sign + + @needs_to_sign.setter + def needs_to_sign(self, needs_to_sign): + """Sets the needs_to_sign of this Signer. + + + :param needs_to_sign: The needs_to_sign of this Signer. # noqa: E501 + :type: bool + """ + + self._needs_to_sign = needs_to_sign + + @property + def approve_only(self): + """Gets the approve_only of this Signer. # noqa: E501 + + + :return: The approve_only of this Signer. # noqa: E501 + :rtype: bool + """ + return self._approve_only + + @approve_only.setter + def approve_only(self, approve_only): + """Sets the approve_only of this Signer. + + + :param approve_only: The approve_only of this Signer. # noqa: E501 + :type: bool + """ + + self._approve_only = approve_only + + @property + def notify_only(self): + """Gets the notify_only of this Signer. # noqa: E501 + + + :return: The notify_only of this Signer. # noqa: E501 + :rtype: bool + """ + return self._notify_only + + @notify_only.setter + def notify_only(self, notify_only): + """Sets the notify_only of this Signer. + + + :param notify_only: The notify_only of this Signer. # noqa: E501 + :type: bool + """ + + self._notify_only = notify_only + + @property + def in_person(self): + """Gets the in_person of this Signer. # noqa: E501 + + + :return: The in_person of this Signer. # noqa: E501 + :rtype: bool + """ + return self._in_person + + @in_person.setter + def in_person(self, in_person): + """Sets the in_person of this Signer. + + + :param in_person: The in_person of this Signer. # noqa: E501 + :type: bool + """ + + self._in_person = in_person + + @property + def order(self): + """Gets the order of this Signer. # noqa: E501 + + + :return: The order of this Signer. # noqa: E501 + :rtype: int + """ + return self._order + + @order.setter + def order(self, order): + """Sets the order of this Signer. + + + :param order: The order of this Signer. # noqa: E501 + :type: int + """ + if order is not None and order > 2147483647: # noqa: E501 + raise ValueError("Invalid value for `order`, must be a value less than or equal to `2147483647`") # noqa: E501 + if order is not None and order < 0: # noqa: E501 + raise ValueError("Invalid value for `order`, must be a value greater than or equal to `0`") # noqa: E501 + + self._order = order + + @property + def language(self): + """Gets the language of this Signer. # noqa: E501 + + + :return: The language of this Signer. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this Signer. + + + :param language: The language of this Signer. # noqa: E501 + :type: str + """ + allowed_values = ["en", "en-gb", "nl", "fr", "de", "he", "da", "fi", "hu", "it", "no", "pl", "pt", "es", "sv", "ru"] # noqa: E501 + if language not in allowed_values: + raise ValueError( + "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 + .format(language, allowed_values) + ) + + self._language = language + + @property + def force_language(self): + """Gets the force_language of this Signer. # noqa: E501 + + + :return: The force_language of this Signer. # noqa: E501 + :rtype: bool + """ + return self._force_language + + @force_language.setter + def force_language(self, force_language): + """Sets the force_language of this Signer. + + + :param force_language: The force_language of this Signer. # noqa: E501 + :type: bool + """ + + self._force_language = force_language + + @property + def emailed(self): + """Gets the emailed of this Signer. # noqa: E501 + + + :return: The emailed of this Signer. # noqa: E501 + :rtype: bool + """ + return self._emailed + + @emailed.setter + def emailed(self, emailed): + """Sets the emailed of this Signer. + + + :param emailed: The emailed of this Signer. # noqa: E501 + :type: bool + """ + + self._emailed = emailed + + @property + def verify_phone_number(self): + """Gets the verify_phone_number of this Signer. # noqa: E501 + + + :return: The verify_phone_number of this Signer. # noqa: E501 + :rtype: str + """ + return self._verify_phone_number + + @verify_phone_number.setter + def verify_phone_number(self, verify_phone_number): + """Sets the verify_phone_number of this Signer. + + + :param verify_phone_number: The verify_phone_number of this Signer. # noqa: E501 + :type: str + """ + if verify_phone_number is not None and len(verify_phone_number) > 255: + raise ValueError("Invalid value for `verify_phone_number`, length must be less than or equal to `255`") # noqa: E501 + + self._verify_phone_number = verify_phone_number + + @property + def verify_bank_account(self): + """Gets the verify_bank_account of this Signer. # noqa: E501 + + + :return: The verify_bank_account of this Signer. # noqa: E501 + :rtype: str + """ + return self._verify_bank_account + + @verify_bank_account.setter + def verify_bank_account(self, verify_bank_account): + """Sets the verify_bank_account of this Signer. + + + :param verify_bank_account: The verify_bank_account of this Signer. # noqa: E501 + :type: str + """ + if verify_bank_account is not None and len(verify_bank_account) > 255: + raise ValueError("Invalid value for `verify_bank_account`, length must be less than or equal to `255`") # noqa: E501 + + self._verify_bank_account = verify_bank_account + + @property + def declined(self): + """Gets the declined of this Signer. # noqa: E501 + + + :return: The declined of this Signer. # noqa: E501 + :rtype: bool + """ + return self._declined + + @declined.setter + def declined(self, declined): + """Sets the declined of this Signer. + + + :param declined: The declined of this Signer. # noqa: E501 + :type: bool + """ + + self._declined = declined + + @property + def declined_on(self): + """Gets the declined_on of this Signer. # noqa: E501 + + + :return: The declined_on of this Signer. # noqa: E501 + :rtype: datetime + """ + return self._declined_on + + @declined_on.setter + def declined_on(self, declined_on): + """Sets the declined_on of this Signer. + + + :param declined_on: The declined_on of this Signer. # noqa: E501 + :type: datetime + """ + + self._declined_on = declined_on + + @property + def forwarded(self): + """Gets the forwarded of this Signer. # noqa: E501 + + + :return: The forwarded of this Signer. # noqa: E501 + :rtype: str + """ + return self._forwarded + + @forwarded.setter + def forwarded(self, forwarded): + """Sets the forwarded of this Signer. + + + :param forwarded: The forwarded of this Signer. # noqa: E501 + :type: str + """ + + self._forwarded = forwarded + + @property + def forwarded_on(self): + """Gets the forwarded_on of this Signer. # noqa: E501 + + + :return: The forwarded_on of this Signer. # noqa: E501 + :rtype: datetime + """ + return self._forwarded_on + + @forwarded_on.setter + def forwarded_on(self, forwarded_on): + """Sets the forwarded_on of this Signer. + + + :param forwarded_on: The forwarded_on of this Signer. # noqa: E501 + :type: datetime + """ + + self._forwarded_on = forwarded_on + + @property + def forwarded_to_email(self): + """Gets the forwarded_to_email of this Signer. # noqa: E501 + + + :return: The forwarded_to_email of this Signer. # noqa: E501 + :rtype: str + """ + return self._forwarded_to_email + + @forwarded_to_email.setter + def forwarded_to_email(self, forwarded_to_email): + """Sets the forwarded_to_email of this Signer. + + + :param forwarded_to_email: The forwarded_to_email of this Signer. # noqa: E501 + :type: str + """ + if forwarded_to_email is not None and len(forwarded_to_email) < 1: + raise ValueError("Invalid value for `forwarded_to_email`, length must be greater than or equal to `1`") # noqa: E501 + + self._forwarded_to_email = forwarded_to_email + + @property + def forwarded_reason(self): + """Gets the forwarded_reason of this Signer. # noqa: E501 + + + :return: The forwarded_reason of this Signer. # noqa: E501 + :rtype: str + """ + return self._forwarded_reason + + @forwarded_reason.setter + def forwarded_reason(self, forwarded_reason): + """Sets the forwarded_reason of this Signer. + + + :param forwarded_reason: The forwarded_reason of this Signer. # noqa: E501 + :type: str + """ + if forwarded_reason is not None and len(forwarded_reason) < 1: + raise ValueError("Invalid value for `forwarded_reason`, length must be greater than or equal to `1`") # noqa: E501 + + self._forwarded_reason = forwarded_reason + + @property + def message(self): + """Gets the message of this Signer. # noqa: E501 + + + :return: The message of this Signer. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Signer. + + + :param message: The message of this Signer. # noqa: E501 + :type: str + """ + if message is not None and len(message) < 1: + raise ValueError("Invalid value for `message`, length must be greater than or equal to `1`") # noqa: E501 + + self._message = message + + @property + def embed_url_user_id(self): + """Gets the embed_url_user_id of this Signer. # noqa: E501 + + + :return: The embed_url_user_id of this Signer. # noqa: E501 + :rtype: str + """ + return self._embed_url_user_id + + @embed_url_user_id.setter + def embed_url_user_id(self, embed_url_user_id): + """Sets the embed_url_user_id of this Signer. + + + :param embed_url_user_id: The embed_url_user_id of this Signer. # noqa: E501 + :type: str + """ + if embed_url_user_id is not None and len(embed_url_user_id) > 255: + raise ValueError("Invalid value for `embed_url_user_id`, length must be less than or equal to `255`") # noqa: E501 + + self._embed_url_user_id = embed_url_user_id + + @property + def inputs(self): + """Gets the inputs of this Signer. # noqa: E501 + + + :return: The inputs of this Signer. # noqa: E501 + :rtype: list[SignerInputs] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """Sets the inputs of this Signer. + + + :param inputs: The inputs of this Signer. # noqa: E501 + :type: list[SignerInputs] + """ + + self._inputs = inputs + + @property + def embed_url(self): + """Gets the embed_url of this Signer. # noqa: E501 + + + :return: The embed_url of this Signer. # noqa: E501 + :rtype: str + """ + return self._embed_url + + @embed_url.setter + def embed_url(self, embed_url): + """Sets the embed_url of this Signer. + + + :param embed_url: The embed_url of this Signer. # noqa: E501 + :type: str + """ + if embed_url is not None and len(embed_url) < 1: + raise ValueError("Invalid value for `embed_url`, length must be greater than or equal to `1`") # noqa: E501 + + self._embed_url = embed_url + + @property + def attachments(self): + """Gets the attachments of this Signer. # noqa: E501 + + + :return: The attachments of this Signer. # noqa: E501 + :rtype: list[SignerAttachment] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this Signer. + + + :param attachments: The attachments of this Signer. # noqa: E501 + :type: list[SignerAttachment] + """ + + self._attachments = attachments + + @property + def redirect_url(self): + """Gets the redirect_url of this Signer. # noqa: E501 + + + :return: The redirect_url of this Signer. # noqa: E501 + :rtype: str + """ + return self._redirect_url + + @redirect_url.setter + def redirect_url(self, redirect_url): + """Sets the redirect_url of this Signer. + + + :param redirect_url: The redirect_url of this Signer. # noqa: E501 + :type: str + """ + if redirect_url is not None and len(redirect_url) > 2100: + raise ValueError("Invalid value for `redirect_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._redirect_url = redirect_url + + @property + def after_document(self): + """Gets the after_document of this Signer. # noqa: E501 + + + :return: The after_document of this Signer. # noqa: E501 + :rtype: str + """ + return self._after_document + + @after_document.setter + def after_document(self, after_document): + """Sets the after_document of this Signer. + + + :param after_document: The after_document of this Signer. # noqa: E501 + :type: str + """ + + self._after_document = after_document + + @property + def integrations(self): + """Gets the integrations of this Signer. # noqa: E501 + + + :return: The integrations of this Signer. # noqa: E501 + :rtype: list[InlineDocumentSignerIntegrationData] + """ + return self._integrations + + @integrations.setter + def integrations(self, integrations): + """Sets the integrations of this Signer. + + + :param integrations: The integrations of this Signer. # noqa: E501 + :type: list[InlineDocumentSignerIntegrationData] + """ + + self._integrations = integrations + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Signer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/signer_attachment.py b/signrequest_client/models/signer_attachment.py new file mode 100644 index 0000000..a991a13 --- /dev/null +++ b/signrequest_client/models/signer_attachment.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.required_attachment import RequiredAttachment # noqa: F401,E501 + + +class SignerAttachment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uuid': 'str', + 'name': 'str', + 'file': 'str', + 'for_attachment': 'RequiredAttachment' + } + + attribute_map = { + 'uuid': 'uuid', + 'name': 'name', + 'file': 'file', + 'for_attachment': 'for_attachment' + } + + def __init__(self, uuid=None, name=None, file=None, for_attachment=None): # noqa: E501 + """SignerAttachment - a model defined in Swagger""" # noqa: E501 + + self._uuid = None + self._name = None + self._file = None + self._for_attachment = None + self.discriminator = None + + if uuid is not None: + self.uuid = uuid + if name is not None: + self.name = name + if file is not None: + self.file = file + if for_attachment is not None: + self.for_attachment = for_attachment + + @property + def uuid(self): + """Gets the uuid of this SignerAttachment. # noqa: E501 + + + :return: The uuid of this SignerAttachment. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this SignerAttachment. + + + :param uuid: The uuid of this SignerAttachment. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def name(self): + """Gets the name of this SignerAttachment. # noqa: E501 + + Defaults to filename # noqa: E501 + + :return: The name of this SignerAttachment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SignerAttachment. + + Defaults to filename # noqa: E501 + + :param name: The name of this SignerAttachment. # noqa: E501 + :type: str + """ + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def file(self): + """Gets the file of this SignerAttachment. # noqa: E501 + + + :return: The file of this SignerAttachment. # noqa: E501 + :rtype: str + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this SignerAttachment. + + + :param file: The file of this SignerAttachment. # noqa: E501 + :type: str + """ + + self._file = file + + @property + def for_attachment(self): + """Gets the for_attachment of this SignerAttachment. # noqa: E501 + + + :return: The for_attachment of this SignerAttachment. # noqa: E501 + :rtype: RequiredAttachment + """ + return self._for_attachment + + @for_attachment.setter + def for_attachment(self, for_attachment): + """Sets the for_attachment of this SignerAttachment. + + + :param for_attachment: The for_attachment of this SignerAttachment. # noqa: E501 + :type: RequiredAttachment + """ + + self._for_attachment = for_attachment + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignerAttachment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/signer_inputs.py b/signrequest_client/models/signer_inputs.py new file mode 100644 index 0000000..41f14f0 --- /dev/null +++ b/signrequest_client/models/signer_inputs.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SignerInputs(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'type': 'str', + 'page_index': 'int', + 'text': 'str', + 'checkbox_value': 'bool', + 'date_value': 'date', + 'external_id': 'str', + 'placeholder_uuid': 'str' + } + + attribute_map = { + 'type': 'type', + 'page_index': 'page_index', + 'text': 'text', + 'checkbox_value': 'checkbox_value', + 'date_value': 'date_value', + 'external_id': 'external_id', + 'placeholder_uuid': 'placeholder_uuid' + } + + def __init__(self, type=None, page_index=None, text=None, checkbox_value=None, date_value=None, external_id=None, placeholder_uuid=None): # noqa: E501 + """SignerInputs - a model defined in Swagger""" # noqa: E501 + + self._type = None + self._page_index = None + self._text = None + self._checkbox_value = None + self._date_value = None + self._external_id = None + self._placeholder_uuid = None + self.discriminator = None + + if type is not None: + self.type = type + self.page_index = page_index + if text is not None: + self.text = text + if checkbox_value is not None: + self.checkbox_value = checkbox_value + if date_value is not None: + self.date_value = date_value + if external_id is not None: + self.external_id = external_id + if placeholder_uuid is not None: + self.placeholder_uuid = placeholder_uuid + + @property + def type(self): + """Gets the type of this SignerInputs. # noqa: E501 + + + :return: The type of this SignerInputs. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SignerInputs. + + + :param type: The type of this SignerInputs. # noqa: E501 + :type: str + """ + allowed_values = ["s", "i", "n", "d", "t", "c"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def page_index(self): + """Gets the page_index of this SignerInputs. # noqa: E501 + + + :return: The page_index of this SignerInputs. # noqa: E501 + :rtype: int + """ + return self._page_index + + @page_index.setter + def page_index(self, page_index): + """Sets the page_index of this SignerInputs. + + + :param page_index: The page_index of this SignerInputs. # noqa: E501 + :type: int + """ + if page_index is None: + raise ValueError("Invalid value for `page_index`, must not be `None`") # noqa: E501 + + self._page_index = page_index + + @property + def text(self): + """Gets the text of this SignerInputs. # noqa: E501 + + + :return: The text of this SignerInputs. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this SignerInputs. + + + :param text: The text of this SignerInputs. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def checkbox_value(self): + """Gets the checkbox_value of this SignerInputs. # noqa: E501 + + + :return: The checkbox_value of this SignerInputs. # noqa: E501 + :rtype: bool + """ + return self._checkbox_value + + @checkbox_value.setter + def checkbox_value(self, checkbox_value): + """Sets the checkbox_value of this SignerInputs. + + + :param checkbox_value: The checkbox_value of this SignerInputs. # noqa: E501 + :type: bool + """ + + self._checkbox_value = checkbox_value + + @property + def date_value(self): + """Gets the date_value of this SignerInputs. # noqa: E501 + + + :return: The date_value of this SignerInputs. # noqa: E501 + :rtype: date + """ + return self._date_value + + @date_value.setter + def date_value(self, date_value): + """Sets the date_value of this SignerInputs. + + + :param date_value: The date_value of this SignerInputs. # noqa: E501 + :type: date + """ + + self._date_value = date_value + + @property + def external_id(self): + """Gets the external_id of this SignerInputs. # noqa: E501 + + + :return: The external_id of this SignerInputs. # noqa: E501 + :rtype: str + """ + return self._external_id + + @external_id.setter + def external_id(self, external_id): + """Sets the external_id of this SignerInputs. + + + :param external_id: The external_id of this SignerInputs. # noqa: E501 + :type: str + """ + if external_id is not None and len(external_id) > 255: + raise ValueError("Invalid value for `external_id`, length must be less than or equal to `255`") # noqa: E501 + + self._external_id = external_id + + @property + def placeholder_uuid(self): + """Gets the placeholder_uuid of this SignerInputs. # noqa: E501 + + + :return: The placeholder_uuid of this SignerInputs. # noqa: E501 + :rtype: str + """ + return self._placeholder_uuid + + @placeholder_uuid.setter + def placeholder_uuid(self, placeholder_uuid): + """Sets the placeholder_uuid of this SignerInputs. + + + :param placeholder_uuid: The placeholder_uuid of this SignerInputs. # noqa: E501 + :type: str + """ + if placeholder_uuid is not None and len(placeholder_uuid) > 36: + raise ValueError("Invalid value for `placeholder_uuid`, length must be less than or equal to `36`") # noqa: E501 + + self._placeholder_uuid = placeholder_uuid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignerInputs): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/signing_log.py b/signrequest_client/models/signing_log.py new file mode 100644 index 0000000..3490f17 --- /dev/null +++ b/signrequest_client/models/signing_log.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SigningLog(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'pdf': 'str', + 'security_hash': 'str' + } + + attribute_map = { + 'pdf': 'pdf', + 'security_hash': 'security_hash' + } + + def __init__(self, pdf=None, security_hash=None): # noqa: E501 + """SigningLog - a model defined in Swagger""" # noqa: E501 + + self._pdf = None + self._security_hash = None + self.discriminator = None + + if pdf is not None: + self.pdf = pdf + if security_hash is not None: + self.security_hash = security_hash + + @property + def pdf(self): + """Gets the pdf of this SigningLog. # noqa: E501 + + Temporary URL to signing log, expires in five minutes # noqa: E501 + + :return: The pdf of this SigningLog. # noqa: E501 + :rtype: str + """ + return self._pdf + + @pdf.setter + def pdf(self, pdf): + """Sets the pdf of this SigningLog. + + Temporary URL to signing log, expires in five minutes # noqa: E501 + + :param pdf: The pdf of this SigningLog. # noqa: E501 + :type: str + """ + + self._pdf = pdf + + @property + def security_hash(self): + """Gets the security_hash of this SigningLog. # noqa: E501 + + SHA256 hash of PDF contents # noqa: E501 + + :return: The security_hash of this SigningLog. # noqa: E501 + :rtype: str + """ + return self._security_hash + + @security_hash.setter + def security_hash(self, security_hash): + """Sets the security_hash of this SigningLog. + + SHA256 hash of PDF contents # noqa: E501 + + :param security_hash: The security_hash of this SigningLog. # noqa: E501 + :type: str + """ + if security_hash is not None and len(security_hash) < 1: + raise ValueError("Invalid value for `security_hash`, length must be greater than or equal to `1`") # noqa: E501 + + self._security_hash = security_hash + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SigningLog): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/team.py b/signrequest_client/models/team.py new file mode 100644 index 0000000..a029e10 --- /dev/null +++ b/signrequest_client/models/team.py @@ -0,0 +1,312 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.inline_team_member import InlineTeamMember # noqa: F401,E501 + + +class Team(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'subdomain': 'str', + 'url': 'str', + 'logo': 'str', + 'phone': 'str', + 'primary_color': 'str', + 'events_callback_url': 'str', + 'members': 'list[InlineTeamMember]' + } + + attribute_map = { + 'name': 'name', + 'subdomain': 'subdomain', + 'url': 'url', + 'logo': 'logo', + 'phone': 'phone', + 'primary_color': 'primary_color', + 'events_callback_url': 'events_callback_url', + 'members': 'members' + } + + def __init__(self, name=None, subdomain=None, url=None, logo=None, phone=None, primary_color=None, events_callback_url=None, members=None): # noqa: E501 + """Team - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._subdomain = None + self._url = None + self._logo = None + self._phone = None + self._primary_color = None + self._events_callback_url = None + self._members = None + self.discriminator = None + + self.name = name + self.subdomain = subdomain + if url is not None: + self.url = url + if logo is not None: + self.logo = logo + if phone is not None: + self.phone = phone + if primary_color is not None: + self.primary_color = primary_color + if events_callback_url is not None: + self.events_callback_url = events_callback_url + if members is not None: + self.members = members + + @property + def name(self): + """Gets the name of this Team. # noqa: E501 + + + :return: The name of this Team. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Team. + + + :param name: The name of this Team. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if name is not None and len(name) > 100: + raise ValueError("Invalid value for `name`, length must be less than or equal to `100`") # noqa: E501 + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def subdomain(self): + """Gets the subdomain of this Team. # noqa: E501 + + + :return: The subdomain of this Team. # noqa: E501 + :rtype: str + """ + return self._subdomain + + @subdomain.setter + def subdomain(self, subdomain): + """Sets the subdomain of this Team. + + + :param subdomain: The subdomain of this Team. # noqa: E501 + :type: str + """ + if subdomain is None: + raise ValueError("Invalid value for `subdomain`, must not be `None`") # noqa: E501 + if subdomain is not None and len(subdomain) > 100: + raise ValueError("Invalid value for `subdomain`, length must be less than or equal to `100`") # noqa: E501 + if subdomain is not None and len(subdomain) < 1: + raise ValueError("Invalid value for `subdomain`, length must be greater than or equal to `1`") # noqa: E501 + + self._subdomain = subdomain + + @property + def url(self): + """Gets the url of this Team. # noqa: E501 + + + :return: The url of this Team. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Team. + + + :param url: The url of this Team. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def logo(self): + """Gets the logo of this Team. # noqa: E501 + + + :return: The logo of this Team. # noqa: E501 + :rtype: str + """ + return self._logo + + @logo.setter + def logo(self, logo): + """Sets the logo of this Team. + + + :param logo: The logo of this Team. # noqa: E501 + :type: str + """ + + self._logo = logo + + @property + def phone(self): + """Gets the phone of this Team. # noqa: E501 + + + :return: The phone of this Team. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this Team. + + + :param phone: The phone of this Team. # noqa: E501 + :type: str + """ + if phone is not None and len(phone) > 100: + raise ValueError("Invalid value for `phone`, length must be less than or equal to `100`") # noqa: E501 + + self._phone = phone + + @property + def primary_color(self): + """Gets the primary_color of this Team. # noqa: E501 + + + :return: The primary_color of this Team. # noqa: E501 + :rtype: str + """ + return self._primary_color + + @primary_color.setter + def primary_color(self, primary_color): + """Sets the primary_color of this Team. + + + :param primary_color: The primary_color of this Team. # noqa: E501 + :type: str + """ + if primary_color is not None and len(primary_color) > 100: + raise ValueError("Invalid value for `primary_color`, length must be less than or equal to `100`") # noqa: E501 + + self._primary_color = primary_color + + @property + def events_callback_url(self): + """Gets the events_callback_url of this Team. # noqa: E501 + + + :return: The events_callback_url of this Team. # noqa: E501 + :rtype: str + """ + return self._events_callback_url + + @events_callback_url.setter + def events_callback_url(self, events_callback_url): + """Sets the events_callback_url of this Team. + + + :param events_callback_url: The events_callback_url of this Team. # noqa: E501 + :type: str + """ + if events_callback_url is not None and len(events_callback_url) > 2100: + raise ValueError("Invalid value for `events_callback_url`, length must be less than or equal to `2100`") # noqa: E501 + + self._events_callback_url = events_callback_url + + @property + def members(self): + """Gets the members of this Team. # noqa: E501 + + + :return: The members of this Team. # noqa: E501 + :rtype: list[InlineTeamMember] + """ + return self._members + + @members.setter + def members(self, members): + """Sets the members of this Team. + + + :param members: The members of this Team. # noqa: E501 + :type: list[InlineTeamMember] + """ + + self._members = members + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Team): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/team_member.py b/signrequest_client/models/team_member.py new file mode 100644 index 0000000..ceeb4c8 --- /dev/null +++ b/signrequest_client/models/team_member.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.user import User # noqa: F401,E501 + + +class TeamMember(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uuid': 'str', + 'url': 'str', + 'user': 'User', + 'is_admin': 'bool', + 'is_active': 'bool', + 'is_owner': 'bool' + } + + attribute_map = { + 'uuid': 'uuid', + 'url': 'url', + 'user': 'user', + 'is_admin': 'is_admin', + 'is_active': 'is_active', + 'is_owner': 'is_owner' + } + + def __init__(self, uuid=None, url=None, user=None, is_admin=None, is_active=None, is_owner=None): # noqa: E501 + """TeamMember - a model defined in Swagger""" # noqa: E501 + + self._uuid = None + self._url = None + self._user = None + self._is_admin = None + self._is_active = None + self._is_owner = None + self.discriminator = None + + if uuid is not None: + self.uuid = uuid + if url is not None: + self.url = url + if user is not None: + self.user = user + if is_admin is not None: + self.is_admin = is_admin + if is_active is not None: + self.is_active = is_active + if is_owner is not None: + self.is_owner = is_owner + + @property + def uuid(self): + """Gets the uuid of this TeamMember. # noqa: E501 + + + :return: The uuid of this TeamMember. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this TeamMember. + + + :param uuid: The uuid of this TeamMember. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def url(self): + """Gets the url of this TeamMember. # noqa: E501 + + + :return: The url of this TeamMember. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this TeamMember. + + + :param url: The url of this TeamMember. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this TeamMember. # noqa: E501 + + + :return: The user of this TeamMember. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this TeamMember. + + + :param user: The user of this TeamMember. # noqa: E501 + :type: User + """ + + self._user = user + + @property + def is_admin(self): + """Gets the is_admin of this TeamMember. # noqa: E501 + + + :return: The is_admin of this TeamMember. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this TeamMember. + + + :param is_admin: The is_admin of this TeamMember. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def is_active(self): + """Gets the is_active of this TeamMember. # noqa: E501 + + + :return: The is_active of this TeamMember. # noqa: E501 + :rtype: bool + """ + return self._is_active + + @is_active.setter + def is_active(self, is_active): + """Sets the is_active of this TeamMember. + + + :param is_active: The is_active of this TeamMember. # noqa: E501 + :type: bool + """ + + self._is_active = is_active + + @property + def is_owner(self): + """Gets the is_owner of this TeamMember. # noqa: E501 + + + :return: The is_owner of this TeamMember. # noqa: E501 + :rtype: bool + """ + return self._is_owner + + @is_owner.setter + def is_owner(self, is_owner): + """Sets the is_owner of this TeamMember. + + + :param is_owner: The is_owner of this TeamMember. # noqa: E501 + :type: bool + """ + + self._is_owner = is_owner + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TeamMember): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/template.py b/signrequest_client/models/template.py new file mode 100644 index 0000000..7ddf311 --- /dev/null +++ b/signrequest_client/models/template.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from signrequest_client.models.document_signer_template_conf import DocumentSignerTemplateConf # noqa: F401,E501 +from signrequest_client.models.user import User # noqa: F401,E501 + + +class Template(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'url': 'str', + 'name': 'str', + 'uuid': 'str', + 'user': 'User', + 'who': 'str', + 'signers': 'list[DocumentSignerTemplateConf]' + } + + attribute_map = { + 'url': 'url', + 'name': 'name', + 'uuid': 'uuid', + 'user': 'user', + 'who': 'who', + 'signers': 'signers' + } + + def __init__(self, url=None, name=None, uuid=None, user=None, who=None, signers=None): # noqa: E501 + """Template - a model defined in Swagger""" # noqa: E501 + + self._url = None + self._name = None + self._uuid = None + self._user = None + self._who = None + self._signers = None + self.discriminator = None + + if url is not None: + self.url = url + if name is not None: + self.name = name + if uuid is not None: + self.uuid = uuid + if user is not None: + self.user = user + if who is not None: + self.who = who + if signers is not None: + self.signers = signers + + @property + def url(self): + """Gets the url of this Template. # noqa: E501 + + + :return: The url of this Template. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Template. + + + :param url: The url of this Template. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def name(self): + """Gets the name of this Template. # noqa: E501 + + Defaults to filename # noqa: E501 + + :return: The name of this Template. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Template. + + Defaults to filename # noqa: E501 + + :param name: The name of this Template. # noqa: E501 + :type: str + """ + if name is not None and len(name) < 1: + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 + + self._name = name + + @property + def uuid(self): + """Gets the uuid of this Template. # noqa: E501 + + + :return: The uuid of this Template. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Template. + + + :param uuid: The uuid of this Template. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def user(self): + """Gets the user of this Template. # noqa: E501 + + + :return: The user of this Template. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Template. + + + :param user: The user of this Template. # noqa: E501 + :type: User + """ + + self._user = user + + @property + def who(self): + """Gets the who of this Template. # noqa: E501 + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :return: The who of this Template. # noqa: E501 + :rtype: str + """ + return self._who + + @who.setter + def who(self, who): + """Sets the who of this Template. + + `m`: only me, `mo`: me and others, `o`: only others # noqa: E501 + + :param who: The who of this Template. # noqa: E501 + :type: str + """ + allowed_values = ["m", "mo", "o"] # noqa: E501 + if who not in allowed_values: + raise ValueError( + "Invalid value for `who` ({0}), must be one of {1}" # noqa: E501 + .format(who, allowed_values) + ) + + self._who = who + + @property + def signers(self): + """Gets the signers of this Template. # noqa: E501 + + + :return: The signers of this Template. # noqa: E501 + :rtype: list[DocumentSignerTemplateConf] + """ + return self._signers + + @signers.setter + def signers(self, signers): + """Sets the signers of this Template. + + + :param signers: The signers of this Template. # noqa: E501 + :type: list[DocumentSignerTemplateConf] + """ + + self._signers = signers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Template): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/user.py b/signrequest_client/models/user.py new file mode 100644 index 0000000..953698a --- /dev/null +++ b/signrequest_client/models/user.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class User(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'first_name': 'str', + 'last_name': 'str', + 'display_name': 'str' + } + + attribute_map = { + 'email': 'email', + 'first_name': 'first_name', + 'last_name': 'last_name', + 'display_name': 'display_name' + } + + def __init__(self, email=None, first_name=None, last_name=None, display_name=None): # noqa: E501 + """User - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._first_name = None + self._last_name = None + self._display_name = None + self.discriminator = None + + self.email = email + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + if display_name is not None: + self.display_name = display_name + + @property + def email(self): + """Gets the email of this User. # noqa: E501 + + + :return: The email of this User. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this User. + + + :param email: The email of this User. # noqa: E501 + :type: str + """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + if email is not None and len(email) > 254: + raise ValueError("Invalid value for `email`, length must be less than or equal to `254`") # noqa: E501 + if email is not None and len(email) < 1: + raise ValueError("Invalid value for `email`, length must be greater than or equal to `1`") # noqa: E501 + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this User. # noqa: E501 + + + :return: The first_name of this User. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this User. + + + :param first_name: The first_name of this User. # noqa: E501 + :type: str + """ + if first_name is not None and len(first_name) > 255: + raise ValueError("Invalid value for `first_name`, length must be less than or equal to `255`") # noqa: E501 + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this User. # noqa: E501 + + + :return: The last_name of this User. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this User. + + + :param last_name: The last_name of this User. # noqa: E501 + :type: str + """ + if last_name is not None and len(last_name) > 255: + raise ValueError("Invalid value for `last_name`, length must be less than or equal to `255`") # noqa: E501 + + self._last_name = last_name + + @property + def display_name(self): + """Gets the display_name of this User. # noqa: E501 + + + :return: The display_name of this User. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this User. + + + :param display_name: The display_name of this User. # noqa: E501 + :type: str + """ + if display_name is not None and len(display_name) < 1: + raise ValueError("Invalid value for `display_name`, length must be greater than or equal to `1`") # noqa: E501 + + self._display_name = display_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, User): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/models/webhook_subscription.py b/signrequest_client/models/webhook_subscription.py new file mode 100644 index 0000000..e1caf50 --- /dev/null +++ b/signrequest_client/models/webhook_subscription.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class WebhookSubscription(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'url': 'str', + 'uuid': 'str', + 'name': 'str', + 'event_type': 'str', + 'callback_url': 'str', + 'integration': 'str', + 'created': 'datetime' + } + + attribute_map = { + 'url': 'url', + 'uuid': 'uuid', + 'name': 'name', + 'event_type': 'event_type', + 'callback_url': 'callback_url', + 'integration': 'integration', + 'created': 'created' + } + + def __init__(self, url=None, uuid=None, name=None, event_type=None, callback_url=None, integration=None, created=None): # noqa: E501 + """WebhookSubscription - a model defined in Swagger""" # noqa: E501 + + self._url = None + self._uuid = None + self._name = None + self._event_type = None + self._callback_url = None + self._integration = None + self._created = None + self.discriminator = None + + if url is not None: + self.url = url + if uuid is not None: + self.uuid = uuid + if name is not None: + self.name = name + self.event_type = event_type + self.callback_url = callback_url + if integration is not None: + self.integration = integration + if created is not None: + self.created = created + + @property + def url(self): + """Gets the url of this WebhookSubscription. # noqa: E501 + + + :return: The url of this WebhookSubscription. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WebhookSubscription. + + + :param url: The url of this WebhookSubscription. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def uuid(self): + """Gets the uuid of this WebhookSubscription. # noqa: E501 + + + :return: The uuid of this WebhookSubscription. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this WebhookSubscription. + + + :param uuid: The uuid of this WebhookSubscription. # noqa: E501 + :type: str + """ + if uuid is not None and len(uuid) < 1: + raise ValueError("Invalid value for `uuid`, length must be greater than or equal to `1`") # noqa: E501 + + self._uuid = uuid + + @property + def name(self): + """Gets the name of this WebhookSubscription. # noqa: E501 + + Optional name to easily identify what webhook is used for # noqa: E501 + + :return: The name of this WebhookSubscription. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebhookSubscription. + + Optional name to easily identify what webhook is used for # noqa: E501 + + :param name: The name of this WebhookSubscription. # noqa: E501 + :type: str + """ + if name is not None and len(name) > 255: + raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 + + self._name = name + + @property + def event_type(self): + """Gets the event_type of this WebhookSubscription. # noqa: E501 + + + :return: The event_type of this WebhookSubscription. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this WebhookSubscription. + + + :param event_type: The event_type of this WebhookSubscription. # noqa: E501 + :type: str + """ + if event_type is None: + raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 + allowed_values = ["convert_error", "converted", "sending_error", "sent", "declined", "cancelled", "expired", "signed", "viewed", "downloaded", "signer_signed", "signer_email_bounced", "signer_viewed_email", "signer_viewed", "signer_forwarded", "signer_downloaded", "signrequest_received"] # noqa: E501 + if event_type not in allowed_values: + raise ValueError( + "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 + .format(event_type, allowed_values) + ) + + self._event_type = event_type + + @property + def callback_url(self): + """Gets the callback_url of this WebhookSubscription. # noqa: E501 + + + :return: The callback_url of this WebhookSubscription. # noqa: E501 + :rtype: str + """ + return self._callback_url + + @callback_url.setter + def callback_url(self, callback_url): + """Sets the callback_url of this WebhookSubscription. + + + :param callback_url: The callback_url of this WebhookSubscription. # noqa: E501 + :type: str + """ + if callback_url is None: + raise ValueError("Invalid value for `callback_url`, must not be `None`") # noqa: E501 + if callback_url is not None and len(callback_url) > 2100: + raise ValueError("Invalid value for `callback_url`, length must be less than or equal to `2100`") # noqa: E501 + if callback_url is not None and len(callback_url) < 1: + raise ValueError("Invalid value for `callback_url`, length must be greater than or equal to `1`") # noqa: E501 + + self._callback_url = callback_url + + @property + def integration(self): + """Gets the integration of this WebhookSubscription. # noqa: E501 + + + :return: The integration of this WebhookSubscription. # noqa: E501 + :rtype: str + """ + return self._integration + + @integration.setter + def integration(self, integration): + """Sets the integration of this WebhookSubscription. + + + :param integration: The integration of this WebhookSubscription. # noqa: E501 + :type: str + """ + allowed_values = ["mfiles", "salesforce", "formdesk", "zapier", "txhash"] # noqa: E501 + if integration not in allowed_values: + raise ValueError( + "Invalid value for `integration` ({0}), must be one of {1}" # noqa: E501 + .format(integration, allowed_values) + ) + + self._integration = integration + + @property + def created(self): + """Gets the created of this WebhookSubscription. # noqa: E501 + + + :return: The created of this WebhookSubscription. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this WebhookSubscription. + + + :param created: The created of this WebhookSubscription. # noqa: E501 + :type: datetime + """ + + self._created = created + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookSubscription): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/signrequest_client/rest.py b/signrequest_client/rest.py new file mode 100644 index 0000000..b6d5d88 --- /dev/null +++ b/signrequest_client/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_api_tokens_api.py b/test/test_api_tokens_api.py new file mode 100644 index 0000000..9d25929 --- /dev/null +++ b/test/test_api_tokens_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.api_tokens_api import ApiTokensApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestApiTokensApi(unittest.TestCase): + """ApiTokensApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.api_tokens_api.ApiTokensApi() # noqa: E501 + + def tearDown(self): + pass + + def test_api_tokens_create(self): + """Test case for api_tokens_create + + Create an API token # noqa: E501 + """ + pass + + def test_api_tokens_delete(self): + """Test case for api_tokens_delete + + Delete an API token # noqa: E501 + """ + pass + + def test_api_tokens_list(self): + """Test case for api_tokens_list + + Retrieve a list of API tokens # noqa: E501 + """ + pass + + def test_api_tokens_read(self): + """Test case for api_tokens_read + + Retrieve an API token # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_token.py b/test/test_auth_token.py new file mode 100644 index 0000000..05858d3 --- /dev/null +++ b/test/test_auth_token.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.auth_token import AuthToken # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestAuthToken(unittest.TestCase): + """AuthToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuthToken(self): + """Test AuthToken""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.auth_token.AuthToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_document.py b/test/test_document.py new file mode 100644 index 0000000..1bf8a4b --- /dev/null +++ b/test/test_document.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.document import Document # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocument(unittest.TestCase): + """Document unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDocument(self): + """Test Document""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.document.Document() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_document_attachment.py b/test/test_document_attachment.py new file mode 100644 index 0000000..a0e2cbb --- /dev/null +++ b/test/test_document_attachment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.document_attachment import DocumentAttachment # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocumentAttachment(unittest.TestCase): + """DocumentAttachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDocumentAttachment(self): + """Test DocumentAttachment""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.document_attachment.DocumentAttachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_document_attachments_api.py b/test/test_document_attachments_api.py new file mode 100644 index 0000000..c1bf201 --- /dev/null +++ b/test/test_document_attachments_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.document_attachments_api import DocumentAttachmentsApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocumentAttachmentsApi(unittest.TestCase): + """DocumentAttachmentsApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.document_attachments_api.DocumentAttachmentsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_document_attachments_create(self): + """Test case for document_attachments_create + + Create a Document Attachment # noqa: E501 + """ + pass + + def test_document_attachments_list(self): + """Test case for document_attachments_list + + Retrieve a list of Document Attachments # noqa: E501 + """ + pass + + def test_document_attachments_read(self): + """Test case for document_attachments_read + + Retrieve a Document Attachment # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_document_search.py b/test/test_document_search.py new file mode 100644 index 0000000..9551920 --- /dev/null +++ b/test/test_document_search.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.document_search import DocumentSearch # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocumentSearch(unittest.TestCase): + """DocumentSearch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDocumentSearch(self): + """Test DocumentSearch""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.document_search.DocumentSearch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_document_signer_template_conf.py b/test/test_document_signer_template_conf.py new file mode 100644 index 0000000..aab7729 --- /dev/null +++ b/test/test_document_signer_template_conf.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.document_signer_template_conf import DocumentSignerTemplateConf # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocumentSignerTemplateConf(unittest.TestCase): + """DocumentSignerTemplateConf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDocumentSignerTemplateConf(self): + """Test DocumentSignerTemplateConf""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.document_signer_template_conf.DocumentSignerTemplateConf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_documents_api.py b/test/test_documents_api.py new file mode 100644 index 0000000..cd9ee1c --- /dev/null +++ b/test/test_documents_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.documents_api import DocumentsApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocumentsApi(unittest.TestCase): + """DocumentsApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.documents_api.DocumentsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_documents_create(self): + """Test case for documents_create + + Create a Document # noqa: E501 + """ + pass + + def test_documents_delete(self): + """Test case for documents_delete + + Delete a Document # noqa: E501 + """ + pass + + def test_documents_delete_files(self): + """Test case for documents_delete_files + + Delete a Document's Files # noqa: E501 + """ + pass + + def test_documents_list(self): + """Test case for documents_list + + Retrieve a list of Documents # noqa: E501 + """ + pass + + def test_documents_read(self): + """Test case for documents_read + + Retrieve a Document # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_documents_search_api.py b/test/test_documents_search_api.py new file mode 100644 index 0000000..870f720 --- /dev/null +++ b/test/test_documents_search_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.documents_search_api import DocumentsSearchApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestDocumentsSearchApi(unittest.TestCase): + """DocumentsSearchApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.documents_search_api.DocumentsSearchApi() # noqa: E501 + + def tearDown(self): + pass + + def test_documents_search_list(self): + """Test case for documents_search_list + + Search documents # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_event.py b/test/test_event.py new file mode 100644 index 0000000..9ac0a21 --- /dev/null +++ b/test/test_event.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.event import Event # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestEvent(unittest.TestCase): + """Event unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEvent(self): + """Test Event""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.event.Event() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_events_api.py b/test/test_events_api.py new file mode 100644 index 0000000..7ab731a --- /dev/null +++ b/test/test_events_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.events_api import EventsApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestEventsApi(unittest.TestCase): + """EventsApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.events_api.EventsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_events_list(self): + """Test case for events_list + + Retrieve a list of Events # noqa: E501 + """ + pass + + def test_events_read(self): + """Test case for events_read + + Retrieve an Event # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_from_sf.py b/test/test_file_from_sf.py new file mode 100644 index 0000000..e852d57 --- /dev/null +++ b/test/test_file_from_sf.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.file_from_sf import FileFromSf # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestFileFromSf(unittest.TestCase): + """FileFromSf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileFromSf(self): + """Test FileFromSf""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.file_from_sf.FileFromSf() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_document_signer_integration_data.py b/test/test_inline_document_signer_integration_data.py new file mode 100644 index 0000000..3e8ae29 --- /dev/null +++ b/test/test_inline_document_signer_integration_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_document_signer_integration_data import InlineDocumentSignerIntegrationData # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineDocumentSignerIntegrationData(unittest.TestCase): + """InlineDocumentSignerIntegrationData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineDocumentSignerIntegrationData(self): + """Test InlineDocumentSignerIntegrationData""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_document_signer_integration_data.InlineDocumentSignerIntegrationData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_integration_data.py b/test/test_inline_integration_data.py new file mode 100644 index 0000000..1e3e65f --- /dev/null +++ b/test/test_inline_integration_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_integration_data import InlineIntegrationData # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineIntegrationData(unittest.TestCase): + """InlineIntegrationData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineIntegrationData(self): + """Test InlineIntegrationData""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_integration_data.InlineIntegrationData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_prefill_tags.py b/test/test_inline_prefill_tags.py new file mode 100644 index 0000000..5ed1bf8 --- /dev/null +++ b/test/test_inline_prefill_tags.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_prefill_tags import InlinePrefillTags # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlinePrefillTags(unittest.TestCase): + """InlinePrefillTags unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlinePrefillTags(self): + """Test InlinePrefillTags""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_prefill_tags.InlinePrefillTags() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200.py b/test/test_inline_response_200.py new file mode 100644 index 0000000..3a82aec --- /dev/null +++ b/test/test_inline_response_200.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200 import InlineResponse200 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_1.py b/test/test_inline_response_200_1.py new file mode 100644 index 0000000..bfa97ec --- /dev/null +++ b/test/test_inline_response_200_1.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_1 import InlineResponse2001 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2001(unittest.TestCase): + """InlineResponse2001 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2001(self): + """Test InlineResponse2001""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_1.InlineResponse2001() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_2.py b/test/test_inline_response_200_2.py new file mode 100644 index 0000000..4bcbde5 --- /dev/null +++ b/test/test_inline_response_200_2.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_2 import InlineResponse2002 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2002(unittest.TestCase): + """InlineResponse2002 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2002(self): + """Test InlineResponse2002""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_2.InlineResponse2002() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_3.py b/test/test_inline_response_200_3.py new file mode 100644 index 0000000..042c842 --- /dev/null +++ b/test/test_inline_response_200_3.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_3 import InlineResponse2003 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2003(unittest.TestCase): + """InlineResponse2003 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2003(self): + """Test InlineResponse2003""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_3.InlineResponse2003() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_4.py b/test/test_inline_response_200_4.py new file mode 100644 index 0000000..54679b5 --- /dev/null +++ b/test/test_inline_response_200_4.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_4 import InlineResponse2004 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2004(unittest.TestCase): + """InlineResponse2004 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2004(self): + """Test InlineResponse2004""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_4.InlineResponse2004() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_5.py b/test/test_inline_response_200_5.py new file mode 100644 index 0000000..bcb158e --- /dev/null +++ b/test/test_inline_response_200_5.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_5 import InlineResponse2005 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2005(unittest.TestCase): + """InlineResponse2005 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2005(self): + """Test InlineResponse2005""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_5.InlineResponse2005() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_6.py b/test/test_inline_response_200_6.py new file mode 100644 index 0000000..102a470 --- /dev/null +++ b/test/test_inline_response_200_6.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_6 import InlineResponse2006 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2006(unittest.TestCase): + """InlineResponse2006 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2006(self): + """Test InlineResponse2006""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_6.InlineResponse2006() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_7.py b/test/test_inline_response_200_7.py new file mode 100644 index 0000000..3f1185f --- /dev/null +++ b/test/test_inline_response_200_7.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_7 import InlineResponse2007 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2007(unittest.TestCase): + """InlineResponse2007 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2007(self): + """Test InlineResponse2007""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_7.InlineResponse2007() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_8.py b/test/test_inline_response_200_8.py new file mode 100644 index 0000000..58c0378 --- /dev/null +++ b/test/test_inline_response_200_8.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_8 import InlineResponse2008 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2008(unittest.TestCase): + """InlineResponse2008 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2008(self): + """Test InlineResponse2008""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_8.InlineResponse2008() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_200_9.py b/test/test_inline_response_200_9.py new file mode 100644 index 0000000..6d90b20 --- /dev/null +++ b/test/test_inline_response_200_9.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_200_9 import InlineResponse2009 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2009(unittest.TestCase): + """InlineResponse2009 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2009(self): + """Test InlineResponse2009""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_200_9.InlineResponse2009() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_201.py b/test/test_inline_response_201.py new file mode 100644 index 0000000..6c1e9b0 --- /dev/null +++ b/test/test_inline_response_201.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_201 import InlineResponse201 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse201(unittest.TestCase): + """InlineResponse201 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse201(self): + """Test InlineResponse201""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_201.InlineResponse201() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response_201_1.py b/test/test_inline_response_201_1.py new file mode 100644 index 0000000..6d57cc1 --- /dev/null +++ b/test/test_inline_response_201_1.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_response_201_1 import InlineResponse2011 # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineResponse2011(unittest.TestCase): + """InlineResponse2011 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2011(self): + """Test InlineResponse2011""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_response_201_1.InlineResponse2011() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_sign_request.py b/test/test_inline_sign_request.py new file mode 100644 index 0000000..99cb52a --- /dev/null +++ b/test/test_inline_sign_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_sign_request import InlineSignRequest # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineSignRequest(unittest.TestCase): + """InlineSignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineSignRequest(self): + """Test InlineSignRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_sign_request.InlineSignRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_team.py b/test/test_inline_team.py new file mode 100644 index 0000000..c0202f0 --- /dev/null +++ b/test/test_inline_team.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_team import InlineTeam # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineTeam(unittest.TestCase): + """InlineTeam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineTeam(self): + """Test InlineTeam""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_team.InlineTeam() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_team_member.py b/test/test_inline_team_member.py new file mode 100644 index 0000000..569941f --- /dev/null +++ b/test/test_inline_team_member.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.inline_team_member import InlineTeamMember # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInlineTeamMember(unittest.TestCase): + """InlineTeamMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineTeamMember(self): + """Test InlineTeamMember""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.inline_team_member.InlineTeamMember() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_member.py b/test/test_invite_member.py new file mode 100644 index 0000000..f40b171 --- /dev/null +++ b/test/test_invite_member.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.invite_member import InviteMember # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestInviteMember(unittest.TestCase): + """InviteMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInviteMember(self): + """Test InviteMember""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.invite_member.InviteMember() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_placeholder.py b/test/test_placeholder.py new file mode 100644 index 0000000..7109b7c --- /dev/null +++ b/test/test_placeholder.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.placeholder import Placeholder # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestPlaceholder(unittest.TestCase): + """Placeholder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPlaceholder(self): + """Test Placeholder""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.placeholder.Placeholder() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_required_attachment.py b/test/test_required_attachment.py new file mode 100644 index 0000000..2bccd55 --- /dev/null +++ b/test/test_required_attachment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.required_attachment import RequiredAttachment # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestRequiredAttachment(unittest.TestCase): + """RequiredAttachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRequiredAttachment(self): + """Test RequiredAttachment""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.required_attachment.RequiredAttachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_request.py b/test/test_sign_request.py new file mode 100644 index 0000000..f4629c8 --- /dev/null +++ b/test/test_sign_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.sign_request import SignRequest # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSignRequest(unittest.TestCase): + """SignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignRequest(self): + """Test SignRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.sign_request.SignRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sign_request_quick_create.py b/test/test_sign_request_quick_create.py new file mode 100644 index 0000000..27f6171 --- /dev/null +++ b/test/test_sign_request_quick_create.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.sign_request_quick_create import SignRequestQuickCreate # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSignRequestQuickCreate(unittest.TestCase): + """SignRequestQuickCreate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignRequestQuickCreate(self): + """Test SignRequestQuickCreate""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.sign_request_quick_create.SignRequestQuickCreate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signer.py b/test/test_signer.py new file mode 100644 index 0000000..28d66bc --- /dev/null +++ b/test/test_signer.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.signer import Signer # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSigner(unittest.TestCase): + """Signer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSigner(self): + """Test Signer""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.signer.Signer() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signer_attachment.py b/test/test_signer_attachment.py new file mode 100644 index 0000000..70592d7 --- /dev/null +++ b/test/test_signer_attachment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.signer_attachment import SignerAttachment # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSignerAttachment(unittest.TestCase): + """SignerAttachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignerAttachment(self): + """Test SignerAttachment""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.signer_attachment.SignerAttachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signer_inputs.py b/test/test_signer_inputs.py new file mode 100644 index 0000000..98ee7d3 --- /dev/null +++ b/test/test_signer_inputs.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.signer_inputs import SignerInputs # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSignerInputs(unittest.TestCase): + """SignerInputs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignerInputs(self): + """Test SignerInputs""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.signer_inputs.SignerInputs() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signing_log.py b/test/test_signing_log.py new file mode 100644 index 0000000..c1ab60d --- /dev/null +++ b/test/test_signing_log.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.signing_log import SigningLog # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSigningLog(unittest.TestCase): + """SigningLog unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSigningLog(self): + """Test SigningLog""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.signing_log.SigningLog() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signrequest_quick_create_api.py b/test/test_signrequest_quick_create_api.py new file mode 100644 index 0000000..1833fb2 --- /dev/null +++ b/test/test_signrequest_quick_create_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.signrequest_quick_create_api import SignrequestQuickCreateApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSignrequestQuickCreateApi(unittest.TestCase): + """SignrequestQuickCreateApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.signrequest_quick_create_api.SignrequestQuickCreateApi() # noqa: E501 + + def tearDown(self): + pass + + def test_signrequest_quick_create_create(self): + """Test case for signrequest_quick_create_create + + Quick create a SignRequest # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_signrequests_api.py b/test/test_signrequests_api.py new file mode 100644 index 0000000..98428be --- /dev/null +++ b/test/test_signrequests_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.signrequests_api import SignrequestsApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestSignrequestsApi(unittest.TestCase): + """SignrequestsApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.signrequests_api.SignrequestsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_signrequests_cancel_signrequest(self): + """Test case for signrequests_cancel_signrequest + + Cancel a SignRequest # noqa: E501 + """ + pass + + def test_signrequests_create(self): + """Test case for signrequests_create + + Create a SignRequest # noqa: E501 + """ + pass + + def test_signrequests_list(self): + """Test case for signrequests_list + + Retrieve a list of SignRequests # noqa: E501 + """ + pass + + def test_signrequests_read(self): + """Test case for signrequests_read + + Retrieve a SignRequest # noqa: E501 + """ + pass + + def test_signrequests_resend_signrequest_email(self): + """Test case for signrequests_resend_signrequest_email + + Resend a SignRequest # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team.py b/test/test_team.py new file mode 100644 index 0000000..8c0a1e7 --- /dev/null +++ b/test/test_team.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.team import Team # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestTeam(unittest.TestCase): + """Team unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeam(self): + """Test Team""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.team.Team() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team_member.py b/test/test_team_member.py new file mode 100644 index 0000000..b124f94 --- /dev/null +++ b/test/test_team_member.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.team_member import TeamMember # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestTeamMember(unittest.TestCase): + """TeamMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeamMember(self): + """Test TeamMember""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.team_member.TeamMember() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team_members_api.py b/test/test_team_members_api.py new file mode 100644 index 0000000..ea82ef9 --- /dev/null +++ b/test/test_team_members_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.team_members_api import TeamMembersApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestTeamMembersApi(unittest.TestCase): + """TeamMembersApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.team_members_api.TeamMembersApi() # noqa: E501 + + def tearDown(self): + pass + + def test_team_members_list(self): + """Test case for team_members_list + + Retrieve a list of Team Members # noqa: E501 + """ + pass + + def test_team_members_read(self): + """Test case for team_members_read + + Retrieve a Team Member # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teams_api.py b/test/test_teams_api.py new file mode 100644 index 0000000..dfbf9f0 --- /dev/null +++ b/test/test_teams_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.teams_api import TeamsApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestTeamsApi(unittest.TestCase): + """TeamsApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.teams_api.TeamsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_teams_create(self): + """Test case for teams_create + + Create a Team # noqa: E501 + """ + pass + + def test_teams_invite_member(self): + """Test case for teams_invite_member + + Invite a Team Member # noqa: E501 + """ + pass + + def test_teams_list(self): + """Test case for teams_list + + Retrieve a list of Teams # noqa: E501 + """ + pass + + def test_teams_partial_update(self): + """Test case for teams_partial_update + + Update a Team # noqa: E501 + """ + pass + + def test_teams_read(self): + """Test case for teams_read + + Retrieve a Team # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_template.py b/test/test_template.py new file mode 100644 index 0000000..243bb7f --- /dev/null +++ b/test/test_template.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.template import Template # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestTemplate(unittest.TestCase): + """Template unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTemplate(self): + """Test Template""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.template.Template() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_templates_api.py b/test/test_templates_api.py new file mode 100644 index 0000000..ca7a2f1 --- /dev/null +++ b/test/test_templates_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.templates_api import TemplatesApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestTemplatesApi(unittest.TestCase): + """TemplatesApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.templates_api.TemplatesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_templates_list(self): + """Test case for templates_list + + Retrieve a list of Templates # noqa: E501 + """ + pass + + def test_templates_read(self): + """Test case for templates_read + + Retrieve a Template # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user.py b/test/test_user.py new file mode 100644 index 0000000..708ddeb --- /dev/null +++ b/test/test_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.user import User # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUser(self): + """Test User""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.user.User() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_subscription.py b/test/test_webhook_subscription.py new file mode 100644 index 0000000..89556f9 --- /dev/null +++ b/test/test_webhook_subscription.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.models.webhook_subscription import WebhookSubscription # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestWebhookSubscription(unittest.TestCase): + """WebhookSubscription unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWebhookSubscription(self): + """Test WebhookSubscription""" + # FIXME: construct object with mandatory attributes with example values + # model = signrequest_python_client.models.webhook_subscription.WebhookSubscription() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhooks_api.py b/test/test_webhooks_api.py new file mode 100644 index 0000000..aaed470 --- /dev/null +++ b/test/test_webhooks_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SignRequest API + + API for SignRequest.com + + OpenAPI spec version: v1 + Contact: tech-support@signrequest.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import signrequest_python_client +from signrequest_python_client.api.webhooks_api import WebhooksApi # noqa: E501 +from signrequest_python_client.rest import ApiException + + +class TestWebhooksApi(unittest.TestCase): + """WebhooksApi unit test stubs""" + + def setUp(self): + self.api = signrequest_python_client.api.webhooks_api.WebhooksApi() # noqa: E501 + + def tearDown(self): + pass + + def test_webhooks_create(self): + """Test case for webhooks_create + + Create a Webhook # noqa: E501 + """ + pass + + def test_webhooks_delete(self): + """Test case for webhooks_delete + + Delete a Webhook # noqa: E501 + """ + pass + + def test_webhooks_list(self): + """Test case for webhooks_list + + Retrieve a list of Webhooks # noqa: E501 + """ + pass + + def test_webhooks_partial_update(self): + """Test case for webhooks_partial_update + + Partially update a Webhook # noqa: E501 + """ + pass + + def test_webhooks_read(self): + """Test case for webhooks_read + + Retrieve a Webhook # noqa: E501 + """ + pass + + def test_webhooks_update(self): + """Test case for webhooks_update + + Update a Webhook # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/SignRequestDemoDocument.pdf b/tests/SignRequestDemoDocument.pdf deleted file mode 100644 index be8fdb1..0000000 Binary files a/tests/SignRequestDemoDocument.pdf and /dev/null differ diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index 845abfb..0000000 --- a/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'michael' diff --git a/tests/test_client.py b/tests/test_client.py deleted file mode 100644 index 68e1349..0000000 --- a/tests/test_client.py +++ /dev/null @@ -1,48 +0,0 @@ -import unittest -from signrequest_client import SignRequestClient - - -class TestClient(unittest.TestCase): - """ - This is a quick integration test only usable for SignRequest developers - """ - def setUp(self): - self.client = SignRequestClient( - username='testuser@signrequest.com', password='testuser', - subdomain='test-subdomain', - api_base_endpoint='http://localhost:8080/api/v1/' - ) - - def test_client(self): - with open('SignRequestDemoDocument.pdf') as f: - doc = self.client.create_document_from_file(file_object=f) - uuid = doc.get('uuid') - self.assertIsNotNone(uuid) - - signrequest = self.client.create_signrequest( - uuid, from_email='testuser@signrequest.com', who='o', - signers=[ - {'email': 'michael@signrequest.com'} - ]) - - signrequest_uuid = signrequest.get('uuid') - self.assertIsNotNone(signrequest_uuid) - - doc = self.client.get_document(uuid) - uuid = doc.get('uuid') - self.assertIsNotNone(uuid) - - events = self.client.get_events() - self.assertGreaterEqual(events['count'], 1) - - events_for_doc = self.client.get_events(doc_uuid=uuid) - self.assertGreaterEqual(events_for_doc['count'], 1) - - all_docs = self.client.get_documents() - self.assertGreaterEqual(all_docs['count'], 1) - - filtered_docs = self.client.get_documents(filter_params='signrequest__from_email=testuser@signrequest.com') - self.assertGreaterEqual(filtered_docs['count'], 1) - -if __name__ == '__main__': - unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..1cf0829 --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] \ No newline at end of file