From 7b4e441ccb6cd0a8e7148308bded2ab18165542f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 9 Feb 2024 13:02:56 -0800 Subject: [PATCH] Version 1.0.2rc12-v1.1.0-1.0.2 release --- .swagger-codegen-ignore | 41 + .swagger-codegen/VERSION | 1 + .travis.yml | 16 + CHANGELOG.md | 39 + LICENSE | 21 - README.md | 129 ++- docusign_webforms/__init__.py | 57 ++ docusign_webforms/apis/__init__.py | 7 + .../apis/form_instance_management_api.py | 524 +++++++++++ docusign_webforms/apis/form_management_api.py | 298 ++++++ docusign_webforms/client/__init__.py | 22 + docusign_webforms/client/api_client.py | 850 ++++++++++++++++++ docusign_webforms/client/api_exception.py | 60 ++ docusign_webforms/client/api_response.py | 317 +++++++ docusign_webforms/client/auth/__init__.py | 21 + docusign_webforms/client/auth/oauth.py | 573 ++++++++++++ docusign_webforms/client/configuration.py | 281 ++++++ docusign_webforms/models/__init__.py | 38 + docusign_webforms/models/account_id.py | 95 ++ docusign_webforms/models/assertion_id.py | 95 ++ .../models/authentication_instant.py | 95 ++ .../models/authentication_method.py | 95 ++ docusign_webforms/models/brand_id.py | 95 ++ docusign_webforms/models/client_user_id.py | 95 ++ docusign_webforms/models/component_key.py | 95 ++ docusign_webforms/models/count.py | 95 ++ .../models/create_instance_request_body.py | 326 +++++++ docusign_webforms/models/created_date_time.py | 95 ++ docusign_webforms/models/envelope_id.py | 95 ++ .../models/expiration_date_time.py | 95 ++ docusign_webforms/models/expiration_offset.py | 95 ++ docusign_webforms/models/form_sort_by.py | 95 ++ docusign_webforms/models/form_url.py | 95 ++ docusign_webforms/models/guid.py | 95 ++ docusign_webforms/models/http_error.py | 151 ++++ docusign_webforms/models/http_success.py | 122 +++ docusign_webforms/models/instance_id.py | 95 ++ docusign_webforms/models/instance_source.py | 103 +++ docusign_webforms/models/instance_status.py | 103 +++ docusign_webforms/models/instance_token.py | 95 ++ docusign_webforms/models/is_private_access.py | 95 ++ docusign_webforms/models/is_published.py | 95 ++ docusign_webforms/models/is_standalone.py | 95 ++ .../models/last_modified_date_time.py | 95 ++ docusign_webforms/models/model_date_time.py | 95 ++ docusign_webforms/models/return_url.py | 95 ++ docusign_webforms/models/search_text.py | 95 ++ docusign_webforms/models/security_domain.py | 95 ++ docusign_webforms/models/source.py | 103 +++ docusign_webforms/models/start_position.py | 95 ++ docusign_webforms/models/tags.py | 95 ++ .../models/template_properties.py | 205 +++++ .../models/token_expiration_date_time.py | 95 ++ .../models/update_instance_request_body.py | 122 +++ docusign_webforms/models/user_filter.py | 102 +++ docusign_webforms/models/user_id.py | 95 ++ docusign_webforms/models/web_form.py | 152 ++++ docusign_webforms/models/web_form_adm_type.py | 111 +++ .../models/web_form_component.py | 186 ++++ .../models/web_form_component_type.py | 106 +++ .../models/web_form_components_map.py | 95 ++ docusign_webforms/models/web_form_content.py | 201 +++++ docusign_webforms/models/web_form_id.py | 95 ++ docusign_webforms/models/web_form_instance.py | 405 +++++++++ .../models/web_form_instance_envelopes.py | 122 +++ .../models/web_form_instance_list.py | 124 +++ .../models/web_form_instance_metadata.py | 232 +++++ docusign_webforms/models/web_form_metadata.py | 637 +++++++++++++ docusign_webforms/models/web_form_name.py | 95 ++ .../models/web_form_properties.py | 147 +++ .../models/web_form_published_names.py | 95 ++ docusign_webforms/models/web_form_source.py | 101 +++ docusign_webforms/models/web_form_state.py | 101 +++ docusign_webforms/models/web_form_summary.py | 303 +++++++ .../models/web_form_summary_list.py | 286 ++++++ .../models/web_form_user_info.py | 152 ++++ docusign_webforms/models/web_form_values.py | 95 ++ .../models/web_form_version_id.py | 95 ++ linter.sh | 1 + requirements.txt | 8 + setup.py | 57 ++ test-requirements.txt | 6 + 82 files changed, 11372 insertions(+), 23 deletions(-) create mode 100644 .swagger-codegen-ignore create mode 100644 .swagger-codegen/VERSION create mode 100644 .travis.yml create mode 100644 CHANGELOG.md delete mode 100644 LICENSE create mode 100644 docusign_webforms/__init__.py create mode 100644 docusign_webforms/apis/__init__.py create mode 100644 docusign_webforms/apis/form_instance_management_api.py create mode 100644 docusign_webforms/apis/form_management_api.py create mode 100644 docusign_webforms/client/__init__.py create mode 100644 docusign_webforms/client/api_client.py create mode 100644 docusign_webforms/client/api_exception.py create mode 100644 docusign_webforms/client/api_response.py create mode 100644 docusign_webforms/client/auth/__init__.py create mode 100644 docusign_webforms/client/auth/oauth.py create mode 100644 docusign_webforms/client/configuration.py create mode 100644 docusign_webforms/models/__init__.py create mode 100644 docusign_webforms/models/account_id.py create mode 100644 docusign_webforms/models/assertion_id.py create mode 100644 docusign_webforms/models/authentication_instant.py create mode 100644 docusign_webforms/models/authentication_method.py create mode 100644 docusign_webforms/models/brand_id.py create mode 100644 docusign_webforms/models/client_user_id.py create mode 100644 docusign_webforms/models/component_key.py create mode 100644 docusign_webforms/models/count.py create mode 100644 docusign_webforms/models/create_instance_request_body.py create mode 100644 docusign_webforms/models/created_date_time.py create mode 100644 docusign_webforms/models/envelope_id.py create mode 100644 docusign_webforms/models/expiration_date_time.py create mode 100644 docusign_webforms/models/expiration_offset.py create mode 100644 docusign_webforms/models/form_sort_by.py create mode 100644 docusign_webforms/models/form_url.py create mode 100644 docusign_webforms/models/guid.py create mode 100644 docusign_webforms/models/http_error.py create mode 100644 docusign_webforms/models/http_success.py create mode 100644 docusign_webforms/models/instance_id.py create mode 100644 docusign_webforms/models/instance_source.py create mode 100644 docusign_webforms/models/instance_status.py create mode 100644 docusign_webforms/models/instance_token.py create mode 100644 docusign_webforms/models/is_private_access.py create mode 100644 docusign_webforms/models/is_published.py create mode 100644 docusign_webforms/models/is_standalone.py create mode 100644 docusign_webforms/models/last_modified_date_time.py create mode 100644 docusign_webforms/models/model_date_time.py create mode 100644 docusign_webforms/models/return_url.py create mode 100644 docusign_webforms/models/search_text.py create mode 100644 docusign_webforms/models/security_domain.py create mode 100644 docusign_webforms/models/source.py create mode 100644 docusign_webforms/models/start_position.py create mode 100644 docusign_webforms/models/tags.py create mode 100644 docusign_webforms/models/template_properties.py create mode 100644 docusign_webforms/models/token_expiration_date_time.py create mode 100644 docusign_webforms/models/update_instance_request_body.py create mode 100644 docusign_webforms/models/user_filter.py create mode 100644 docusign_webforms/models/user_id.py create mode 100644 docusign_webforms/models/web_form.py create mode 100644 docusign_webforms/models/web_form_adm_type.py create mode 100644 docusign_webforms/models/web_form_component.py create mode 100644 docusign_webforms/models/web_form_component_type.py create mode 100644 docusign_webforms/models/web_form_components_map.py create mode 100644 docusign_webforms/models/web_form_content.py create mode 100644 docusign_webforms/models/web_form_id.py create mode 100644 docusign_webforms/models/web_form_instance.py create mode 100644 docusign_webforms/models/web_form_instance_envelopes.py create mode 100644 docusign_webforms/models/web_form_instance_list.py create mode 100644 docusign_webforms/models/web_form_instance_metadata.py create mode 100644 docusign_webforms/models/web_form_metadata.py create mode 100644 docusign_webforms/models/web_form_name.py create mode 100644 docusign_webforms/models/web_form_properties.py create mode 100644 docusign_webforms/models/web_form_published_names.py create mode 100644 docusign_webforms/models/web_form_source.py create mode 100644 docusign_webforms/models/web_form_state.py create mode 100644 docusign_webforms/models/web_form_summary.py create mode 100644 docusign_webforms/models/web_form_summary_list.py create mode 100644 docusign_webforms/models/web_form_user_info.py create mode 100644 docusign_webforms/models/web_form_values.py create mode 100644 docusign_webforms/models/web_form_version_id.py create mode 100644 linter.sh create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 test-requirements.txt diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..d5b934c --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,41 @@ +# 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 + +# Swagger and Git files +.swagger-codegen-ignore +.gitignore +git_push.sh +CHANGELOG.md + +# Specific src and test files +tox.ini +docs/ +test/ + +# Project Files + +# [DCM-11154]: [SDK] [WebForms API] [Python] Issue with web_form.py +# Added this file to mitigate the issue during code generation where bad code is getting generated for Inheritance logic +docusign_webforms/models/web_form.py + diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..19244e8 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.21 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e6ce8b8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +# 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 + - pip install -r test-requirements.txt +# command to run tests +script: nosetests -s \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ae9a49b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,39 @@ +## [v1.0.2rc12] - WebForms API v1.1.0-1.0.2 - 2024-02-09 +### Breaking Changes + +- **`baseUrl` Defaulting to DEMO URL:** + - The `baseUrl` now defaults to the DEMO URL if not provided. Please update your configurations accordingly. + +### Other Changes + +- Updated the SDK release version +## [v1.0.2rc11] - WebForms API v1.1.0-1.0.2 - 2024-02-08 +### Changed +- Added support for version v1.1.0-1.0.2 of the DocuSign WebForms API. +- Updated the SDK release version. + +## [v1.0.1rc9] - WebForms API v1.1.0-1.0.1 - 2024-02-05 +### Changed +- Added support for version v1.1.0-1.0.1 of the DocuSign WebForms API. +- Updated the SDK release version. + +## [v1.0.0rc6] - WebForms API v1.1.0-1.0.0 - 2024-01-05 +### Changed +- Added support for version v1.1.0-1.0.0 of the DocuSign WebForms API. +- Updated the SDK release version. + +## [v1.0.0rc05] - WebForms API v1.1.0-1.0.0 - 2023-12-26 +### Changed +- Added support for version v1.1.0-1.0.0 of the DocuSign WebForms API. +- Updated the SDK release version. + +## [v1.0.0rc04] - WebForms API v1.1.0-1.0.0 - 2023-12-18 +### Changed +- Added support for version v1.1.0-1.0.0 of the DocuSign WebForms API. +- Updated the SDK release version. + +## [v1.0.0rc03] - WebForms API 1.1.0-1.0.0 - 2023-12-15 +### Changed +- Added support for version 1.1.0-1.0.0 of the DocuSign WebForms API. +- Updated the SDK release version. + diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 71a5961..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 DocuSign Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index ce63ee3..aceaf69 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,127 @@ -# docusign-webforms-python-client -DocuSign Python Web Forms SDK +# docusign-webforms +The Web Forms API facilitates generating semantic HTML forms around everyday contracts. + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.1.0 +- Package version: 1.0.2rc12 +- Build package: io.swagger.codegen.languages.PythonClientCodegen +For more information, please visit [https://developers.docusign.com/](https://developers.docusign.com/) + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import docusign_webforms +``` + +### 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 docusign_webforms +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import docusign_webforms +from docusign_webforms.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: docusignAccessCode +configuration = docusign_webforms.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = docusign_webforms.FormInstanceManagementApi(docusign_webforms.ApiClient(configuration)) +account_id = 'account_id_example' # str | Account identifier in which the web form resides +form_id = 'form_id_example' # str | Unique identifier for a web form entity that is consistent for it's lifetime +create_instance_body = docusign_webforms.CreateInstanceRequestBody() # CreateInstanceRequestBody | Request body containing properties that will be used to create instance. + +try: + # Creates an instance of the web form + api_response = api_instance.create_instance(account_id, form_id, create_instance_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling FormInstanceManagementApi->create_instance: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://www.docusign.net/webforms/v1.1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*FormInstanceManagementApi* | [**create_instance**](docs/FormInstanceManagementApi.md#create_instance) | **POST** /accounts/{account_id}/forms/{form_id}/instances | Creates an instance of the web form +*FormInstanceManagementApi* | [**get_instance**](docs/FormInstanceManagementApi.md#get_instance) | **GET** /accounts/{account_id}/forms/{form_id}/instances/{instance_id} | Get form instance +*FormInstanceManagementApi* | [**list_instances**](docs/FormInstanceManagementApi.md#list_instances) | **GET** /accounts/{account_id}/forms/{form_id}/instances | List instances +*FormInstanceManagementApi* | [**refresh_token**](docs/FormInstanceManagementApi.md#refresh_token) | **POST** /accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh | Refreshes the instance token +*FormManagementApi* | [**get_form**](docs/FormManagementApi.md#get_form) | **GET** /accounts/{account_id}/forms/{form_id} | Get Form +*FormManagementApi* | [**list_forms**](docs/FormManagementApi.md#list_forms) | **GET** /accounts/{account_id}/forms | List Forms + + +## Documentation For Models + + - [CreateInstanceRequestBody](docs/CreateInstanceRequestBody.md) + - [HttpError](docs/HttpError.md) + - [HttpSuccess](docs/HttpSuccess.md) + - [InstanceSource](docs/InstanceSource.md) + - [InstanceStatus](docs/InstanceStatus.md) + - [TemplateProperties](docs/TemplateProperties.md) + - [WebForm](docs/WebForm.md) + - [WebFormComponentType](docs/WebFormComponentType.md) + - [WebFormContent](docs/WebFormContent.md) + - [WebFormInstance](docs/WebFormInstance.md) + - [WebFormInstanceEnvelopes](docs/WebFormInstanceEnvelopes.md) + - [WebFormInstanceList](docs/WebFormInstanceList.md) + - [WebFormInstanceMetadata](docs/WebFormInstanceMetadata.md) + - [WebFormMetadata](docs/WebFormMetadata.md) + - [WebFormProperties](docs/WebFormProperties.md) + - [WebFormSource](docs/WebFormSource.md) + - [WebFormState](docs/WebFormState.md) + - [WebFormSummary](docs/WebFormSummary.md) + - [WebFormSummaryList](docs/WebFormSummaryList.md) + - [WebFormUserInfo](docs/WebFormUserInfo.md) + - [WebFormValues](docs/WebFormValues.md) + + +## Documentation For Authorization + + +## docusignAccessCode + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: https://account.docusign.com/oauth/auth +- **Scopes**: N/A + + +## Author + +devcenter@docusign.com + diff --git a/docusign_webforms/__init__.py b/docusign_webforms/__init__.py new file mode 100644 index 0000000..6ff246f --- /dev/null +++ b/docusign_webforms/__init__.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from .apis.form_instance_management_api import FormInstanceManagementApi +from .apis.form_management_api import FormManagementApi + +# import ApiClient +from .client.api_client import ApiClient +from .client.configuration import Configuration +from .client.api_exception import ApiException + +from .client.auth.oauth import OAuth +from .client.auth.oauth import OAuthToken +from .client.auth.oauth import Account +from .client.auth.oauth import Organization +from .client.auth.oauth import Link + +# import models into sdk package +from docusign_webforms.models.create_instance_request_body import CreateInstanceRequestBody +from docusign_webforms.models.http_error import HttpError +from docusign_webforms.models.http_success import HttpSuccess +from docusign_webforms.models.instance_source import InstanceSource +from docusign_webforms.models.instance_status import InstanceStatus +from docusign_webforms.models.template_properties import TemplateProperties +from docusign_webforms.models.web_form import WebForm +from docusign_webforms.models.web_form_component_type import WebFormComponentType +from docusign_webforms.models.web_form_content import WebFormContent +from docusign_webforms.models.web_form_instance import WebFormInstance +from docusign_webforms.models.web_form_instance_envelopes import WebFormInstanceEnvelopes +from docusign_webforms.models.web_form_instance_list import WebFormInstanceList +from docusign_webforms.models.web_form_instance_metadata import WebFormInstanceMetadata +from docusign_webforms.models.web_form_metadata import WebFormMetadata +from docusign_webforms.models.web_form_properties import WebFormProperties +from docusign_webforms.models.web_form_source import WebFormSource +from docusign_webforms.models.web_form_state import WebFormState +from docusign_webforms.models.web_form_summary import WebFormSummary +from docusign_webforms.models.web_form_summary_list import WebFormSummaryList +from docusign_webforms.models.web_form_user_info import WebFormUserInfo +from docusign_webforms.models.web_form_values import WebFormValues + + +configuration = Configuration() \ No newline at end of file diff --git a/docusign_webforms/apis/__init__.py b/docusign_webforms/apis/__init__.py new file mode 100644 index 0000000..cecc6ce --- /dev/null +++ b/docusign_webforms/apis/__init__.py @@ -0,0 +1,7 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from .form_instance_management_api import FormInstanceManagementApi +from .form_management_api import FormManagementApi diff --git a/docusign_webforms/apis/form_instance_management_api.py b/docusign_webforms/apis/form_instance_management_api.py new file mode 100644 index 0000000..60a560c --- /dev/null +++ b/docusign_webforms/apis/form_instance_management_api.py @@ -0,0 +1,524 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import sys +import os +import re + +# python 2 and python 3 compatibility library +from six import iteritems + +from ..client.configuration import Configuration +from ..client.api_client import ApiClient + + +class FormInstanceManagementApi(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): + config = Configuration() + if api_client: + self.api_client = api_client + else: + if not config.api_client: + config.api_client = ApiClient() + self.api_client = config.api_client + + def create_instance(self, account_id, form_id, create_instance_body, **kwargs): + """ + Creates an instance of the web form + Creates an instance of the web form. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.create_instance(account_id, form_id, create_instance_body, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form entity that is consistent for it's lifetime (required) + :param CreateInstanceRequestBody create_instance_body: Request body containing properties that will be used to create instance. (required) + :return: WebFormInstance + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.create_instance_with_http_info(account_id, form_id, create_instance_body, **kwargs) + else: + (data) = self.create_instance_with_http_info(account_id, form_id, create_instance_body, **kwargs) + return data + + def create_instance_with_http_info(self, account_id, form_id, create_instance_body, **kwargs): + """ + Creates an instance of the web form + Creates an instance of the web form. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.create_instance_with_http_info(account_id, form_id, create_instance_body, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form entity that is consistent for it's lifetime (required) + :param CreateInstanceRequestBody create_instance_body: Request body containing properties that will be used to create instance. (required) + :return: WebFormInstance + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['account_id', 'form_id', 'create_instance_body'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_instance" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'account_id' is set + if ('account_id' not in params) or (params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `create_instance`") + # verify the required parameter 'form_id' is set + if ('form_id' not in params) or (params['form_id'] is None): + raise ValueError("Missing the required parameter `form_id` when calling `create_instance`") + # verify the required parameter 'create_instance_body' is set + if ('create_instance_body' not in params) or (params['create_instance_body'] is None): + raise ValueError("Missing the required parameter `create_instance_body` when calling `create_instance`") + + + collection_formats = {} + + resource_path = '/accounts/{account_id}/forms/{form_id}/instances'.replace('{format}', 'json') + path_params = {} + if 'account_id' in params: + path_params['account_id'] = params['account_id'] + if 'form_id' in params: + path_params['form_id'] = params['form_id'] + + query_params = {} + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_instance_body' in params: + body_params = params['create_instance_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api(resource_path, 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebFormInstance', + auth_settings=auth_settings, + callback=params.get('callback'), + _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 get_instance(self, account_id, form_id, instance_id, **kwargs): + """ + Get form instance + Retrieves instance information filter by instance id + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.get_instance(account_id, form_id, instance_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form entity that is consistent for it's lifetime (required) + :param str instance_id: Unique identifier for a Web Form Instance that is consistent until its expiration (required) + :return: WebFormInstance + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.get_instance_with_http_info(account_id, form_id, instance_id, **kwargs) + else: + (data) = self.get_instance_with_http_info(account_id, form_id, instance_id, **kwargs) + return data + + def get_instance_with_http_info(self, account_id, form_id, instance_id, **kwargs): + """ + Get form instance + Retrieves instance information filter by instance id + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.get_instance_with_http_info(account_id, form_id, instance_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form entity that is consistent for it's lifetime (required) + :param str instance_id: Unique identifier for a Web Form Instance that is consistent until its expiration (required) + :return: WebFormInstance + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['account_id', 'form_id', 'instance_id'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_instance" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'account_id' is set + if ('account_id' not in params) or (params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `get_instance`") + # verify the required parameter 'form_id' is set + if ('form_id' not in params) or (params['form_id'] is None): + raise ValueError("Missing the required parameter `form_id` when calling `get_instance`") + # verify the required parameter 'instance_id' is set + if ('instance_id' not in params) or (params['instance_id'] is None): + raise ValueError("Missing the required parameter `instance_id` when calling `get_instance`") + + + collection_formats = {} + + resource_path = '/accounts/{account_id}/forms/{form_id}/instances/{instance_id}'.replace('{format}', 'json') + path_params = {} + if 'account_id' in params: + path_params['account_id'] = params['account_id'] + if 'form_id' in params: + path_params['form_id'] = params['form_id'] + if 'instance_id' in params: + path_params['instance_id'] = params['instance_id'] + + 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']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api(resource_path, 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebFormInstance', + auth_settings=auth_settings, + callback=params.get('callback'), + _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 list_instances(self, account_id, form_id, **kwargs): + """ + List instances + List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.list_instances(account_id, form_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form that is consistent for it's lifetime (required) + :param str client_user_id: A unique identifier for a user that should originate from client's system. This value can be anything your backend system would use to track individual form instances. Examples include employee IDs, email addresses, surrogate key values, etc. + :return: WebFormInstanceList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.list_instances_with_http_info(account_id, form_id, **kwargs) + else: + (data) = self.list_instances_with_http_info(account_id, form_id, **kwargs) + return data + + def list_instances_with_http_info(self, account_id, form_id, **kwargs): + """ + List instances + List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.list_instances_with_http_info(account_id, form_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form that is consistent for it's lifetime (required) + :param str client_user_id: A unique identifier for a user that should originate from client's system. This value can be anything your backend system would use to track individual form instances. Examples include employee IDs, email addresses, surrogate key values, etc. + :return: WebFormInstanceList + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['account_id', 'form_id', 'client_user_id'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_instances" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'account_id' is set + if ('account_id' not in params) or (params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `list_instances`") + # verify the required parameter 'form_id' is set + if ('form_id' not in params) or (params['form_id'] is None): + raise ValueError("Missing the required parameter `form_id` when calling `list_instances`") + + if 'client_user_id' in params and len(params['client_user_id']) > 100: + raise ValueError("Invalid value for parameter `client_user_id` when calling `list_instances`, length must be less than or equal to `100`") + + collection_formats = {} + + resource_path = '/accounts/{account_id}/forms/{form_id}/instances'.replace('{format}', 'json') + path_params = {} + if 'account_id' in params: + path_params['account_id'] = params['account_id'] + if 'form_id' in params: + path_params['form_id'] = params['form_id'] + + query_params = {} + if 'client_user_id' in params: + query_params['client_user_id'] = params['client_user_id'] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api(resource_path, 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebFormInstanceList', + auth_settings=auth_settings, + callback=params.get('callback'), + _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 refresh_token(self, account_id, form_id, instance_id, **kwargs): + """ + Refreshes the instance token + Generates new instance token for the existing Web Form Instance. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.refresh_token(account_id, form_id, instance_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form entity that is consistent for it's lifetime (required) + :param str instance_id: Unique identifier for a Web Form Instance that is consistent until its expiration (required) + :return: WebFormInstance + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.refresh_token_with_http_info(account_id, form_id, instance_id, **kwargs) + else: + (data) = self.refresh_token_with_http_info(account_id, form_id, instance_id, **kwargs) + return data + + def refresh_token_with_http_info(self, account_id, form_id, instance_id, **kwargs): + """ + Refreshes the instance token + Generates new instance token for the existing Web Form Instance. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.refresh_token_with_http_info(account_id, form_id, instance_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form entity that is consistent for it's lifetime (required) + :param str instance_id: Unique identifier for a Web Form Instance that is consistent until its expiration (required) + :return: WebFormInstance + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['account_id', 'form_id', 'instance_id'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method refresh_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'account_id' is set + if ('account_id' not in params) or (params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `refresh_token`") + # verify the required parameter 'form_id' is set + if ('form_id' not in params) or (params['form_id'] is None): + raise ValueError("Missing the required parameter `form_id` when calling `refresh_token`") + # verify the required parameter 'instance_id' is set + if ('instance_id' not in params) or (params['instance_id'] is None): + raise ValueError("Missing the required parameter `instance_id` when calling `refresh_token`") + + + collection_formats = {} + + resource_path = '/accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh'.replace('{format}', 'json') + path_params = {} + if 'account_id' in params: + path_params['account_id'] = params['account_id'] + if 'form_id' in params: + path_params['form_id'] = params['form_id'] + if 'instance_id' in params: + path_params['instance_id'] = params['instance_id'] + + 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']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api(resource_path, 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebFormInstance', + auth_settings=auth_settings, + callback=params.get('callback'), + _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/docusign_webforms/apis/form_management_api.py b/docusign_webforms/apis/form_management_api.py new file mode 100644 index 0000000..cafe079 --- /dev/null +++ b/docusign_webforms/apis/form_management_api.py @@ -0,0 +1,298 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import sys +import os +import re + +# python 2 and python 3 compatibility library +from six import iteritems + +from ..client.configuration import Configuration +from ..client.api_client import ApiClient + + +class FormManagementApi(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): + config = Configuration() + if api_client: + self.api_client = api_client + else: + if not config.api_client: + config.api_client = ApiClient() + self.api_client = config.api_client + + def get_form(self, account_id, form_id, **kwargs): + """ + Get Form + Retrieves form information filter by form id and state. The `state` parameter is optional and can accept value from `draft, active`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.get_form(account_id, form_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form that is consistent for it's lifetime (required) + :param str state: The state of the web form configuration + :return: WebForm + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.get_form_with_http_info(account_id, form_id, **kwargs) + else: + (data) = self.get_form_with_http_info(account_id, form_id, **kwargs) + return data + + def get_form_with_http_info(self, account_id, form_id, **kwargs): + """ + Get Form + Retrieves form information filter by form id and state. The `state` parameter is optional and can accept value from `draft, active`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.get_form_with_http_info(account_id, form_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the web form resides (required) + :param str form_id: Unique identifier for a web form that is consistent for it's lifetime (required) + :param str state: The state of the web form configuration + :return: WebForm + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['account_id', 'form_id', 'state'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_form" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'account_id' is set + if ('account_id' not in params) or (params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `get_form`") + # verify the required parameter 'form_id' is set + if ('form_id' not in params) or (params['form_id'] is None): + raise ValueError("Missing the required parameter `form_id` when calling `get_form`") + + if 'state' in params and len(params['state']) > 15: + raise ValueError("Invalid value for parameter `state` when calling `get_form`, length must be less than or equal to `15`") + + collection_formats = {} + + resource_path = '/accounts/{account_id}/forms/{form_id}'.replace('{format}', 'json') + path_params = {} + if 'account_id' in params: + path_params['account_id'] = params['account_id'] + if 'form_id' in params: + path_params['form_id'] = params['form_id'] + + query_params = {} + if 'state' in params: + query_params['state'] = params['state'] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api(resource_path, 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebForm', + auth_settings=auth_settings, + callback=params.get('callback'), + _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 list_forms(self, account_id, **kwargs): + """ + List Forms + List all the forms for the active user that can be in an active or draft state + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.list_forms(account_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the webform resides (required) + :param str user_filter: Filter which forms are returned + :param bool is_standalone: Is the form a standalone form + :param bool is_published: Has the form been published + :param str sort_by: Sort result set in mentioned sort property:order. Default is lastModifiedDateTime:desc. Default sort is descending if not mentioned. + :param str search: Search through form names + :param str start_position: Starting position for desired page of results. + :param str count: Number of results to return per page. + :return: WebFormSummaryList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.list_forms_with_http_info(account_id, **kwargs) + else: + (data) = self.list_forms_with_http_info(account_id, **kwargs) + return data + + def list_forms_with_http_info(self, account_id, **kwargs): + """ + List Forms + List all the forms for the active user that can be in an active or draft state + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.list_forms_with_http_info(account_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str account_id: Account identifier in which the webform resides (required) + :param str user_filter: Filter which forms are returned + :param bool is_standalone: Is the form a standalone form + :param bool is_published: Has the form been published + :param str sort_by: Sort result set in mentioned sort property:order. Default is lastModifiedDateTime:desc. Default sort is descending if not mentioned. + :param str search: Search through form names + :param str start_position: Starting position for desired page of results. + :param str count: Number of results to return per page. + :return: WebFormSummaryList + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['account_id', 'user_filter', 'is_standalone', 'is_published', 'sort_by', 'search', 'start_position', 'count'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_forms" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'account_id' is set + if ('account_id' not in params) or (params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `list_forms`") + + if 'sort_by' in params and len(params['sort_by']) > 50: + raise ValueError("Invalid value for parameter `sort_by` when calling `list_forms`, length must be less than or equal to `50`") + + collection_formats = {} + + resource_path = '/accounts/{account_id}/forms'.replace('{format}', 'json') + path_params = {} + if 'account_id' in params: + path_params['account_id'] = params['account_id'] + + query_params = {} + if 'user_filter' in params: + query_params['user_filter'] = params['user_filter'] + if 'is_standalone' in params: + query_params['is_standalone'] = params['is_standalone'] + if 'is_published' in params: + query_params['is_published'] = params['is_published'] + if 'sort_by' in params: + query_params['sort_by'] = params['sort_by'] + if 'search' in params: + query_params['search'] = params['search'] + if 'start_position' in params: + query_params['start_position'] = params['start_position'] + if 'count' in params: + query_params['count'] = params['count'] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api(resource_path, 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebFormSummaryList', + auth_settings=auth_settings, + callback=params.get('callback'), + _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/docusign_webforms/client/__init__.py b/docusign_webforms/client/__init__.py new file mode 100644 index 0000000..e0d37ed --- /dev/null +++ b/docusign_webforms/client/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import auth modules into client package +from .auth.oauth import Account +from .auth.oauth import Organization +from .auth.oauth import Link +from .auth.oauth import OAuth +from .auth.oauth import OAuthToken +from .auth.oauth import OAuthUserInfo diff --git a/docusign_webforms/client/api_client.py b/docusign_webforms/client/api_client.py new file mode 100644 index 0000000..c34353d --- /dev/null +++ b/docusign_webforms/client/api_client.py @@ -0,0 +1,850 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import os +import re +import json +import mimetypes +import tempfile +import threading +import base64 +import math +import jwt + +from datetime import date, datetime +from time import time + +# python 2 and python 3 compatibility library +from six import PY3, integer_types, iteritems, text_type +from six.moves.urllib.parse import quote + +from docusign_webforms import client +from docusign_webforms import models + +from .configuration import Configuration +from .api_exception import ApiException, ArgumentException +from .api_response import RESTClientObject, RESTResponse +from .auth.oauth import OAuthUserInfo, OAuthToken, OAuth, Account, Organization, Link + +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 host: The base path for the server to call. + :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. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, text_type) + integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': date, + 'datetime': datetime, + 'object': object, + } + + OAUTH_TYPES = (OAuthToken.__name__, OAuthUserInfo.__name__, Account.__name__, Organization.__name__, Link.__name__) + + def __init__(self, host=None, header_name=None, header_value=None, cookie=None, oauth_host_name=None, base_path=None): + """ + Constructor of the class. + """ + + config = Configuration() + self.rest_client = RESTClientObject(config) + self.default_headers = {'X-DocuSign-SDK': 'Python'} + if header_name is not None: + self.default_headers[header_name] = header_value + if host is None: + self.host = config.host + elif host == "": + raise ArgumentException("basePath cannot be empty") + else: + self.host = host + + self.cookie = cookie + self.oauth_host_name = oauth_host_name + self.base_path = base_path + # Set default User-Agent. + self.user_agent = config.user_agent + + @property + def user_agent(self): + """ + Gets user agent. + """ + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + """ + Sets user agent. + """ + 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, callback=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, + _request_timeout=None): + """ + :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without + reading/decoding response data. Default is True. + :return: + """ + + # 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: + resource_path = resource_path.replace( + '{%s}' % k, quote(str(v), safe="")) + + # 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.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: + r = RESTResponse(response_data) + # deserialize response data + if response_type: + return_data = self.deserialize(r, response_type) + else: + return_data = None + + if callback: + if _return_http_data_only: + callback(return_data) + else: + callback((return_data, response_data.status, response_data.getheaders())) + elif _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, 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 iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in 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 iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + if klass in self.OAUTH_TYPES: + klass = getattr(client, klass) + else: + klass = getattr(models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == date: + return self.__deserialize_date(data) + elif klass == 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, callback=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, + _request_timeout=None): + """ + Makes the HTTP request (synchronous) and return the deserialized data. + To make an async request, define a function for callback. + + :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 callback function: Callback function for asynchronous request. + If provide this parameter, + the request will be called 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 provide parameter callback, + the request will be called asynchronously. + The method will return the request thread. + If parameter callback is None, + then the method will return the response directly. + """ + if callback is None: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, callback, + _return_http_data_only, collection_formats, _preload_content, _request_timeout) + else: + thread = threading.Thread(target=self.__call_api, + args=(resource_path, method, + path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + callback, _return_http_data_only, + collection_formats, _preload_content, _request_timeout)) + thread.start() + 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 iteritems(params) if isinstance(params, dict) else params: + 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 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. + """ + config = Configuration() + + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = config.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): + """ + 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. + """ + config = Configuration() + + fd, path = tempfile.mkstemp(dir=config.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) + curr_time = datetime.now() + formatted_time = curr_time.strftime('%m%d%Y_%H%M%S_%f') + filename = "{}_{}".format(formatted_time, filename) + 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 unicode(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 ApiException( + status=0, + reason="Failed to parse `{0}` into a 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 ApiException( + status=0, + reason=( + "Failed to parse `{0}` into a 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. + """ + instance = klass() + + if not instance.swagger_types: + return data + + for attr, attr_type in iteritems(instance.swagger_types): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, self.__deserialize(value, attr_type)) + + return instance + + def request_jwt_user_token(self, client_id, user_id, oauth_host_name, private_key_bytes, expires_in, + scopes=(OAuth.SCOPE_SIGNATURE,)): + """ + Request JWT User Token + :param client_id: DocuSign OAuth Client Id(AKA Integrator Key) + :param user_id: DocuSign user Id to be impersonated + :param oauth_host_name: DocuSign OAuth host name + :param private_key_bytes: the byte contents of the RSA private key + :param expires_in: number of seconds remaining before the JWT assertion is considered as invalid + :param scopes: Optional. The list of requested scopes may include (but not limited to) You can also pass any + advanced scope. + :return: OAuthToken object + """ + if not private_key_bytes: + raise ArgumentException("Private key not supplied or is invalid!") + if not user_id: + raise ArgumentException("User Id not supplied or is invalid!") + if not oauth_host_name: + raise ArgumentException("oAuthBasePath cannot be empty") + + now = math.floor(time()) + later = now + (expires_in * 1) + claim = {"iss": client_id, "sub": user_id, "aud": oauth_host_name, "iat": now, "exp": later, + "scope": " ".join(scopes)} + token = jwt.encode(payload=claim, key=private_key_bytes, algorithm='RS256') + response = self.request("POST", "https://" + oauth_host_name + "/oauth/token", + headers=self.sanitize_for_serialization( + {"Content-Type": "application/x-www-form-urlencoded"}), + post_params=self.sanitize_for_serialization( + {"assertion": token, "grant_type": OAuth.GRANT_TYPE_JWT})) + + response_data = json.loads(response.data) + + if 'token_type' in response_data and 'access_token' in response_data: + self.set_default_header("Authorization", response_data['token_type'] + " " + response_data['access_token']) + else: + raise ApiException(status=response.status, + reason="Error while requesting server, received a non successful HTTP code {}" + " with response Body: {}".format(response.status, response.data) + ) + + return self.deserialize(response=response, response_type=OAuthToken) + + def request_jwt_application_token(self, client_id, oauth_host_name, private_key_bytes, expires_in, + scopes=(OAuth.SCOPE_SIGNATURE,)): + """ + Request JWT Application Token + :param client_id: DocuSign OAuth Client Id(AKA Integrator Key) + :param oauth_host_name: DocuSign OAuth host name + :param private_key_bytes: the byte contents of the RSA private key + :param expires_in: number of seconds remaining before the JWT assertion is considered as invalid + :param scopes: Optional. The list of requested scopes may include (but not limited to) You can also pass any + advanced scope. + :return: OAuthToken object + """ + + if not private_key_bytes: + raise ArgumentException("Private key not supplied or is invalid!") + if not oauth_host_name: + raise ArgumentException("oAuthBasePath cannot be empty") + + now = math.floor(time()) + later = now + (expires_in * 1) + claim = {"iss": client_id, "aud": oauth_host_name, "iat": now, "exp": later, + "scope": " ".join(scopes)} + token = jwt.encode(payload=claim, key=private_key_bytes, algorithm='RS256') + + response = self.request("POST", "https://" + oauth_host_name + "/oauth/token", + headers=self.sanitize_for_serialization( + {"Content-Type": "application/x-www-form-urlencoded"}), + post_params=self.sanitize_for_serialization( + {"assertion": token, "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer"})) + response_data = json.loads(response.data) + + if 'token_type' in response_data and 'access_token' in response_data: + self.set_default_header("Authorization", response_data['token_type'] + " " + response_data['access_token']) + else: + ApiException(status=response.status, + reason="Error while requesting server, received a non successful HTTP code {}" + " with response Body: {}".format(response.status, response.data) + ) + + return self.deserialize(response=response, response_type=OAuthToken) + + def get_user_info(self, access_token): + """ + Get User Info method takes the accessToken to retrieve User Account Data. + :param access_token: + :return: The User Info model. + """ + if not access_token: + raise ArgumentException("Cannot find a valid access token." + " Make sure OAuth is configured before you try again.") + if not self.oauth_host_name: + raise ArgumentException("oAuthBasePath cannot be empty") + + resource_path = '/oauth/userinfo' + headers = {"Authorization": "Bearer " + access_token} + + response = self.request("GET", "https://" + self.oauth_host_name + resource_path, headers=headers) + return self.deserialize(response=response, response_type=OAuthUserInfo) + + def generate_access_token(self, client_id, client_secret, code): + """ + GenerateAccessToken will exchange the authorization code for an access token and refresh tokens. + :param client_id: DocuSign OAuth Client Id(AKA Integrator Key) + :param client_secret: The secret key you generated when you set up the integration in DocuSign Admin console. + :param code: The authorization code + :return: OAuthToken object + """ + if not client_id or not client_secret or not code: + raise ArgumentException + url = "https://{0}/oauth/token".format(self.oauth_host_name) + integrator_and_secret_key = b"Basic " + base64.b64encode(str.encode("{}:{}".format(client_id, client_secret))) + headers = { + "Authorization": integrator_and_secret_key.decode("utf-8"), + "Content-Type": "application/x-www-form-urlencoded", + } + post_params = self.sanitize_for_serialization({ + "grant_type": "authorization_code", + "code": code + }) + response = self.rest_client.POST(url, headers=headers, post_params=post_params) + + return self.deserialize(response=response, response_type=OAuthToken) + + def set_base_path(self, base_path): + """ + :param base_path: + :return: + """ + self.base_path = base_path + + def set_oauth_host_name(self, oauth_host_name=None): + """ + :param oauth_host_name: + :return: + """ + if oauth_host_name: + self.oauth_host_name = oauth_host_name + return + + if not oauth_host_name: + raise ArgumentException('oAuthBasePath cannot be empty') + + # Derive OAuth Base Path if not given + if self.base_path is None or self.base_path.startswith("https://demo") or self.base_path.startswith("http://demo") or self.base_path.startswith("https://apps-d") or self.base_path.startswith("http://apps-d"): + self.oauth_host_name = OAuth.DEMO_OAUTH_BASE_PATH + elif self.base_path.startswith("https://stage") or self.base_path.startswith("http://stage") or self.base_path.startswith("https://apps-s") or self.base_path.startswith("http://apps-s"): + self.oauth_host_name = OAuth.STAGE_OAUTH_BASE_PATH + else: + self.oauth_host_name = OAuth.PRODUCTION_OAUTH_BASE_PATH + + def set_access_token(self, token_obj): + """ + + :param token_obj: + :return: + """ + self.default_headers['Authorization'] = token_obj.access_token + + def get_authorization_uri(self, client_id, scopes, redirect_uri, response_type, state=None): + """ + Helper method to configure the OAuth accessCode/implicit flow parameters + :param client_id: DocuSign OAuth Client Id(AKA Integrator Key) + :param scopes: The list of requested scopes. Client applications may be scoped to a limited set of system access. + :param redirect_uri: This determines where to deliver the response containing the authorization code + :param response_type: Determines the response type of the authorization request, NOTE: these response types are + mutually exclusive for a client application. A public/native client application may only request a response type + of "token". A private/trusted client application may only request a response type of "code". + :param state: Allows for arbitrary state that may be useful to your application. The value in this parameter + will be round-tripped along with the response so you can make sure it didn't change. + :return: string + """ + if not self.oauth_host_name: + self.oauth_host_name = self.get_oauth_host_name() + scopes = " ".join(scopes) if scopes else "" + uri = "https://{}/oauth/auth?response_type={}&scope={}&client_id={}&redirect_uri={}" + if state: + uri += "&state={}" + return uri.format(self.oauth_host_name, response_type, quote(scopes), client_id, redirect_uri, state) + + def get_oauth_host_name(self): + """ + :return: string + """ + if not self.oauth_host_name: + self.set_oauth_host_name() + + return self.oauth_host_name diff --git a/docusign_webforms/client/api_exception.py b/docusign_webforms/client/api_exception.py new file mode 100644 index 0000000..a6eae67 --- /dev/null +++ b/docusign_webforms/client/api_exception.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +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() + self.trace_token = http_resp.getheader('X-DocuSign-TraceToken') + self.timestamp = http_resp.getheader('date') + self.response = http_resp + 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" \ + "Trace-Token: {2}\n" \ + "Timestamp: {3}\n".format(self.status, self.reason, self.trace_token, self.timestamp) + 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 + + +class ArgumentException(Exception): + + def __init__(self, *args, **kwargs): + if not args: + super(Exception).__init__("argument cannot be empty") + else: + super(Exception).__init__(*args, **kwargs) + + +class InvalidBasePath(Exception): + pass diff --git a/docusign_webforms/client/api_response.py b/docusign_webforms/client/api_response.py new file mode 100644 index 0000000..01ad282 --- /dev/null +++ b/docusign_webforms/client/api_response.py @@ -0,0 +1,317 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.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 + +from .api_exception import ApiException + +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 = '{}' + 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'] + + body = None + fields = post_params + + # Custom handling for 'multipart/form-data' when there's a single file + # The standard approach is not used in this case to avoid overwriting + # the 'Content-Type' and 'Content-Disposition' headers generated by urllib3. + if len(post_params) == 1: + [k, v] = post_params[0] + [file_name, file_data, mime_type] = v + + if isinstance(file_data, bytes): + # If the file data is bytes, customize headers and set body + headers['Content-Type'] = mime_type + headers['Content-Disposition'] = 'form-data; name="' + k + '"; filename="' + file_name + '"' + body = file_data + fields = None # Clear fields when there is only one file + + r = self.pool_manager.request(method, url, + fields=fields, + body=body, + 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: + try: + r.data = r.data.decode('utf8') + except (UnicodeDecodeError, AttributeError): + pass + # 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) \ No newline at end of file diff --git a/docusign_webforms/client/auth/__init__.py b/docusign_webforms/client/auth/__init__.py new file mode 100644 index 0000000..dab739a --- /dev/null +++ b/docusign_webforms/client/auth/__init__.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import auth modules into client package +from .oauth import Account +from .oauth import Organization +from .oauth import Link +from .oauth import OAuth +from .oauth import OAuthToken \ No newline at end of file diff --git a/docusign_webforms/client/auth/oauth.py b/docusign_webforms/client/auth/oauth.py new file mode 100644 index 0000000..d75b501 --- /dev/null +++ b/docusign_webforms/client/auth/oauth.py @@ -0,0 +1,573 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import json +from pprint import pformat +from six import iteritems + + +class OAuth(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + # create and send envelopes, and obtain links for starting signing sessions. + SCOPE_SIGNATURE = "signature" + # obtain a refresh token with an extended lifetime. + SCOPE_EXTENDED = "extended" + # obtain access to the user’s account when the user is not present. + SCOPE_IMPERSONATION = "impersonation" + + # OAuth Base path constants + # Demo server base path + DEMO_OAUTH_BASE_PATH = "account-d.docusign.com" + # Production server base path + PRODUCTION_OAUTH_BASE_PATH = "account.docusign.com" + # Stage server base path + STAGE_OAUTH_BASE_PATH = "account-s.docusign.com" + # JWT Grant Type + GRANT_TYPE_JWT = "urn:ietf:params:oauth:grant-type:jwt-bearer" + + +class OAuthUserInfo(object): + + def __init__(self, sub=None, email=None, accounts=None, name=None, given_name=None, family_name=None, + created=None): + + self.swagger_types = { + 'sub': 'str', + 'email': 'str', + 'accounts': 'list[Account]', + 'name': 'str', + 'given_name': 'str', + 'family_name': 'str', + 'created': 'str' + } + + self.attribute_map = { + 'sub': 'sub', + 'email': 'email', + 'accounts': 'accounts', + 'name': 'name', + 'given_name': 'given_name', + 'family_name': 'family_name', + 'created': 'created' + } + self._sub = sub + self._email = email + self._accounts = accounts + self._name = name + self._given_name = given_name + self._family_name = family_name + self._created = created + + @property + def sub(self): + return self._sub + + @sub.setter + def sub(self, sub): + self._sub = sub + + @property + def created(self): + return self._created + + @created.setter + def created(self, created): + self._created = created + + @property + def email(self): + return self._email + + @email.setter + def email(self, email): + self._email = email + + @property + def name(self): + return self._name + + @name.setter + def name(self, name): + self._name = name + + @property + def given_name(self): + return self._given_name + + @given_name.setter + def given_name(self, given_name): + self._given_name = given_name + + @property + def family_name(self): + return self._family_name + + @family_name.setter + def family_name(self, family_name): + self._family_name = family_name + + def list(self): + return self._accounts + + @property + def accounts(self): + return self._accounts + + @accounts.setter + def accounts(self, accounts): + self._accounts = accounts + + def add_account(self, account): + if not self.accounts: + self._accounts = list() + self._accounts.append(account) + + def get_accounts(self): + if not self.accounts: + self._accounts = list() + return self._accounts + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 __str__(self): + """ + Returns the string representation of the model + """ + return pformat(self.to_dict()) + + def to_indented_string(self, obj): + """ + Convert the given object to string with each line indented by 4 + spaces (except the first line). + :param obj: + :return: + """ + if obj: + return str(obj).replace("\n", "\n ") + return "" + + +class Account(object): + def __init__(self, account_id=None, is_default=None, account_name=None, base_uri=None, organization=None): + self.swagger_types = { + 'account_id': 'str', + 'is_default': 'str', + 'account_name': 'str', + 'base_uri': 'str', + 'organization': 'str', + } + + self.attribute_map = { + 'account_id': 'account_id', + 'is_default': 'is_default', + 'account_name': 'account_name', + 'base_uri': 'base_uri', + 'organization': 'organization', + } + self._account_id = account_id + self.is_default = is_default + self._account_name = account_name + self._base_uri = base_uri + self._organization = organization + + def get_is_default(self): + return self.get_is_default + + @property + def account_id(self): + return self._account_id + + @account_id.setter + def account_id(self, account_id): + self._account_id = account_id + + @property + def is_default(self): + return self._is_default + + @is_default.setter + def is_default(self, is_default): + self._is_default = is_default + + @property + def account_name(self): + return self._account_name + + @account_name.setter + def account_name(self, account_name): + self._account_name = account_name + + @property + def base_uri(self): + return self._base_uri + + @base_uri.setter + def base_uri(self, base_uri): + self._base_uri = base_uri + + @property + def organization(self): + return self._organization + + @organization.setter + def organization(self, organization): + self._organization = organization + + +class Link(object): + def __init__(self, rel=None, href=None): + self._rel = rel + self._href = href + + @property + def rel(self): + return self._rel + + @rel.setter + def rel(self, rel): + self._rel = rel + + @property + def href(self): + return self._href + + @href.setter + def organization(self, href): + self._href = href + + def __str__(self): + return "class Link {\n rel: {}\n href: {}".format(self.to_indented_string(self.rel), + self.to_indented_string(self.href)) + + def to_indented_string(self, obj): + """ + Convert the given object to string with each line indented by 4 + spaces (except the first line). + :param obj: + :return: + """ + if obj: + return str(obj).replace("\n", "\n ") + return None + + def __eq__(self, other): + if not other: + return False + return (self.rel == other.rel or self.rel and self.rel == other.rel) and \ + (self.href == other.href or self.href and self.href == other.href) + + def to_json(self): + pass + + +class Organization(object): + def __init__(self, organization_id=None, links=None): + self._organization_id = organization_id + self._links = links + + @property + def organization_id(self): + return self._organization_id + + @organization_id.setter + def organization_id(self, organization_id): + self._organization_id = organization_id + + @property + def links(self): + return self._links + + @links.setter + def links(self, links): + self._links = links + + def list(self): + if not self._links: + self._links = list() + return self._links + + def add_links(self, link): + if not self.links: + self.links = list() + self._links.append(link) + + def __str__(self): + return "class Organization {\n organization_id: {}\n links: {}".format( + self.to_indented_string(self._organization_id), + self.to_indented_string(self._links) + ) + + def to_indented_string(self, obj): + + if obj: + return str(obj).replace("\n", "\n ") + return None + + def __eq__(self, other): + if not other: + return False + return (self.organization_id == other.organization_id or self.organization_id + and self.organization_id == other.organization_id) and\ + (self.links == other.links or self.links and self.links == other.links) + + +class OAuthToken(object): + + def __init__(self, access_token=None, data=None, expires_in=None, refresh_token=None, scope=None, token_type=None): + """ + OAuthToken - a model defined in Swagger + + :param dict swaggerTypes: The key is attribute name + and the value is attribute type. + :param dict attributeMap: The key is attribute name + and the value is json key in definition. + """ + self.swagger_types = { + 'access_token': 'str', + 'data': 'list[NameValue]', + 'expires_in': 'str', + 'refresh_token': 'str', + 'scope': 'str', + 'token_type': 'str' + } + + self.attribute_map = { + 'access_token': 'access_token', + 'data': 'data', + 'expires_in': 'expires_in', + 'refresh_token': 'refresh_token', + 'scope': 'scope', + 'token_type': 'token_type' + } + + self._access_token = access_token + self._data = data + self._expires_in = expires_in + self._refresh_token = refresh_token + self._scope = scope + self._token_type = token_type + + @property + def access_token(self): + """ + Gets the access_token of this OAuthToken. + Access token information. + + :return: The access_token of this OAuthToken. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """ + Sets the access_token of this OAuthToken. + Access token information. + + :param access_token: The access_token of this OAuthToken. + :type: str + """ + + self._access_token = access_token + + @property + def data(self): + """ + Gets the data of this OAuthToken. + + + :return: The data of this OAuthToken. + :rtype: list[NameValue] + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this OAuthToken. + + + :param data: The data of this OAuthToken. + :type: list[NameValue] + """ + + self._data = data + + @property + def expires_in(self): + """ + Gets the expires_in of this OAuthToken. + + + :return: The expires_in of this OAuthToken. + :rtype: str + """ + return self._expires_in + + @expires_in.setter + def expires_in(self, expires_in): + """ + Sets the expires_in of this OAuthToken. + + + :param expires_in: The expires_in of this OAuthToken. + :type: str + """ + + self._expires_in = expires_in + + @property + def refresh_token(self): + """ + Gets the refresh_token of this OAuthToken. + + + :return: The refresh_token of this OAuthToken. + :rtype: str + """ + return self._refresh_token + + @refresh_token.setter + def refresh_token(self, refresh_token): + """ + Sets the refresh_token of this OAuthToken. + + + :param refresh_token: The refresh_token of this OAuthToken. + :type: str + """ + + self._refresh_token = refresh_token + + @property + def scope(self): + """ + Gets the scope of this OAuthToken. + Must be set to \"api\". + + :return: The scope of this OAuthToken. + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """ + Sets the scope of this OAuthToken. + Must be set to \"api\". + + :param scope: The scope of this OAuthToken. + :type: str + """ + + self._scope = scope + + @property + def token_type(self): + """ + Gets the token_type of this OAuthToken. + + + :return: The token_type of this OAuthToken. + :rtype: str + """ + return self._token_type + + @token_type.setter + def token_type(self, token_type): + """ + Sets the token_type of this OAuthToken. + + + :param token_type: The token_type of this OAuthToken. + :type: str + """ + + self._token_type = token_type + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 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 + """ + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """ + Returns true if both objects are not equal + """ + return not self == other \ No newline at end of file diff --git a/docusign_webforms/client/configuration.py b/docusign_webforms/client/configuration.py new file mode 100644 index 0000000..5802c4d --- /dev/null +++ b/docusign_webforms/client/configuration.py @@ -0,0 +1,281 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.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 platform + +import six +from six.moves import http_client as httplib + +def singleton(cls, *args, **kw): + instances = {} + + def _singleton(): + if cls not in instances: + instances[cls] = cls(*args, **kw) + return instances[cls] + return _singleton + +@singleton +class Configuration(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. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "https://apps-d.docusign.com/api/webforms/v1.1" + + # Default api client + self.api_client = None + + # 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 = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # access token for OAuth + self.access_token = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("docusign_webforms") + 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 = '' + + # Disable client side validation + self.client_side_validation = True + + python_version = platform.python_version() + + if six.PY3: + self.user_agent = "Swagger-Codegen/1.1.0/1.0.2rc12/python3/" + f"{python_version}" + else: + self.user_agent = "Swagger-Codegen/1.1.0/1.0.2rc12/python2/" + f"{python_version}" + + + @classmethod + def set_default(cls, default): + cls._default = default + + @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.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + 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 { + + 'docusignAccessCode': + { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + }, + + } + + 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: 1.1.0\n"\ + "SDK Package Version: 1.0.2rc12".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/docusign_webforms/models/__init__.py b/docusign_webforms/models/__init__.py new file mode 100644 index 0000000..3dbe8aa --- /dev/null +++ b/docusign_webforms/models/__init__.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +# flake8: noqa +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from docusign_webforms.models.create_instance_request_body import CreateInstanceRequestBody +from docusign_webforms.models.http_error import HttpError +from docusign_webforms.models.http_success import HttpSuccess +from docusign_webforms.models.instance_source import InstanceSource +from docusign_webforms.models.instance_status import InstanceStatus +from docusign_webforms.models.template_properties import TemplateProperties +from docusign_webforms.models.web_form import WebForm +from docusign_webforms.models.web_form_component_type import WebFormComponentType +from docusign_webforms.models.web_form_content import WebFormContent +from docusign_webforms.models.web_form_instance import WebFormInstance +from docusign_webforms.models.web_form_instance_envelopes import WebFormInstanceEnvelopes +from docusign_webforms.models.web_form_instance_list import WebFormInstanceList +from docusign_webforms.models.web_form_instance_metadata import WebFormInstanceMetadata +from docusign_webforms.models.web_form_metadata import WebFormMetadata +from docusign_webforms.models.web_form_properties import WebFormProperties +from docusign_webforms.models.web_form_source import WebFormSource +from docusign_webforms.models.web_form_state import WebFormState +from docusign_webforms.models.web_form_summary import WebFormSummary +from docusign_webforms.models.web_form_summary_list import WebFormSummaryList +from docusign_webforms.models.web_form_user_info import WebFormUserInfo +from docusign_webforms.models.web_form_values import WebFormValues diff --git a/docusign_webforms/models/account_id.py b/docusign_webforms/models/account_id.py new file mode 100644 index 0000000..2b38a65 --- /dev/null +++ b/docusign_webforms/models/account_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class AccountId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """AccountId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(AccountId, dict): + for key, value in self.items(): + result[key] = 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, AccountId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccountId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/assertion_id.py b/docusign_webforms/models/assertion_id.py new file mode 100644 index 0000000..659890d --- /dev/null +++ b/docusign_webforms/models/assertion_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class AssertionId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """AssertionId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(AssertionId, dict): + for key, value in self.items(): + result[key] = 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, AssertionId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AssertionId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/authentication_instant.py b/docusign_webforms/models/authentication_instant.py new file mode 100644 index 0000000..702fde3 --- /dev/null +++ b/docusign_webforms/models/authentication_instant.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class AuthenticationInstant(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """AuthenticationInstant - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(AuthenticationInstant, dict): + for key, value in self.items(): + result[key] = 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, AuthenticationInstant): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AuthenticationInstant): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/authentication_method.py b/docusign_webforms/models/authentication_method.py new file mode 100644 index 0000000..9c73e65 --- /dev/null +++ b/docusign_webforms/models/authentication_method.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class AuthenticationMethod(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """AuthenticationMethod - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(AuthenticationMethod, dict): + for key, value in self.items(): + result[key] = 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, AuthenticationMethod): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AuthenticationMethod): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/brand_id.py b/docusign_webforms/models/brand_id.py new file mode 100644 index 0000000..2524b1e --- /dev/null +++ b/docusign_webforms/models/brand_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class BrandId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """BrandId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(BrandId, dict): + for key, value in self.items(): + result[key] = 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, BrandId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BrandId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/client_user_id.py b/docusign_webforms/models/client_user_id.py new file mode 100644 index 0000000..79f406e --- /dev/null +++ b/docusign_webforms/models/client_user_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class ClientUserId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """ClientUserId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(ClientUserId, dict): + for key, value in self.items(): + result[key] = 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, ClientUserId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ClientUserId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/component_key.py b/docusign_webforms/models/component_key.py new file mode 100644 index 0000000..1e0fd71 --- /dev/null +++ b/docusign_webforms/models/component_key.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class ComponentKey(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """ComponentKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(ComponentKey, dict): + for key, value in self.items(): + result[key] = 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, ComponentKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ComponentKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/count.py b/docusign_webforms/models/count.py new file mode 100644 index 0000000..0ad018f --- /dev/null +++ b/docusign_webforms/models/count.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class Count(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """Count - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(Count, dict): + for key, value in self.items(): + result[key] = 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, Count): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Count): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/create_instance_request_body.py b/docusign_webforms/models/create_instance_request_body.py new file mode 100644 index 0000000..8813d70 --- /dev/null +++ b/docusign_webforms/models/create_instance_request_body.py @@ -0,0 +1,326 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class CreateInstanceRequestBody(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 = { + 'form_values': 'WebFormValues', + 'client_user_id': 'str', + 'authentication_instant': 'datetime', + 'authentication_method': 'str', + 'assertion_id': 'str', + 'security_domain': 'str', + 'return_url': 'str', + 'expiration_offset': 'int', + 'tags': 'list[str]' + } + + attribute_map = { + 'form_values': 'formValues', + 'client_user_id': 'clientUserId', + 'authentication_instant': 'authenticationInstant', + 'authentication_method': 'authenticationMethod', + 'assertion_id': 'assertionId', + 'security_domain': 'securityDomain', + 'return_url': 'returnUrl', + 'expiration_offset': 'expirationOffset', + 'tags': 'tags' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """CreateInstanceRequestBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._form_values = None + self._client_user_id = None + self._authentication_instant = None + self._authentication_method = None + self._assertion_id = None + self._security_domain = None + self._return_url = None + self._expiration_offset = None + self._tags = None + self.discriminator = None + + setattr(self, "_{}".format('form_values'), kwargs.get('form_values', None)) + setattr(self, "_{}".format('client_user_id'), kwargs.get('client_user_id', None)) + setattr(self, "_{}".format('authentication_instant'), kwargs.get('authentication_instant', None)) + setattr(self, "_{}".format('authentication_method'), kwargs.get('authentication_method', None)) + setattr(self, "_{}".format('assertion_id'), kwargs.get('assertion_id', None)) + setattr(self, "_{}".format('security_domain'), kwargs.get('security_domain', None)) + setattr(self, "_{}".format('return_url'), kwargs.get('return_url', None)) + setattr(self, "_{}".format('expiration_offset'), kwargs.get('expiration_offset', None)) + setattr(self, "_{}".format('tags'), kwargs.get('tags', None)) + + @property + def form_values(self): + """Gets the form_values of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The form_values of this CreateInstanceRequestBody. # noqa: E501 + :rtype: WebFormValues + """ + return self._form_values + + @form_values.setter + def form_values(self, form_values): + """Sets the form_values of this CreateInstanceRequestBody. + + + :param form_values: The form_values of this CreateInstanceRequestBody. # noqa: E501 + :type: WebFormValues + """ + + self._form_values = form_values + + @property + def client_user_id(self): + """Gets the client_user_id of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The client_user_id of this CreateInstanceRequestBody. # noqa: E501 + :rtype: str + """ + return self._client_user_id + + @client_user_id.setter + def client_user_id(self, client_user_id): + """Sets the client_user_id of this CreateInstanceRequestBody. + + + :param client_user_id: The client_user_id of this CreateInstanceRequestBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and client_user_id is None: + raise ValueError("Invalid value for `client_user_id`, must not be `None`") # noqa: E501 + + self._client_user_id = client_user_id + + @property + def authentication_instant(self): + """Gets the authentication_instant of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The authentication_instant of this CreateInstanceRequestBody. # noqa: E501 + :rtype: datetime + """ + return self._authentication_instant + + @authentication_instant.setter + def authentication_instant(self, authentication_instant): + """Sets the authentication_instant of this CreateInstanceRequestBody. + + + :param authentication_instant: The authentication_instant of this CreateInstanceRequestBody. # noqa: E501 + :type: datetime + """ + + self._authentication_instant = authentication_instant + + @property + def authentication_method(self): + """Gets the authentication_method of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The authentication_method of this CreateInstanceRequestBody. # noqa: E501 + :rtype: str + """ + return self._authentication_method + + @authentication_method.setter + def authentication_method(self, authentication_method): + """Sets the authentication_method of this CreateInstanceRequestBody. + + + :param authentication_method: The authentication_method of this CreateInstanceRequestBody. # noqa: E501 + :type: str + """ + + self._authentication_method = authentication_method + + @property + def assertion_id(self): + """Gets the assertion_id of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The assertion_id of this CreateInstanceRequestBody. # noqa: E501 + :rtype: str + """ + return self._assertion_id + + @assertion_id.setter + def assertion_id(self, assertion_id): + """Sets the assertion_id of this CreateInstanceRequestBody. + + + :param assertion_id: The assertion_id of this CreateInstanceRequestBody. # noqa: E501 + :type: str + """ + + self._assertion_id = assertion_id + + @property + def security_domain(self): + """Gets the security_domain of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The security_domain of this CreateInstanceRequestBody. # noqa: E501 + :rtype: str + """ + return self._security_domain + + @security_domain.setter + def security_domain(self, security_domain): + """Sets the security_domain of this CreateInstanceRequestBody. + + + :param security_domain: The security_domain of this CreateInstanceRequestBody. # noqa: E501 + :type: str + """ + + self._security_domain = security_domain + + @property + def return_url(self): + """Gets the return_url of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The return_url of this CreateInstanceRequestBody. # noqa: E501 + :rtype: str + """ + return self._return_url + + @return_url.setter + def return_url(self, return_url): + """Sets the return_url of this CreateInstanceRequestBody. + + + :param return_url: The return_url of this CreateInstanceRequestBody. # noqa: E501 + :type: str + """ + + self._return_url = return_url + + @property + def expiration_offset(self): + """Gets the expiration_offset of this CreateInstanceRequestBody. # noqa: E501 + + + :return: The expiration_offset of this CreateInstanceRequestBody. # noqa: E501 + :rtype: int + """ + return self._expiration_offset + + @expiration_offset.setter + def expiration_offset(self, expiration_offset): + """Sets the expiration_offset of this CreateInstanceRequestBody. + + + :param expiration_offset: The expiration_offset of this CreateInstanceRequestBody. # noqa: E501 + :type: int + """ + + self._expiration_offset = expiration_offset + + @property + def tags(self): + """Gets the tags of this CreateInstanceRequestBody. # noqa: E501 + + List of tags provided by the user with each request. This field is optional. # noqa: E501 + + :return: The tags of this CreateInstanceRequestBody. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this CreateInstanceRequestBody. + + List of tags provided by the user with each request. This field is optional. # noqa: E501 + + :param tags: The tags of this CreateInstanceRequestBody. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + 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 + if issubclass(CreateInstanceRequestBody, dict): + for key, value in self.items(): + result[key] = 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, CreateInstanceRequestBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateInstanceRequestBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/created_date_time.py b/docusign_webforms/models/created_date_time.py new file mode 100644 index 0000000..358ae46 --- /dev/null +++ b/docusign_webforms/models/created_date_time.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class CreatedDateTime(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """CreatedDateTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(CreatedDateTime, dict): + for key, value in self.items(): + result[key] = 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, CreatedDateTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatedDateTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/envelope_id.py b/docusign_webforms/models/envelope_id.py new file mode 100644 index 0000000..6fce4ac --- /dev/null +++ b/docusign_webforms/models/envelope_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class EnvelopeId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """EnvelopeId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(EnvelopeId, dict): + for key, value in self.items(): + result[key] = 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, EnvelopeId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EnvelopeId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/expiration_date_time.py b/docusign_webforms/models/expiration_date_time.py new file mode 100644 index 0000000..5dccdd2 --- /dev/null +++ b/docusign_webforms/models/expiration_date_time.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class ExpirationDateTime(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """ExpirationDateTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(ExpirationDateTime, dict): + for key, value in self.items(): + result[key] = 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, ExpirationDateTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExpirationDateTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/expiration_offset.py b/docusign_webforms/models/expiration_offset.py new file mode 100644 index 0000000..af3a082 --- /dev/null +++ b/docusign_webforms/models/expiration_offset.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class ExpirationOffset(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """ExpirationOffset - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(ExpirationOffset, dict): + for key, value in self.items(): + result[key] = 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, ExpirationOffset): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExpirationOffset): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/form_sort_by.py b/docusign_webforms/models/form_sort_by.py new file mode 100644 index 0000000..8d51bc1 --- /dev/null +++ b/docusign_webforms/models/form_sort_by.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class FormSortBy(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """FormSortBy - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(FormSortBy, dict): + for key, value in self.items(): + result[key] = 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, FormSortBy): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FormSortBy): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/form_url.py b/docusign_webforms/models/form_url.py new file mode 100644 index 0000000..8424b2c --- /dev/null +++ b/docusign_webforms/models/form_url.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class FormUrl(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """FormUrl - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(FormUrl, dict): + for key, value in self.items(): + result[key] = 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, FormUrl): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FormUrl): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/guid.py b/docusign_webforms/models/guid.py new file mode 100644 index 0000000..4bd69ff --- /dev/null +++ b/docusign_webforms/models/guid.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class Guid(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """Guid - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(Guid, dict): + for key, value in self.items(): + result[key] = 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, Guid): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Guid): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/http_error.py b/docusign_webforms/models/http_error.py new file mode 100644 index 0000000..0f043e3 --- /dev/null +++ b/docusign_webforms/models/http_error.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class HttpError(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 = { + 'error_code': 'str', + 'message': 'str' + } + + attribute_map = { + 'error_code': 'errorCode', + 'message': 'message' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """HttpError - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._error_code = None + self._message = None + self.discriminator = None + + setattr(self, "_{}".format('error_code'), kwargs.get('error_code', None)) + setattr(self, "_{}".format('message'), kwargs.get('message', None)) + + @property + def error_code(self): + """Gets the error_code of this HttpError. # noqa: E501 + + A granular, human and computer readable code indicating more deeply what error occurred. # noqa: E501 + + :return: The error_code of this HttpError. # noqa: E501 + :rtype: str + """ + return self._error_code + + @error_code.setter + def error_code(self, error_code): + """Sets the error_code of this HttpError. + + A granular, human and computer readable code indicating more deeply what error occurred. # noqa: E501 + + :param error_code: The error_code of this HttpError. # noqa: E501 + :type: str + """ + + self._error_code = error_code + + @property + def message(self): + """Gets the message of this HttpError. # noqa: E501 + + A human-readable description of the error, meant for developers to store for their review. # noqa: E501 + + :return: The message of this HttpError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this HttpError. + + A human-readable description of the error, meant for developers to store for their review. # noqa: E501 + + :param message: The message of this HttpError. # noqa: E501 + :type: str + """ + + self._message = message + + 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 + if issubclass(HttpError, dict): + for key, value in self.items(): + result[key] = 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, HttpError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, HttpError): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/http_success.py b/docusign_webforms/models/http_success.py new file mode 100644 index 0000000..f7e3b4a --- /dev/null +++ b/docusign_webforms/models/http_success.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class HttpSuccess(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' + } + + attribute_map = { + 'status': 'status' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """HttpSuccess - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._status = None + self.discriminator = None + + setattr(self, "_{}".format('status'), kwargs.get('status', None)) + + @property + def status(self): + """Gets the status of this HttpSuccess. # noqa: E501 + + + :return: The status of this HttpSuccess. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this HttpSuccess. + + + :param status: The status of this HttpSuccess. # noqa: E501 + :type: str + """ + + self._status = status + + 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 + if issubclass(HttpSuccess, dict): + for key, value in self.items(): + result[key] = 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, HttpSuccess): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, HttpSuccess): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/instance_id.py b/docusign_webforms/models/instance_id.py new file mode 100644 index 0000000..417cf6a --- /dev/null +++ b/docusign_webforms/models/instance_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class InstanceId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """InstanceId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(InstanceId, dict): + for key, value in self.items(): + result[key] = 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, InstanceId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstanceId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/instance_source.py b/docusign_webforms/models/instance_source.py new file mode 100644 index 0000000..9c4e5ae --- /dev/null +++ b/docusign_webforms/models/instance_source.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class InstanceSource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + PUBLIC_URL = "PUBLIC_URL" + API_EMBEDDED = "API_EMBEDDED" + API_REMOTE = "API_REMOTE" + UI_REMOTE = "UI_REMOTE" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """InstanceSource - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(InstanceSource, dict): + for key, value in self.items(): + result[key] = 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, InstanceSource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstanceSource): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/instance_status.py b/docusign_webforms/models/instance_status.py new file mode 100644 index 0000000..c085d58 --- /dev/null +++ b/docusign_webforms/models/instance_status.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class InstanceStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + INITIATED = "INITIATED" + SUBMITTED = "SUBMITTED" + EXPIRED = "EXPIRED" + FAILED = "FAILED" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """InstanceStatus - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(InstanceStatus, dict): + for key, value in self.items(): + result[key] = 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, InstanceStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstanceStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/instance_token.py b/docusign_webforms/models/instance_token.py new file mode 100644 index 0000000..7fb0027 --- /dev/null +++ b/docusign_webforms/models/instance_token.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class InstanceToken(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """InstanceToken - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(InstanceToken, dict): + for key, value in self.items(): + result[key] = 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, InstanceToken): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstanceToken): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/is_private_access.py b/docusign_webforms/models/is_private_access.py new file mode 100644 index 0000000..c9ec29e --- /dev/null +++ b/docusign_webforms/models/is_private_access.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class IsPrivateAccess(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """IsPrivateAccess - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(IsPrivateAccess, dict): + for key, value in self.items(): + result[key] = 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, IsPrivateAccess): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IsPrivateAccess): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/is_published.py b/docusign_webforms/models/is_published.py new file mode 100644 index 0000000..66d84b9 --- /dev/null +++ b/docusign_webforms/models/is_published.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class IsPublished(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """IsPublished - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(IsPublished, dict): + for key, value in self.items(): + result[key] = 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, IsPublished): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IsPublished): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/is_standalone.py b/docusign_webforms/models/is_standalone.py new file mode 100644 index 0000000..7831812 --- /dev/null +++ b/docusign_webforms/models/is_standalone.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class IsStandalone(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """IsStandalone - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(IsStandalone, dict): + for key, value in self.items(): + result[key] = 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, IsStandalone): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IsStandalone): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/last_modified_date_time.py b/docusign_webforms/models/last_modified_date_time.py new file mode 100644 index 0000000..b2328be --- /dev/null +++ b/docusign_webforms/models/last_modified_date_time.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class LastModifiedDateTime(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """LastModifiedDateTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(LastModifiedDateTime, dict): + for key, value in self.items(): + result[key] = 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, LastModifiedDateTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LastModifiedDateTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/model_date_time.py b/docusign_webforms/models/model_date_time.py new file mode 100644 index 0000000..826f117 --- /dev/null +++ b/docusign_webforms/models/model_date_time.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class ModelDateTime(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """ModelDateTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(ModelDateTime, dict): + for key, value in self.items(): + result[key] = 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, ModelDateTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ModelDateTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/return_url.py b/docusign_webforms/models/return_url.py new file mode 100644 index 0000000..d055fd1 --- /dev/null +++ b/docusign_webforms/models/return_url.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class ReturnUrl(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """ReturnUrl - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(ReturnUrl, dict): + for key, value in self.items(): + result[key] = 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, ReturnUrl): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReturnUrl): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/search_text.py b/docusign_webforms/models/search_text.py new file mode 100644 index 0000000..9cb8583 --- /dev/null +++ b/docusign_webforms/models/search_text.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class SearchText(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """SearchText - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(SearchText, dict): + for key, value in self.items(): + result[key] = 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, SearchText): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SearchText): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/security_domain.py b/docusign_webforms/models/security_domain.py new file mode 100644 index 0000000..06bdfbc --- /dev/null +++ b/docusign_webforms/models/security_domain.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class SecurityDomain(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """SecurityDomain - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(SecurityDomain, dict): + for key, value in self.items(): + result[key] = 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, SecurityDomain): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SecurityDomain): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/source.py b/docusign_webforms/models/source.py new file mode 100644 index 0000000..31e98fe --- /dev/null +++ b/docusign_webforms/models/source.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class Source(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + PUBLIC_URL = "PUBLIC_URL" + API_EMBEDDED = "API_EMBEDDED" + API_REMOTE = "API_REMOTE" + UI_REMOTE = "UI_REMOTE" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """Source - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(Source, dict): + for key, value in self.items(): + result[key] = 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, Source): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Source): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/start_position.py b/docusign_webforms/models/start_position.py new file mode 100644 index 0000000..18edacb --- /dev/null +++ b/docusign_webforms/models/start_position.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class StartPosition(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """StartPosition - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(StartPosition, dict): + for key, value in self.items(): + result[key] = 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, StartPosition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StartPosition): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/tags.py b/docusign_webforms/models/tags.py new file mode 100644 index 0000000..6df3e84 --- /dev/null +++ b/docusign_webforms/models/tags.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class Tags(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """Tags - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(Tags, dict): + for key, value in self.items(): + result[key] = 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, Tags): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Tags): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/template_properties.py b/docusign_webforms/models/template_properties.py new file mode 100644 index 0000000..6faba00 --- /dev/null +++ b/docusign_webforms/models/template_properties.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class TemplateProperties(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 = { + 'original_template_id': 'str', + 'cloned_template_id': 'str', + 'imported_date_time': 'datetime', + 'recipient_ids': 'list[str]' + } + + attribute_map = { + 'original_template_id': 'originalTemplateId', + 'cloned_template_id': 'clonedTemplateId', + 'imported_date_time': 'importedDateTime', + 'recipient_ids': 'recipientIds' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """TemplateProperties - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._original_template_id = None + self._cloned_template_id = None + self._imported_date_time = None + self._recipient_ids = None + self.discriminator = None + + setattr(self, "_{}".format('original_template_id'), kwargs.get('original_template_id', None)) + setattr(self, "_{}".format('cloned_template_id'), kwargs.get('cloned_template_id', None)) + setattr(self, "_{}".format('imported_date_time'), kwargs.get('imported_date_time', None)) + setattr(self, "_{}".format('recipient_ids'), kwargs.get('recipient_ids', None)) + + @property + def original_template_id(self): + """Gets the original_template_id of this TemplateProperties. # noqa: E501 + + Template identifier for original Template that is used by the DocuSign Template API. # noqa: E501 + + :return: The original_template_id of this TemplateProperties. # noqa: E501 + :rtype: str + """ + return self._original_template_id + + @original_template_id.setter + def original_template_id(self, original_template_id): + """Sets the original_template_id of this TemplateProperties. + + Template identifier for original Template that is used by the DocuSign Template API. # noqa: E501 + + :param original_template_id: The original_template_id of this TemplateProperties. # noqa: E501 + :type: str + """ + + self._original_template_id = original_template_id + + @property + def cloned_template_id(self): + """Gets the cloned_template_id of this TemplateProperties. # noqa: E501 + + Template identifier for cloned Template that is used by the DocuSign Template API. # noqa: E501 + + :return: The cloned_template_id of this TemplateProperties. # noqa: E501 + :rtype: str + """ + return self._cloned_template_id + + @cloned_template_id.setter + def cloned_template_id(self, cloned_template_id): + """Sets the cloned_template_id of this TemplateProperties. + + Template identifier for cloned Template that is used by the DocuSign Template API. # noqa: E501 + + :param cloned_template_id: The cloned_template_id of this TemplateProperties. # noqa: E501 + :type: str + """ + + self._cloned_template_id = cloned_template_id + + @property + def imported_date_time(self): + """Gets the imported_date_time of this TemplateProperties. # noqa: E501 + + Track the time of assignment of Template information to the Form. # noqa: E501 + + :return: The imported_date_time of this TemplateProperties. # noqa: E501 + :rtype: datetime + """ + return self._imported_date_time + + @imported_date_time.setter + def imported_date_time(self, imported_date_time): + """Sets the imported_date_time of this TemplateProperties. + + Track the time of assignment of Template information to the Form. # noqa: E501 + + :param imported_date_time: The imported_date_time of this TemplateProperties. # noqa: E501 + :type: datetime + """ + + self._imported_date_time = imported_date_time + + @property + def recipient_ids(self): + """Gets the recipient_ids of this TemplateProperties. # noqa: E501 + + Track mapped recipients on Template. # noqa: E501 + + :return: The recipient_ids of this TemplateProperties. # noqa: E501 + :rtype: list[str] + """ + return self._recipient_ids + + @recipient_ids.setter + def recipient_ids(self, recipient_ids): + """Sets the recipient_ids of this TemplateProperties. + + Track mapped recipients on Template. # noqa: E501 + + :param recipient_ids: The recipient_ids of this TemplateProperties. # noqa: E501 + :type: list[str] + """ + + self._recipient_ids = recipient_ids + + 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 + if issubclass(TemplateProperties, dict): + for key, value in self.items(): + result[key] = 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, TemplateProperties): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TemplateProperties): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/token_expiration_date_time.py b/docusign_webforms/models/token_expiration_date_time.py new file mode 100644 index 0000000..222507d --- /dev/null +++ b/docusign_webforms/models/token_expiration_date_time.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class TokenExpirationDateTime(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """TokenExpirationDateTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(TokenExpirationDateTime, dict): + for key, value in self.items(): + result[key] = 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, TokenExpirationDateTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TokenExpirationDateTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/update_instance_request_body.py b/docusign_webforms/models/update_instance_request_body.py new file mode 100644 index 0000000..21a7ab7 --- /dev/null +++ b/docusign_webforms/models/update_instance_request_body.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class UpdateInstanceRequestBody(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 = { + 'form_values': 'WebFormValues' + } + + attribute_map = { + 'form_values': 'formValues' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """UpdateInstanceRequestBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._form_values = None + self.discriminator = None + + setattr(self, "_{}".format('form_values'), kwargs.get('form_values', None)) + + @property + def form_values(self): + """Gets the form_values of this UpdateInstanceRequestBody. # noqa: E501 + + + :return: The form_values of this UpdateInstanceRequestBody. # noqa: E501 + :rtype: WebFormValues + """ + return self._form_values + + @form_values.setter + def form_values(self, form_values): + """Sets the form_values of this UpdateInstanceRequestBody. + + + :param form_values: The form_values of this UpdateInstanceRequestBody. # noqa: E501 + :type: WebFormValues + """ + + self._form_values = form_values + + 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 + if issubclass(UpdateInstanceRequestBody, dict): + for key, value in self.items(): + result[key] = 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, UpdateInstanceRequestBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateInstanceRequestBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/user_filter.py b/docusign_webforms/models/user_filter.py new file mode 100644 index 0000000..51c37cb --- /dev/null +++ b/docusign_webforms/models/user_filter.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class UserFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + OWNED_BY_ME = "owned_by_me" + SHARED_WITH_ME = "shared_with_me" + ALL = "all" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """UserFilter - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(UserFilter, dict): + for key, value in self.items(): + result[key] = 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, UserFilter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserFilter): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/user_id.py b/docusign_webforms/models/user_id.py new file mode 100644 index 0000000..1b35067 --- /dev/null +++ b/docusign_webforms/models/user_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class UserId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """UserId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(UserId, dict): + for key, value in self.items(): + result[key] = 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, UserId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form.py b/docusign_webforms/models/web_form.py new file mode 100644 index 0000000..7b0f3c7 --- /dev/null +++ b/docusign_webforms/models/web_form.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.models.web_form_summary import WebFormSummary # noqa: F401,E501 +from docusign_webforms.client.configuration import Configuration + + +class WebForm(WebFormSummary): + """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 = { + 'version_id': 'int', + 'form_content': 'WebFormContent' + } + if hasattr(WebFormSummary, "swagger_types"): + swagger_types.update(WebFormSummary.swagger_types) + + attribute_map = { + 'version_id': 'versionId', + 'form_content': 'formContent' + } + if hasattr(WebFormSummary, "attribute_map"): + attribute_map.update(WebFormSummary.attribute_map) + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebForm - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._version_id = None + self._form_content = None + self.discriminator = None + WebFormSummary.__init__(self, _configuration, **kwargs) + + setattr(self, "_{}".format('version_id'), kwargs.get('version_id', None)) + setattr(self, "_{}".format('form_content'), kwargs.get('form_content', None)) + + @property + def version_id(self): + """Gets the version_id of this WebForm. # noqa: E501 + + + :return: The version_id of this WebForm. # noqa: E501 + :rtype: int + """ + return self._version_id + + @version_id.setter + def version_id(self, version_id): + """Sets the version_id of this WebForm. + + + :param version_id: The version_id of this WebForm. # noqa: E501 + :type: int + """ + + self._version_id = version_id + + @property + def form_content(self): + """Gets the form_content of this WebForm. # noqa: E501 + + + :return: The form_content of this WebForm. # noqa: E501 + :rtype: WebFormContent + """ + return self._form_content + + @form_content.setter + def form_content(self, form_content): + """Sets the form_content of this WebForm. + + + :param form_content: The form_content of this WebForm. # noqa: E501 + :type: WebFormContent + """ + + self._form_content = form_content + + 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 + if issubclass(WebForm, dict): + for key, value in self.items(): + result[key] = 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, WebForm): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebForm): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_adm_type.py b/docusign_webforms/models/web_form_adm_type.py new file mode 100644 index 0000000..c2d3c33 --- /dev/null +++ b/docusign_webforms/models/web_form_adm_type.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormAdmType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + STRING = "String" + BOOLEAN = "Boolean" + DOUBLE = "Double" + DATETIME = "DateTime" + ARRAYOFSTRING = "ArrayOfString" + CHECKBOXGROUP = "CheckboxGroup" + DATE = "Date" + EMAIL = "Email" + NUMBER = "Number" + RADIOBUTTONGROUP = "RadioButtonGroup" + SELECT = "Select" + TEXTBOX = "TextBox" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormAdmType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormAdmType, dict): + for key, value in self.items(): + result[key] = 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, WebFormAdmType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormAdmType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_component.py b/docusign_webforms/models/web_form_component.py new file mode 100644 index 0000000..0719d93 --- /dev/null +++ b/docusign_webforms/models/web_form_component.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormComponent(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 = { + 'component_key': 'str', + 'component_type': 'str', + 'component_name': 'str' + } + + attribute_map = { + 'component_key': 'componentKey', + 'component_type': 'componentType', + 'component_name': 'componentName' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormComponent - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._component_key = None + self._component_type = None + self._component_name = None + self.discriminator = None + + setattr(self, "_{}".format('component_key'), kwargs.get('component_key', None)) + setattr(self, "_{}".format('component_type'), kwargs.get('component_type', None)) + setattr(self, "_{}".format('component_name'), kwargs.get('component_name', None)) + + @property + def component_key(self): + """Gets the component_key of this WebFormComponent. # noqa: E501 + + + :return: The component_key of this WebFormComponent. # noqa: E501 + :rtype: str + """ + return self._component_key + + @component_key.setter + def component_key(self, component_key): + """Sets the component_key of this WebFormComponent. + + + :param component_key: The component_key of this WebFormComponent. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and component_key is None: + raise ValueError("Invalid value for `component_key`, must not be `None`") # noqa: E501 + + self._component_key = component_key + + @property + def component_type(self): + """Gets the component_type of this WebFormComponent. # noqa: E501 + + The type of component this object represents # noqa: E501 + + :return: The component_type of this WebFormComponent. # noqa: E501 + :rtype: str + """ + return self._component_type + + @component_type.setter + def component_type(self, component_type): + """Sets the component_type of this WebFormComponent. + + The type of component this object represents # noqa: E501 + + :param component_type: The component_type of this WebFormComponent. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and component_type is None: + raise ValueError("Invalid value for `component_type`, must not be `None`") # noqa: E501 + if (self._configuration.client_side_validation and + component_type is not None and len(component_type) > 100): + raise ValueError("Invalid value for `component_type`, length must be less than or equal to `100`") # noqa: E501 + + self._component_type = component_type + + @property + def component_name(self): + """Gets the component_name of this WebFormComponent. # noqa: E501 + + Name value that is used for mapping components to external sources # noqa: E501 + + :return: The component_name of this WebFormComponent. # noqa: E501 + :rtype: str + """ + return self._component_name + + @component_name.setter + def component_name(self, component_name): + """Sets the component_name of this WebFormComponent. + + Name value that is used for mapping components to external sources # noqa: E501 + + :param component_name: The component_name of this WebFormComponent. # noqa: E501 + :type: str + """ + if (self._configuration.client_side_validation and + component_name is not None and len(component_name) > 100): + raise ValueError("Invalid value for `component_name`, length must be less than or equal to `100`") # noqa: E501 + + self._component_name = component_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 + if issubclass(WebFormComponent, dict): + for key, value in self.items(): + result[key] = 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, WebFormComponent): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormComponent): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_component_type.py b/docusign_webforms/models/web_form_component_type.py new file mode 100644 index 0000000..6519cf6 --- /dev/null +++ b/docusign_webforms/models/web_form_component_type.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormComponentType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + CHECKBOXGROUP = "CheckboxGroup" + DATE = "Date" + EMAIL = "Email" + NUMBER = "Number" + RADIOBUTTONGROUP = "RadioButtonGroup" + SELECT = "Select" + TEXTBOX = "TextBox" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormComponentType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormComponentType, dict): + for key, value in self.items(): + result[key] = 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, WebFormComponentType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormComponentType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_components_map.py b/docusign_webforms/models/web_form_components_map.py new file mode 100644 index 0000000..c342e9e --- /dev/null +++ b/docusign_webforms/models/web_form_components_map.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormComponentsMap(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormComponentsMap - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormComponentsMap, dict): + for key, value in self.items(): + result[key] = 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, WebFormComponentsMap): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormComponentsMap): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_content.py b/docusign_webforms/models/web_form_content.py new file mode 100644 index 0000000..26d1dfa --- /dev/null +++ b/docusign_webforms/models/web_form_content.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormContent(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 = { + 'components': 'dict(str, dict(str, object))', + 'is_standalone': 'bool', + 'brand_id': 'str', + 'templates': 'list[TemplateProperties]' + } + + attribute_map = { + 'components': 'components', + 'is_standalone': 'isStandalone', + 'brand_id': 'brandId', + 'templates': 'templates' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormContent - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._components = None + self._is_standalone = None + self._brand_id = None + self._templates = None + self.discriminator = None + + setattr(self, "_{}".format('components'), kwargs.get('components', None)) + setattr(self, "_{}".format('is_standalone'), kwargs.get('is_standalone', None)) + setattr(self, "_{}".format('brand_id'), kwargs.get('brand_id', None)) + setattr(self, "_{}".format('templates'), kwargs.get('templates', None)) + + @property + def components(self): + """Gets the components of this WebFormContent. # noqa: E501 + + Key/value dictionary of components that represent the form # noqa: E501 + + :return: The components of this WebFormContent. # noqa: E501 + :rtype: dict(str, dict(str, object)) + """ + return self._components + + @components.setter + def components(self, components): + """Sets the components of this WebFormContent. + + Key/value dictionary of components that represent the form # noqa: E501 + + :param components: The components of this WebFormContent. # noqa: E501 + :type: dict(str, dict(str, object)) + """ + + self._components = components + + @property + def is_standalone(self): + """Gets the is_standalone of this WebFormContent. # noqa: E501 + + + :return: The is_standalone of this WebFormContent. # noqa: E501 + :rtype: bool + """ + return self._is_standalone + + @is_standalone.setter + def is_standalone(self, is_standalone): + """Sets the is_standalone of this WebFormContent. + + + :param is_standalone: The is_standalone of this WebFormContent. # noqa: E501 + :type: bool + """ + + self._is_standalone = is_standalone + + @property + def brand_id(self): + """Gets the brand_id of this WebFormContent. # noqa: E501 + + + :return: The brand_id of this WebFormContent. # noqa: E501 + :rtype: str + """ + return self._brand_id + + @brand_id.setter + def brand_id(self, brand_id): + """Sets the brand_id of this WebFormContent. + + + :param brand_id: The brand_id of this WebFormContent. # noqa: E501 + :type: str + """ + + self._brand_id = brand_id + + @property + def templates(self): + """Gets the templates of this WebFormContent. # noqa: E501 + + Optional template information that will be used to seed the form. # noqa: E501 + + :return: The templates of this WebFormContent. # noqa: E501 + :rtype: list[TemplateProperties] + """ + return self._templates + + @templates.setter + def templates(self, templates): + """Sets the templates of this WebFormContent. + + Optional template information that will be used to seed the form. # noqa: E501 + + :param templates: The templates of this WebFormContent. # noqa: E501 + :type: list[TemplateProperties] + """ + + self._templates = templates + + 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 + if issubclass(WebFormContent, dict): + for key, value in self.items(): + result[key] = 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, WebFormContent): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormContent): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_id.py b/docusign_webforms/models/web_form_id.py new file mode 100644 index 0000000..5d911ae --- /dev/null +++ b/docusign_webforms/models/web_form_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormId, dict): + for key, value in self.items(): + result[key] = 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, WebFormId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_instance.py b/docusign_webforms/models/web_form_instance.py new file mode 100644 index 0000000..8a927e4 --- /dev/null +++ b/docusign_webforms/models/web_form_instance.py @@ -0,0 +1,405 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormInstance(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 = { + 'form_url': 'str', + 'instance_token': 'str', + 'token_expiration_date_time': 'datetime', + 'id': 'str', + 'form_id': 'str', + 'account_id': 'str', + 'client_user_id': 'str', + 'tags': 'list[str]', + 'status': 'InstanceStatus', + 'envelopes': 'list[WebFormInstanceEnvelopes]', + 'instance_metadata': 'WebFormInstanceMetadata', + 'form_values': 'WebFormValues' + } + + attribute_map = { + 'form_url': 'formUrl', + 'instance_token': 'instanceToken', + 'token_expiration_date_time': 'tokenExpirationDateTime', + 'id': 'id', + 'form_id': 'formId', + 'account_id': 'accountId', + 'client_user_id': 'clientUserId', + 'tags': 'tags', + 'status': 'status', + 'envelopes': 'envelopes', + 'instance_metadata': 'instanceMetadata', + 'form_values': 'formValues' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormInstance - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._form_url = None + self._instance_token = None + self._token_expiration_date_time = None + self._id = None + self._form_id = None + self._account_id = None + self._client_user_id = None + self._tags = None + self._status = None + self._envelopes = None + self._instance_metadata = None + self._form_values = None + self.discriminator = None + + setattr(self, "_{}".format('form_url'), kwargs.get('form_url', None)) + setattr(self, "_{}".format('instance_token'), kwargs.get('instance_token', None)) + setattr(self, "_{}".format('token_expiration_date_time'), kwargs.get('token_expiration_date_time', None)) + setattr(self, "_{}".format('id'), kwargs.get('id', None)) + setattr(self, "_{}".format('form_id'), kwargs.get('form_id', None)) + setattr(self, "_{}".format('account_id'), kwargs.get('account_id', None)) + setattr(self, "_{}".format('client_user_id'), kwargs.get('client_user_id', None)) + setattr(self, "_{}".format('tags'), kwargs.get('tags', None)) + setattr(self, "_{}".format('status'), kwargs.get('status', None)) + setattr(self, "_{}".format('envelopes'), kwargs.get('envelopes', None)) + setattr(self, "_{}".format('instance_metadata'), kwargs.get('instance_metadata', None)) + setattr(self, "_{}".format('form_values'), kwargs.get('form_values', None)) + + @property + def form_url(self): + """Gets the form_url of this WebFormInstance. # noqa: E501 + + + :return: The form_url of this WebFormInstance. # noqa: E501 + :rtype: str + """ + return self._form_url + + @form_url.setter + def form_url(self, form_url): + """Sets the form_url of this WebFormInstance. + + + :param form_url: The form_url of this WebFormInstance. # noqa: E501 + :type: str + """ + + self._form_url = form_url + + @property + def instance_token(self): + """Gets the instance_token of this WebFormInstance. # noqa: E501 + + + :return: The instance_token of this WebFormInstance. # noqa: E501 + :rtype: str + """ + return self._instance_token + + @instance_token.setter + def instance_token(self, instance_token): + """Sets the instance_token of this WebFormInstance. + + + :param instance_token: The instance_token of this WebFormInstance. # noqa: E501 + :type: str + """ + + self._instance_token = instance_token + + @property + def token_expiration_date_time(self): + """Gets the token_expiration_date_time of this WebFormInstance. # noqa: E501 + + + :return: The token_expiration_date_time of this WebFormInstance. # noqa: E501 + :rtype: datetime + """ + return self._token_expiration_date_time + + @token_expiration_date_time.setter + def token_expiration_date_time(self, token_expiration_date_time): + """Sets the token_expiration_date_time of this WebFormInstance. + + + :param token_expiration_date_time: The token_expiration_date_time of this WebFormInstance. # noqa: E501 + :type: datetime + """ + + self._token_expiration_date_time = token_expiration_date_time + + @property + def id(self): + """Gets the id of this WebFormInstance. # noqa: E501 + + + :return: The id of this WebFormInstance. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebFormInstance. + + + :param id: The id of this WebFormInstance. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def form_id(self): + """Gets the form_id of this WebFormInstance. # noqa: E501 + + Web form from which the instance is created # noqa: E501 + + :return: The form_id of this WebFormInstance. # noqa: E501 + :rtype: str + """ + return self._form_id + + @form_id.setter + def form_id(self, form_id): + """Sets the form_id of this WebFormInstance. + + Web form from which the instance is created # noqa: E501 + + :param form_id: The form_id of this WebFormInstance. # noqa: E501 + :type: str + """ + + self._form_id = form_id + + @property + def account_id(self): + """Gets the account_id of this WebFormInstance. # noqa: E501 + + + :return: The account_id of this WebFormInstance. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this WebFormInstance. + + + :param account_id: The account_id of this WebFormInstance. # noqa: E501 + :type: str + """ + + self._account_id = account_id + + @property + def client_user_id(self): + """Gets the client_user_id of this WebFormInstance. # noqa: E501 + + + :return: The client_user_id of this WebFormInstance. # noqa: E501 + :rtype: str + """ + return self._client_user_id + + @client_user_id.setter + def client_user_id(self, client_user_id): + """Sets the client_user_id of this WebFormInstance. + + + :param client_user_id: The client_user_id of this WebFormInstance. # noqa: E501 + :type: str + """ + + self._client_user_id = client_user_id + + @property + def tags(self): + """Gets the tags of this WebFormInstance. # noqa: E501 + + List of tags provided by the user with each request. This field is optional. # noqa: E501 + + :return: The tags of this WebFormInstance. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this WebFormInstance. + + List of tags provided by the user with each request. This field is optional. # noqa: E501 + + :param tags: The tags of this WebFormInstance. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def status(self): + """Gets the status of this WebFormInstance. # noqa: E501 + + + :return: The status of this WebFormInstance. # noqa: E501 + :rtype: InstanceStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this WebFormInstance. + + + :param status: The status of this WebFormInstance. # noqa: E501 + :type: InstanceStatus + """ + + self._status = status + + @property + def envelopes(self): + """Gets the envelopes of this WebFormInstance. # noqa: E501 + + The associated envelope that is created when the instance is submitted # noqa: E501 + + :return: The envelopes of this WebFormInstance. # noqa: E501 + :rtype: list[WebFormInstanceEnvelopes] + """ + return self._envelopes + + @envelopes.setter + def envelopes(self, envelopes): + """Sets the envelopes of this WebFormInstance. + + The associated envelope that is created when the instance is submitted # noqa: E501 + + :param envelopes: The envelopes of this WebFormInstance. # noqa: E501 + :type: list[WebFormInstanceEnvelopes] + """ + + self._envelopes = envelopes + + @property + def instance_metadata(self): + """Gets the instance_metadata of this WebFormInstance. # noqa: E501 + + + :return: The instance_metadata of this WebFormInstance. # noqa: E501 + :rtype: WebFormInstanceMetadata + """ + return self._instance_metadata + + @instance_metadata.setter + def instance_metadata(self, instance_metadata): + """Sets the instance_metadata of this WebFormInstance. + + + :param instance_metadata: The instance_metadata of this WebFormInstance. # noqa: E501 + :type: WebFormInstanceMetadata + """ + + self._instance_metadata = instance_metadata + + @property + def form_values(self): + """Gets the form_values of this WebFormInstance. # noqa: E501 + + + :return: The form_values of this WebFormInstance. # noqa: E501 + :rtype: WebFormValues + """ + return self._form_values + + @form_values.setter + def form_values(self, form_values): + """Sets the form_values of this WebFormInstance. + + + :param form_values: The form_values of this WebFormInstance. # noqa: E501 + :type: WebFormValues + """ + + self._form_values = form_values + + 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 + if issubclass(WebFormInstance, dict): + for key, value in self.items(): + result[key] = 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, WebFormInstance): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormInstance): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_instance_envelopes.py b/docusign_webforms/models/web_form_instance_envelopes.py new file mode 100644 index 0000000..72f2709 --- /dev/null +++ b/docusign_webforms/models/web_form_instance_envelopes.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormInstanceEnvelopes(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 = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormInstanceEnvelopes - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self.discriminator = None + + setattr(self, "_{}".format('id'), kwargs.get('id', None)) + + @property + def id(self): + """Gets the id of this WebFormInstanceEnvelopes. # noqa: E501 + + + :return: The id of this WebFormInstanceEnvelopes. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebFormInstanceEnvelopes. + + + :param id: The id of this WebFormInstanceEnvelopes. # noqa: E501 + :type: str + """ + + self._id = 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 + if issubclass(WebFormInstanceEnvelopes, dict): + for key, value in self.items(): + result[key] = 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, WebFormInstanceEnvelopes): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormInstanceEnvelopes): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_instance_list.py b/docusign_webforms/models/web_form_instance_list.py new file mode 100644 index 0000000..9ea861b --- /dev/null +++ b/docusign_webforms/models/web_form_instance_list.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormInstanceList(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 = { + 'items': 'list[WebFormInstance]' + } + + attribute_map = { + 'items': 'items' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormInstanceList - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._items = None + self.discriminator = None + + setattr(self, "_{}".format('items'), kwargs.get('items', None)) + + @property + def items(self): + """Gets the items of this WebFormInstanceList. # noqa: E501 + + Array of web form instance items. # noqa: E501 + + :return: The items of this WebFormInstanceList. # noqa: E501 + :rtype: list[WebFormInstance] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this WebFormInstanceList. + + Array of web form instance items. # noqa: E501 + + :param items: The items of this WebFormInstanceList. # noqa: E501 + :type: list[WebFormInstance] + """ + + self._items = items + + 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 + if issubclass(WebFormInstanceList, dict): + for key, value in self.items(): + result[key] = 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, WebFormInstanceList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormInstanceList): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_instance_metadata.py b/docusign_webforms/models/web_form_instance_metadata.py new file mode 100644 index 0000000..16ff58e --- /dev/null +++ b/docusign_webforms/models/web_form_instance_metadata.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormInstanceMetadata(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 = { + 'expiration_date_time': 'datetime', + 'created_date_time': 'datetime', + 'created_by': 'WebFormUserInfo', + 'last_modified_date_time': 'str', + 'last_modified_by': 'WebFormUserInfo' + } + + attribute_map = { + 'expiration_date_time': 'expirationDateTime', + 'created_date_time': 'createdDateTime', + 'created_by': 'createdBy', + 'last_modified_date_time': 'lastModifiedDateTime', + 'last_modified_by': 'lastModifiedBy' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormInstanceMetadata - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._expiration_date_time = None + self._created_date_time = None + self._created_by = None + self._last_modified_date_time = None + self._last_modified_by = None + self.discriminator = None + + setattr(self, "_{}".format('expiration_date_time'), kwargs.get('expiration_date_time', None)) + setattr(self, "_{}".format('created_date_time'), kwargs.get('created_date_time', None)) + setattr(self, "_{}".format('created_by'), kwargs.get('created_by', None)) + setattr(self, "_{}".format('last_modified_date_time'), kwargs.get('last_modified_date_time', None)) + setattr(self, "_{}".format('last_modified_by'), kwargs.get('last_modified_by', None)) + + @property + def expiration_date_time(self): + """Gets the expiration_date_time of this WebFormInstanceMetadata. # noqa: E501 + + + :return: The expiration_date_time of this WebFormInstanceMetadata. # noqa: E501 + :rtype: datetime + """ + return self._expiration_date_time + + @expiration_date_time.setter + def expiration_date_time(self, expiration_date_time): + """Sets the expiration_date_time of this WebFormInstanceMetadata. + + + :param expiration_date_time: The expiration_date_time of this WebFormInstanceMetadata. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and expiration_date_time is None: + raise ValueError("Invalid value for `expiration_date_time`, must not be `None`") # noqa: E501 + + self._expiration_date_time = expiration_date_time + + @property + def created_date_time(self): + """Gets the created_date_time of this WebFormInstanceMetadata. # noqa: E501 + + + :return: The created_date_time of this WebFormInstanceMetadata. # noqa: E501 + :rtype: datetime + """ + return self._created_date_time + + @created_date_time.setter + def created_date_time(self, created_date_time): + """Sets the created_date_time of this WebFormInstanceMetadata. + + + :param created_date_time: The created_date_time of this WebFormInstanceMetadata. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and created_date_time is None: + raise ValueError("Invalid value for `created_date_time`, must not be `None`") # noqa: E501 + + self._created_date_time = created_date_time + + @property + def created_by(self): + """Gets the created_by of this WebFormInstanceMetadata. # noqa: E501 + + The user that created the Web Form Instance # noqa: E501 + + :return: The created_by of this WebFormInstanceMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """Sets the created_by of this WebFormInstanceMetadata. + + The user that created the Web Form Instance # noqa: E501 + + :param created_by: The created_by of this WebFormInstanceMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + if self._configuration.client_side_validation and created_by is None: + raise ValueError("Invalid value for `created_by`, must not be `None`") # noqa: E501 + + self._created_by = created_by + + @property + def last_modified_date_time(self): + """Gets the last_modified_date_time of this WebFormInstanceMetadata. # noqa: E501 + + + :return: The last_modified_date_time of this WebFormInstanceMetadata. # noqa: E501 + :rtype: str + """ + return self._last_modified_date_time + + @last_modified_date_time.setter + def last_modified_date_time(self, last_modified_date_time): + """Sets the last_modified_date_time of this WebFormInstanceMetadata. + + + :param last_modified_date_time: The last_modified_date_time of this WebFormInstanceMetadata. # noqa: E501 + :type: str + """ + + self._last_modified_date_time = last_modified_date_time + + @property + def last_modified_by(self): + """Gets the last_modified_by of this WebFormInstanceMetadata. # noqa: E501 + + The user that last modified the Web Form Instance # noqa: E501 + + :return: The last_modified_by of this WebFormInstanceMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._last_modified_by + + @last_modified_by.setter + def last_modified_by(self, last_modified_by): + """Sets the last_modified_by of this WebFormInstanceMetadata. + + The user that last modified the Web Form Instance # noqa: E501 + + :param last_modified_by: The last_modified_by of this WebFormInstanceMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._last_modified_by = last_modified_by + + 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 + if issubclass(WebFormInstanceMetadata, dict): + for key, value in self.items(): + result[key] = 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, WebFormInstanceMetadata): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormInstanceMetadata): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_metadata.py b/docusign_webforms/models/web_form_metadata.py new file mode 100644 index 0000000..ad50589 --- /dev/null +++ b/docusign_webforms/models/web_form_metadata.py @@ -0,0 +1,637 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormMetadata(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 = { + 'source': 'WebFormSource', + 'owner': 'WebFormUserInfo', + 'sender': 'WebFormUserInfo', + 'last_modified_by': 'WebFormUserInfo', + 'form_content_modified_by': 'WebFormUserInfo', + 'form_properties_modified_by': 'WebFormUserInfo', + 'last_published_by': 'WebFormUserInfo', + 'last_enabled_by': 'WebFormUserInfo', + 'last_disabled_by': 'WebFormUserInfo', + 'archived_date_time': 'datetime', + 'created_date_time': 'datetime', + 'last_modified_date_time': 'datetime', + 'form_content_modified_date_time': 'datetime', + 'form_properties_modified_date_time': 'datetime', + 'last_published_date_time': 'datetime', + 'last_enabled_date_time': 'datetime', + 'last_disabled_date_time': 'datetime', + 'last_sender_consent_date_time': 'datetime', + 'published_slug': 'str', + 'published_component_names': 'dict(str, WebFormComponentType)' + } + + attribute_map = { + 'source': 'source', + 'owner': 'owner', + 'sender': 'sender', + 'last_modified_by': 'lastModifiedBy', + 'form_content_modified_by': 'formContentModifiedBy', + 'form_properties_modified_by': 'formPropertiesModifiedBy', + 'last_published_by': 'lastPublishedBy', + 'last_enabled_by': 'lastEnabledBy', + 'last_disabled_by': 'lastDisabledBy', + 'archived_date_time': 'archivedDateTime', + 'created_date_time': 'createdDateTime', + 'last_modified_date_time': 'lastModifiedDateTime', + 'form_content_modified_date_time': 'formContentModifiedDateTime', + 'form_properties_modified_date_time': 'formPropertiesModifiedDateTime', + 'last_published_date_time': 'lastPublishedDateTime', + 'last_enabled_date_time': 'lastEnabledDateTime', + 'last_disabled_date_time': 'lastDisabledDateTime', + 'last_sender_consent_date_time': 'lastSenderConsentDateTime', + 'published_slug': 'publishedSlug', + 'published_component_names': 'publishedComponentNames' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormMetadata - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._source = None + self._owner = None + self._sender = None + self._last_modified_by = None + self._form_content_modified_by = None + self._form_properties_modified_by = None + self._last_published_by = None + self._last_enabled_by = None + self._last_disabled_by = None + self._archived_date_time = None + self._created_date_time = None + self._last_modified_date_time = None + self._form_content_modified_date_time = None + self._form_properties_modified_date_time = None + self._last_published_date_time = None + self._last_enabled_date_time = None + self._last_disabled_date_time = None + self._last_sender_consent_date_time = None + self._published_slug = None + self._published_component_names = None + self.discriminator = None + + setattr(self, "_{}".format('source'), kwargs.get('source', None)) + setattr(self, "_{}".format('owner'), kwargs.get('owner', None)) + setattr(self, "_{}".format('sender'), kwargs.get('sender', None)) + setattr(self, "_{}".format('last_modified_by'), kwargs.get('last_modified_by', None)) + setattr(self, "_{}".format('form_content_modified_by'), kwargs.get('form_content_modified_by', None)) + setattr(self, "_{}".format('form_properties_modified_by'), kwargs.get('form_properties_modified_by', None)) + setattr(self, "_{}".format('last_published_by'), kwargs.get('last_published_by', None)) + setattr(self, "_{}".format('last_enabled_by'), kwargs.get('last_enabled_by', None)) + setattr(self, "_{}".format('last_disabled_by'), kwargs.get('last_disabled_by', None)) + setattr(self, "_{}".format('archived_date_time'), kwargs.get('archived_date_time', None)) + setattr(self, "_{}".format('created_date_time'), kwargs.get('created_date_time', None)) + setattr(self, "_{}".format('last_modified_date_time'), kwargs.get('last_modified_date_time', None)) + setattr(self, "_{}".format('form_content_modified_date_time'), kwargs.get('form_content_modified_date_time', None)) + setattr(self, "_{}".format('form_properties_modified_date_time'), kwargs.get('form_properties_modified_date_time', None)) + setattr(self, "_{}".format('last_published_date_time'), kwargs.get('last_published_date_time', None)) + setattr(self, "_{}".format('last_enabled_date_time'), kwargs.get('last_enabled_date_time', None)) + setattr(self, "_{}".format('last_disabled_date_time'), kwargs.get('last_disabled_date_time', None)) + setattr(self, "_{}".format('last_sender_consent_date_time'), kwargs.get('last_sender_consent_date_time', None)) + setattr(self, "_{}".format('published_slug'), kwargs.get('published_slug', None)) + setattr(self, "_{}".format('published_component_names'), kwargs.get('published_component_names', None)) + + @property + def source(self): + """Gets the source of this WebFormMetadata. # noqa: E501 + + The source from which the webform is created. Accepted values are [upload, templates, blank] # noqa: E501 + + :return: The source of this WebFormMetadata. # noqa: E501 + :rtype: WebFormSource + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this WebFormMetadata. + + The source from which the webform is created. Accepted values are [upload, templates, blank] # noqa: E501 + + :param source: The source of this WebFormMetadata. # noqa: E501 + :type: WebFormSource + """ + + self._source = source + + @property + def owner(self): + """Gets the owner of this WebFormMetadata. # noqa: E501 + + The user that created the form or has been transferred ownership # noqa: E501 + + :return: The owner of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this WebFormMetadata. + + The user that created the form or has been transferred ownership # noqa: E501 + + :param owner: The owner of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._owner = owner + + @property + def sender(self): + """Gets the sender of this WebFormMetadata. # noqa: E501 + + The user that has added their consent to the form for sending actions # noqa: E501 + + :return: The sender of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this WebFormMetadata. + + The user that has added their consent to the form for sending actions # noqa: E501 + + :param sender: The sender of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._sender = sender + + @property + def last_modified_by(self): + """Gets the last_modified_by of this WebFormMetadata. # noqa: E501 + + Track the user that last modified anything related to the form # noqa: E501 + + :return: The last_modified_by of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._last_modified_by + + @last_modified_by.setter + def last_modified_by(self, last_modified_by): + """Sets the last_modified_by of this WebFormMetadata. + + Track the user that last modified anything related to the form # noqa: E501 + + :param last_modified_by: The last_modified_by of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._last_modified_by = last_modified_by + + @property + def form_content_modified_by(self): + """Gets the form_content_modified_by of this WebFormMetadata. # noqa: E501 + + Track the user that last modified the form content # noqa: E501 + + :return: The form_content_modified_by of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._form_content_modified_by + + @form_content_modified_by.setter + def form_content_modified_by(self, form_content_modified_by): + """Sets the form_content_modified_by of this WebFormMetadata. + + Track the user that last modified the form content # noqa: E501 + + :param form_content_modified_by: The form_content_modified_by of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._form_content_modified_by = form_content_modified_by + + @property + def form_properties_modified_by(self): + """Gets the form_properties_modified_by of this WebFormMetadata. # noqa: E501 + + Track the user that last modified the form properties # noqa: E501 + + :return: The form_properties_modified_by of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._form_properties_modified_by + + @form_properties_modified_by.setter + def form_properties_modified_by(self, form_properties_modified_by): + """Sets the form_properties_modified_by of this WebFormMetadata. + + Track the user that last modified the form properties # noqa: E501 + + :param form_properties_modified_by: The form_properties_modified_by of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._form_properties_modified_by = form_properties_modified_by + + @property + def last_published_by(self): + """Gets the last_published_by of this WebFormMetadata. # noqa: E501 + + Track the user that last published a draft version to active # noqa: E501 + + :return: The last_published_by of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._last_published_by + + @last_published_by.setter + def last_published_by(self, last_published_by): + """Sets the last_published_by of this WebFormMetadata. + + Track the user that last published a draft version to active # noqa: E501 + + :param last_published_by: The last_published_by of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._last_published_by = last_published_by + + @property + def last_enabled_by(self): + """Gets the last_enabled_by of this WebFormMetadata. # noqa: E501 + + Track the user that last unpublished an active version # noqa: E501 + + :return: The last_enabled_by of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._last_enabled_by + + @last_enabled_by.setter + def last_enabled_by(self, last_enabled_by): + """Sets the last_enabled_by of this WebFormMetadata. + + Track the user that last unpublished an active version # noqa: E501 + + :param last_enabled_by: The last_enabled_by of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._last_enabled_by = last_enabled_by + + @property + def last_disabled_by(self): + """Gets the last_disabled_by of this WebFormMetadata. # noqa: E501 + + Track the user that last unpublished an active version # noqa: E501 + + :return: The last_disabled_by of this WebFormMetadata. # noqa: E501 + :rtype: WebFormUserInfo + """ + return self._last_disabled_by + + @last_disabled_by.setter + def last_disabled_by(self, last_disabled_by): + """Sets the last_disabled_by of this WebFormMetadata. + + Track the user that last unpublished an active version # noqa: E501 + + :param last_disabled_by: The last_disabled_by of this WebFormMetadata. # noqa: E501 + :type: WebFormUserInfo + """ + + self._last_disabled_by = last_disabled_by + + @property + def archived_date_time(self): + """Gets the archived_date_time of this WebFormMetadata. # noqa: E501 + + The last time the web form was archived # noqa: E501 + + :return: The archived_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._archived_date_time + + @archived_date_time.setter + def archived_date_time(self, archived_date_time): + """Sets the archived_date_time of this WebFormMetadata. + + The last time the web form was archived # noqa: E501 + + :param archived_date_time: The archived_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._archived_date_time = archived_date_time + + @property + def created_date_time(self): + """Gets the created_date_time of this WebFormMetadata. # noqa: E501 + + Track the time the web form was created # noqa: E501 + + :return: The created_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._created_date_time + + @created_date_time.setter + def created_date_time(self, created_date_time): + """Sets the created_date_time of this WebFormMetadata. + + Track the time the web form was created # noqa: E501 + + :param created_date_time: The created_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._created_date_time = created_date_time + + @property + def last_modified_date_time(self): + """Gets the last_modified_date_time of this WebFormMetadata. # noqa: E501 + + The last time anything was modified on the form # noqa: E501 + + :return: The last_modified_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._last_modified_date_time + + @last_modified_date_time.setter + def last_modified_date_time(self, last_modified_date_time): + """Sets the last_modified_date_time of this WebFormMetadata. + + The last time anything was modified on the form # noqa: E501 + + :param last_modified_date_time: The last_modified_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._last_modified_date_time = last_modified_date_time + + @property + def form_content_modified_date_time(self): + """Gets the form_content_modified_date_time of this WebFormMetadata. # noqa: E501 + + Track the last time web form content changed. # noqa: E501 + + :return: The form_content_modified_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._form_content_modified_date_time + + @form_content_modified_date_time.setter + def form_content_modified_date_time(self, form_content_modified_date_time): + """Sets the form_content_modified_date_time of this WebFormMetadata. + + Track the last time web form content changed. # noqa: E501 + + :param form_content_modified_date_time: The form_content_modified_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._form_content_modified_date_time = form_content_modified_date_time + + @property + def form_properties_modified_date_time(self): + """Gets the form_properties_modified_date_time of this WebFormMetadata. # noqa: E501 + + Track the last time the form properties changed. # noqa: E501 + + :return: The form_properties_modified_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._form_properties_modified_date_time + + @form_properties_modified_date_time.setter + def form_properties_modified_date_time(self, form_properties_modified_date_time): + """Sets the form_properties_modified_date_time of this WebFormMetadata. + + Track the last time the form properties changed. # noqa: E501 + + :param form_properties_modified_date_time: The form_properties_modified_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._form_properties_modified_date_time = form_properties_modified_date_time + + @property + def last_published_date_time(self): + """Gets the last_published_date_time of this WebFormMetadata. # noqa: E501 + + Track the last time a draft version was published to active # noqa: E501 + + :return: The last_published_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._last_published_date_time + + @last_published_date_time.setter + def last_published_date_time(self, last_published_date_time): + """Sets the last_published_date_time of this WebFormMetadata. + + Track the last time a draft version was published to active # noqa: E501 + + :param last_published_date_time: The last_published_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._last_published_date_time = last_published_date_time + + @property + def last_enabled_date_time(self): + """Gets the last_enabled_date_time of this WebFormMetadata. # noqa: E501 + + Track the last time the form was enabled # noqa: E501 + + :return: The last_enabled_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._last_enabled_date_time + + @last_enabled_date_time.setter + def last_enabled_date_time(self, last_enabled_date_time): + """Sets the last_enabled_date_time of this WebFormMetadata. + + Track the last time the form was enabled # noqa: E501 + + :param last_enabled_date_time: The last_enabled_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._last_enabled_date_time = last_enabled_date_time + + @property + def last_disabled_date_time(self): + """Gets the last_disabled_date_time of this WebFormMetadata. # noqa: E501 + + Track the last time the form was disabled # noqa: E501 + + :return: The last_disabled_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._last_disabled_date_time + + @last_disabled_date_time.setter + def last_disabled_date_time(self, last_disabled_date_time): + """Sets the last_disabled_date_time of this WebFormMetadata. + + Track the last time the form was disabled # noqa: E501 + + :param last_disabled_date_time: The last_disabled_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._last_disabled_date_time = last_disabled_date_time + + @property + def last_sender_consent_date_time(self): + """Gets the last_sender_consent_date_time of this WebFormMetadata. # noqa: E501 + + Track the last time a user added their consent for the form. # noqa: E501 + + :return: The last_sender_consent_date_time of this WebFormMetadata. # noqa: E501 + :rtype: datetime + """ + return self._last_sender_consent_date_time + + @last_sender_consent_date_time.setter + def last_sender_consent_date_time(self, last_sender_consent_date_time): + """Sets the last_sender_consent_date_time of this WebFormMetadata. + + Track the last time a user added their consent for the form. # noqa: E501 + + :param last_sender_consent_date_time: The last_sender_consent_date_time of this WebFormMetadata. # noqa: E501 + :type: datetime + """ + + self._last_sender_consent_date_time = last_sender_consent_date_time + + @property + def published_slug(self): + """Gets the published_slug of this WebFormMetadata. # noqa: E501 + + The public friendly slug that is used to access the form from the player # noqa: E501 + + :return: The published_slug of this WebFormMetadata. # noqa: E501 + :rtype: str + """ + return self._published_slug + + @published_slug.setter + def published_slug(self, published_slug): + """Sets the published_slug of this WebFormMetadata. + + The public friendly slug that is used to access the form from the player # noqa: E501 + + :param published_slug: The published_slug of this WebFormMetadata. # noqa: E501 + :type: str + """ + + self._published_slug = published_slug + + @property + def published_component_names(self): + """Gets the published_component_names of this WebFormMetadata. # noqa: E501 + + A dictionary containing the mapping of component names to their respective component types for all the published components. # noqa: E501 + + :return: The published_component_names of this WebFormMetadata. # noqa: E501 + :rtype: dict(str, WebFormComponentType) + """ + return self._published_component_names + + @published_component_names.setter + def published_component_names(self, published_component_names): + """Sets the published_component_names of this WebFormMetadata. + + A dictionary containing the mapping of component names to their respective component types for all the published components. # noqa: E501 + + :param published_component_names: The published_component_names of this WebFormMetadata. # noqa: E501 + :type: dict(str, WebFormComponentType) + """ + + self._published_component_names = published_component_names + + 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 + if issubclass(WebFormMetadata, dict): + for key, value in self.items(): + result[key] = 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, WebFormMetadata): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormMetadata): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_name.py b/docusign_webforms/models/web_form_name.py new file mode 100644 index 0000000..29adc45 --- /dev/null +++ b/docusign_webforms/models/web_form_name.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormName(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormName - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormName, dict): + for key, value in self.items(): + result[key] = 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, WebFormName): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormName): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_properties.py b/docusign_webforms/models/web_form_properties.py new file mode 100644 index 0000000..96bbea0 --- /dev/null +++ b/docusign_webforms/models/web_form_properties.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormProperties(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', + 'is_private_access': 'bool' + } + + attribute_map = { + 'name': 'name', + 'is_private_access': 'isPrivateAccess' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormProperties - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._is_private_access = None + self.discriminator = None + + setattr(self, "_{}".format('name'), kwargs.get('name', None)) + setattr(self, "_{}".format('is_private_access'), kwargs.get('is_private_access', None)) + + @property + def name(self): + """Gets the name of this WebFormProperties. # noqa: E501 + + + :return: The name of this WebFormProperties. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebFormProperties. + + + :param name: The name of this WebFormProperties. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def is_private_access(self): + """Gets the is_private_access of this WebFormProperties. # noqa: E501 + + + :return: The is_private_access of this WebFormProperties. # noqa: E501 + :rtype: bool + """ + return self._is_private_access + + @is_private_access.setter + def is_private_access(self, is_private_access): + """Sets the is_private_access of this WebFormProperties. + + + :param is_private_access: The is_private_access of this WebFormProperties. # noqa: E501 + :type: bool + """ + + self._is_private_access = is_private_access + + 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 + if issubclass(WebFormProperties, dict): + for key, value in self.items(): + result[key] = 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, WebFormProperties): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormProperties): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_published_names.py b/docusign_webforms/models/web_form_published_names.py new file mode 100644 index 0000000..f51ea46 --- /dev/null +++ b/docusign_webforms/models/web_form_published_names.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormPublishedNames(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormPublishedNames - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormPublishedNames, dict): + for key, value in self.items(): + result[key] = 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, WebFormPublishedNames): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormPublishedNames): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_source.py b/docusign_webforms/models/web_form_source.py new file mode 100644 index 0000000..7ae6e0a --- /dev/null +++ b/docusign_webforms/models/web_form_source.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormSource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + TEMPLATES = "templates" + BLANK = "blank" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormSource - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormSource, dict): + for key, value in self.items(): + result[key] = 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, WebFormSource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormSource): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_state.py b/docusign_webforms/models/web_form_state.py new file mode 100644 index 0000000..294e45d --- /dev/null +++ b/docusign_webforms/models/web_form_state.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + ACTIVE = "active" + DRAFT = "draft" + + """ + 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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormState - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormState, dict): + for key, value in self.items(): + result[key] = 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, WebFormState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormState): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_summary.py b/docusign_webforms/models/web_form_summary.py new file mode 100644 index 0000000..dace836 --- /dev/null +++ b/docusign_webforms/models/web_form_summary.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormSummary(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 = { + 'id': 'str', + 'account_id': 'str', + 'is_published': 'bool', + 'is_enabled': 'bool', + 'has_draft_changes': 'bool', + 'form_state': 'WebFormState', + 'form_properties': 'WebFormProperties', + 'form_metadata': 'WebFormMetadata' + } + + attribute_map = { + 'id': 'id', + 'account_id': 'accountId', + 'is_published': 'isPublished', + 'is_enabled': 'isEnabled', + 'has_draft_changes': 'hasDraftChanges', + 'form_state': 'formState', + 'form_properties': 'formProperties', + 'form_metadata': 'formMetadata' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormSummary - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._account_id = None + self._is_published = None + self._is_enabled = None + self._has_draft_changes = None + self._form_state = None + self._form_properties = None + self._form_metadata = None + self.discriminator = None + + setattr(self, "_{}".format('id'), kwargs.get('id', None)) + setattr(self, "_{}".format('account_id'), kwargs.get('account_id', None)) + setattr(self, "_{}".format('is_published'), kwargs.get('is_published', None)) + setattr(self, "_{}".format('is_enabled'), kwargs.get('is_enabled', None)) + setattr(self, "_{}".format('has_draft_changes'), kwargs.get('has_draft_changes', None)) + setattr(self, "_{}".format('form_state'), kwargs.get('form_state', None)) + setattr(self, "_{}".format('form_properties'), kwargs.get('form_properties', None)) + setattr(self, "_{}".format('form_metadata'), kwargs.get('form_metadata', None)) + + @property + def id(self): + """Gets the id of this WebFormSummary. # noqa: E501 + + + :return: The id of this WebFormSummary. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebFormSummary. + + + :param id: The id of this WebFormSummary. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def account_id(self): + """Gets the account_id of this WebFormSummary. # noqa: E501 + + + :return: The account_id of this WebFormSummary. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this WebFormSummary. + + + :param account_id: The account_id of this WebFormSummary. # noqa: E501 + :type: str + """ + + self._account_id = account_id + + @property + def is_published(self): + """Gets the is_published of this WebFormSummary. # noqa: E501 + + Has the form been published # noqa: E501 + + :return: The is_published of this WebFormSummary. # noqa: E501 + :rtype: bool + """ + return self._is_published + + @is_published.setter + def is_published(self, is_published): + """Sets the is_published of this WebFormSummary. + + Has the form been published # noqa: E501 + + :param is_published: The is_published of this WebFormSummary. # noqa: E501 + :type: bool + """ + + self._is_published = is_published + + @property + def is_enabled(self): + """Gets the is_enabled of this WebFormSummary. # noqa: E501 + + Is the form currently enabled and available for data collection # noqa: E501 + + :return: The is_enabled of this WebFormSummary. # noqa: E501 + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """Sets the is_enabled of this WebFormSummary. + + Is the form currently enabled and available for data collection # noqa: E501 + + :param is_enabled: The is_enabled of this WebFormSummary. # noqa: E501 + :type: bool + """ + + self._is_enabled = is_enabled + + @property + def has_draft_changes(self): + """Gets the has_draft_changes of this WebFormSummary. # noqa: E501 + + Does the form have draft changes that need to be published? # noqa: E501 + + :return: The has_draft_changes of this WebFormSummary. # noqa: E501 + :rtype: bool + """ + return self._has_draft_changes + + @has_draft_changes.setter + def has_draft_changes(self, has_draft_changes): + """Sets the has_draft_changes of this WebFormSummary. + + Does the form have draft changes that need to be published? # noqa: E501 + + :param has_draft_changes: The has_draft_changes of this WebFormSummary. # noqa: E501 + :type: bool + """ + + self._has_draft_changes = has_draft_changes + + @property + def form_state(self): + """Gets the form_state of this WebFormSummary. # noqa: E501 + + + :return: The form_state of this WebFormSummary. # noqa: E501 + :rtype: WebFormState + """ + return self._form_state + + @form_state.setter + def form_state(self, form_state): + """Sets the form_state of this WebFormSummary. + + + :param form_state: The form_state of this WebFormSummary. # noqa: E501 + :type: WebFormState + """ + + self._form_state = form_state + + @property + def form_properties(self): + """Gets the form_properties of this WebFormSummary. # noqa: E501 + + + :return: The form_properties of this WebFormSummary. # noqa: E501 + :rtype: WebFormProperties + """ + return self._form_properties + + @form_properties.setter + def form_properties(self, form_properties): + """Sets the form_properties of this WebFormSummary. + + + :param form_properties: The form_properties of this WebFormSummary. # noqa: E501 + :type: WebFormProperties + """ + + self._form_properties = form_properties + + @property + def form_metadata(self): + """Gets the form_metadata of this WebFormSummary. # noqa: E501 + + + :return: The form_metadata of this WebFormSummary. # noqa: E501 + :rtype: WebFormMetadata + """ + return self._form_metadata + + @form_metadata.setter + def form_metadata(self, form_metadata): + """Sets the form_metadata of this WebFormSummary. + + + :param form_metadata: The form_metadata of this WebFormSummary. # noqa: E501 + :type: WebFormMetadata + """ + + self._form_metadata = form_metadata + + 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 + if issubclass(WebFormSummary, dict): + for key, value in self.items(): + result[key] = 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, WebFormSummary): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormSummary): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_summary_list.py b/docusign_webforms/models/web_form_summary_list.py new file mode 100644 index 0000000..533e070 --- /dev/null +++ b/docusign_webforms/models/web_form_summary_list.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormSummaryList(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 = { + 'items': 'list[WebFormSummary]', + 'result_set_size': 'float', + 'total_set_size': 'float', + 'start_position': 'float', + 'end_position': 'float', + 'next_url': 'str', + 'previous_url': 'str' + } + + attribute_map = { + 'items': 'items', + 'result_set_size': 'resultSetSize', + 'total_set_size': 'totalSetSize', + 'start_position': 'startPosition', + 'end_position': 'endPosition', + 'next_url': 'nextUrl', + 'previous_url': 'previousUrl' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormSummaryList - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._items = None + self._result_set_size = None + self._total_set_size = None + self._start_position = None + self._end_position = None + self._next_url = None + self._previous_url = None + self.discriminator = None + + setattr(self, "_{}".format('items'), kwargs.get('items', None)) + setattr(self, "_{}".format('result_set_size'), kwargs.get('result_set_size', None)) + setattr(self, "_{}".format('total_set_size'), kwargs.get('total_set_size', None)) + setattr(self, "_{}".format('start_position'), kwargs.get('start_position', None)) + setattr(self, "_{}".format('end_position'), kwargs.get('end_position', None)) + setattr(self, "_{}".format('next_url'), kwargs.get('next_url', None)) + setattr(self, "_{}".format('previous_url'), kwargs.get('previous_url', None)) + + @property + def items(self): + """Gets the items of this WebFormSummaryList. # noqa: E501 + + Array of web form items with each containing summary. # noqa: E501 + + :return: The items of this WebFormSummaryList. # noqa: E501 + :rtype: list[WebFormSummary] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this WebFormSummaryList. + + Array of web form items with each containing summary. # noqa: E501 + + :param items: The items of this WebFormSummaryList. # noqa: E501 + :type: list[WebFormSummary] + """ + + self._items = items + + @property + def result_set_size(self): + """Gets the result_set_size of this WebFormSummaryList. # noqa: E501 + + Result set size for current page # noqa: E501 + + :return: The result_set_size of this WebFormSummaryList. # noqa: E501 + :rtype: float + """ + return self._result_set_size + + @result_set_size.setter + def result_set_size(self, result_set_size): + """Sets the result_set_size of this WebFormSummaryList. + + Result set size for current page # noqa: E501 + + :param result_set_size: The result_set_size of this WebFormSummaryList. # noqa: E501 + :type: float + """ + + self._result_set_size = result_set_size + + @property + def total_set_size(self): + """Gets the total_set_size of this WebFormSummaryList. # noqa: E501 + + Total result set size # noqa: E501 + + :return: The total_set_size of this WebFormSummaryList. # noqa: E501 + :rtype: float + """ + return self._total_set_size + + @total_set_size.setter + def total_set_size(self, total_set_size): + """Sets the total_set_size of this WebFormSummaryList. + + Total result set size # noqa: E501 + + :param total_set_size: The total_set_size of this WebFormSummaryList. # noqa: E501 + :type: float + """ + + self._total_set_size = total_set_size + + @property + def start_position(self): + """Gets the start_position of this WebFormSummaryList. # noqa: E501 + + Starting position of fields returned for the current page # noqa: E501 + + :return: The start_position of this WebFormSummaryList. # noqa: E501 + :rtype: float + """ + return self._start_position + + @start_position.setter + def start_position(self, start_position): + """Sets the start_position of this WebFormSummaryList. + + Starting position of fields returned for the current page # noqa: E501 + + :param start_position: The start_position of this WebFormSummaryList. # noqa: E501 + :type: float + """ + + self._start_position = start_position + + @property + def end_position(self): + """Gets the end_position of this WebFormSummaryList. # noqa: E501 + + Ending position of fields returned for the current page # noqa: E501 + + :return: The end_position of this WebFormSummaryList. # noqa: E501 + :rtype: float + """ + return self._end_position + + @end_position.setter + def end_position(self, end_position): + """Sets the end_position of this WebFormSummaryList. + + Ending position of fields returned for the current page # noqa: E501 + + :param end_position: The end_position of this WebFormSummaryList. # noqa: E501 + :type: float + """ + + self._end_position = end_position + + @property + def next_url(self): + """Gets the next_url of this WebFormSummaryList. # noqa: E501 + + Url for the next page of results # noqa: E501 + + :return: The next_url of this WebFormSummaryList. # noqa: E501 + :rtype: str + """ + return self._next_url + + @next_url.setter + def next_url(self, next_url): + """Sets the next_url of this WebFormSummaryList. + + Url for the next page of results # noqa: E501 + + :param next_url: The next_url of this WebFormSummaryList. # noqa: E501 + :type: str + """ + + self._next_url = next_url + + @property + def previous_url(self): + """Gets the previous_url of this WebFormSummaryList. # noqa: E501 + + Url for the previous page of results # noqa: E501 + + :return: The previous_url of this WebFormSummaryList. # noqa: E501 + :rtype: str + """ + return self._previous_url + + @previous_url.setter + def previous_url(self, previous_url): + """Sets the previous_url of this WebFormSummaryList. + + Url for the previous page of results # noqa: E501 + + :param previous_url: The previous_url of this WebFormSummaryList. # noqa: E501 + :type: str + """ + + self._previous_url = previous_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 + if issubclass(WebFormSummaryList, dict): + for key, value in self.items(): + result[key] = 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, WebFormSummaryList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormSummaryList): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_user_info.py b/docusign_webforms/models/web_form_user_info.py new file mode 100644 index 0000000..1f82c03 --- /dev/null +++ b/docusign_webforms/models/web_form_user_info.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormUserInfo(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 = { + 'user_id': 'str', + 'user_name': 'str' + } + + attribute_map = { + 'user_id': 'userId', + 'user_name': 'userName' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormUserInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._user_id = None + self._user_name = None + self.discriminator = None + + setattr(self, "_{}".format('user_id'), kwargs.get('user_id', None)) + setattr(self, "_{}".format('user_name'), kwargs.get('user_name', None)) + + @property + def user_id(self): + """Gets the user_id of this WebFormUserInfo. # noqa: E501 + + + :return: The user_id of this WebFormUserInfo. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this WebFormUserInfo. + + + :param user_id: The user_id of this WebFormUserInfo. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this WebFormUserInfo. # noqa: E501 + + Name of the user that can be displayed in the user interface. # noqa: E501 + + :return: The user_name of this WebFormUserInfo. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this WebFormUserInfo. + + Name of the user that can be displayed in the user interface. # noqa: E501 + + :param user_name: The user_name of this WebFormUserInfo. # noqa: E501 + :type: str + """ + if (self._configuration.client_side_validation and + user_name is not None and len(user_name) > 150): + raise ValueError("Invalid value for `user_name`, length must be less than or equal to `150`") # noqa: E501 + + self._user_name = user_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 + if issubclass(WebFormUserInfo, dict): + for key, value in self.items(): + result[key] = 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, WebFormUserInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormUserInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_values.py b/docusign_webforms/models/web_form_values.py new file mode 100644 index 0000000..54be28e --- /dev/null +++ b/docusign_webforms/models/web_form_values.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormValues(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormValues - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormValues, dict): + for key, value in self.items(): + result[key] = 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, WebFormValues): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormValues): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_webforms/models/web_form_version_id.py b/docusign_webforms/models/web_form_version_id.py new file mode 100644 index 0000000..7eca155 --- /dev/null +++ b/docusign_webforms/models/web_form_version_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_webforms.client.configuration import Configuration + + +class WebFormVersionId(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 = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """WebFormVersionId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + 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 + if issubclass(WebFormVersionId, dict): + for key, value in self.items(): + result[key] = 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, WebFormVersionId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebFormVersionId): + return True + + return self.to_dict() != other.to_dict() diff --git a/linter.sh b/linter.sh new file mode 100644 index 0000000..142ce46 --- /dev/null +++ b/linter.sh @@ -0,0 +1 @@ +autopep8 --in-place --aggressive --recursive docusign_esign && pycodestyle --ignore=E501,W504,W503 -v docusign_esign \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..57db7c4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +certifi >= 14.05.14 +six >= 1.8.0 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15 +PyJWT>=2.0.0 +cryptography>=2.5 +nose>=1.3.7 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0ceea8c --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Web Forms API version 1.1 + + The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 + + OpenAPI spec version: 1.1.0 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages, Command, os # noqa: H301 + +NAME = "docusign-webforms" +VERSION = "1.0.2rc12" +# 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.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT>=2.0.0", "cryptography>=2.5", "nose>=1.3.7"] + +class CleanCommand(Command): + """Custom clean command to tidy up the project root.""" + user_options = [] + def initialize_options(self): + pass + def finalize_options(self): + pass + def run(self): + os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info') + +this_directory = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + + +setup( + name=NAME, + version=VERSION, + description="Web Forms API version 1.1", + author_email="devcenter@docusign.com", + url="", + keywords=["Swagger", "Web Forms API version 1.1"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + cmdclass={ + 'clean': CleanCommand, + }, + long_description=long_description, + long_description_content_type='text/markdown' +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..4229be9 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,6 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 +tox \ No newline at end of file