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,114 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+ """
5
+ SignWell Developer API
6
+
7
+ API for creating, managing, and tracking electronic signature workflows.
8
+
9
+ The version of the OpenAPI document: v1
10
+ Contact: support@signwell.com
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+ # import models into model package
17
+ from signwell_sdk.models.account_info_response import AccountInfoResponse
18
+ from signwell_sdk.models.account_info_response_active_users_inner import AccountInfoResponseActiveUsersInner
19
+ from signwell_sdk.models.account_info_response_preferences import AccountInfoResponsePreferences
20
+ from signwell_sdk.models.additional_fields_inner_inner import AdditionalFieldsInnerInner
21
+ from signwell_sdk.models.additional_fields_inner_inner_value import AdditionalFieldsInnerInnerValue
22
+ from signwell_sdk.models.additional_files_inner import AdditionalFilesInner
23
+ from signwell_sdk.models.api_application_response import ApiApplicationResponse
24
+ from signwell_sdk.models.api_application_response_owner import ApiApplicationResponseOwner
25
+ from signwell_sdk.models.api_application_response_preferences import ApiApplicationResponsePreferences
26
+ from signwell_sdk.models.attachment_request_info import AttachmentRequestInfo
27
+ from signwell_sdk.models.attachment_requests_inner import AttachmentRequestsInner
28
+ from signwell_sdk.models.bulk_send_create_response import BulkSendCreateResponse
29
+ from signwell_sdk.models.bulk_send_csv_request import BulkSendCsvRequest
30
+ from signwell_sdk.models.bulk_send_csv_template_response import BulkSendCsvTemplateResponse
31
+ from signwell_sdk.models.bulk_send_documents_response import BulkSendDocumentsResponse
32
+ from signwell_sdk.models.bulk_send_list_item import BulkSendListItem
33
+ from signwell_sdk.models.bulk_send_list_response import BulkSendListResponse
34
+ from signwell_sdk.models.bulk_send_response import BulkSendResponse
35
+ from signwell_sdk.models.bulk_send_response_templates_inner import BulkSendResponseTemplatesInner
36
+ from signwell_sdk.models.bulk_send_validate_csv_response import BulkSendValidateCsvResponse
37
+ from signwell_sdk.models.checkbox_group_info import CheckboxGroupInfo
38
+ from signwell_sdk.models.checkbox_groups_inner import CheckboxGroupsInner
39
+ from signwell_sdk.models.checkbox_validation import CheckboxValidation
40
+ from signwell_sdk.models.completed_pdf_response import CompletedPdfResponse
41
+ from signwell_sdk.models.completed_pdf_url_response import CompletedPdfUrlResponse
42
+ from signwell_sdk.models.copied_contact_info import CopiedContactInfo
43
+ from signwell_sdk.models.copied_contacts_inner import CopiedContactsInner
44
+ from signwell_sdk.models.copied_placeholders_inner import CopiedPlaceholdersInner
45
+ from signwell_sdk.models.create_bulk_send_request import CreateBulkSendRequest
46
+ from signwell_sdk.models.create_webhook_request import CreateWebhookRequest
47
+ from signwell_sdk.models.date_format import DateFormat
48
+ from signwell_sdk.models.detailed_option import DetailedOption
49
+ from signwell_sdk.models.document_from_template_request import DocumentFromTemplateRequest
50
+ from signwell_sdk.models.document_from_template_response import DocumentFromTemplateResponse
51
+ from signwell_sdk.models.document_from_template_response_fields_inner_inner import (
52
+ DocumentFromTemplateResponseFieldsInnerInner,
53
+ )
54
+ from signwell_sdk.models.document_from_template_response_fields_inner_inner_recipient import (
55
+ DocumentFromTemplateResponseFieldsInnerInnerRecipient,
56
+ )
57
+ from signwell_sdk.models.document_from_template_response_recipients_inner import (
58
+ DocumentFromTemplateResponseRecipientsInner,
59
+ )
60
+ from signwell_sdk.models.document_list_response import DocumentListResponse
61
+ from signwell_sdk.models.document_request import DocumentRequest
62
+ from signwell_sdk.models.document_response import DocumentResponse
63
+ from signwell_sdk.models.document_response_attachment_requests_inner import DocumentResponseAttachmentRequestsInner
64
+ from signwell_sdk.models.document_response_fields_inner_inner import DocumentResponseFieldsInnerInner
65
+ from signwell_sdk.models.document_response_fields_inner_inner_options_inner import (
66
+ DocumentResponseFieldsInnerInnerOptionsInner,
67
+ )
68
+ from signwell_sdk.models.document_response_fields_inner_inner_recipient import DocumentResponseFieldsInnerInnerRecipient
69
+ from signwell_sdk.models.document_response_fields_inner_inner_value import DocumentResponseFieldsInnerInnerValue
70
+ from signwell_sdk.models.document_response_recipients_inner import DocumentResponseRecipientsInner
71
+ from signwell_sdk.models.document_template_list_response import DocumentTemplateListResponse
72
+ from signwell_sdk.models.document_template_request import DocumentTemplateRequest
73
+ from signwell_sdk.models.document_template_response import DocumentTemplateResponse
74
+ from signwell_sdk.models.document_template_response_copied_placeholders_inner import (
75
+ DocumentTemplateResponseCopiedPlaceholdersInner,
76
+ )
77
+ from signwell_sdk.models.document_template_response_placeholders_inner import DocumentTemplateResponsePlaceholdersInner
78
+ from signwell_sdk.models.document_template_update_request import DocumentTemplateUpdateRequest
79
+ from signwell_sdk.models.dropdown_option import DropdownOption
80
+ from signwell_sdk.models.error_response import ErrorResponse
81
+ from signwell_sdk.models.error_response_meta import ErrorResponseMeta
82
+ from signwell_sdk.models.field_type import FieldType
83
+ from signwell_sdk.models.fields_inner_inner import FieldsInnerInner
84
+ from signwell_sdk.models.file_format import FileFormat
85
+ from signwell_sdk.models.file_info import FileInfo
86
+ from signwell_sdk.models.files_inner import FilesInner
87
+ from signwell_sdk.models.label_info import LabelInfo
88
+ from signwell_sdk.models.label_request import LabelRequest
89
+ from signwell_sdk.models.label_response import LabelResponse
90
+ from signwell_sdk.models.me_response import MeResponse
91
+ from signwell_sdk.models.me_response_contact import MeResponseContact
92
+ from signwell_sdk.models.me_response_user import MeResponseUser
93
+ from signwell_sdk.models.me_response_user_preferences import MeResponseUserPreferences
94
+ from signwell_sdk.models.nom151_certificate_response import Nom151CertificateResponse
95
+ from signwell_sdk.models.nom151_certificate_response_nom151 import Nom151CertificateResponseNom151
96
+ from signwell_sdk.models.nom151_url_response import Nom151UrlResponse
97
+ from signwell_sdk.models.pagination_meta import PaginationMeta
98
+ from signwell_sdk.models.placeholders_inner import PlaceholdersInner
99
+ from signwell_sdk.models.rate_limit_error_response import RateLimitErrorResponse
100
+ from signwell_sdk.models.recipients_inner import RecipientsInner
101
+ from signwell_sdk.models.reminder_recipients_inner import ReminderRecipientsInner
102
+ from signwell_sdk.models.send_reminder_request import SendReminderRequest
103
+ from signwell_sdk.models.template_attachment_requests_inner import TemplateAttachmentRequestsInner
104
+ from signwell_sdk.models.template_checkbox_groups_inner import TemplateCheckboxGroupsInner
105
+ from signwell_sdk.models.template_field_values_inner import TemplateFieldValuesInner
106
+ from signwell_sdk.models.template_field_values_inner_value import TemplateFieldValuesInnerValue
107
+ from signwell_sdk.models.template_fields_inner_inner import TemplateFieldsInnerInner
108
+ from signwell_sdk.models.template_recipients_inner import TemplateRecipientsInner
109
+ from signwell_sdk.models.text_validation import TextValidation
110
+ from signwell_sdk.models.update_document_and_send_request import UpdateDocumentAndSendRequest
111
+ from signwell_sdk.models.update_recipients_map_inner import UpdateRecipientsMapInner
112
+ from signwell_sdk.models.update_recipients_request import UpdateRecipientsRequest
113
+ from signwell_sdk.models.validation_error_response import ValidationErrorResponse
114
+ from signwell_sdk.models.webhook_response import WebhookResponse
@@ -0,0 +1,143 @@
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, StrictBool, StrictInt, StrictStr
19
+ from typing import Any, ClassVar, Dict, List, Optional
20
+ from signwell_sdk.models.account_info_response_active_users_inner import AccountInfoResponseActiveUsersInner
21
+ from signwell_sdk.models.account_info_response_preferences import AccountInfoResponsePreferences
22
+ from typing import Any, Optional, Set
23
+ from typing_extensions import Self
24
+
25
+
26
+ class AccountInfoResponse(BaseModel):
27
+ """
28
+ Account or workspace information
29
+ """ # noqa: E501
30
+
31
+ id: StrictStr
32
+ name: StrictStr
33
+ plan_tier: StrictStr
34
+ active_templates: StrictInt | None = None
35
+ can_create_template: StrictBool | None = None
36
+ can_create_tracking_document: StrictBool | None = None
37
+ can_create_completion_document: StrictBool | None = None
38
+ active_users: List[AccountInfoResponseActiveUsersInner] | None = None
39
+ preferences: AccountInfoResponsePreferences | None = None
40
+ additional_properties: Dict[str, Any] = {}
41
+ __properties: ClassVar[List[str]] = [
42
+ "id",
43
+ "name",
44
+ "plan_tier",
45
+ "active_templates",
46
+ "can_create_template",
47
+ "can_create_tracking_document",
48
+ "can_create_completion_document",
49
+ "active_users",
50
+ "preferences",
51
+ ]
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.model_dump(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
+ return json.dumps(self.to_dict())
67
+
68
+ @classmethod
69
+ def from_json(cls, json_str: str) -> Self | None:
70
+ """Create an instance of AccountInfoResponse from a JSON string"""
71
+ return cls.from_dict(json.loads(json_str))
72
+
73
+ def to_dict(self) -> Dict[str, Any]:
74
+ """Return the dictionary representation of the model using alias.
75
+
76
+ This has the following differences from calling pydantic's
77
+ `self.model_dump(by_alias=True)`:
78
+
79
+ * `None` is only added to the output dict for nullable fields that
80
+ were set at model initialization. Other fields with value `None`
81
+ are ignored.
82
+ * Fields in `self.additional_properties` are added to the output dict.
83
+ """
84
+ excluded_fields: Set[str] = set(
85
+ [
86
+ "additional_properties",
87
+ ]
88
+ )
89
+
90
+ _dict = self.model_dump(
91
+ by_alias=True,
92
+ exclude=excluded_fields,
93
+ exclude_none=True,
94
+ )
95
+ # override the default output from pydantic by calling `to_dict()` of each item in active_users (list)
96
+ _items_active_users: list[Any] = []
97
+ if self.active_users:
98
+ for _item_active_users in self.active_users:
99
+ if _item_active_users:
100
+ _items_active_users.append(_item_active_users.to_dict())
101
+ _dict["active_users"] = _items_active_users
102
+ # override the default output from pydantic by calling `to_dict()` of preferences
103
+ if self.preferences:
104
+ _dict["preferences"] = self.preferences.to_dict()
105
+ # puts key-value pairs in additional_properties in the top level
106
+ if self.additional_properties is not None:
107
+ for _key, _value in self.additional_properties.items():
108
+ _dict[_key] = _value
109
+
110
+ return _dict
111
+
112
+ @classmethod
113
+ def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
114
+ """Create an instance of AccountInfoResponse from a dict"""
115
+ if obj is None:
116
+ return None
117
+
118
+ if not isinstance(obj, dict):
119
+ return cls.model_validate(obj)
120
+
121
+ _obj = cls.model_validate(
122
+ {
123
+ "id": obj.get("id"),
124
+ "name": obj.get("name"),
125
+ "plan_tier": obj.get("plan_tier"),
126
+ "active_templates": obj.get("active_templates"),
127
+ "can_create_template": obj.get("can_create_template"),
128
+ "can_create_tracking_document": obj.get("can_create_tracking_document"),
129
+ "can_create_completion_document": obj.get("can_create_completion_document"),
130
+ "active_users": [AccountInfoResponseActiveUsersInner.from_dict(_item) for _item in obj["active_users"]]
131
+ if obj.get("active_users") is not None
132
+ else None,
133
+ "preferences": AccountInfoResponsePreferences.from_dict(obj["preferences"])
134
+ if obj.get("preferences") is not None
135
+ else None,
136
+ }
137
+ )
138
+ # store additional fields in additional_properties
139
+ for _key in obj.keys():
140
+ if _key not in cls.__properties:
141
+ _obj.additional_properties[_key] = obj.get(_key)
142
+
143
+ return _obj
@@ -0,0 +1,107 @@
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, 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 AccountInfoResponseActiveUsersInner(BaseModel):
25
+ """
26
+ AccountInfoResponseActiveUsersInner
27
+ """ # noqa: E501
28
+
29
+ id: StrictStr
30
+ name: StrictStr
31
+ email: StrictStr
32
+ has_google_registration: StrictBool | None = None
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["id", "name", "email", "has_google_registration"]
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 AccountInfoResponseActiveUsersInner 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 AccountInfoResponseActiveUsersInner 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(
95
+ {
96
+ "id": obj.get("id"),
97
+ "name": obj.get("name"),
98
+ "email": obj.get("email"),
99
+ "has_google_registration": obj.get("has_google_registration"),
100
+ }
101
+ )
102
+ # store additional fields in additional_properties
103
+ for _key in obj.keys():
104
+ if _key not in cls.__properties:
105
+ _obj.additional_properties[_key] = obj.get(_key)
106
+
107
+ return _obj
@@ -0,0 +1,147 @@
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, 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 AccountInfoResponsePreferences(BaseModel):
25
+ """
26
+ AccountInfoResponsePreferences
27
+ """ # noqa: E501
28
+
29
+ date_format: StrictStr | None = None
30
+ days_until_links_expire: StrictInt | None = None
31
+ disable_apply_everywhere: StrictBool | None = None
32
+ disable_apply_everywhere_effective: StrictBool | None = None
33
+ disable_drawn_signatures: StrictBool | None = None
34
+ disable_typed_signatures: StrictBool | None = None
35
+ disable_uploaded_signatures: StrictBool | None = None
36
+ enable_redirect: StrictBool | None = None
37
+ hide_document_id_in_audit: StrictBool | None = None
38
+ mute_branding: StrictBool | None = None
39
+ redirect_url: StrictStr | None = None
40
+ separate_audit_pdf: StrictBool | None = None
41
+ separate_completed_file: StrictBool | None = None
42
+ enable_nom151_compliance: StrictBool | None = None
43
+ additional_properties: Dict[str, Any] = {}
44
+ __properties: ClassVar[List[str]] = [
45
+ "date_format",
46
+ "days_until_links_expire",
47
+ "disable_apply_everywhere",
48
+ "disable_apply_everywhere_effective",
49
+ "disable_drawn_signatures",
50
+ "disable_typed_signatures",
51
+ "disable_uploaded_signatures",
52
+ "enable_redirect",
53
+ "hide_document_id_in_audit",
54
+ "mute_branding",
55
+ "redirect_url",
56
+ "separate_audit_pdf",
57
+ "separate_completed_file",
58
+ "enable_nom151_compliance",
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 AccountInfoResponsePreferences 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
+ # set to None if redirect_url (nullable) is None
109
+ # and model_fields_set contains the field
110
+ if self.redirect_url is None and "redirect_url" in self.model_fields_set:
111
+ _dict["redirect_url"] = None
112
+
113
+ return _dict
114
+
115
+ @classmethod
116
+ def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
117
+ """Create an instance of AccountInfoResponsePreferences 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
+ "date_format": obj.get("date_format"),
127
+ "days_until_links_expire": obj.get("days_until_links_expire"),
128
+ "disable_apply_everywhere": obj.get("disable_apply_everywhere"),
129
+ "disable_apply_everywhere_effective": obj.get("disable_apply_everywhere_effective"),
130
+ "disable_drawn_signatures": obj.get("disable_drawn_signatures"),
131
+ "disable_typed_signatures": obj.get("disable_typed_signatures"),
132
+ "disable_uploaded_signatures": obj.get("disable_uploaded_signatures"),
133
+ "enable_redirect": obj.get("enable_redirect"),
134
+ "hide_document_id_in_audit": obj.get("hide_document_id_in_audit"),
135
+ "mute_branding": obj.get("mute_branding"),
136
+ "redirect_url": obj.get("redirect_url"),
137
+ "separate_audit_pdf": obj.get("separate_audit_pdf"),
138
+ "separate_completed_file": obj.get("separate_completed_file"),
139
+ "enable_nom151_compliance": obj.get("enable_nom151_compliance"),
140
+ }
141
+ )
142
+ # store additional fields in additional_properties
143
+ for _key in obj.keys():
144
+ if _key not in cls.__properties:
145
+ _obj.additional_properties[_key] = obj.get(_key)
146
+
147
+ return _obj