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.
Files changed (110) hide show
  1. signwell_sdk/__init__.py +287 -0
  2. signwell_sdk/api/__init__.py +10 -0
  3. signwell_sdk/api/api_application_api.py +481 -0
  4. signwell_sdk/api/bulk_send_api.py +1589 -0
  5. signwell_sdk/api/document_api.py +2425 -0
  6. signwell_sdk/api/me_api.py +246 -0
  7. signwell_sdk/api/regional_api.py +345 -0
  8. signwell_sdk/api/template_api.py +1298 -0
  9. signwell_sdk/api/webhooks_api.py +710 -0
  10. signwell_sdk/api_client.py +747 -0
  11. signwell_sdk/api_response.py +20 -0
  12. signwell_sdk/configuration.py +599 -0
  13. signwell_sdk/embedded.py +385 -0
  14. signwell_sdk/exceptions.py +314 -0
  15. signwell_sdk/models/__init__.py +114 -0
  16. signwell_sdk/models/account_info_response.py +143 -0
  17. signwell_sdk/models/account_info_response_active_users_inner.py +107 -0
  18. signwell_sdk/models/account_info_response_preferences.py +147 -0
  19. signwell_sdk/models/additional_fields_inner_inner.py +274 -0
  20. signwell_sdk/models/additional_fields_inner_inner_value.py +189 -0
  21. signwell_sdk/models/additional_files_inner.py +103 -0
  22. signwell_sdk/models/api_application_response.py +137 -0
  23. signwell_sdk/models/api_application_response_owner.py +107 -0
  24. signwell_sdk/models/api_application_response_preferences.py +135 -0
  25. signwell_sdk/models/attachment_request_info.py +99 -0
  26. signwell_sdk/models/attachment_requests_inner.py +110 -0
  27. signwell_sdk/models/bulk_send_create_response.py +132 -0
  28. signwell_sdk/models/bulk_send_csv_request.py +100 -0
  29. signwell_sdk/models/bulk_send_csv_template_response.py +97 -0
  30. signwell_sdk/models/bulk_send_documents_response.py +167 -0
  31. signwell_sdk/models/bulk_send_list_item.py +141 -0
  32. signwell_sdk/models/bulk_send_list_response.py +138 -0
  33. signwell_sdk/models/bulk_send_response.py +151 -0
  34. signwell_sdk/models/bulk_send_response_templates_inner.py +98 -0
  35. signwell_sdk/models/bulk_send_validate_csv_response.py +129 -0
  36. signwell_sdk/models/checkbox_group_info.py +138 -0
  37. signwell_sdk/models/checkbox_groups_inner.py +136 -0
  38. signwell_sdk/models/checkbox_validation.py +35 -0
  39. signwell_sdk/models/completed_pdf_response.py +177 -0
  40. signwell_sdk/models/completed_pdf_url_response.py +97 -0
  41. signwell_sdk/models/copied_contact_info.py +99 -0
  42. signwell_sdk/models/copied_contacts_inner.py +98 -0
  43. signwell_sdk/models/copied_placeholders_inner.py +111 -0
  44. signwell_sdk/models/create_bulk_send_request.py +155 -0
  45. signwell_sdk/models/create_webhook_request.py +100 -0
  46. signwell_sdk/models/date_format.py +36 -0
  47. signwell_sdk/models/detailed_option.py +105 -0
  48. signwell_sdk/models/document_from_template_request.py +377 -0
  49. signwell_sdk/models/document_from_template_response.py +353 -0
  50. signwell_sdk/models/document_from_template_response_fields_inner_inner.py +270 -0
  51. signwell_sdk/models/document_from_template_response_fields_inner_inner_recipient.py +99 -0
  52. signwell_sdk/models/document_from_template_response_recipients_inner.py +206 -0
  53. signwell_sdk/models/document_list_response.py +138 -0
  54. signwell_sdk/models/document_request.py +350 -0
  55. signwell_sdk/models/document_response.py +357 -0
  56. signwell_sdk/models/document_response_attachment_requests_inner.py +101 -0
  57. signwell_sdk/models/document_response_fields_inner_inner.py +268 -0
  58. signwell_sdk/models/document_response_fields_inner_inner_options_inner.py +101 -0
  59. signwell_sdk/models/document_response_fields_inner_inner_recipient.py +98 -0
  60. signwell_sdk/models/document_response_fields_inner_inner_value.py +195 -0
  61. signwell_sdk/models/document_response_recipients_inner.py +208 -0
  62. signwell_sdk/models/document_template_list_response.py +138 -0
  63. signwell_sdk/models/document_template_request.py +307 -0
  64. signwell_sdk/models/document_template_response.py +323 -0
  65. signwell_sdk/models/document_template_response_copied_placeholders_inner.py +131 -0
  66. signwell_sdk/models/document_template_response_placeholders_inner.py +144 -0
  67. signwell_sdk/models/document_template_update_request.py +208 -0
  68. signwell_sdk/models/dropdown_option.py +153 -0
  69. signwell_sdk/models/error_response.py +107 -0
  70. signwell_sdk/models/error_response_meta.py +101 -0
  71. signwell_sdk/models/field_type.py +46 -0
  72. signwell_sdk/models/fields_inner_inner.py +268 -0
  73. signwell_sdk/models/file_format.py +33 -0
  74. signwell_sdk/models/file_info.py +98 -0
  75. signwell_sdk/models/files_inner.py +103 -0
  76. signwell_sdk/models/label_info.py +98 -0
  77. signwell_sdk/models/label_request.py +97 -0
  78. signwell_sdk/models/label_response.py +98 -0
  79. signwell_sdk/models/me_response.py +130 -0
  80. signwell_sdk/models/me_response_contact.py +147 -0
  81. signwell_sdk/models/me_response_user.py +117 -0
  82. signwell_sdk/models/me_response_user_preferences.py +105 -0
  83. signwell_sdk/models/nom151_certificate_response.py +107 -0
  84. signwell_sdk/models/nom151_certificate_response_nom151.py +125 -0
  85. signwell_sdk/models/nom151_url_response.py +97 -0
  86. signwell_sdk/models/pagination_meta.py +119 -0
  87. signwell_sdk/models/placeholders_inner.py +115 -0
  88. signwell_sdk/models/rate_limit_error_response.py +97 -0
  89. signwell_sdk/models/recipients_inner.py +141 -0
  90. signwell_sdk/models/reminder_recipients_inner.py +100 -0
  91. signwell_sdk/models/send_reminder_request.py +114 -0
  92. signwell_sdk/models/template_attachment_requests_inner.py +110 -0
  93. signwell_sdk/models/template_checkbox_groups_inner.py +136 -0
  94. signwell_sdk/models/template_field_values_inner.py +109 -0
  95. signwell_sdk/models/template_field_values_inner_value.py +189 -0
  96. signwell_sdk/models/template_fields_inner_inner.py +266 -0
  97. signwell_sdk/models/template_recipients_inner.py +146 -0
  98. signwell_sdk/models/text_validation.py +42 -0
  99. signwell_sdk/models/update_document_and_send_request.py +234 -0
  100. signwell_sdk/models/update_recipients_map_inner.py +118 -0
  101. signwell_sdk/models/update_recipients_request.py +111 -0
  102. signwell_sdk/models/validation_error_response.py +99 -0
  103. signwell_sdk/models/webhook_response.py +110 -0
  104. signwell_sdk/py.typed +0 -0
  105. signwell_sdk/rest.py +209 -0
  106. signwell_sdk/webhook.py +214 -0
  107. signwell_sdk_python-0.1.0.dist-info/METADATA +177 -0
  108. signwell_sdk_python-0.1.0.dist-info/RECORD +110 -0
  109. signwell_sdk_python-0.1.0.dist-info/WHEEL +4 -0
  110. signwell_sdk_python-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,146 @@
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 TemplateRecipientsInner(BaseModel):
25
+ """
26
+ TemplateRecipientsInner
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
+ placeholder_name: StrictStr | None = Field(
35
+ default=None, description="The name of the placeholder you want this recipient assigned to."
36
+ )
37
+ passcode: StrictStr | None = Field(
38
+ default=None,
39
+ 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.",
40
+ )
41
+ subject: StrictStr | None = Field(
42
+ default=None,
43
+ description="Email subject for the signature request that the recipient will see. Overrides the general subject for the template.",
44
+ )
45
+ message: StrictStr | None = Field(
46
+ default=None,
47
+ description="Email message for the signature request that the recipient will see. Overrides the general message for the template.",
48
+ )
49
+ send_email: StrictBool | None = Field(
50
+ default=False,
51
+ 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`.",
52
+ )
53
+ send_email_delay: StrictInt | None = Field(
54
+ default=0,
55
+ 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`.",
56
+ )
57
+ additional_properties: Dict[str, Any] = {}
58
+ __properties: ClassVar[List[str]] = [
59
+ "id",
60
+ "name",
61
+ "email",
62
+ "placeholder_name",
63
+ "passcode",
64
+ "subject",
65
+ "message",
66
+ "send_email",
67
+ "send_email_delay",
68
+ ]
69
+
70
+ model_config = ConfigDict(
71
+ populate_by_name=True,
72
+ validate_assignment=True,
73
+ protected_namespaces=(),
74
+ )
75
+
76
+ def to_str(self) -> str:
77
+ """Returns the string representation of the model using alias"""
78
+ return pprint.pformat(self.model_dump(by_alias=True))
79
+
80
+ def to_json(self) -> str:
81
+ """Returns the JSON representation of the model using alias"""
82
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
83
+ return json.dumps(self.to_dict())
84
+
85
+ @classmethod
86
+ def from_json(cls, json_str: str) -> Self | None:
87
+ """Create an instance of TemplateRecipientsInner from a JSON string"""
88
+ return cls.from_dict(json.loads(json_str))
89
+
90
+ def to_dict(self) -> Dict[str, Any]:
91
+ """Return the dictionary representation of the model using alias.
92
+
93
+ This has the following differences from calling pydantic's
94
+ `self.model_dump(by_alias=True)`:
95
+
96
+ * `None` is only added to the output dict for nullable fields that
97
+ were set at model initialization. Other fields with value `None`
98
+ are ignored.
99
+ * Fields in `self.additional_properties` are added to the output dict.
100
+ """
101
+ excluded_fields: Set[str] = set(
102
+ [
103
+ "additional_properties",
104
+ ]
105
+ )
106
+
107
+ _dict = self.model_dump(
108
+ by_alias=True,
109
+ exclude=excluded_fields,
110
+ exclude_none=True,
111
+ )
112
+ # puts key-value pairs in additional_properties in the top level
113
+ if self.additional_properties is not None:
114
+ for _key, _value in self.additional_properties.items():
115
+ _dict[_key] = _value
116
+
117
+ return _dict
118
+
119
+ @classmethod
120
+ def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
121
+ """Create an instance of TemplateRecipientsInner from a dict"""
122
+ if obj is None:
123
+ return None
124
+
125
+ if not isinstance(obj, dict):
126
+ return cls.model_validate(obj)
127
+
128
+ _obj = cls.model_validate(
129
+ {
130
+ "id": obj.get("id"),
131
+ "name": obj.get("name"),
132
+ "email": obj.get("email"),
133
+ "placeholder_name": obj.get("placeholder_name"),
134
+ "passcode": obj.get("passcode"),
135
+ "subject": obj.get("subject"),
136
+ "message": obj.get("message"),
137
+ "send_email": obj.get("send_email") if obj.get("send_email") is not None else False,
138
+ "send_email_delay": obj.get("send_email_delay") if obj.get("send_email_delay") is not None else 0,
139
+ }
140
+ )
141
+ # store additional fields in additional_properties
142
+ for _key in obj.keys():
143
+ if _key not in cls.__properties:
144
+ _obj.additional_properties[_key] = obj.get(_key)
145
+
146
+ return _obj
@@ -0,0 +1,42 @@
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 json
15
+ from enum import Enum
16
+ from typing_extensions import Self
17
+
18
+
19
+ class TextValidation(str, Enum):
20
+ """
21
+ Validation rule for text fields
22
+ """
23
+
24
+ """
25
+ allowed enum values
26
+ """
27
+ NO_TEXT_VALIDATION = "no_text_validation"
28
+ NUMBERS = "numbers"
29
+ LETTERS = "letters"
30
+ EMAIL_ADDRESS = "email_address"
31
+ US_PHONE_NUMBER = "us_phone_number"
32
+ US_ZIP_CODE = "us_zip_code"
33
+ US_SSN = "us_ssn"
34
+ US_AGE = "us_age"
35
+ ALPHANUMERIC = "alphanumeric"
36
+ US_BANK_ROUTING_NUMBER = "us_bank_routing_number"
37
+ US_BANK_ACCOUNT_NUMBER = "us_bank_account_number"
38
+
39
+ @classmethod
40
+ def from_json(cls, json_str: str) -> Self:
41
+ """Create an instance of TextValidation from a JSON string"""
42
+ return cls(json.loads(json_str))
@@ -0,0 +1,234 @@
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.checkbox_groups_inner import CheckboxGroupsInner
22
+ from signwell_sdk.models.label_request import LabelRequest
23
+ from typing import Any, Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class UpdateDocumentAndSendRequest(BaseModel):
28
+ """
29
+ UpdateDocumentAndSendRequest
30
+ """ # noqa: E501
31
+
32
+ test_mode: StrictBool | None = Field(
33
+ default=False,
34
+ 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`",
35
+ )
36
+ name: StrictStr | None = Field(default=None, description="The name of the document.")
37
+ subject: StrictStr | None = Field(
38
+ default=None,
39
+ 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).",
40
+ )
41
+ message: StrictStr | None = Field(
42
+ default=None,
43
+ 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).",
44
+ )
45
+ expires_in: Annotated[int, Field(strict=True, ge=1)] | None = Field(
46
+ default=None,
47
+ 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).",
48
+ )
49
+ reminders: StrictBool | None = Field(
50
+ default=True,
51
+ 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`.",
52
+ )
53
+ apply_signing_order: StrictBool | None = Field(
54
+ default=False,
55
+ description="When set to `true` recipients will sign one at a time in the order of the `recipients` collection of this request.",
56
+ )
57
+ api_application_id: StrictStr | None = Field(
58
+ default=None,
59
+ 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",
60
+ )
61
+ embedded_signing: StrictBool | None = Field(
62
+ default=False,
63
+ 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`.",
64
+ )
65
+ embedded_signing_notifications: StrictBool | None = Field(
66
+ default=False,
67
+ 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`",
68
+ )
69
+ custom_requester_name: StrictStr | None = Field(
70
+ default=None,
71
+ 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.",
72
+ )
73
+ custom_requester_email: StrictStr | None = Field(
74
+ default=None,
75
+ 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.",
76
+ )
77
+ redirect_url: StrictStr | None = Field(
78
+ default=None, description="A URL that recipients are redirected to after successfully signing a document."
79
+ )
80
+ allow_decline: StrictBool | None = Field(
81
+ default=True,
82
+ 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.",
83
+ )
84
+ allow_reassign: StrictBool | None = Field(
85
+ default=True,
86
+ 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.",
87
+ )
88
+ decline_redirect_url: StrictStr | None = Field(
89
+ default=None, description="A URL that recipients are redirected to if the document is declined."
90
+ )
91
+ metadata: Dict[str, StrictStr] | None = Field(
92
+ default=None,
93
+ description="Optional key-value data that can be associated with the document. If set, will be available every time the document data is returned.",
94
+ )
95
+ labels: List[LabelRequest] | None = Field(
96
+ default=None,
97
+ 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. Updating labels on a document will replace any existing labels for that document.",
98
+ )
99
+ checkbox_groups: List[CheckboxGroupsInner] | None = Field(
100
+ default=None,
101
+ 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.",
102
+ )
103
+ additional_properties: Dict[str, Any] = {}
104
+ __properties: ClassVar[List[str]] = [
105
+ "test_mode",
106
+ "name",
107
+ "subject",
108
+ "message",
109
+ "expires_in",
110
+ "reminders",
111
+ "apply_signing_order",
112
+ "api_application_id",
113
+ "embedded_signing",
114
+ "embedded_signing_notifications",
115
+ "custom_requester_name",
116
+ "custom_requester_email",
117
+ "redirect_url",
118
+ "allow_decline",
119
+ "allow_reassign",
120
+ "decline_redirect_url",
121
+ "metadata",
122
+ "labels",
123
+ "checkbox_groups",
124
+ ]
125
+
126
+ model_config = ConfigDict(
127
+ populate_by_name=True,
128
+ validate_assignment=True,
129
+ protected_namespaces=(),
130
+ )
131
+
132
+ def to_str(self) -> str:
133
+ """Returns the string representation of the model using alias"""
134
+ return pprint.pformat(self.model_dump(by_alias=True))
135
+
136
+ def to_json(self) -> str:
137
+ """Returns the JSON representation of the model using alias"""
138
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
139
+ return json.dumps(self.to_dict())
140
+
141
+ @classmethod
142
+ def from_json(cls, json_str: str) -> Self | None:
143
+ """Create an instance of UpdateDocumentAndSendRequest from a JSON string"""
144
+ return cls.from_dict(json.loads(json_str))
145
+
146
+ def to_dict(self) -> Dict[str, Any]:
147
+ """Return the dictionary representation of the model using alias.
148
+
149
+ This has the following differences from calling pydantic's
150
+ `self.model_dump(by_alias=True)`:
151
+
152
+ * `None` is only added to the output dict for nullable fields that
153
+ were set at model initialization. Other fields with value `None`
154
+ are ignored.
155
+ * Fields in `self.additional_properties` are added to the output dict.
156
+ """
157
+ excluded_fields: Set[str] = set(
158
+ [
159
+ "additional_properties",
160
+ ]
161
+ )
162
+
163
+ _dict = self.model_dump(
164
+ by_alias=True,
165
+ exclude=excluded_fields,
166
+ exclude_none=True,
167
+ )
168
+ # override the default output from pydantic by calling `to_dict()` of each item in labels (list)
169
+ _items_labels: list[Any] = []
170
+ if self.labels:
171
+ for _item_labels in self.labels:
172
+ if _item_labels:
173
+ _items_labels.append(_item_labels.to_dict())
174
+ _dict["labels"] = _items_labels
175
+ # override the default output from pydantic by calling `to_dict()` of each item in checkbox_groups (list)
176
+ _items_checkbox_groups: list[Any] = []
177
+ if self.checkbox_groups:
178
+ for _item_checkbox_groups in self.checkbox_groups:
179
+ if _item_checkbox_groups:
180
+ _items_checkbox_groups.append(_item_checkbox_groups.to_dict())
181
+ _dict["checkbox_groups"] = _items_checkbox_groups
182
+ # puts key-value pairs in additional_properties in the top level
183
+ if self.additional_properties is not None:
184
+ for _key, _value in self.additional_properties.items():
185
+ _dict[_key] = _value
186
+
187
+ return _dict
188
+
189
+ @classmethod
190
+ def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
191
+ """Create an instance of UpdateDocumentAndSendRequest from a dict"""
192
+ if obj is None:
193
+ return None
194
+
195
+ if not isinstance(obj, dict):
196
+ return cls.model_validate(obj)
197
+
198
+ _obj = cls.model_validate(
199
+ {
200
+ "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False,
201
+ "name": obj.get("name"),
202
+ "subject": obj.get("subject"),
203
+ "message": obj.get("message"),
204
+ "expires_in": obj.get("expires_in"),
205
+ "reminders": obj.get("reminders") if obj.get("reminders") is not None else True,
206
+ "apply_signing_order": obj.get("apply_signing_order")
207
+ if obj.get("apply_signing_order") is not None
208
+ else False,
209
+ "api_application_id": obj.get("api_application_id"),
210
+ "embedded_signing": obj.get("embedded_signing") if obj.get("embedded_signing") is not None else False,
211
+ "embedded_signing_notifications": obj.get("embedded_signing_notifications")
212
+ if obj.get("embedded_signing_notifications") is not None
213
+ else False,
214
+ "custom_requester_name": obj.get("custom_requester_name"),
215
+ "custom_requester_email": obj.get("custom_requester_email"),
216
+ "redirect_url": obj.get("redirect_url"),
217
+ "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else True,
218
+ "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else True,
219
+ "decline_redirect_url": obj.get("decline_redirect_url"),
220
+ "metadata": obj.get("metadata"),
221
+ "labels": [LabelRequest.from_dict(_item) for _item in obj["labels"]]
222
+ if obj.get("labels") is not None
223
+ else None,
224
+ "checkbox_groups": [CheckboxGroupsInner.from_dict(_item) for _item in obj["checkbox_groups"]]
225
+ if obj.get("checkbox_groups") is not None
226
+ else None,
227
+ }
228
+ )
229
+ # store additional fields in additional_properties
230
+ for _key in obj.keys():
231
+ if _key not in cls.__properties:
232
+ _obj.additional_properties[_key] = obj.get(_key)
233
+
234
+ return _obj
@@ -0,0 +1,118 @@
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 UpdateRecipientsMapInner(BaseModel):
25
+ """
26
+ UpdateRecipientsMapInner
27
+ """ # noqa: E501
28
+
29
+ id: StrictStr = Field(description="The recipient's unique identifier from the Get Document response.")
30
+ name: StrictStr = Field(description="Updated name for the recipient.")
31
+ email: StrictStr = Field(description="Updated email address for the recipient.")
32
+ subject: StrictStr | None = Field(
33
+ default=None, description="Updated email subject for the signature request that this recipient will see."
34
+ )
35
+ message: StrictStr | None = Field(
36
+ default=None, description="Updated email message for the signature request that this recipient will see."
37
+ )
38
+ passcode: StrictStr | None = Field(
39
+ default=None,
40
+ description="Updated passcode for the recipient. If set, the signer will be required to enter the passcode before viewing and completing the document.",
41
+ )
42
+ additional_properties: Dict[str, Any] = {}
43
+ __properties: ClassVar[List[str]] = ["id", "name", "email", "subject", "message", "passcode"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
+ return json.dumps(self.to_dict())
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Self | None:
62
+ """Create an instance of UpdateRecipientsMapInner from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ * Fields in `self.additional_properties` are added to the output dict.
75
+ """
76
+ excluded_fields: Set[str] = set(
77
+ [
78
+ "additional_properties",
79
+ ]
80
+ )
81
+
82
+ _dict = self.model_dump(
83
+ by_alias=True,
84
+ exclude=excluded_fields,
85
+ exclude_none=True,
86
+ )
87
+ # puts key-value pairs in additional_properties in the top level
88
+ if self.additional_properties is not None:
89
+ for _key, _value in self.additional_properties.items():
90
+ _dict[_key] = _value
91
+
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
96
+ """Create an instance of UpdateRecipientsMapInner from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate(
104
+ {
105
+ "id": obj.get("id"),
106
+ "name": obj.get("name"),
107
+ "email": obj.get("email"),
108
+ "subject": obj.get("subject"),
109
+ "message": obj.get("message"),
110
+ "passcode": obj.get("passcode"),
111
+ }
112
+ )
113
+ # store additional fields in additional_properties
114
+ for _key in obj.keys():
115
+ if _key not in cls.__properties:
116
+ _obj.additional_properties[_key] = obj.get(_key)
117
+
118
+ return _obj
@@ -0,0 +1,111 @@
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
20
+ from signwell_sdk.models.update_recipients_map_inner import UpdateRecipientsMapInner
21
+ from typing import Any, Optional, Set
22
+ from typing_extensions import Self
23
+
24
+
25
+ class UpdateRecipientsRequest(BaseModel):
26
+ """
27
+ UpdateRecipientsRequest
28
+ """ # noqa: E501
29
+
30
+ recipients: List[UpdateRecipientsMapInner] = Field(description="List of recipients to update on the document.")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["recipients"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Self | None:
51
+ """Create an instance of UpdateRecipientsRequest from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ * Fields in `self.additional_properties` are added to the output dict.
64
+ """
65
+ excluded_fields: Set[str] = set(
66
+ [
67
+ "additional_properties",
68
+ ]
69
+ )
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of each item in recipients (list)
77
+ _items_recipients: list[Any] = []
78
+ if self.recipients:
79
+ for _item_recipients in self.recipients:
80
+ if _item_recipients:
81
+ _items_recipients.append(_item_recipients.to_dict())
82
+ _dict["recipients"] = _items_recipients
83
+ # puts key-value pairs in additional_properties in the top level
84
+ if self.additional_properties is not None:
85
+ for _key, _value in self.additional_properties.items():
86
+ _dict[_key] = _value
87
+
88
+ return _dict
89
+
90
+ @classmethod
91
+ def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
92
+ """Create an instance of UpdateRecipientsRequest from a dict"""
93
+ if obj is None:
94
+ return None
95
+
96
+ if not isinstance(obj, dict):
97
+ return cls.model_validate(obj)
98
+
99
+ _obj = cls.model_validate(
100
+ {
101
+ "recipients": [UpdateRecipientsMapInner.from_dict(_item) for _item in obj["recipients"]]
102
+ if obj.get("recipients") is not None
103
+ else None
104
+ }
105
+ )
106
+ # store additional fields in additional_properties
107
+ for _key in obj.keys():
108
+ if _key not in cls.__properties:
109
+ _obj.additional_properties[_key] = obj.get(_key)
110
+
111
+ return _obj