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,323 @@
|
|
|
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 datetime import datetime
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from signwell_sdk.models.checkbox_group_info import CheckboxGroupInfo
|
|
22
|
+
from signwell_sdk.models.document_response_fields_inner_inner import DocumentResponseFieldsInnerInner
|
|
23
|
+
from signwell_sdk.models.document_template_response_copied_placeholders_inner import (
|
|
24
|
+
DocumentTemplateResponseCopiedPlaceholdersInner,
|
|
25
|
+
)
|
|
26
|
+
from signwell_sdk.models.document_template_response_placeholders_inner import DocumentTemplateResponsePlaceholdersInner
|
|
27
|
+
from signwell_sdk.models.file_info import FileInfo
|
|
28
|
+
from signwell_sdk.models.label_info import LabelInfo
|
|
29
|
+
from typing import Any, Optional, Set
|
|
30
|
+
from typing_extensions import Self
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class DocumentTemplateResponse(BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
DocumentTemplateResponse
|
|
36
|
+
""" # noqa: E501
|
|
37
|
+
|
|
38
|
+
id: StrictStr
|
|
39
|
+
api_application_id: StrictStr | None = None
|
|
40
|
+
requester_email_address: StrictStr | None = None
|
|
41
|
+
custom_requester_name: StrictStr | None = None
|
|
42
|
+
custom_requester_email: StrictStr | None = None
|
|
43
|
+
name: StrictStr | None = None
|
|
44
|
+
subject: StrictStr | None = None
|
|
45
|
+
message: StrictStr | None = None
|
|
46
|
+
metadata: Dict[str, StrictStr] | None = None
|
|
47
|
+
created_at: datetime | None = None
|
|
48
|
+
updated_at: datetime | None = None
|
|
49
|
+
placeholders: List[DocumentTemplateResponsePlaceholdersInner] | None = None
|
|
50
|
+
copied_placeholders: List[DocumentTemplateResponseCopiedPlaceholdersInner] | None = None
|
|
51
|
+
status: StrictStr | None = None
|
|
52
|
+
reminders: StrictBool | None = None
|
|
53
|
+
archived: StrictBool | None = None
|
|
54
|
+
embedded_edit_url: StrictStr | None = None
|
|
55
|
+
template_link: StrictStr | None = None
|
|
56
|
+
template_id: StrictStr | None = None
|
|
57
|
+
apply_signing_order: StrictBool | None = None
|
|
58
|
+
redirect_url: StrictStr | None = None
|
|
59
|
+
decline_redirect_url: StrictStr | None = None
|
|
60
|
+
language: StrictStr | None = None
|
|
61
|
+
expires_in: StrictInt | None = None
|
|
62
|
+
files: List[FileInfo] | None = None
|
|
63
|
+
fields: List[List[DocumentResponseFieldsInnerInner]] | None = None
|
|
64
|
+
allow_decline: StrictBool | None = None
|
|
65
|
+
allow_reassign: StrictBool | None = None
|
|
66
|
+
labels: List[LabelInfo] | None = None
|
|
67
|
+
checkbox_groups: List[CheckboxGroupInfo] | None = None
|
|
68
|
+
additional_properties: Dict[str, Any] = {}
|
|
69
|
+
__properties: ClassVar[List[str]] = [
|
|
70
|
+
"id",
|
|
71
|
+
"api_application_id",
|
|
72
|
+
"requester_email_address",
|
|
73
|
+
"custom_requester_name",
|
|
74
|
+
"custom_requester_email",
|
|
75
|
+
"name",
|
|
76
|
+
"subject",
|
|
77
|
+
"message",
|
|
78
|
+
"metadata",
|
|
79
|
+
"created_at",
|
|
80
|
+
"updated_at",
|
|
81
|
+
"placeholders",
|
|
82
|
+
"copied_placeholders",
|
|
83
|
+
"status",
|
|
84
|
+
"reminders",
|
|
85
|
+
"archived",
|
|
86
|
+
"embedded_edit_url",
|
|
87
|
+
"template_link",
|
|
88
|
+
"template_id",
|
|
89
|
+
"apply_signing_order",
|
|
90
|
+
"redirect_url",
|
|
91
|
+
"decline_redirect_url",
|
|
92
|
+
"language",
|
|
93
|
+
"expires_in",
|
|
94
|
+
"files",
|
|
95
|
+
"fields",
|
|
96
|
+
"allow_decline",
|
|
97
|
+
"allow_reassign",
|
|
98
|
+
"labels",
|
|
99
|
+
"checkbox_groups",
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
model_config = ConfigDict(
|
|
103
|
+
populate_by_name=True,
|
|
104
|
+
validate_assignment=True,
|
|
105
|
+
protected_namespaces=(),
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def to_str(self) -> str:
|
|
109
|
+
"""Returns the string representation of the model using alias"""
|
|
110
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
111
|
+
|
|
112
|
+
def to_json(self) -> str:
|
|
113
|
+
"""Returns the JSON representation of the model using alias"""
|
|
114
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
115
|
+
return json.dumps(self.to_dict())
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
119
|
+
"""Create an instance of DocumentTemplateResponse from a JSON string"""
|
|
120
|
+
return cls.from_dict(json.loads(json_str))
|
|
121
|
+
|
|
122
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
123
|
+
"""Return the dictionary representation of the model using alias.
|
|
124
|
+
|
|
125
|
+
This has the following differences from calling pydantic's
|
|
126
|
+
`self.model_dump(by_alias=True)`:
|
|
127
|
+
|
|
128
|
+
* `None` is only added to the output dict for nullable fields that
|
|
129
|
+
were set at model initialization. Other fields with value `None`
|
|
130
|
+
are ignored.
|
|
131
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
132
|
+
"""
|
|
133
|
+
excluded_fields: Set[str] = set(
|
|
134
|
+
[
|
|
135
|
+
"additional_properties",
|
|
136
|
+
]
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
_dict = self.model_dump(
|
|
140
|
+
by_alias=True,
|
|
141
|
+
exclude=excluded_fields,
|
|
142
|
+
exclude_none=True,
|
|
143
|
+
)
|
|
144
|
+
# override the default output from pydantic by calling `to_dict()` of each item in placeholders (list)
|
|
145
|
+
_items_placeholders: list[Any] = []
|
|
146
|
+
if self.placeholders:
|
|
147
|
+
for _item_placeholders in self.placeholders:
|
|
148
|
+
if _item_placeholders:
|
|
149
|
+
_items_placeholders.append(_item_placeholders.to_dict())
|
|
150
|
+
_dict["placeholders"] = _items_placeholders
|
|
151
|
+
# override the default output from pydantic by calling `to_dict()` of each item in copied_placeholders (list)
|
|
152
|
+
_items_copied_placeholders: list[Any] = []
|
|
153
|
+
if self.copied_placeholders:
|
|
154
|
+
for _item_copied_placeholders in self.copied_placeholders:
|
|
155
|
+
if _item_copied_placeholders:
|
|
156
|
+
_items_copied_placeholders.append(_item_copied_placeholders.to_dict())
|
|
157
|
+
_dict["copied_placeholders"] = _items_copied_placeholders
|
|
158
|
+
# override the default output from pydantic by calling `to_dict()` of each item in files (list)
|
|
159
|
+
_items_files: list[Any] = []
|
|
160
|
+
if self.files:
|
|
161
|
+
for _item_files in self.files:
|
|
162
|
+
if _item_files:
|
|
163
|
+
_items_files.append(_item_files.to_dict())
|
|
164
|
+
_dict["files"] = _items_files
|
|
165
|
+
# override the default output from pydantic by calling `to_dict()` of each item in fields (list of list)
|
|
166
|
+
_items_fields: list[Any] = []
|
|
167
|
+
if self.fields:
|
|
168
|
+
for _item_fields in self.fields:
|
|
169
|
+
if _item_fields:
|
|
170
|
+
_items_fields.append(
|
|
171
|
+
[_inner_item.to_dict() for _inner_item in _item_fields if _inner_item is not None]
|
|
172
|
+
)
|
|
173
|
+
_dict["fields"] = _items_fields
|
|
174
|
+
# override the default output from pydantic by calling `to_dict()` of each item in labels (list)
|
|
175
|
+
_items_labels: list[Any] = []
|
|
176
|
+
if self.labels:
|
|
177
|
+
for _item_labels in self.labels:
|
|
178
|
+
if _item_labels:
|
|
179
|
+
_items_labels.append(_item_labels.to_dict())
|
|
180
|
+
_dict["labels"] = _items_labels
|
|
181
|
+
# override the default output from pydantic by calling `to_dict()` of each item in checkbox_groups (list)
|
|
182
|
+
_items_checkbox_groups: list[Any] = []
|
|
183
|
+
if self.checkbox_groups:
|
|
184
|
+
for _item_checkbox_groups in self.checkbox_groups:
|
|
185
|
+
if _item_checkbox_groups:
|
|
186
|
+
_items_checkbox_groups.append(_item_checkbox_groups.to_dict())
|
|
187
|
+
_dict["checkbox_groups"] = _items_checkbox_groups
|
|
188
|
+
# puts key-value pairs in additional_properties in the top level
|
|
189
|
+
if self.additional_properties is not None:
|
|
190
|
+
for _key, _value in self.additional_properties.items():
|
|
191
|
+
_dict[_key] = _value
|
|
192
|
+
|
|
193
|
+
# set to None if api_application_id (nullable) is None
|
|
194
|
+
# and model_fields_set contains the field
|
|
195
|
+
if self.api_application_id is None and "api_application_id" in self.model_fields_set:
|
|
196
|
+
_dict["api_application_id"] = None
|
|
197
|
+
|
|
198
|
+
# set to None if custom_requester_name (nullable) is None
|
|
199
|
+
# and model_fields_set contains the field
|
|
200
|
+
if self.custom_requester_name is None and "custom_requester_name" in self.model_fields_set:
|
|
201
|
+
_dict["custom_requester_name"] = None
|
|
202
|
+
|
|
203
|
+
# set to None if custom_requester_email (nullable) is None
|
|
204
|
+
# and model_fields_set contains the field
|
|
205
|
+
if self.custom_requester_email is None and "custom_requester_email" in self.model_fields_set:
|
|
206
|
+
_dict["custom_requester_email"] = None
|
|
207
|
+
|
|
208
|
+
# set to None if metadata (nullable) is None
|
|
209
|
+
# and model_fields_set contains the field
|
|
210
|
+
if self.metadata is None and "metadata" in self.model_fields_set:
|
|
211
|
+
_dict["metadata"] = None
|
|
212
|
+
|
|
213
|
+
# set to None if reminders (nullable) is None
|
|
214
|
+
# and model_fields_set contains the field
|
|
215
|
+
if self.reminders is None and "reminders" in self.model_fields_set:
|
|
216
|
+
_dict["reminders"] = None
|
|
217
|
+
|
|
218
|
+
# set to None if embedded_edit_url (nullable) is None
|
|
219
|
+
# and model_fields_set contains the field
|
|
220
|
+
if self.embedded_edit_url is None and "embedded_edit_url" in self.model_fields_set:
|
|
221
|
+
_dict["embedded_edit_url"] = None
|
|
222
|
+
|
|
223
|
+
# set to None if template_id (nullable) is None
|
|
224
|
+
# and model_fields_set contains the field
|
|
225
|
+
if self.template_id is None and "template_id" in self.model_fields_set:
|
|
226
|
+
_dict["template_id"] = None
|
|
227
|
+
|
|
228
|
+
# set to None if redirect_url (nullable) is None
|
|
229
|
+
# and model_fields_set contains the field
|
|
230
|
+
if self.redirect_url is None and "redirect_url" in self.model_fields_set:
|
|
231
|
+
_dict["redirect_url"] = None
|
|
232
|
+
|
|
233
|
+
# set to None if decline_redirect_url (nullable) is None
|
|
234
|
+
# and model_fields_set contains the field
|
|
235
|
+
if self.decline_redirect_url is None and "decline_redirect_url" in self.model_fields_set:
|
|
236
|
+
_dict["decline_redirect_url"] = None
|
|
237
|
+
|
|
238
|
+
# set to None if expires_in (nullable) is None
|
|
239
|
+
# and model_fields_set contains the field
|
|
240
|
+
if self.expires_in is None and "expires_in" in self.model_fields_set:
|
|
241
|
+
_dict["expires_in"] = None
|
|
242
|
+
|
|
243
|
+
# set to None if allow_decline (nullable) is None
|
|
244
|
+
# and model_fields_set contains the field
|
|
245
|
+
if self.allow_decline is None and "allow_decline" in self.model_fields_set:
|
|
246
|
+
_dict["allow_decline"] = None
|
|
247
|
+
|
|
248
|
+
# set to None if allow_reassign (nullable) is None
|
|
249
|
+
# and model_fields_set contains the field
|
|
250
|
+
if self.allow_reassign is None and "allow_reassign" in self.model_fields_set:
|
|
251
|
+
_dict["allow_reassign"] = None
|
|
252
|
+
|
|
253
|
+
return _dict
|
|
254
|
+
|
|
255
|
+
@classmethod
|
|
256
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
257
|
+
"""Create an instance of DocumentTemplateResponse from a dict"""
|
|
258
|
+
if obj is None:
|
|
259
|
+
return None
|
|
260
|
+
|
|
261
|
+
if not isinstance(obj, dict):
|
|
262
|
+
return cls.model_validate(obj)
|
|
263
|
+
|
|
264
|
+
_obj = cls.model_validate(
|
|
265
|
+
{
|
|
266
|
+
"id": obj.get("id"),
|
|
267
|
+
"api_application_id": obj.get("api_application_id"),
|
|
268
|
+
"requester_email_address": obj.get("requester_email_address"),
|
|
269
|
+
"custom_requester_name": obj.get("custom_requester_name"),
|
|
270
|
+
"custom_requester_email": obj.get("custom_requester_email"),
|
|
271
|
+
"name": obj.get("name"),
|
|
272
|
+
"subject": obj.get("subject"),
|
|
273
|
+
"message": obj.get("message"),
|
|
274
|
+
"metadata": obj.get("metadata"),
|
|
275
|
+
"created_at": obj.get("created_at"),
|
|
276
|
+
"updated_at": obj.get("updated_at"),
|
|
277
|
+
"placeholders": [
|
|
278
|
+
DocumentTemplateResponsePlaceholdersInner.from_dict(_item) for _item in obj["placeholders"]
|
|
279
|
+
]
|
|
280
|
+
if obj.get("placeholders") is not None
|
|
281
|
+
else None,
|
|
282
|
+
"copied_placeholders": [
|
|
283
|
+
DocumentTemplateResponseCopiedPlaceholdersInner.from_dict(_item)
|
|
284
|
+
for _item in obj["copied_placeholders"]
|
|
285
|
+
]
|
|
286
|
+
if obj.get("copied_placeholders") is not None
|
|
287
|
+
else None,
|
|
288
|
+
"status": obj.get("status"),
|
|
289
|
+
"reminders": obj.get("reminders"),
|
|
290
|
+
"archived": obj.get("archived"),
|
|
291
|
+
"embedded_edit_url": obj.get("embedded_edit_url"),
|
|
292
|
+
"template_link": obj.get("template_link"),
|
|
293
|
+
"template_id": obj.get("template_id"),
|
|
294
|
+
"apply_signing_order": obj.get("apply_signing_order"),
|
|
295
|
+
"redirect_url": obj.get("redirect_url"),
|
|
296
|
+
"decline_redirect_url": obj.get("decline_redirect_url"),
|
|
297
|
+
"language": obj.get("language"),
|
|
298
|
+
"expires_in": obj.get("expires_in"),
|
|
299
|
+
"files": [FileInfo.from_dict(_item) for _item in obj["files"]]
|
|
300
|
+
if obj.get("files") is not None
|
|
301
|
+
else None,
|
|
302
|
+
"fields": [
|
|
303
|
+
[DocumentResponseFieldsInnerInner.from_dict(_inner_item) for _inner_item in _item]
|
|
304
|
+
for _item in obj["fields"]
|
|
305
|
+
]
|
|
306
|
+
if obj.get("fields") is not None
|
|
307
|
+
else None,
|
|
308
|
+
"allow_decline": obj.get("allow_decline"),
|
|
309
|
+
"allow_reassign": obj.get("allow_reassign"),
|
|
310
|
+
"labels": [LabelInfo.from_dict(_item) for _item in obj["labels"]]
|
|
311
|
+
if obj.get("labels") is not None
|
|
312
|
+
else None,
|
|
313
|
+
"checkbox_groups": [CheckboxGroupInfo.from_dict(_item) for _item in obj["checkbox_groups"]]
|
|
314
|
+
if obj.get("checkbox_groups") is not None
|
|
315
|
+
else None,
|
|
316
|
+
}
|
|
317
|
+
)
|
|
318
|
+
# store additional fields in additional_properties
|
|
319
|
+
for _key in obj.keys():
|
|
320
|
+
if _key not in cls.__properties:
|
|
321
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
322
|
+
|
|
323
|
+
return _obj
|
|
@@ -0,0 +1,131 @@
|
|
|
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, 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 DocumentTemplateResponseCopiedPlaceholdersInner(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
DocumentTemplateResponseCopiedPlaceholdersInner
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
id: StrictStr | None = None
|
|
30
|
+
placeholder_id: StrictStr | None = None
|
|
31
|
+
name: StrictStr
|
|
32
|
+
subject: StrictStr | None = None
|
|
33
|
+
message: StrictStr | None = None
|
|
34
|
+
preassigned_recipient_name: StrictStr | None = None
|
|
35
|
+
preassigned_recipient_email: StrictStr | None = None
|
|
36
|
+
additional_properties: Dict[str, Any] = {}
|
|
37
|
+
__properties: ClassVar[List[str]] = [
|
|
38
|
+
"id",
|
|
39
|
+
"placeholder_id",
|
|
40
|
+
"name",
|
|
41
|
+
"subject",
|
|
42
|
+
"message",
|
|
43
|
+
"preassigned_recipient_name",
|
|
44
|
+
"preassigned_recipient_email",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
64
|
+
"""Create an instance of DocumentTemplateResponseCopiedPlaceholdersInner from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
77
|
+
"""
|
|
78
|
+
excluded_fields: Set[str] = set(
|
|
79
|
+
[
|
|
80
|
+
"additional_properties",
|
|
81
|
+
]
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
# puts key-value pairs in additional_properties in the top level
|
|
90
|
+
if self.additional_properties is not None:
|
|
91
|
+
for _key, _value in self.additional_properties.items():
|
|
92
|
+
_dict[_key] = _value
|
|
93
|
+
|
|
94
|
+
# set to None if subject (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.subject is None and "subject" in self.model_fields_set:
|
|
97
|
+
_dict["subject"] = None
|
|
98
|
+
|
|
99
|
+
# set to None if message (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.message is None and "message" in self.model_fields_set:
|
|
102
|
+
_dict["message"] = None
|
|
103
|
+
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
108
|
+
"""Create an instance of DocumentTemplateResponseCopiedPlaceholdersInner from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return cls.model_validate(obj)
|
|
114
|
+
|
|
115
|
+
_obj = cls.model_validate(
|
|
116
|
+
{
|
|
117
|
+
"id": obj.get("id"),
|
|
118
|
+
"placeholder_id": obj.get("placeholder_id"),
|
|
119
|
+
"name": obj.get("name"),
|
|
120
|
+
"subject": obj.get("subject"),
|
|
121
|
+
"message": obj.get("message"),
|
|
122
|
+
"preassigned_recipient_name": obj.get("preassigned_recipient_name"),
|
|
123
|
+
"preassigned_recipient_email": obj.get("preassigned_recipient_email"),
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
# store additional fields in additional_properties
|
|
127
|
+
for _key in obj.keys():
|
|
128
|
+
if _key not in cls.__properties:
|
|
129
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
130
|
+
|
|
131
|
+
return _obj
|
|
@@ -0,0 +1,144 @@
|
|
|
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, StrictInt, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
20
|
+
from signwell_sdk.models.attachment_request_info import AttachmentRequestInfo
|
|
21
|
+
from typing import Any, Optional, Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class DocumentTemplateResponsePlaceholdersInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DocumentTemplateResponsePlaceholdersInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
id: StrictStr | None = None
|
|
31
|
+
name: StrictStr
|
|
32
|
+
subject: StrictStr | None = None
|
|
33
|
+
message: StrictStr | None = None
|
|
34
|
+
preassigned_recipient_name: StrictStr | None = None
|
|
35
|
+
preassigned_recipient_email: StrictStr | None = None
|
|
36
|
+
signing_order: StrictInt | None = None
|
|
37
|
+
attachment_requests: List[AttachmentRequestInfo] | None = None
|
|
38
|
+
additional_properties: Dict[str, Any] = {}
|
|
39
|
+
__properties: ClassVar[List[str]] = [
|
|
40
|
+
"id",
|
|
41
|
+
"name",
|
|
42
|
+
"subject",
|
|
43
|
+
"message",
|
|
44
|
+
"preassigned_recipient_name",
|
|
45
|
+
"preassigned_recipient_email",
|
|
46
|
+
"signing_order",
|
|
47
|
+
"attachment_requests",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
def to_str(self) -> str:
|
|
57
|
+
"""Returns the string representation of the model using alias"""
|
|
58
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
59
|
+
|
|
60
|
+
def to_json(self) -> str:
|
|
61
|
+
"""Returns the JSON representation of the model using alias"""
|
|
62
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
63
|
+
return json.dumps(self.to_dict())
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
67
|
+
"""Create an instance of DocumentTemplateResponsePlaceholdersInner from a JSON string"""
|
|
68
|
+
return cls.from_dict(json.loads(json_str))
|
|
69
|
+
|
|
70
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
71
|
+
"""Return the dictionary representation of the model using alias.
|
|
72
|
+
|
|
73
|
+
This has the following differences from calling pydantic's
|
|
74
|
+
`self.model_dump(by_alias=True)`:
|
|
75
|
+
|
|
76
|
+
* `None` is only added to the output dict for nullable fields that
|
|
77
|
+
were set at model initialization. Other fields with value `None`
|
|
78
|
+
are ignored.
|
|
79
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set(
|
|
82
|
+
[
|
|
83
|
+
"additional_properties",
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
_dict = self.model_dump(
|
|
88
|
+
by_alias=True,
|
|
89
|
+
exclude=excluded_fields,
|
|
90
|
+
exclude_none=True,
|
|
91
|
+
)
|
|
92
|
+
# override the default output from pydantic by calling `to_dict()` of each item in attachment_requests (list)
|
|
93
|
+
_items_attachment_requests: list[Any] = []
|
|
94
|
+
if self.attachment_requests:
|
|
95
|
+
for _item_attachment_requests in self.attachment_requests:
|
|
96
|
+
if _item_attachment_requests:
|
|
97
|
+
_items_attachment_requests.append(_item_attachment_requests.to_dict())
|
|
98
|
+
_dict["attachment_requests"] = _items_attachment_requests
|
|
99
|
+
# puts key-value pairs in additional_properties in the top level
|
|
100
|
+
if self.additional_properties is not None:
|
|
101
|
+
for _key, _value in self.additional_properties.items():
|
|
102
|
+
_dict[_key] = _value
|
|
103
|
+
|
|
104
|
+
# set to None if subject (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.subject is None and "subject" in self.model_fields_set:
|
|
107
|
+
_dict["subject"] = None
|
|
108
|
+
|
|
109
|
+
# set to None if message (nullable) is None
|
|
110
|
+
# and model_fields_set contains the field
|
|
111
|
+
if self.message is None and "message" in self.model_fields_set:
|
|
112
|
+
_dict["message"] = None
|
|
113
|
+
|
|
114
|
+
return _dict
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
118
|
+
"""Create an instance of DocumentTemplateResponsePlaceholdersInner from a dict"""
|
|
119
|
+
if obj is None:
|
|
120
|
+
return None
|
|
121
|
+
|
|
122
|
+
if not isinstance(obj, dict):
|
|
123
|
+
return cls.model_validate(obj)
|
|
124
|
+
|
|
125
|
+
_obj = cls.model_validate(
|
|
126
|
+
{
|
|
127
|
+
"id": obj.get("id"),
|
|
128
|
+
"name": obj.get("name"),
|
|
129
|
+
"subject": obj.get("subject"),
|
|
130
|
+
"message": obj.get("message"),
|
|
131
|
+
"preassigned_recipient_name": obj.get("preassigned_recipient_name"),
|
|
132
|
+
"preassigned_recipient_email": obj.get("preassigned_recipient_email"),
|
|
133
|
+
"signing_order": obj.get("signing_order"),
|
|
134
|
+
"attachment_requests": [AttachmentRequestInfo.from_dict(_item) for _item in obj["attachment_requests"]]
|
|
135
|
+
if obj.get("attachment_requests") is not None
|
|
136
|
+
else None,
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
# store additional fields in additional_properties
|
|
140
|
+
for _key in obj.keys():
|
|
141
|
+
if _key not in cls.__properties:
|
|
142
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
143
|
+
|
|
144
|
+
return _obj
|