signwell-sdk-python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- signwell_sdk/__init__.py +287 -0
- signwell_sdk/api/__init__.py +10 -0
- signwell_sdk/api/api_application_api.py +481 -0
- signwell_sdk/api/bulk_send_api.py +1589 -0
- signwell_sdk/api/document_api.py +2425 -0
- signwell_sdk/api/me_api.py +246 -0
- signwell_sdk/api/regional_api.py +345 -0
- signwell_sdk/api/template_api.py +1298 -0
- signwell_sdk/api/webhooks_api.py +710 -0
- signwell_sdk/api_client.py +747 -0
- signwell_sdk/api_response.py +20 -0
- signwell_sdk/configuration.py +599 -0
- signwell_sdk/embedded.py +385 -0
- signwell_sdk/exceptions.py +314 -0
- signwell_sdk/models/__init__.py +114 -0
- signwell_sdk/models/account_info_response.py +143 -0
- signwell_sdk/models/account_info_response_active_users_inner.py +107 -0
- signwell_sdk/models/account_info_response_preferences.py +147 -0
- signwell_sdk/models/additional_fields_inner_inner.py +274 -0
- signwell_sdk/models/additional_fields_inner_inner_value.py +189 -0
- signwell_sdk/models/additional_files_inner.py +103 -0
- signwell_sdk/models/api_application_response.py +137 -0
- signwell_sdk/models/api_application_response_owner.py +107 -0
- signwell_sdk/models/api_application_response_preferences.py +135 -0
- signwell_sdk/models/attachment_request_info.py +99 -0
- signwell_sdk/models/attachment_requests_inner.py +110 -0
- signwell_sdk/models/bulk_send_create_response.py +132 -0
- signwell_sdk/models/bulk_send_csv_request.py +100 -0
- signwell_sdk/models/bulk_send_csv_template_response.py +97 -0
- signwell_sdk/models/bulk_send_documents_response.py +167 -0
- signwell_sdk/models/bulk_send_list_item.py +141 -0
- signwell_sdk/models/bulk_send_list_response.py +138 -0
- signwell_sdk/models/bulk_send_response.py +151 -0
- signwell_sdk/models/bulk_send_response_templates_inner.py +98 -0
- signwell_sdk/models/bulk_send_validate_csv_response.py +129 -0
- signwell_sdk/models/checkbox_group_info.py +138 -0
- signwell_sdk/models/checkbox_groups_inner.py +136 -0
- signwell_sdk/models/checkbox_validation.py +35 -0
- signwell_sdk/models/completed_pdf_response.py +177 -0
- signwell_sdk/models/completed_pdf_url_response.py +97 -0
- signwell_sdk/models/copied_contact_info.py +99 -0
- signwell_sdk/models/copied_contacts_inner.py +98 -0
- signwell_sdk/models/copied_placeholders_inner.py +111 -0
- signwell_sdk/models/create_bulk_send_request.py +155 -0
- signwell_sdk/models/create_webhook_request.py +100 -0
- signwell_sdk/models/date_format.py +36 -0
- signwell_sdk/models/detailed_option.py +105 -0
- signwell_sdk/models/document_from_template_request.py +377 -0
- signwell_sdk/models/document_from_template_response.py +353 -0
- signwell_sdk/models/document_from_template_response_fields_inner_inner.py +270 -0
- signwell_sdk/models/document_from_template_response_fields_inner_inner_recipient.py +99 -0
- signwell_sdk/models/document_from_template_response_recipients_inner.py +206 -0
- signwell_sdk/models/document_list_response.py +138 -0
- signwell_sdk/models/document_request.py +350 -0
- signwell_sdk/models/document_response.py +357 -0
- signwell_sdk/models/document_response_attachment_requests_inner.py +101 -0
- signwell_sdk/models/document_response_fields_inner_inner.py +268 -0
- signwell_sdk/models/document_response_fields_inner_inner_options_inner.py +101 -0
- signwell_sdk/models/document_response_fields_inner_inner_recipient.py +98 -0
- signwell_sdk/models/document_response_fields_inner_inner_value.py +195 -0
- signwell_sdk/models/document_response_recipients_inner.py +208 -0
- signwell_sdk/models/document_template_list_response.py +138 -0
- signwell_sdk/models/document_template_request.py +307 -0
- signwell_sdk/models/document_template_response.py +323 -0
- signwell_sdk/models/document_template_response_copied_placeholders_inner.py +131 -0
- signwell_sdk/models/document_template_response_placeholders_inner.py +144 -0
- signwell_sdk/models/document_template_update_request.py +208 -0
- signwell_sdk/models/dropdown_option.py +153 -0
- signwell_sdk/models/error_response.py +107 -0
- signwell_sdk/models/error_response_meta.py +101 -0
- signwell_sdk/models/field_type.py +46 -0
- signwell_sdk/models/fields_inner_inner.py +268 -0
- signwell_sdk/models/file_format.py +33 -0
- signwell_sdk/models/file_info.py +98 -0
- signwell_sdk/models/files_inner.py +103 -0
- signwell_sdk/models/label_info.py +98 -0
- signwell_sdk/models/label_request.py +97 -0
- signwell_sdk/models/label_response.py +98 -0
- signwell_sdk/models/me_response.py +130 -0
- signwell_sdk/models/me_response_contact.py +147 -0
- signwell_sdk/models/me_response_user.py +117 -0
- signwell_sdk/models/me_response_user_preferences.py +105 -0
- signwell_sdk/models/nom151_certificate_response.py +107 -0
- signwell_sdk/models/nom151_certificate_response_nom151.py +125 -0
- signwell_sdk/models/nom151_url_response.py +97 -0
- signwell_sdk/models/pagination_meta.py +119 -0
- signwell_sdk/models/placeholders_inner.py +115 -0
- signwell_sdk/models/rate_limit_error_response.py +97 -0
- signwell_sdk/models/recipients_inner.py +141 -0
- signwell_sdk/models/reminder_recipients_inner.py +100 -0
- signwell_sdk/models/send_reminder_request.py +114 -0
- signwell_sdk/models/template_attachment_requests_inner.py +110 -0
- signwell_sdk/models/template_checkbox_groups_inner.py +136 -0
- signwell_sdk/models/template_field_values_inner.py +109 -0
- signwell_sdk/models/template_field_values_inner_value.py +189 -0
- signwell_sdk/models/template_fields_inner_inner.py +266 -0
- signwell_sdk/models/template_recipients_inner.py +146 -0
- signwell_sdk/models/text_validation.py +42 -0
- signwell_sdk/models/update_document_and_send_request.py +234 -0
- signwell_sdk/models/update_recipients_map_inner.py +118 -0
- signwell_sdk/models/update_recipients_request.py +111 -0
- signwell_sdk/models/validation_error_response.py +99 -0
- signwell_sdk/models/webhook_response.py +110 -0
- signwell_sdk/py.typed +0 -0
- signwell_sdk/rest.py +209 -0
- signwell_sdk/webhook.py +214 -0
- signwell_sdk_python-0.1.0.dist-info/METADATA +177 -0
- signwell_sdk_python-0.1.0.dist-info/RECORD +110 -0
- signwell_sdk_python-0.1.0.dist-info/WHEEL +4 -0
- signwell_sdk_python-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
20
|
+
from typing import Any, Optional, Set
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class RecipientsInner(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
RecipientsInner
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
id: StrictStr = Field(
|
|
30
|
+
description="A unique identifier that you will give to each recipient. We recommend numbering sequentially from 1 to X. IDs are required for associating recipients to fields and more."
|
|
31
|
+
)
|
|
32
|
+
name: StrictStr | None = Field(default=None, description="Name of the recipient.")
|
|
33
|
+
email: StrictStr = Field(description="Email address for the recipient.")
|
|
34
|
+
passcode: StrictStr | None = Field(
|
|
35
|
+
default=None,
|
|
36
|
+
description="If set, signers assigned with a passcode will be required to enter the passcode before they’re able to view and complete the document.",
|
|
37
|
+
)
|
|
38
|
+
subject: StrictStr | None = Field(
|
|
39
|
+
default=None,
|
|
40
|
+
description="Email subject for the signature request that the recipient will see. Overrides the general subject for the document.",
|
|
41
|
+
)
|
|
42
|
+
message: StrictStr | None = Field(
|
|
43
|
+
default=None,
|
|
44
|
+
description="Email message for the signature request that the recipient will see. Overrides the general message for the document.",
|
|
45
|
+
)
|
|
46
|
+
send_email: StrictBool | None = Field(
|
|
47
|
+
default=False,
|
|
48
|
+
description="Applies on when `embedded_signing` is `true`. By default, recipients are not notified through email to sign when doing embedded signing. Setting this to `true` will send a notification email to the recipient. Default is `false`.",
|
|
49
|
+
)
|
|
50
|
+
send_email_delay: StrictInt | None = Field(
|
|
51
|
+
default=0,
|
|
52
|
+
description="If `send_email` is `true` recipients will receive a new document notification immediately. In the case of embedded signing, you can delay this notification to only send if the document is not completed within a few minutes. The email notification will not go out if the document is completed before the delay time is over. Valid values are in minutes ranging from `0` to `60`. Defaults to `0`.",
|
|
53
|
+
)
|
|
54
|
+
additional_properties: Dict[str, Any] = {}
|
|
55
|
+
__properties: ClassVar[List[str]] = [
|
|
56
|
+
"id",
|
|
57
|
+
"name",
|
|
58
|
+
"email",
|
|
59
|
+
"passcode",
|
|
60
|
+
"subject",
|
|
61
|
+
"message",
|
|
62
|
+
"send_email",
|
|
63
|
+
"send_email_delay",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
model_config = ConfigDict(
|
|
67
|
+
populate_by_name=True,
|
|
68
|
+
validate_assignment=True,
|
|
69
|
+
protected_namespaces=(),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def to_str(self) -> str:
|
|
73
|
+
"""Returns the string representation of the model using alias"""
|
|
74
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
|
+
|
|
76
|
+
def to_json(self) -> str:
|
|
77
|
+
"""Returns the JSON representation of the model using alias"""
|
|
78
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
79
|
+
return json.dumps(self.to_dict())
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
83
|
+
"""Create an instance of RecipientsInner from a JSON string"""
|
|
84
|
+
return cls.from_dict(json.loads(json_str))
|
|
85
|
+
|
|
86
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
87
|
+
"""Return the dictionary representation of the model using alias.
|
|
88
|
+
|
|
89
|
+
This has the following differences from calling pydantic's
|
|
90
|
+
`self.model_dump(by_alias=True)`:
|
|
91
|
+
|
|
92
|
+
* `None` is only added to the output dict for nullable fields that
|
|
93
|
+
were set at model initialization. Other fields with value `None`
|
|
94
|
+
are ignored.
|
|
95
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
96
|
+
"""
|
|
97
|
+
excluded_fields: Set[str] = set(
|
|
98
|
+
[
|
|
99
|
+
"additional_properties",
|
|
100
|
+
]
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_dict = self.model_dump(
|
|
104
|
+
by_alias=True,
|
|
105
|
+
exclude=excluded_fields,
|
|
106
|
+
exclude_none=True,
|
|
107
|
+
)
|
|
108
|
+
# puts key-value pairs in additional_properties in the top level
|
|
109
|
+
if self.additional_properties is not None:
|
|
110
|
+
for _key, _value in self.additional_properties.items():
|
|
111
|
+
_dict[_key] = _value
|
|
112
|
+
|
|
113
|
+
return _dict
|
|
114
|
+
|
|
115
|
+
@classmethod
|
|
116
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
117
|
+
"""Create an instance of RecipientsInner from a dict"""
|
|
118
|
+
if obj is None:
|
|
119
|
+
return None
|
|
120
|
+
|
|
121
|
+
if not isinstance(obj, dict):
|
|
122
|
+
return cls.model_validate(obj)
|
|
123
|
+
|
|
124
|
+
_obj = cls.model_validate(
|
|
125
|
+
{
|
|
126
|
+
"id": obj.get("id"),
|
|
127
|
+
"name": obj.get("name"),
|
|
128
|
+
"email": obj.get("email"),
|
|
129
|
+
"passcode": obj.get("passcode"),
|
|
130
|
+
"subject": obj.get("subject"),
|
|
131
|
+
"message": obj.get("message"),
|
|
132
|
+
"send_email": obj.get("send_email") if obj.get("send_email") is not None else False,
|
|
133
|
+
"send_email_delay": obj.get("send_email_delay") if obj.get("send_email_delay") is not None else 0,
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
# store additional fields in additional_properties
|
|
137
|
+
for _key in obj.keys():
|
|
138
|
+
if _key not in cls.__properties:
|
|
139
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
140
|
+
|
|
141
|
+
return _obj
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
20
|
+
from typing import Any, Optional, Set
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ReminderRecipientsInner(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
ReminderRecipientsInner
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
name: StrictStr | None = Field(
|
|
30
|
+
default=None, description="Recipient's name (required if multiple recipients share the same email)."
|
|
31
|
+
)
|
|
32
|
+
email: StrictStr | None = Field(default=None, description="Recipient's email address.")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "email"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
53
|
+
"""Create an instance of ReminderRecipientsInner from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set(
|
|
68
|
+
[
|
|
69
|
+
"additional_properties",
|
|
70
|
+
]
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# puts key-value pairs in additional_properties in the top level
|
|
79
|
+
if self.additional_properties is not None:
|
|
80
|
+
for _key, _value in self.additional_properties.items():
|
|
81
|
+
_dict[_key] = _value
|
|
82
|
+
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
87
|
+
"""Create an instance of ReminderRecipientsInner from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({"name": obj.get("name"), "email": obj.get("email")})
|
|
95
|
+
# store additional fields in additional_properties
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
|
+
|
|
100
|
+
return _obj
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
20
|
+
from signwell_sdk.models.reminder_recipients_inner import ReminderRecipientsInner
|
|
21
|
+
from typing import Any, Optional, Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SendReminderRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SendReminderRequest
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
recipients: List[ReminderRecipientsInner] | None = Field(
|
|
31
|
+
default=None,
|
|
32
|
+
description="Optional list if recipients within the document to send a reminder email to. If none are specified, all recipients that have not signed yet will receive a reminder email.",
|
|
33
|
+
)
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties: ClassVar[List[str]] = ["recipients"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
54
|
+
"""Create an instance of SendReminderRequest from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set(
|
|
69
|
+
[
|
|
70
|
+
"additional_properties",
|
|
71
|
+
]
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in recipients (list)
|
|
80
|
+
_items_recipients: list[Any] = []
|
|
81
|
+
if self.recipients:
|
|
82
|
+
for _item_recipients in self.recipients:
|
|
83
|
+
if _item_recipients:
|
|
84
|
+
_items_recipients.append(_item_recipients.to_dict())
|
|
85
|
+
_dict["recipients"] = _items_recipients
|
|
86
|
+
# puts key-value pairs in additional_properties in the top level
|
|
87
|
+
if self.additional_properties is not None:
|
|
88
|
+
for _key, _value in self.additional_properties.items():
|
|
89
|
+
_dict[_key] = _value
|
|
90
|
+
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
95
|
+
"""Create an instance of SendReminderRequest from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return cls.model_validate(obj)
|
|
101
|
+
|
|
102
|
+
_obj = cls.model_validate(
|
|
103
|
+
{
|
|
104
|
+
"recipients": [ReminderRecipientsInner.from_dict(_item) for _item in obj["recipients"]]
|
|
105
|
+
if obj.get("recipients") is not None
|
|
106
|
+
else None
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
# store additional fields in additional_properties
|
|
110
|
+
for _key in obj.keys():
|
|
111
|
+
if _key not in cls.__properties:
|
|
112
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
113
|
+
|
|
114
|
+
return _obj
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
20
|
+
from typing import Any, Optional, Set
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class TemplateAttachmentRequestsInner(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
TemplateAttachmentRequestsInner
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
name: StrictStr = Field(description="Name of the requested attachment.")
|
|
30
|
+
placeholder_id: StrictStr = Field(
|
|
31
|
+
description="Unique identifier of the recipient that will view the attachment request."
|
|
32
|
+
)
|
|
33
|
+
required: StrictBool | None = Field(
|
|
34
|
+
default=True,
|
|
35
|
+
description="Whether the recipient will need to upload the attachment to successfully complete/sign the document. Defaults to `true`.",
|
|
36
|
+
)
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["name", "placeholder_id", "required"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
57
|
+
"""Create an instance of TemplateAttachmentRequestsInner from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set(
|
|
72
|
+
[
|
|
73
|
+
"additional_properties",
|
|
74
|
+
]
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# puts key-value pairs in additional_properties in the top level
|
|
83
|
+
if self.additional_properties is not None:
|
|
84
|
+
for _key, _value in self.additional_properties.items():
|
|
85
|
+
_dict[_key] = _value
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
91
|
+
"""Create an instance of TemplateAttachmentRequestsInner from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate(
|
|
99
|
+
{
|
|
100
|
+
"name": obj.get("name"),
|
|
101
|
+
"placeholder_id": obj.get("placeholder_id"),
|
|
102
|
+
"required": obj.get("required") if obj.get("required") is not None else True,
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
# store additional fields in additional_properties
|
|
106
|
+
for _key in obj.keys():
|
|
107
|
+
if _key not in cls.__properties:
|
|
108
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
109
|
+
|
|
110
|
+
return _obj
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
20
|
+
from signwell_sdk.models.checkbox_validation import CheckboxValidation
|
|
21
|
+
from typing import Any, Optional, Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class TemplateCheckboxGroupsInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
TemplateCheckboxGroupsInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
group_name: StrictStr = Field(description="A unique identifier for the checkbox group.")
|
|
31
|
+
placeholder_id: StrictStr = Field(description="The recipient ID associated with the checkbox group.")
|
|
32
|
+
checkbox_ids: List[StrictStr]
|
|
33
|
+
validation: CheckboxValidation | None = None
|
|
34
|
+
required: StrictBool | None = Field(
|
|
35
|
+
default=False, description="Whether the group must be completed by the recipient. Defaults to false."
|
|
36
|
+
)
|
|
37
|
+
min_value: StrictInt | None = Field(
|
|
38
|
+
default=None,
|
|
39
|
+
description="The minimum number of checkboxes that must be checked in the group. (Only for validation: minimum and range)",
|
|
40
|
+
)
|
|
41
|
+
max_value: StrictInt | None = Field(
|
|
42
|
+
default=None,
|
|
43
|
+
description="The maximum number of checkboxes that can be checked in the group. (Only for validation: maximum and range)",
|
|
44
|
+
)
|
|
45
|
+
exact_value: StrictInt | None = Field(
|
|
46
|
+
default=None,
|
|
47
|
+
description="The exact number of checkboxes that must be checked in the group. (Only for validation: exact)",
|
|
48
|
+
)
|
|
49
|
+
additional_properties: Dict[str, Any] = {}
|
|
50
|
+
__properties: ClassVar[List[str]] = [
|
|
51
|
+
"group_name",
|
|
52
|
+
"placeholder_id",
|
|
53
|
+
"checkbox_ids",
|
|
54
|
+
"validation",
|
|
55
|
+
"required",
|
|
56
|
+
"min_value",
|
|
57
|
+
"max_value",
|
|
58
|
+
"exact_value",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
model_config = ConfigDict(
|
|
62
|
+
populate_by_name=True,
|
|
63
|
+
validate_assignment=True,
|
|
64
|
+
protected_namespaces=(),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def to_str(self) -> str:
|
|
68
|
+
"""Returns the string representation of the model using alias"""
|
|
69
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
70
|
+
|
|
71
|
+
def to_json(self) -> str:
|
|
72
|
+
"""Returns the JSON representation of the model using alias"""
|
|
73
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
74
|
+
return json.dumps(self.to_dict())
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
78
|
+
"""Create an instance of TemplateCheckboxGroupsInner from a JSON string"""
|
|
79
|
+
return cls.from_dict(json.loads(json_str))
|
|
80
|
+
|
|
81
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
82
|
+
"""Return the dictionary representation of the model using alias.
|
|
83
|
+
|
|
84
|
+
This has the following differences from calling pydantic's
|
|
85
|
+
`self.model_dump(by_alias=True)`:
|
|
86
|
+
|
|
87
|
+
* `None` is only added to the output dict for nullable fields that
|
|
88
|
+
were set at model initialization. Other fields with value `None`
|
|
89
|
+
are ignored.
|
|
90
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
91
|
+
"""
|
|
92
|
+
excluded_fields: Set[str] = set(
|
|
93
|
+
[
|
|
94
|
+
"additional_properties",
|
|
95
|
+
]
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_dict = self.model_dump(
|
|
99
|
+
by_alias=True,
|
|
100
|
+
exclude=excluded_fields,
|
|
101
|
+
exclude_none=True,
|
|
102
|
+
)
|
|
103
|
+
# puts key-value pairs in additional_properties in the top level
|
|
104
|
+
if self.additional_properties is not None:
|
|
105
|
+
for _key, _value in self.additional_properties.items():
|
|
106
|
+
_dict[_key] = _value
|
|
107
|
+
|
|
108
|
+
return _dict
|
|
109
|
+
|
|
110
|
+
@classmethod
|
|
111
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
112
|
+
"""Create an instance of TemplateCheckboxGroupsInner from a dict"""
|
|
113
|
+
if obj is None:
|
|
114
|
+
return None
|
|
115
|
+
|
|
116
|
+
if not isinstance(obj, dict):
|
|
117
|
+
return cls.model_validate(obj)
|
|
118
|
+
|
|
119
|
+
_obj = cls.model_validate(
|
|
120
|
+
{
|
|
121
|
+
"group_name": obj.get("group_name"),
|
|
122
|
+
"placeholder_id": obj.get("placeholder_id"),
|
|
123
|
+
"checkbox_ids": obj.get("checkbox_ids"),
|
|
124
|
+
"validation": obj.get("validation"),
|
|
125
|
+
"required": obj.get("required") if obj.get("required") is not None else False,
|
|
126
|
+
"min_value": obj.get("min_value"),
|
|
127
|
+
"max_value": obj.get("max_value"),
|
|
128
|
+
"exact_value": obj.get("exact_value"),
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
# store additional fields in additional_properties
|
|
132
|
+
for _key in obj.keys():
|
|
133
|
+
if _key not in cls.__properties:
|
|
134
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
135
|
+
|
|
136
|
+
return _obj
|