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,350 @@
|
|
|
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_extensions import Annotated
|
|
21
|
+
from signwell_sdk.models.attachment_requests_inner import AttachmentRequestsInner
|
|
22
|
+
from signwell_sdk.models.checkbox_groups_inner import CheckboxGroupsInner
|
|
23
|
+
from signwell_sdk.models.copied_contacts_inner import CopiedContactsInner
|
|
24
|
+
from signwell_sdk.models.fields_inner_inner import FieldsInnerInner
|
|
25
|
+
from signwell_sdk.models.files_inner import FilesInner
|
|
26
|
+
from signwell_sdk.models.label_request import LabelRequest
|
|
27
|
+
from signwell_sdk.models.recipients_inner import RecipientsInner
|
|
28
|
+
from typing import Any, Optional, Set
|
|
29
|
+
from typing_extensions import Self
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class DocumentRequest(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
DocumentRequest
|
|
35
|
+
""" # noqa: E501
|
|
36
|
+
|
|
37
|
+
test_mode: StrictBool | None = Field(
|
|
38
|
+
default=False,
|
|
39
|
+
description="Set to `true` to enable Test Mode. Documents created with Test Mode do not count towards API billing and are not legally binding. Defaults to `false`",
|
|
40
|
+
)
|
|
41
|
+
files: List[FilesInner] = Field(
|
|
42
|
+
description="Document files can be uploaded by specifying a file URL or base64 string. Either `file_url` or `file_base64` must be present (not both). Valid file types are: .pdf, .doc, .docx, .pages, .ppt, .pptx, .key, .xls, .xlsx, .numbers, .jpg, .jpeg, .png, .tiff, .tif, .webp, .html, and .htm"
|
|
43
|
+
)
|
|
44
|
+
name: StrictStr | None = Field(default=None, description="The name of the document.")
|
|
45
|
+
subject: StrictStr | None = Field(
|
|
46
|
+
default=None,
|
|
47
|
+
description="Email subject for the signature request that recipients will see. Defaults to the default system subject or a template subject (if the document is created from a template).",
|
|
48
|
+
)
|
|
49
|
+
message: StrictStr | None = Field(
|
|
50
|
+
default=None,
|
|
51
|
+
description="Email message for the signature request that recipients will see. Defaults to the default system message or a template message (if the document is created from a template).",
|
|
52
|
+
)
|
|
53
|
+
recipients: List[RecipientsInner] = Field(
|
|
54
|
+
description="Document recipients are people that must complete and/or sign a document."
|
|
55
|
+
)
|
|
56
|
+
draft: StrictBool | None = Field(
|
|
57
|
+
default=False,
|
|
58
|
+
description="Whether the document can still be updated before sending a signature request. If set to `false` the document is sent for signing as part of this request. Defaults to `false`.",
|
|
59
|
+
)
|
|
60
|
+
self_sign: StrictBool | None = Field(
|
|
61
|
+
default=False,
|
|
62
|
+
description="When set to true the document will enter self-sign mode, which allows the document creator to sign and complete a document without any field setup. Must use the embedded_edit_url in the response and (if embedding) the embedded requesting workflow.",
|
|
63
|
+
)
|
|
64
|
+
with_signature_page: StrictBool | None = Field(
|
|
65
|
+
default=False,
|
|
66
|
+
description="When set to `true` the document will have a signature page added to the end, and all signers will be required to add their signature on that page.",
|
|
67
|
+
)
|
|
68
|
+
expires_in: Annotated[int, Field(strict=True, ge=1)] | None = Field(
|
|
69
|
+
default=None,
|
|
70
|
+
description="Number of days before the signature request expires. Defaults to the account expiration setting or template expiration (if the document is created from a template).",
|
|
71
|
+
)
|
|
72
|
+
reminders: StrictBool | None = Field(
|
|
73
|
+
default=True,
|
|
74
|
+
description="Whether to send signing reminders to recipients. Reminders are sent on day 3, day 6, and day 10 if set to `true`. Defaults to `true`.",
|
|
75
|
+
)
|
|
76
|
+
apply_signing_order: StrictBool | None = Field(
|
|
77
|
+
default=False,
|
|
78
|
+
description="When set to `true` recipients will sign one at a time in the order of the `recipients` collection of this request.",
|
|
79
|
+
)
|
|
80
|
+
api_application_id: StrictStr | None = Field(
|
|
81
|
+
default=None,
|
|
82
|
+
description="Unique identifier for API Application settings to use. API Applications are optional and mainly used when isolating OAuth apps or for more control over embedded API settings",
|
|
83
|
+
)
|
|
84
|
+
embedded_signing: StrictBool | None = Field(
|
|
85
|
+
default=False,
|
|
86
|
+
description="When set to `true` it enables embedded signing in your website/web application. Embedded functionality works with an iFrame and email authentication is disabled. :embedded_signinig defaults to `false`.",
|
|
87
|
+
)
|
|
88
|
+
embedded_signing_notifications: StrictBool | None = Field(
|
|
89
|
+
default=False,
|
|
90
|
+
description="On embedding signing, document owners (and CC'd contacts) do not get a notification email when documents have been completed. Setting this param to `true` will send out those final completed notifications. Default is `false`",
|
|
91
|
+
)
|
|
92
|
+
text_tags: StrictBool | None = Field(
|
|
93
|
+
default=False,
|
|
94
|
+
description="An alternative way (if you can’t use the recommended way) of placing fields in specific locations of your document by using special text tags. Useful when changing the content of your files changes the location of fields. See API documentation for “Text Tags” for details. Defaults to false.",
|
|
95
|
+
)
|
|
96
|
+
custom_requester_name: StrictStr | None = Field(
|
|
97
|
+
default=None,
|
|
98
|
+
description="Sets the custom requester name for the document. When set, this is the name used for all email communications, signing notifications, and in the audit file.",
|
|
99
|
+
)
|
|
100
|
+
custom_requester_email: StrictStr | None = Field(
|
|
101
|
+
default=None,
|
|
102
|
+
description="Sets the custom requester email for the document. When set, this is the email used for all email communications, signing notifications, and in the audit file.",
|
|
103
|
+
)
|
|
104
|
+
redirect_url: StrictStr | None = Field(
|
|
105
|
+
default=None, description="A URL that recipients are redirected to after successfully signing a document."
|
|
106
|
+
)
|
|
107
|
+
allow_decline: StrictBool | None = Field(
|
|
108
|
+
default=True,
|
|
109
|
+
description="Whether to allow recipients the option to decline signing a document. If multiple signers are involved in a document, any single recipient can cancel the entire document signing process by declining to sign.",
|
|
110
|
+
)
|
|
111
|
+
allow_reassign: StrictBool | None = Field(
|
|
112
|
+
default=True,
|
|
113
|
+
description="In some cases a signer is not the right person to sign and may need to reassign their signing responsibilities to another person. This feature allows them to reassign the document to someone else.",
|
|
114
|
+
)
|
|
115
|
+
decline_redirect_url: StrictStr | None = Field(
|
|
116
|
+
default=None, description="A URL that recipients are redirected to if the document is declined."
|
|
117
|
+
)
|
|
118
|
+
language: StrictStr | None = Field(
|
|
119
|
+
default=None,
|
|
120
|
+
description="Sets the language for all recipients on the document and updates all recipient side interactions including the document email and the document itself. Accepted languages: English, Français, Español, Deutsch, Polski, Português, Dansk, Nederlands, Italiano, Русский, Svenska, العربية, Ελληνικά, Türkçe, Slovenčina. Defaults to English. Language should be sent in ISO 639-1 format: en, fr, es, de, pl, pt, da, nl, it, ru, sv, ar, el, tr, sk.",
|
|
121
|
+
)
|
|
122
|
+
metadata: Dict[str, StrictStr] | None = Field(
|
|
123
|
+
default=None,
|
|
124
|
+
description="Optional key-value data that can be associated with the document. If set, will be available every time the document data is returned.",
|
|
125
|
+
)
|
|
126
|
+
fields: List[List[FieldsInnerInner]] | None = Field(
|
|
127
|
+
default=None,
|
|
128
|
+
description="Document fields placed on a document for collecting data or signatures from recipients. At least one field must be present in the Create Document request if `draft` is `false` (unless adding a signature page by using `with_signature_page`). Field data should be sent as a 2-dimensional JSON array. One array of fields is needed for each file in the files array. An array of fields can be empty if you have a file that does not contain any fields.",
|
|
129
|
+
)
|
|
130
|
+
attachment_requests: List[AttachmentRequestsInner] | None = Field(
|
|
131
|
+
default=None,
|
|
132
|
+
description="Attachments that a recipient must upload to complete the signing process. Attachment requests are shown after all document fields have been completed.",
|
|
133
|
+
)
|
|
134
|
+
copied_contacts: List[CopiedContactsInner] | None = Field(
|
|
135
|
+
default=None,
|
|
136
|
+
description="Copied contacts are emailed the final document once it has been completed by all recipients.",
|
|
137
|
+
)
|
|
138
|
+
labels: List[LabelRequest] | None = Field(
|
|
139
|
+
default=None,
|
|
140
|
+
description="Labels can be used to organize documents in a way that can make it easy to find using the document search in SignWell. A document can have multiple labels.",
|
|
141
|
+
)
|
|
142
|
+
checkbox_groups: List[CheckboxGroupsInner] | None = Field(
|
|
143
|
+
default=None,
|
|
144
|
+
description="Checkbox fields that are placed on a document can be grouped with selection requirements. At least 2 checkbox fields in an array of fields must be assigned to the same recipient.",
|
|
145
|
+
)
|
|
146
|
+
additional_properties: Dict[str, Any] = {}
|
|
147
|
+
__properties: ClassVar[List[str]] = [
|
|
148
|
+
"test_mode",
|
|
149
|
+
"files",
|
|
150
|
+
"name",
|
|
151
|
+
"subject",
|
|
152
|
+
"message",
|
|
153
|
+
"recipients",
|
|
154
|
+
"draft",
|
|
155
|
+
"self_sign",
|
|
156
|
+
"with_signature_page",
|
|
157
|
+
"expires_in",
|
|
158
|
+
"reminders",
|
|
159
|
+
"apply_signing_order",
|
|
160
|
+
"api_application_id",
|
|
161
|
+
"embedded_signing",
|
|
162
|
+
"embedded_signing_notifications",
|
|
163
|
+
"text_tags",
|
|
164
|
+
"custom_requester_name",
|
|
165
|
+
"custom_requester_email",
|
|
166
|
+
"redirect_url",
|
|
167
|
+
"allow_decline",
|
|
168
|
+
"allow_reassign",
|
|
169
|
+
"decline_redirect_url",
|
|
170
|
+
"language",
|
|
171
|
+
"metadata",
|
|
172
|
+
"fields",
|
|
173
|
+
"attachment_requests",
|
|
174
|
+
"copied_contacts",
|
|
175
|
+
"labels",
|
|
176
|
+
"checkbox_groups",
|
|
177
|
+
]
|
|
178
|
+
|
|
179
|
+
model_config = ConfigDict(
|
|
180
|
+
populate_by_name=True,
|
|
181
|
+
validate_assignment=True,
|
|
182
|
+
protected_namespaces=(),
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
def to_str(self) -> str:
|
|
186
|
+
"""Returns the string representation of the model using alias"""
|
|
187
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
188
|
+
|
|
189
|
+
def to_json(self) -> str:
|
|
190
|
+
"""Returns the JSON representation of the model using alias"""
|
|
191
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
192
|
+
return json.dumps(self.to_dict())
|
|
193
|
+
|
|
194
|
+
@classmethod
|
|
195
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
196
|
+
"""Create an instance of DocumentRequest from a JSON string"""
|
|
197
|
+
return cls.from_dict(json.loads(json_str))
|
|
198
|
+
|
|
199
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
200
|
+
"""Return the dictionary representation of the model using alias.
|
|
201
|
+
|
|
202
|
+
This has the following differences from calling pydantic's
|
|
203
|
+
`self.model_dump(by_alias=True)`:
|
|
204
|
+
|
|
205
|
+
* `None` is only added to the output dict for nullable fields that
|
|
206
|
+
were set at model initialization. Other fields with value `None`
|
|
207
|
+
are ignored.
|
|
208
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
209
|
+
"""
|
|
210
|
+
excluded_fields: Set[str] = set(
|
|
211
|
+
[
|
|
212
|
+
"additional_properties",
|
|
213
|
+
]
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
_dict = self.model_dump(
|
|
217
|
+
by_alias=True,
|
|
218
|
+
exclude=excluded_fields,
|
|
219
|
+
exclude_none=True,
|
|
220
|
+
)
|
|
221
|
+
# override the default output from pydantic by calling `to_dict()` of each item in files (list)
|
|
222
|
+
_items_files: list[Any] = []
|
|
223
|
+
if self.files:
|
|
224
|
+
for _item_files in self.files:
|
|
225
|
+
if _item_files:
|
|
226
|
+
_items_files.append(_item_files.to_dict())
|
|
227
|
+
_dict["files"] = _items_files
|
|
228
|
+
# override the default output from pydantic by calling `to_dict()` of each item in recipients (list)
|
|
229
|
+
_items_recipients: list[Any] = []
|
|
230
|
+
if self.recipients:
|
|
231
|
+
for _item_recipients in self.recipients:
|
|
232
|
+
if _item_recipients:
|
|
233
|
+
_items_recipients.append(_item_recipients.to_dict())
|
|
234
|
+
_dict["recipients"] = _items_recipients
|
|
235
|
+
# override the default output from pydantic by calling `to_dict()` of each item in fields (list of list)
|
|
236
|
+
_items_fields: list[Any] = []
|
|
237
|
+
if self.fields:
|
|
238
|
+
for _item_fields in self.fields:
|
|
239
|
+
if _item_fields:
|
|
240
|
+
_items_fields.append(
|
|
241
|
+
[_inner_item.to_dict() for _inner_item in _item_fields if _inner_item is not None]
|
|
242
|
+
)
|
|
243
|
+
_dict["fields"] = _items_fields
|
|
244
|
+
# override the default output from pydantic by calling `to_dict()` of each item in attachment_requests (list)
|
|
245
|
+
_items_attachment_requests: list[Any] = []
|
|
246
|
+
if self.attachment_requests:
|
|
247
|
+
for _item_attachment_requests in self.attachment_requests:
|
|
248
|
+
if _item_attachment_requests:
|
|
249
|
+
_items_attachment_requests.append(_item_attachment_requests.to_dict())
|
|
250
|
+
_dict["attachment_requests"] = _items_attachment_requests
|
|
251
|
+
# override the default output from pydantic by calling `to_dict()` of each item in copied_contacts (list)
|
|
252
|
+
_items_copied_contacts: list[Any] = []
|
|
253
|
+
if self.copied_contacts:
|
|
254
|
+
for _item_copied_contacts in self.copied_contacts:
|
|
255
|
+
if _item_copied_contacts:
|
|
256
|
+
_items_copied_contacts.append(_item_copied_contacts.to_dict())
|
|
257
|
+
_dict["copied_contacts"] = _items_copied_contacts
|
|
258
|
+
# override the default output from pydantic by calling `to_dict()` of each item in labels (list)
|
|
259
|
+
_items_labels: list[Any] = []
|
|
260
|
+
if self.labels:
|
|
261
|
+
for _item_labels in self.labels:
|
|
262
|
+
if _item_labels:
|
|
263
|
+
_items_labels.append(_item_labels.to_dict())
|
|
264
|
+
_dict["labels"] = _items_labels
|
|
265
|
+
# override the default output from pydantic by calling `to_dict()` of each item in checkbox_groups (list)
|
|
266
|
+
_items_checkbox_groups: list[Any] = []
|
|
267
|
+
if self.checkbox_groups:
|
|
268
|
+
for _item_checkbox_groups in self.checkbox_groups:
|
|
269
|
+
if _item_checkbox_groups:
|
|
270
|
+
_items_checkbox_groups.append(_item_checkbox_groups.to_dict())
|
|
271
|
+
_dict["checkbox_groups"] = _items_checkbox_groups
|
|
272
|
+
# puts key-value pairs in additional_properties in the top level
|
|
273
|
+
if self.additional_properties is not None:
|
|
274
|
+
for _key, _value in self.additional_properties.items():
|
|
275
|
+
_dict[_key] = _value
|
|
276
|
+
|
|
277
|
+
return _dict
|
|
278
|
+
|
|
279
|
+
@classmethod
|
|
280
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
281
|
+
"""Create an instance of DocumentRequest from a dict"""
|
|
282
|
+
if obj is None:
|
|
283
|
+
return None
|
|
284
|
+
|
|
285
|
+
if not isinstance(obj, dict):
|
|
286
|
+
return cls.model_validate(obj)
|
|
287
|
+
|
|
288
|
+
_obj = cls.model_validate(
|
|
289
|
+
{
|
|
290
|
+
"test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False,
|
|
291
|
+
"files": [FilesInner.from_dict(_item) for _item in obj["files"]]
|
|
292
|
+
if obj.get("files") is not None
|
|
293
|
+
else None,
|
|
294
|
+
"name": obj.get("name"),
|
|
295
|
+
"subject": obj.get("subject"),
|
|
296
|
+
"message": obj.get("message"),
|
|
297
|
+
"recipients": [RecipientsInner.from_dict(_item) for _item in obj["recipients"]]
|
|
298
|
+
if obj.get("recipients") is not None
|
|
299
|
+
else None,
|
|
300
|
+
"draft": obj.get("draft") if obj.get("draft") is not None else False,
|
|
301
|
+
"self_sign": obj.get("self_sign") if obj.get("self_sign") is not None else False,
|
|
302
|
+
"with_signature_page": obj.get("with_signature_page")
|
|
303
|
+
if obj.get("with_signature_page") is not None
|
|
304
|
+
else False,
|
|
305
|
+
"expires_in": obj.get("expires_in"),
|
|
306
|
+
"reminders": obj.get("reminders") if obj.get("reminders") is not None else True,
|
|
307
|
+
"apply_signing_order": obj.get("apply_signing_order")
|
|
308
|
+
if obj.get("apply_signing_order") is not None
|
|
309
|
+
else False,
|
|
310
|
+
"api_application_id": obj.get("api_application_id"),
|
|
311
|
+
"embedded_signing": obj.get("embedded_signing") if obj.get("embedded_signing") is not None else False,
|
|
312
|
+
"embedded_signing_notifications": obj.get("embedded_signing_notifications")
|
|
313
|
+
if obj.get("embedded_signing_notifications") is not None
|
|
314
|
+
else False,
|
|
315
|
+
"text_tags": obj.get("text_tags") if obj.get("text_tags") is not None else False,
|
|
316
|
+
"custom_requester_name": obj.get("custom_requester_name"),
|
|
317
|
+
"custom_requester_email": obj.get("custom_requester_email"),
|
|
318
|
+
"redirect_url": obj.get("redirect_url"),
|
|
319
|
+
"allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else True,
|
|
320
|
+
"allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else True,
|
|
321
|
+
"decline_redirect_url": obj.get("decline_redirect_url"),
|
|
322
|
+
"language": obj.get("language"),
|
|
323
|
+
"metadata": obj.get("metadata"),
|
|
324
|
+
"fields": [
|
|
325
|
+
[FieldsInnerInner.from_dict(_inner_item) for _inner_item in _item] for _item in obj["fields"]
|
|
326
|
+
]
|
|
327
|
+
if obj.get("fields") is not None
|
|
328
|
+
else None,
|
|
329
|
+
"attachment_requests": [
|
|
330
|
+
AttachmentRequestsInner.from_dict(_item) for _item in obj["attachment_requests"]
|
|
331
|
+
]
|
|
332
|
+
if obj.get("attachment_requests") is not None
|
|
333
|
+
else None,
|
|
334
|
+
"copied_contacts": [CopiedContactsInner.from_dict(_item) for _item in obj["copied_contacts"]]
|
|
335
|
+
if obj.get("copied_contacts") is not None
|
|
336
|
+
else None,
|
|
337
|
+
"labels": [LabelRequest.from_dict(_item) for _item in obj["labels"]]
|
|
338
|
+
if obj.get("labels") is not None
|
|
339
|
+
else None,
|
|
340
|
+
"checkbox_groups": [CheckboxGroupsInner.from_dict(_item) for _item in obj["checkbox_groups"]]
|
|
341
|
+
if obj.get("checkbox_groups") is not None
|
|
342
|
+
else None,
|
|
343
|
+
}
|
|
344
|
+
)
|
|
345
|
+
# store additional fields in additional_properties
|
|
346
|
+
for _key in obj.keys():
|
|
347
|
+
if _key not in cls.__properties:
|
|
348
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
349
|
+
|
|
350
|
+
return _obj
|