signwell_sdk 0.0.1.pre.alpha.1
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.
- checksums.yaml +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +24 -0
- data/README.md +398 -0
- data/SECURITY.md +23 -0
- data/lib/signwell_sdk/client.rb +72 -0
- data/lib/signwell_sdk/errors.rb +228 -0
- data/lib/signwell_sdk/file_part.rb +58 -0
- data/lib/signwell_sdk/internal/transport/base_client.rb +573 -0
- data/lib/signwell_sdk/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/signwell_sdk/internal/type/array_of.rb +168 -0
- data/lib/signwell_sdk/internal/type/base_model.rb +531 -0
- data/lib/signwell_sdk/internal/type/base_page.rb +55 -0
- data/lib/signwell_sdk/internal/type/boolean.rb +77 -0
- data/lib/signwell_sdk/internal/type/converter.rb +327 -0
- data/lib/signwell_sdk/internal/type/enum.rb +156 -0
- data/lib/signwell_sdk/internal/type/file_input.rb +111 -0
- data/lib/signwell_sdk/internal/type/hash_of.rb +188 -0
- data/lib/signwell_sdk/internal/type/request_parameters.rb +42 -0
- data/lib/signwell_sdk/internal/type/union.rb +243 -0
- data/lib/signwell_sdk/internal/type/unknown.rb +81 -0
- data/lib/signwell_sdk/internal/util.rb +920 -0
- data/lib/signwell_sdk/internal.rb +20 -0
- data/lib/signwell_sdk/models/attachment_request_info.rb +34 -0
- data/lib/signwell_sdk/models/checkbox_group_info.rb +66 -0
- data/lib/signwell_sdk/models/checkbox_validation.rb +18 -0
- data/lib/signwell_sdk/models/copied_contact_info.rb +34 -0
- data/lib/signwell_sdk/models/date_format.rb +20 -0
- data/lib/signwell_sdk/models/field_type.rb +29 -0
- data/lib/signwell_sdk/models/file_info.rb +26 -0
- data/lib/signwell_sdk/models/label_info.rb +26 -0
- data/lib/signwell_sdk/models/text_validation.rb +25 -0
- data/lib/signwell_sdk/models/v1/api_application_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/api_application_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/attachment_request.rb +38 -0
- data/lib/signwell_sdk/models/v1/bulk_send_create_params.rb +107 -0
- data/lib/signwell_sdk/models/v1/bulk_send_list_params.rb +55 -0
- data/lib/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rb +39 -0
- data/lib/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/bulk_send_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/bulk_send_validate_csv_params.rb +39 -0
- data/lib/signwell_sdk/models/v1/checkbox_group.rb +80 -0
- data/lib/signwell_sdk/models/v1/copied_contact.rb +26 -0
- data/lib/signwell_sdk/models/v1/document.rb +543 -0
- data/lib/signwell_sdk/models/v1/document_create_from_template_params.rb +740 -0
- data/lib/signwell_sdk/models/v1/document_create_from_template_response.rb +500 -0
- data/lib/signwell_sdk/models/v1/document_create_params.rb +620 -0
- data/lib/signwell_sdk/models/v1/document_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_file.rb +34 -0
- data/lib/signwell_sdk/models/v1/document_list_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/document_list_response.rb +50 -0
- data/lib/signwell_sdk/models/v1/document_remind_params.rb +49 -0
- data/lib/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rb +55 -0
- data/lib/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rb +22 -0
- data/lib/signwell_sdk/models/v1/document_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_send_params.rb +198 -0
- data/lib/signwell_sdk/models/v1/document_template.rb +503 -0
- data/lib/signwell_sdk/models/v1/document_template_create_params.rb +599 -0
- data/lib/signwell_sdk/models/v1/document_template_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_template_list_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/document_template_list_response.rb +50 -0
- data/lib/signwell_sdk/models/v1/document_template_retrieve_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/document_template_update_params.rb +162 -0
- data/lib/signwell_sdk/models/v1/hook_create_params.rb +32 -0
- data/lib/signwell_sdk/models/v1/hook_delete_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/hook_list_params.rb +16 -0
- data/lib/signwell_sdk/models/v1/label.rb +22 -0
- data/lib/signwell_sdk/models/v1/template_checkbox_group.rb +80 -0
- data/lib/signwell_sdk/models/v1_me_params.rb +14 -0
- data/lib/signwell_sdk/models.rb +63 -0
- data/lib/signwell_sdk/request_options.rb +77 -0
- data/lib/signwell_sdk/resources/v1/api_applications.rb +59 -0
- data/lib/signwell_sdk/resources/v1/bulk_sends.rb +198 -0
- data/lib/signwell_sdk/resources/v1/document_templates.rb +204 -0
- data/lib/signwell_sdk/resources/v1/documents.rb +372 -0
- data/lib/signwell_sdk/resources/v1/hooks.rb +78 -0
- data/lib/signwell_sdk/resources/v1.rb +47 -0
- data/lib/signwell_sdk/version.rb +5 -0
- data/lib/signwell_sdk.rb +107 -0
- data/manifest.yaml +17 -0
- data/rbi/signwell_sdk/client.rbi +49 -0
- data/rbi/signwell_sdk/errors.rbi +205 -0
- data/rbi/signwell_sdk/file_part.rbi +37 -0
- data/rbi/signwell_sdk/internal/transport/base_client.rbi +302 -0
- data/rbi/signwell_sdk/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/signwell_sdk/internal/type/array_of.rbi +104 -0
- data/rbi/signwell_sdk/internal/type/base_model.rbi +308 -0
- data/rbi/signwell_sdk/internal/type/base_page.rbi +43 -0
- data/rbi/signwell_sdk/internal/type/boolean.rbi +58 -0
- data/rbi/signwell_sdk/internal/type/converter.rbi +216 -0
- data/rbi/signwell_sdk/internal/type/enum.rbi +82 -0
- data/rbi/signwell_sdk/internal/type/file_input.rbi +59 -0
- data/rbi/signwell_sdk/internal/type/hash_of.rbi +104 -0
- data/rbi/signwell_sdk/internal/type/request_parameters.rbi +31 -0
- data/rbi/signwell_sdk/internal/type/union.rbi +128 -0
- data/rbi/signwell_sdk/internal/type/unknown.rbi +58 -0
- data/rbi/signwell_sdk/internal/util.rbi +487 -0
- data/rbi/signwell_sdk/internal.rbi +18 -0
- data/rbi/signwell_sdk/models/attachment_request_info.rbi +52 -0
- data/rbi/signwell_sdk/models/checkbox_group_info.rbi +89 -0
- data/rbi/signwell_sdk/models/checkbox_validation.rbi +27 -0
- data/rbi/signwell_sdk/models/copied_contact_info.rbi +50 -0
- data/rbi/signwell_sdk/models/date_format.rbi +26 -0
- data/rbi/signwell_sdk/models/field_type.rbi +41 -0
- data/rbi/signwell_sdk/models/file_info.rbi +36 -0
- data/rbi/signwell_sdk/models/label_info.rbi +40 -0
- data/rbi/signwell_sdk/models/text_validation.rbi +44 -0
- data/rbi/signwell_sdk/models/v1/api_application_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/api_application_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/attachment_request.rbi +59 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_create_params.rbi +160 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_list_params.rbi +92 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rbi +67 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rbi +62 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/bulk_send_validate_csv_params.rbi +64 -0
- data/rbi/signwell_sdk/models/v1/checkbox_group.rbi +121 -0
- data/rbi/signwell_sdk/models/v1/copied_contact.rbi +41 -0
- data/rbi/signwell_sdk/models/v1/document.rbi +833 -0
- data/rbi/signwell_sdk/models/v1/document_create_from_template_params.rbi +1270 -0
- data/rbi/signwell_sdk/models/v1/document_create_from_template_response.rbi +856 -0
- data/rbi/signwell_sdk/models/v1/document_create_params.rbi +1019 -0
- data/rbi/signwell_sdk/models/v1/document_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_file.rbi +55 -0
- data/rbi/signwell_sdk/models/v1/document_list_params.rbi +62 -0
- data/rbi/signwell_sdk/models/v1/document_list_response.rbi +71 -0
- data/rbi/signwell_sdk/models/v1/document_remind_params.rbi +107 -0
- data/rbi/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rbi +123 -0
- data/rbi/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_send_params.rbi +307 -0
- data/rbi/signwell_sdk/models/v1/document_template.rbi +830 -0
- data/rbi/signwell_sdk/models/v1/document_template_create_params.rbi +1050 -0
- data/rbi/signwell_sdk/models/v1/document_template_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_template_list_params.rbi +62 -0
- data/rbi/signwell_sdk/models/v1/document_template_list_response.rbi +71 -0
- data/rbi/signwell_sdk/models/v1/document_template_retrieve_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/document_template_update_params.rbi +257 -0
- data/rbi/signwell_sdk/models/v1/hook_create_params.rbi +59 -0
- data/rbi/signwell_sdk/models/v1/hook_delete_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/hook_list_params.rbi +34 -0
- data/rbi/signwell_sdk/models/v1/label.rbi +29 -0
- data/rbi/signwell_sdk/models/v1/template_checkbox_group.rbi +121 -0
- data/rbi/signwell_sdk/models/v1_me_params.rbi +27 -0
- data/rbi/signwell_sdk/models.rbi +25 -0
- data/rbi/signwell_sdk/request_options.rbi +59 -0
- data/rbi/signwell_sdk/resources/v1/api_applications.rbi +45 -0
- data/rbi/signwell_sdk/resources/v1/bulk_sends.rbi +173 -0
- data/rbi/signwell_sdk/resources/v1/document_templates.rbi +276 -0
- data/rbi/signwell_sdk/resources/v1/documents.rbi +527 -0
- data/rbi/signwell_sdk/resources/v1/hooks.rbi +52 -0
- data/rbi/signwell_sdk/resources/v1.rbi +32 -0
- data/rbi/signwell_sdk/version.rbi +5 -0
- data/sig/signwell_sdk/client.rbs +26 -0
- data/sig/signwell_sdk/errors.rbs +117 -0
- data/sig/signwell_sdk/file_part.rbs +21 -0
- data/sig/signwell_sdk/internal/transport/base_client.rbs +133 -0
- data/sig/signwell_sdk/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/signwell_sdk/internal/type/array_of.rbs +48 -0
- data/sig/signwell_sdk/internal/type/base_model.rbs +102 -0
- data/sig/signwell_sdk/internal/type/base_page.rbs +24 -0
- data/sig/signwell_sdk/internal/type/boolean.rbs +26 -0
- data/sig/signwell_sdk/internal/type/converter.rbs +79 -0
- data/sig/signwell_sdk/internal/type/enum.rbs +32 -0
- data/sig/signwell_sdk/internal/type/file_input.rbs +25 -0
- data/sig/signwell_sdk/internal/type/hash_of.rbs +48 -0
- data/sig/signwell_sdk/internal/type/request_parameters.rbs +19 -0
- data/sig/signwell_sdk/internal/type/union.rbs +52 -0
- data/sig/signwell_sdk/internal/type/unknown.rbs +26 -0
- data/sig/signwell_sdk/internal/util.rbs +185 -0
- data/sig/signwell_sdk/internal.rbs +9 -0
- data/sig/signwell_sdk/models/attachment_request_info.rbs +19 -0
- data/sig/signwell_sdk/models/checkbox_group_info.rbs +52 -0
- data/sig/signwell_sdk/models/checkbox_validation.rbs +16 -0
- data/sig/signwell_sdk/models/copied_contact_info.rbs +21 -0
- data/sig/signwell_sdk/models/date_format.rbs +22 -0
- data/sig/signwell_sdk/models/field_type.rbs +42 -0
- data/sig/signwell_sdk/models/file_info.rbs +15 -0
- data/sig/signwell_sdk/models/label_info.rbs +19 -0
- data/sig/signwell_sdk/models/text_validation.rbs +34 -0
- data/sig/signwell_sdk/models/v1/api_application_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/api_application_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/attachment_request.rbs +26 -0
- data/sig/signwell_sdk/models/v1/bulk_send_create_params.rbs +89 -0
- data/sig/signwell_sdk/models/v1/bulk_send_list_params.rbs +51 -0
- data/sig/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rbs +32 -0
- data/sig/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rbs +34 -0
- data/sig/signwell_sdk/models/v1/bulk_send_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/bulk_send_validate_csv_params.rbs +30 -0
- data/sig/signwell_sdk/models/v1/checkbox_group.rbs +69 -0
- data/sig/signwell_sdk/models/v1/copied_contact.rbs +19 -0
- data/sig/signwell_sdk/models/v1/document.rbs +563 -0
- data/sig/signwell_sdk/models/v1/document_create_from_template_params.rbs +570 -0
- data/sig/signwell_sdk/models/v1/document_create_from_template_response.rbs +518 -0
- data/sig/signwell_sdk/models/v1/document_create_params.rbs +473 -0
- data/sig/signwell_sdk/models/v1/document_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_file.rbs +32 -0
- data/sig/signwell_sdk/models/v1/document_list_params.rbs +34 -0
- data/sig/signwell_sdk/models/v1/document_list_response.rbs +47 -0
- data/sig/signwell_sdk/models/v1/document_remind_params.rbs +48 -0
- data/sig/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rbs +57 -0
- data/sig/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rbs +15 -0
- data/sig/signwell_sdk/models/v1/document_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_send_params.rbs +160 -0
- data/sig/signwell_sdk/models/v1/document_template.rbs +530 -0
- data/sig/signwell_sdk/models/v1/document_template_create_params.rbs +459 -0
- data/sig/signwell_sdk/models/v1/document_template_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_template_list_params.rbs +34 -0
- data/sig/signwell_sdk/models/v1/document_template_list_response.rbs +47 -0
- data/sig/signwell_sdk/models/v1/document_template_retrieve_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/document_template_update_params.rbs +132 -0
- data/sig/signwell_sdk/models/v1/hook_create_params.rbs +32 -0
- data/sig/signwell_sdk/models/v1/hook_delete_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/hook_list_params.rbs +17 -0
- data/sig/signwell_sdk/models/v1/label.rbs +15 -0
- data/sig/signwell_sdk/models/v1/template_checkbox_group.rbs +69 -0
- data/sig/signwell_sdk/models/v1_me_params.rbs +14 -0
- data/sig/signwell_sdk/models.rbs +23 -0
- data/sig/signwell_sdk/request_options.rbs +36 -0
- data/sig/signwell_sdk/resources/v1/api_applications.rbs +19 -0
- data/sig/signwell_sdk/resources/v1/bulk_sends.rbs +55 -0
- data/sig/signwell_sdk/resources/v1/document_templates.rbs +71 -0
- data/sig/signwell_sdk/resources/v1/documents.rbs +130 -0
- data/sig/signwell_sdk/resources/v1/hooks.rbs +22 -0
- data/sig/signwell_sdk/resources/v1.rbs +19 -0
- data/sig/signwell_sdk/version.rbs +3 -0
- metadata +298 -0
|
@@ -0,0 +1,1050 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SignwellSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
class DocumentTemplateCreateParams < SignwellSDK::Internal::Type::BaseModel
|
|
7
|
+
extend SignwellSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include SignwellSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
SignwellSDK::V1::DocumentTemplateCreateParams,
|
|
14
|
+
SignwellSDK::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Document files can be uploaded by specifying a file URL or base64 string. Either
|
|
19
|
+
# `file_url` or `file_base64` must be present (not both). Valid file types are:
|
|
20
|
+
# .pdf, .doc, .docx, .pages, .ppt, .pptx, .key, .xls, .xlsx, .numbers, .jpg,
|
|
21
|
+
# .jpeg, .png, .tiff, .tif, .webp, .html, and .htm
|
|
22
|
+
sig { returns(T::Array[SignwellSDK::V1::DocumentFile]) }
|
|
23
|
+
attr_accessor :files
|
|
24
|
+
|
|
25
|
+
# Placeholders are generally job roles that must complete and/or sign the
|
|
26
|
+
# document. For example, a placeholder might be “Client” or “Legal Department”.
|
|
27
|
+
# When a document is created from the template, you assign a person to each
|
|
28
|
+
# placeholder.
|
|
29
|
+
sig do
|
|
30
|
+
returns(
|
|
31
|
+
T::Array[SignwellSDK::V1::DocumentTemplateCreateParams::Placeholder]
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
attr_accessor :placeholders
|
|
35
|
+
|
|
36
|
+
# Whether to allow recipients the option to decline signing a document. If
|
|
37
|
+
# multiple signers are involved in a document, any single recipient can cancel the
|
|
38
|
+
# entire document signing process by declining to sign.
|
|
39
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
40
|
+
attr_reader :allow_decline
|
|
41
|
+
|
|
42
|
+
sig { params(allow_decline: T::Boolean).void }
|
|
43
|
+
attr_writer :allow_decline
|
|
44
|
+
|
|
45
|
+
# In some cases a signer is not the right person to sign and may need to reassign
|
|
46
|
+
# their signing responsibilities to another person. This feature allows them to
|
|
47
|
+
# reassign the document to someone else.
|
|
48
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
49
|
+
attr_reader :allow_reassign
|
|
50
|
+
|
|
51
|
+
sig { params(allow_reassign: T::Boolean).void }
|
|
52
|
+
attr_writer :allow_reassign
|
|
53
|
+
|
|
54
|
+
# Unique identifier for API Application settings to use. API Applications are
|
|
55
|
+
# optional and mainly used when isolating OAuth apps or for more control over
|
|
56
|
+
# embedded API settings
|
|
57
|
+
sig { returns(T.nilable(String)) }
|
|
58
|
+
attr_reader :api_application_id
|
|
59
|
+
|
|
60
|
+
sig { params(api_application_id: String).void }
|
|
61
|
+
attr_writer :api_application_id
|
|
62
|
+
|
|
63
|
+
# When set to `true` recipients will sign one at a time in the order of the
|
|
64
|
+
# `recipients` collection of this request.
|
|
65
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
66
|
+
attr_reader :apply_signing_order
|
|
67
|
+
|
|
68
|
+
sig { params(apply_signing_order: T::Boolean).void }
|
|
69
|
+
attr_writer :apply_signing_order
|
|
70
|
+
|
|
71
|
+
# Attachments that a recipient must upload to complete the signing process.
|
|
72
|
+
# Attachment requests are shown after all document fields have been completed.
|
|
73
|
+
sig do
|
|
74
|
+
returns(
|
|
75
|
+
T.nilable(
|
|
76
|
+
T::Array[
|
|
77
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::AttachmentRequest
|
|
78
|
+
]
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
attr_reader :attachment_requests
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
attachment_requests:
|
|
87
|
+
T::Array[
|
|
88
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::AttachmentRequest::OrHash
|
|
89
|
+
]
|
|
90
|
+
).void
|
|
91
|
+
end
|
|
92
|
+
attr_writer :attachment_requests
|
|
93
|
+
|
|
94
|
+
# Checkbox fields that are placed on a document can be grouped with selection
|
|
95
|
+
# requirements. At least 2 checkbox fields in an array of fields must be assigned
|
|
96
|
+
# to the same recipient.
|
|
97
|
+
sig do
|
|
98
|
+
returns(T.nilable(T::Array[SignwellSDK::V1::TemplateCheckboxGroup]))
|
|
99
|
+
end
|
|
100
|
+
attr_reader :checkbox_groups
|
|
101
|
+
|
|
102
|
+
sig do
|
|
103
|
+
params(
|
|
104
|
+
checkbox_groups:
|
|
105
|
+
T::Array[SignwellSDK::V1::TemplateCheckboxGroup::OrHash]
|
|
106
|
+
).void
|
|
107
|
+
end
|
|
108
|
+
attr_writer :checkbox_groups
|
|
109
|
+
|
|
110
|
+
# Copied placeholders are emailed the final document once it has been completed by
|
|
111
|
+
# all recipients.
|
|
112
|
+
sig do
|
|
113
|
+
returns(
|
|
114
|
+
T.nilable(
|
|
115
|
+
T::Array[
|
|
116
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::CopiedPlaceholder
|
|
117
|
+
]
|
|
118
|
+
)
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
attr_reader :copied_placeholders
|
|
122
|
+
|
|
123
|
+
sig do
|
|
124
|
+
params(
|
|
125
|
+
copied_placeholders:
|
|
126
|
+
T::Array[
|
|
127
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::CopiedPlaceholder::OrHash
|
|
128
|
+
]
|
|
129
|
+
).void
|
|
130
|
+
end
|
|
131
|
+
attr_writer :copied_placeholders
|
|
132
|
+
|
|
133
|
+
# A URL that recipients are redirected to if the document is declined.
|
|
134
|
+
sig { returns(T.nilable(String)) }
|
|
135
|
+
attr_reader :decline_redirect_url
|
|
136
|
+
|
|
137
|
+
sig { params(decline_redirect_url: String).void }
|
|
138
|
+
attr_writer :decline_redirect_url
|
|
139
|
+
|
|
140
|
+
# Whether the template can still be updated before it is ready for usage. If set
|
|
141
|
+
# to `false` the template is marked as `Available` and it will be ready for use.
|
|
142
|
+
# Defaults to `false`.
|
|
143
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
144
|
+
attr_reader :draft
|
|
145
|
+
|
|
146
|
+
sig { params(draft: T::Boolean).void }
|
|
147
|
+
attr_writer :draft
|
|
148
|
+
|
|
149
|
+
# Number of days before the signature request expires. Defaults to the account
|
|
150
|
+
# expiration setting or template expiration (if the document is created from a
|
|
151
|
+
# template).
|
|
152
|
+
sig { returns(T.nilable(Integer)) }
|
|
153
|
+
attr_reader :expires_in
|
|
154
|
+
|
|
155
|
+
sig { params(expires_in: Integer).void }
|
|
156
|
+
attr_writer :expires_in
|
|
157
|
+
|
|
158
|
+
# Document fields placed on a document for collecting data or signatures from
|
|
159
|
+
# recipients. At least one field must be present in the Create Document request if
|
|
160
|
+
# `draft` is `false` (unless adding a signature page by using
|
|
161
|
+
# `with_signature_page`). Field data should be sent as a 2-dimensional JSON array.
|
|
162
|
+
# One array of fields is needed for each file in the files array. An array of
|
|
163
|
+
# fields can be empty if you have a file that does not contain any fields.
|
|
164
|
+
sig do
|
|
165
|
+
returns(
|
|
166
|
+
T.nilable(
|
|
167
|
+
T::Array[
|
|
168
|
+
T::Array[SignwellSDK::V1::DocumentTemplateCreateParams::Field]
|
|
169
|
+
]
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
attr_reader :fields
|
|
174
|
+
|
|
175
|
+
sig do
|
|
176
|
+
params(
|
|
177
|
+
fields:
|
|
178
|
+
T::Array[
|
|
179
|
+
T::Array[
|
|
180
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::OrHash
|
|
181
|
+
]
|
|
182
|
+
]
|
|
183
|
+
).void
|
|
184
|
+
end
|
|
185
|
+
attr_writer :fields
|
|
186
|
+
|
|
187
|
+
# Labels can be used to organize documents in a way that can make it easy to find
|
|
188
|
+
# using the document search in SignWell. A document can have multiple labels.
|
|
189
|
+
sig { returns(T.nilable(T::Array[SignwellSDK::V1::Label])) }
|
|
190
|
+
attr_reader :labels
|
|
191
|
+
|
|
192
|
+
sig { params(labels: T::Array[SignwellSDK::V1::Label::OrHash]).void }
|
|
193
|
+
attr_writer :labels
|
|
194
|
+
|
|
195
|
+
# Sets the language for the template and documents created from the template for
|
|
196
|
+
# all recipient side interactions including the document email and the document
|
|
197
|
+
# itself. Accepted languages: English, Français, Español, Deutsch, Polski,
|
|
198
|
+
# Português, Dansk, Nederlands, Italiano, Русский, Svenska, العربية, Ελληνικά,
|
|
199
|
+
# Türkçe, Slovenčina. Language should be sent in ISO 639-1 format: en, fr, es, de,
|
|
200
|
+
# pl, pt, da, nl, it, ru, sv, ar, el, tr, sk.
|
|
201
|
+
sig { returns(T.nilable(String)) }
|
|
202
|
+
attr_reader :language
|
|
203
|
+
|
|
204
|
+
sig { params(language: String).void }
|
|
205
|
+
attr_writer :language
|
|
206
|
+
|
|
207
|
+
# Email message for the signature request that recipients will see. Defaults to
|
|
208
|
+
# the default system message or a template message (if the document is created
|
|
209
|
+
# from a template).
|
|
210
|
+
sig { returns(T.nilable(String)) }
|
|
211
|
+
attr_reader :message
|
|
212
|
+
|
|
213
|
+
sig { params(message: String).void }
|
|
214
|
+
attr_writer :message
|
|
215
|
+
|
|
216
|
+
# Optional key-value data that can be associated with the document. If set, will
|
|
217
|
+
# be available every time the document data is returned.
|
|
218
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
219
|
+
attr_reader :metadata
|
|
220
|
+
|
|
221
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
222
|
+
attr_writer :metadata
|
|
223
|
+
|
|
224
|
+
# The name of the template.
|
|
225
|
+
sig { returns(T.nilable(String)) }
|
|
226
|
+
attr_reader :name
|
|
227
|
+
|
|
228
|
+
sig { params(name: String).void }
|
|
229
|
+
attr_writer :name
|
|
230
|
+
|
|
231
|
+
# A URL that recipients are redirected to after successfully signing a document.
|
|
232
|
+
sig { returns(T.nilable(String)) }
|
|
233
|
+
attr_reader :redirect_url
|
|
234
|
+
|
|
235
|
+
sig { params(redirect_url: String).void }
|
|
236
|
+
attr_writer :redirect_url
|
|
237
|
+
|
|
238
|
+
# Whether to send signing reminders to recipients. Reminders are sent on day 3,
|
|
239
|
+
# day 6, and day 10 if set to `true`. Defaults to `true`.
|
|
240
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
241
|
+
attr_reader :reminders
|
|
242
|
+
|
|
243
|
+
sig { params(reminders: T::Boolean).void }
|
|
244
|
+
attr_writer :reminders
|
|
245
|
+
|
|
246
|
+
# Email subject for the signature request that recipients will see. Defaults to
|
|
247
|
+
# the default system subject or a template subject (if the document is created
|
|
248
|
+
# from a template).
|
|
249
|
+
sig { returns(T.nilable(String)) }
|
|
250
|
+
attr_reader :subject
|
|
251
|
+
|
|
252
|
+
sig { params(subject: String).void }
|
|
253
|
+
attr_writer :subject
|
|
254
|
+
|
|
255
|
+
# An alternative way (if you can’t use the recommended way) of placing fields in
|
|
256
|
+
# specific locations of your document by using special text tags. Useful when
|
|
257
|
+
# changing the content of your files changes the location of fields. See API
|
|
258
|
+
# documentation for “Text Tags” for details. Defaults to false.
|
|
259
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
260
|
+
attr_reader :text_tags
|
|
261
|
+
|
|
262
|
+
sig { params(text_tags: T::Boolean).void }
|
|
263
|
+
attr_writer :text_tags
|
|
264
|
+
|
|
265
|
+
sig do
|
|
266
|
+
params(
|
|
267
|
+
files: T::Array[SignwellSDK::V1::DocumentFile::OrHash],
|
|
268
|
+
placeholders:
|
|
269
|
+
T::Array[
|
|
270
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Placeholder::OrHash
|
|
271
|
+
],
|
|
272
|
+
allow_decline: T::Boolean,
|
|
273
|
+
allow_reassign: T::Boolean,
|
|
274
|
+
api_application_id: String,
|
|
275
|
+
apply_signing_order: T::Boolean,
|
|
276
|
+
attachment_requests:
|
|
277
|
+
T::Array[
|
|
278
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::AttachmentRequest::OrHash
|
|
279
|
+
],
|
|
280
|
+
checkbox_groups:
|
|
281
|
+
T::Array[SignwellSDK::V1::TemplateCheckboxGroup::OrHash],
|
|
282
|
+
copied_placeholders:
|
|
283
|
+
T::Array[
|
|
284
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::CopiedPlaceholder::OrHash
|
|
285
|
+
],
|
|
286
|
+
decline_redirect_url: String,
|
|
287
|
+
draft: T::Boolean,
|
|
288
|
+
expires_in: Integer,
|
|
289
|
+
fields:
|
|
290
|
+
T::Array[
|
|
291
|
+
T::Array[
|
|
292
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::OrHash
|
|
293
|
+
]
|
|
294
|
+
],
|
|
295
|
+
labels: T::Array[SignwellSDK::V1::Label::OrHash],
|
|
296
|
+
language: String,
|
|
297
|
+
message: String,
|
|
298
|
+
metadata: T::Hash[Symbol, String],
|
|
299
|
+
name: String,
|
|
300
|
+
redirect_url: String,
|
|
301
|
+
reminders: T::Boolean,
|
|
302
|
+
subject: String,
|
|
303
|
+
text_tags: T::Boolean,
|
|
304
|
+
request_options: SignwellSDK::RequestOptions::OrHash
|
|
305
|
+
).returns(T.attached_class)
|
|
306
|
+
end
|
|
307
|
+
def self.new(
|
|
308
|
+
# Document files can be uploaded by specifying a file URL or base64 string. Either
|
|
309
|
+
# `file_url` or `file_base64` must be present (not both). Valid file types are:
|
|
310
|
+
# .pdf, .doc, .docx, .pages, .ppt, .pptx, .key, .xls, .xlsx, .numbers, .jpg,
|
|
311
|
+
# .jpeg, .png, .tiff, .tif, .webp, .html, and .htm
|
|
312
|
+
files:,
|
|
313
|
+
# Placeholders are generally job roles that must complete and/or sign the
|
|
314
|
+
# document. For example, a placeholder might be “Client” or “Legal Department”.
|
|
315
|
+
# When a document is created from the template, you assign a person to each
|
|
316
|
+
# placeholder.
|
|
317
|
+
placeholders:,
|
|
318
|
+
# Whether to allow recipients the option to decline signing a document. If
|
|
319
|
+
# multiple signers are involved in a document, any single recipient can cancel the
|
|
320
|
+
# entire document signing process by declining to sign.
|
|
321
|
+
allow_decline: nil,
|
|
322
|
+
# In some cases a signer is not the right person to sign and may need to reassign
|
|
323
|
+
# their signing responsibilities to another person. This feature allows them to
|
|
324
|
+
# reassign the document to someone else.
|
|
325
|
+
allow_reassign: nil,
|
|
326
|
+
# Unique identifier for API Application settings to use. API Applications are
|
|
327
|
+
# optional and mainly used when isolating OAuth apps or for more control over
|
|
328
|
+
# embedded API settings
|
|
329
|
+
api_application_id: nil,
|
|
330
|
+
# When set to `true` recipients will sign one at a time in the order of the
|
|
331
|
+
# `recipients` collection of this request.
|
|
332
|
+
apply_signing_order: nil,
|
|
333
|
+
# Attachments that a recipient must upload to complete the signing process.
|
|
334
|
+
# Attachment requests are shown after all document fields have been completed.
|
|
335
|
+
attachment_requests: nil,
|
|
336
|
+
# Checkbox fields that are placed on a document can be grouped with selection
|
|
337
|
+
# requirements. At least 2 checkbox fields in an array of fields must be assigned
|
|
338
|
+
# to the same recipient.
|
|
339
|
+
checkbox_groups: nil,
|
|
340
|
+
# Copied placeholders are emailed the final document once it has been completed by
|
|
341
|
+
# all recipients.
|
|
342
|
+
copied_placeholders: nil,
|
|
343
|
+
# A URL that recipients are redirected to if the document is declined.
|
|
344
|
+
decline_redirect_url: nil,
|
|
345
|
+
# Whether the template can still be updated before it is ready for usage. If set
|
|
346
|
+
# to `false` the template is marked as `Available` and it will be ready for use.
|
|
347
|
+
# Defaults to `false`.
|
|
348
|
+
draft: nil,
|
|
349
|
+
# Number of days before the signature request expires. Defaults to the account
|
|
350
|
+
# expiration setting or template expiration (if the document is created from a
|
|
351
|
+
# template).
|
|
352
|
+
expires_in: nil,
|
|
353
|
+
# Document fields placed on a document for collecting data or signatures from
|
|
354
|
+
# recipients. At least one field must be present in the Create Document request if
|
|
355
|
+
# `draft` is `false` (unless adding a signature page by using
|
|
356
|
+
# `with_signature_page`). Field data should be sent as a 2-dimensional JSON array.
|
|
357
|
+
# One array of fields is needed for each file in the files array. An array of
|
|
358
|
+
# fields can be empty if you have a file that does not contain any fields.
|
|
359
|
+
fields: nil,
|
|
360
|
+
# Labels can be used to organize documents in a way that can make it easy to find
|
|
361
|
+
# using the document search in SignWell. A document can have multiple labels.
|
|
362
|
+
labels: nil,
|
|
363
|
+
# Sets the language for the template and documents created from the template for
|
|
364
|
+
# all recipient side interactions including the document email and the document
|
|
365
|
+
# itself. Accepted languages: English, Français, Español, Deutsch, Polski,
|
|
366
|
+
# Português, Dansk, Nederlands, Italiano, Русский, Svenska, العربية, Ελληνικά,
|
|
367
|
+
# Türkçe, Slovenčina. Language should be sent in ISO 639-1 format: en, fr, es, de,
|
|
368
|
+
# pl, pt, da, nl, it, ru, sv, ar, el, tr, sk.
|
|
369
|
+
language: nil,
|
|
370
|
+
# Email message for the signature request that recipients will see. Defaults to
|
|
371
|
+
# the default system message or a template message (if the document is created
|
|
372
|
+
# from a template).
|
|
373
|
+
message: nil,
|
|
374
|
+
# Optional key-value data that can be associated with the document. If set, will
|
|
375
|
+
# be available every time the document data is returned.
|
|
376
|
+
metadata: nil,
|
|
377
|
+
# The name of the template.
|
|
378
|
+
name: nil,
|
|
379
|
+
# A URL that recipients are redirected to after successfully signing a document.
|
|
380
|
+
redirect_url: nil,
|
|
381
|
+
# Whether to send signing reminders to recipients. Reminders are sent on day 3,
|
|
382
|
+
# day 6, and day 10 if set to `true`. Defaults to `true`.
|
|
383
|
+
reminders: nil,
|
|
384
|
+
# Email subject for the signature request that recipients will see. Defaults to
|
|
385
|
+
# the default system subject or a template subject (if the document is created
|
|
386
|
+
# from a template).
|
|
387
|
+
subject: nil,
|
|
388
|
+
# An alternative way (if you can’t use the recommended way) of placing fields in
|
|
389
|
+
# specific locations of your document by using special text tags. Useful when
|
|
390
|
+
# changing the content of your files changes the location of fields. See API
|
|
391
|
+
# documentation for “Text Tags” for details. Defaults to false.
|
|
392
|
+
text_tags: nil,
|
|
393
|
+
request_options: {}
|
|
394
|
+
)
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
sig do
|
|
398
|
+
override.returns(
|
|
399
|
+
{
|
|
400
|
+
files: T::Array[SignwellSDK::V1::DocumentFile],
|
|
401
|
+
placeholders:
|
|
402
|
+
T::Array[
|
|
403
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Placeholder
|
|
404
|
+
],
|
|
405
|
+
allow_decline: T::Boolean,
|
|
406
|
+
allow_reassign: T::Boolean,
|
|
407
|
+
api_application_id: String,
|
|
408
|
+
apply_signing_order: T::Boolean,
|
|
409
|
+
attachment_requests:
|
|
410
|
+
T::Array[
|
|
411
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::AttachmentRequest
|
|
412
|
+
],
|
|
413
|
+
checkbox_groups: T::Array[SignwellSDK::V1::TemplateCheckboxGroup],
|
|
414
|
+
copied_placeholders:
|
|
415
|
+
T::Array[
|
|
416
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::CopiedPlaceholder
|
|
417
|
+
],
|
|
418
|
+
decline_redirect_url: String,
|
|
419
|
+
draft: T::Boolean,
|
|
420
|
+
expires_in: Integer,
|
|
421
|
+
fields:
|
|
422
|
+
T::Array[
|
|
423
|
+
T::Array[SignwellSDK::V1::DocumentTemplateCreateParams::Field]
|
|
424
|
+
],
|
|
425
|
+
labels: T::Array[SignwellSDK::V1::Label],
|
|
426
|
+
language: String,
|
|
427
|
+
message: String,
|
|
428
|
+
metadata: T::Hash[Symbol, String],
|
|
429
|
+
name: String,
|
|
430
|
+
redirect_url: String,
|
|
431
|
+
reminders: T::Boolean,
|
|
432
|
+
subject: String,
|
|
433
|
+
text_tags: T::Boolean,
|
|
434
|
+
request_options: SignwellSDK::RequestOptions
|
|
435
|
+
}
|
|
436
|
+
)
|
|
437
|
+
end
|
|
438
|
+
def to_hash
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
class Placeholder < SignwellSDK::Internal::Type::BaseModel
|
|
442
|
+
OrHash =
|
|
443
|
+
T.type_alias do
|
|
444
|
+
T.any(
|
|
445
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Placeholder,
|
|
446
|
+
SignwellSDK::Internal::AnyHash
|
|
447
|
+
)
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# A unique identifier that you will give to each placeholder. We recommend
|
|
451
|
+
# numbering sequentially from 1 to X. IDs are required for associating recipients
|
|
452
|
+
# to fields and more.
|
|
453
|
+
sig { returns(String) }
|
|
454
|
+
attr_accessor :id
|
|
455
|
+
|
|
456
|
+
# Name of the placeholder.
|
|
457
|
+
sig { returns(String) }
|
|
458
|
+
attr_accessor :name
|
|
459
|
+
|
|
460
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
461
|
+
# placeholder because it will always be the same person for all documents created
|
|
462
|
+
# from this template. This sets the email.
|
|
463
|
+
sig { returns(T.nilable(String)) }
|
|
464
|
+
attr_reader :preassigned_recipient_email
|
|
465
|
+
|
|
466
|
+
sig { params(preassigned_recipient_email: String).void }
|
|
467
|
+
attr_writer :preassigned_recipient_email
|
|
468
|
+
|
|
469
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
470
|
+
# placeholder because it will always be the same person for all documents created
|
|
471
|
+
# from this template. This sets the name.
|
|
472
|
+
sig { returns(T.nilable(String)) }
|
|
473
|
+
attr_reader :preassigned_recipient_name
|
|
474
|
+
|
|
475
|
+
sig { params(preassigned_recipient_name: String).void }
|
|
476
|
+
attr_writer :preassigned_recipient_name
|
|
477
|
+
|
|
478
|
+
sig do
|
|
479
|
+
params(
|
|
480
|
+
id: String,
|
|
481
|
+
name: String,
|
|
482
|
+
preassigned_recipient_email: String,
|
|
483
|
+
preassigned_recipient_name: String
|
|
484
|
+
).returns(T.attached_class)
|
|
485
|
+
end
|
|
486
|
+
def self.new(
|
|
487
|
+
# A unique identifier that you will give to each placeholder. We recommend
|
|
488
|
+
# numbering sequentially from 1 to X. IDs are required for associating recipients
|
|
489
|
+
# to fields and more.
|
|
490
|
+
id:,
|
|
491
|
+
# Name of the placeholder.
|
|
492
|
+
name:,
|
|
493
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
494
|
+
# placeholder because it will always be the same person for all documents created
|
|
495
|
+
# from this template. This sets the email.
|
|
496
|
+
preassigned_recipient_email: nil,
|
|
497
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
498
|
+
# placeholder because it will always be the same person for all documents created
|
|
499
|
+
# from this template. This sets the name.
|
|
500
|
+
preassigned_recipient_name: nil
|
|
501
|
+
)
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
sig do
|
|
505
|
+
override.returns(
|
|
506
|
+
{
|
|
507
|
+
id: String,
|
|
508
|
+
name: String,
|
|
509
|
+
preassigned_recipient_email: String,
|
|
510
|
+
preassigned_recipient_name: String
|
|
511
|
+
}
|
|
512
|
+
)
|
|
513
|
+
end
|
|
514
|
+
def to_hash
|
|
515
|
+
end
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
class AttachmentRequest < SignwellSDK::Internal::Type::BaseModel
|
|
519
|
+
OrHash =
|
|
520
|
+
T.type_alias do
|
|
521
|
+
T.any(
|
|
522
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::AttachmentRequest,
|
|
523
|
+
SignwellSDK::Internal::AnyHash
|
|
524
|
+
)
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
# Name of the requested attachment.
|
|
528
|
+
sig { returns(String) }
|
|
529
|
+
attr_accessor :name
|
|
530
|
+
|
|
531
|
+
# Unique identifier of the recipient that will view the attachment request.
|
|
532
|
+
sig { returns(String) }
|
|
533
|
+
attr_accessor :placeholder_id
|
|
534
|
+
|
|
535
|
+
# Whether the recipient will need to upload the attachment to successfully
|
|
536
|
+
# complete/sign the document. Defaults to `true`.
|
|
537
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
538
|
+
attr_reader :required
|
|
539
|
+
|
|
540
|
+
sig { params(required: T::Boolean).void }
|
|
541
|
+
attr_writer :required
|
|
542
|
+
|
|
543
|
+
sig do
|
|
544
|
+
params(
|
|
545
|
+
name: String,
|
|
546
|
+
placeholder_id: String,
|
|
547
|
+
required: T::Boolean
|
|
548
|
+
).returns(T.attached_class)
|
|
549
|
+
end
|
|
550
|
+
def self.new(
|
|
551
|
+
# Name of the requested attachment.
|
|
552
|
+
name:,
|
|
553
|
+
# Unique identifier of the recipient that will view the attachment request.
|
|
554
|
+
placeholder_id:,
|
|
555
|
+
# Whether the recipient will need to upload the attachment to successfully
|
|
556
|
+
# complete/sign the document. Defaults to `true`.
|
|
557
|
+
required: nil
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
sig do
|
|
562
|
+
override.returns(
|
|
563
|
+
{ name: String, placeholder_id: String, required: T::Boolean }
|
|
564
|
+
)
|
|
565
|
+
end
|
|
566
|
+
def to_hash
|
|
567
|
+
end
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
class CopiedPlaceholder < SignwellSDK::Internal::Type::BaseModel
|
|
571
|
+
OrHash =
|
|
572
|
+
T.type_alias do
|
|
573
|
+
T.any(
|
|
574
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::CopiedPlaceholder,
|
|
575
|
+
SignwellSDK::Internal::AnyHash
|
|
576
|
+
)
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
# Name of the placeholder.
|
|
580
|
+
sig { returns(String) }
|
|
581
|
+
attr_accessor :name
|
|
582
|
+
|
|
583
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
584
|
+
# placeholder because it will always be the same person for all documents created
|
|
585
|
+
# from this template. This sets the email.
|
|
586
|
+
sig { returns(T.nilable(String)) }
|
|
587
|
+
attr_reader :preassigned_recipient_email
|
|
588
|
+
|
|
589
|
+
sig { params(preassigned_recipient_email: String).void }
|
|
590
|
+
attr_writer :preassigned_recipient_email
|
|
591
|
+
|
|
592
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
593
|
+
# placeholder because it will always be the same person for all documents created
|
|
594
|
+
# from this template. This sets the name.
|
|
595
|
+
sig { returns(T.nilable(String)) }
|
|
596
|
+
attr_reader :preassigned_recipient_name
|
|
597
|
+
|
|
598
|
+
sig { params(preassigned_recipient_name: String).void }
|
|
599
|
+
attr_writer :preassigned_recipient_name
|
|
600
|
+
|
|
601
|
+
sig do
|
|
602
|
+
params(
|
|
603
|
+
name: String,
|
|
604
|
+
preassigned_recipient_email: String,
|
|
605
|
+
preassigned_recipient_name: String
|
|
606
|
+
).returns(T.attached_class)
|
|
607
|
+
end
|
|
608
|
+
def self.new(
|
|
609
|
+
# Name of the placeholder.
|
|
610
|
+
name:,
|
|
611
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
612
|
+
# placeholder because it will always be the same person for all documents created
|
|
613
|
+
# from this template. This sets the email.
|
|
614
|
+
preassigned_recipient_email: nil,
|
|
615
|
+
# In some cases, it may be necessary to pre-fill the name and email for a
|
|
616
|
+
# placeholder because it will always be the same person for all documents created
|
|
617
|
+
# from this template. This sets the name.
|
|
618
|
+
preassigned_recipient_name: nil
|
|
619
|
+
)
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
sig do
|
|
623
|
+
override.returns(
|
|
624
|
+
{
|
|
625
|
+
name: String,
|
|
626
|
+
preassigned_recipient_email: String,
|
|
627
|
+
preassigned_recipient_name: String
|
|
628
|
+
}
|
|
629
|
+
)
|
|
630
|
+
end
|
|
631
|
+
def to_hash
|
|
632
|
+
end
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
class Field < SignwellSDK::Internal::Type::BaseModel
|
|
636
|
+
OrHash =
|
|
637
|
+
T.type_alias do
|
|
638
|
+
T.any(
|
|
639
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field,
|
|
640
|
+
SignwellSDK::Internal::AnyHash
|
|
641
|
+
)
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
# The page number within the file. If the page does not exist within the file then
|
|
645
|
+
# the field won't be created.
|
|
646
|
+
sig { returns(Integer) }
|
|
647
|
+
attr_accessor :page
|
|
648
|
+
|
|
649
|
+
# Unique identifier of the placeholder assigned to the field.
|
|
650
|
+
sig { returns(String) }
|
|
651
|
+
attr_accessor :placeholder_id
|
|
652
|
+
|
|
653
|
+
# Field type of the field. Valid field types: initials, signatures, checkbox,
|
|
654
|
+
# date, and text. To autofill fields with contact data, use an autofill field
|
|
655
|
+
# type. To group checkbox fields, enter an api_id for each checkbox and add the
|
|
656
|
+
# checkbox_groups parameter.
|
|
657
|
+
sig { returns(SignwellSDK::FieldType::OrSymbol) }
|
|
658
|
+
attr_accessor :type
|
|
659
|
+
|
|
660
|
+
# Horizontal value in the coordinates of the field (in pixels). Coordinates are
|
|
661
|
+
# specific to the page where fields are located.
|
|
662
|
+
sig { returns(Float) }
|
|
663
|
+
attr_accessor :x
|
|
664
|
+
|
|
665
|
+
# Vertical value in the coordinates of the field (in pixels). Coordinates are
|
|
666
|
+
# specific to the page where fields are located.
|
|
667
|
+
sig { returns(Float) }
|
|
668
|
+
attr_accessor :y_
|
|
669
|
+
|
|
670
|
+
# Whether to allow "Other" option with text input (for dropdown/select fields
|
|
671
|
+
# only)
|
|
672
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
673
|
+
attr_reader :allow_other
|
|
674
|
+
|
|
675
|
+
sig { params(allow_other: T::Boolean).void }
|
|
676
|
+
attr_writer :allow_other
|
|
677
|
+
|
|
678
|
+
# Unique identifier of the field. Useful when needing to reference specific field
|
|
679
|
+
# values or update a document and its fields.
|
|
680
|
+
sig { returns(T.nilable(String)) }
|
|
681
|
+
attr_reader :api_id
|
|
682
|
+
|
|
683
|
+
sig { params(api_id: String).void }
|
|
684
|
+
attr_writer :api_id
|
|
685
|
+
|
|
686
|
+
# Date fields only: date format to use for the field. Valid values: MM/DD/YYYY,
|
|
687
|
+
# DD/MM/YYYY, YYYY/MM/DD, Month DD, YYYY, and MM/DD/YYYY hh:mm:ss a. Defaults to
|
|
688
|
+
# MM/DD/YYYY.
|
|
689
|
+
sig { returns(T.nilable(SignwellSDK::DateFormat::OrSymbol)) }
|
|
690
|
+
attr_reader :date_format
|
|
691
|
+
|
|
692
|
+
sig { params(date_format: SignwellSDK::DateFormat::OrSymbol).void }
|
|
693
|
+
attr_writer :date_format
|
|
694
|
+
|
|
695
|
+
# Default selected option (for dropdown/select fields only)
|
|
696
|
+
sig { returns(T.nilable(String)) }
|
|
697
|
+
attr_reader :default_option
|
|
698
|
+
|
|
699
|
+
sig { params(default_option: String).void }
|
|
700
|
+
attr_writer :default_option
|
|
701
|
+
|
|
702
|
+
# Text fields only: whether the field width will stay fixed and text will display
|
|
703
|
+
# in multiple lines, rather than one long line. If set to `false` the field width
|
|
704
|
+
# will automatically grow horizontally to fit text on one line. Defaults to
|
|
705
|
+
# `false`.
|
|
706
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
707
|
+
attr_reader :fixed_width
|
|
708
|
+
|
|
709
|
+
sig { params(fixed_width: T::Boolean).void }
|
|
710
|
+
attr_writer :fixed_width
|
|
711
|
+
|
|
712
|
+
# Height of the field (in pixels). Maximum height varies by field type:
|
|
713
|
+
# Signature/Initials (200px), others (74px). When using text tags if the height is
|
|
714
|
+
# greater than the maximum height, the height will be set to the maximum height.
|
|
715
|
+
sig { returns(T.nilable(Float)) }
|
|
716
|
+
attr_reader :height
|
|
717
|
+
|
|
718
|
+
sig { params(height: Float).void }
|
|
719
|
+
attr_writer :height
|
|
720
|
+
|
|
721
|
+
# Text and Date fields only: label that is displayed when the field is empty.
|
|
722
|
+
sig { returns(T.nilable(String)) }
|
|
723
|
+
attr_reader :label
|
|
724
|
+
|
|
725
|
+
sig { params(label: String).void }
|
|
726
|
+
attr_writer :label
|
|
727
|
+
|
|
728
|
+
# Date fields only: makes fields readonly and automatically populates with the
|
|
729
|
+
# date the recipient signed. Defaults to `false`.
|
|
730
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
731
|
+
attr_reader :lock_sign_date
|
|
732
|
+
|
|
733
|
+
sig { params(lock_sign_date: T::Boolean).void }
|
|
734
|
+
attr_writer :lock_sign_date
|
|
735
|
+
|
|
736
|
+
# Checkbox fields only. At least 2 checkbox fields in an array of fields must be
|
|
737
|
+
# assigned to the same recipient and grouped with selection requirements.
|
|
738
|
+
sig { returns(T.nilable(String)) }
|
|
739
|
+
attr_reader :name
|
|
740
|
+
|
|
741
|
+
sig { params(name: String).void }
|
|
742
|
+
attr_writer :name
|
|
743
|
+
|
|
744
|
+
# Array of dropdown options (for dropdown/select fields only)
|
|
745
|
+
sig do
|
|
746
|
+
returns(
|
|
747
|
+
T.nilable(
|
|
748
|
+
T::Array[
|
|
749
|
+
T.any(
|
|
750
|
+
String,
|
|
751
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption
|
|
752
|
+
)
|
|
753
|
+
]
|
|
754
|
+
)
|
|
755
|
+
)
|
|
756
|
+
end
|
|
757
|
+
attr_reader :options
|
|
758
|
+
|
|
759
|
+
sig do
|
|
760
|
+
params(
|
|
761
|
+
options:
|
|
762
|
+
T::Array[
|
|
763
|
+
T.any(
|
|
764
|
+
String,
|
|
765
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption::OrHash
|
|
766
|
+
)
|
|
767
|
+
]
|
|
768
|
+
).void
|
|
769
|
+
end
|
|
770
|
+
attr_writer :options
|
|
771
|
+
|
|
772
|
+
# Whether the field must be completed by the recipient. Defaults to `true` except
|
|
773
|
+
# for checkbox type fields.
|
|
774
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
775
|
+
attr_reader :required
|
|
776
|
+
|
|
777
|
+
sig { params(required: T::Boolean).void }
|
|
778
|
+
attr_writer :required
|
|
779
|
+
|
|
780
|
+
# Text fields only: optional validation for field values. Valid values: numbers,
|
|
781
|
+
# letters, email_address, us_phone_number, us_zip_code, us_ssn, us_age,
|
|
782
|
+
# alphanumeric, us_bank_routing_number, us_bank_account.
|
|
783
|
+
sig { returns(T.nilable(SignwellSDK::TextValidation::OrSymbol)) }
|
|
784
|
+
attr_reader :validation
|
|
785
|
+
|
|
786
|
+
sig { params(validation: SignwellSDK::TextValidation::OrSymbol).void }
|
|
787
|
+
attr_writer :validation
|
|
788
|
+
|
|
789
|
+
# Varies according to the field type. Text fields accept strings or numbers. Date
|
|
790
|
+
# fields accept Iso8601 date strings. CheckBoxes accept booleans. Signature and
|
|
791
|
+
# Initials fields can't be signed through API requests. Autofill text fields
|
|
792
|
+
# accept strings or numbers.
|
|
793
|
+
sig do
|
|
794
|
+
returns(
|
|
795
|
+
T.nilable(
|
|
796
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Value::Variants
|
|
797
|
+
)
|
|
798
|
+
)
|
|
799
|
+
end
|
|
800
|
+
attr_reader :value
|
|
801
|
+
|
|
802
|
+
sig do
|
|
803
|
+
params(
|
|
804
|
+
value:
|
|
805
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Value::Variants
|
|
806
|
+
).void
|
|
807
|
+
end
|
|
808
|
+
attr_writer :value
|
|
809
|
+
|
|
810
|
+
# Width of the field (in pixels). For text fields, width will auto-grow unless
|
|
811
|
+
# `fixed_width` is true.
|
|
812
|
+
sig { returns(T.nilable(Float)) }
|
|
813
|
+
attr_reader :width
|
|
814
|
+
|
|
815
|
+
sig { params(width: Float).void }
|
|
816
|
+
attr_writer :width
|
|
817
|
+
|
|
818
|
+
sig do
|
|
819
|
+
params(
|
|
820
|
+
page: Integer,
|
|
821
|
+
placeholder_id: String,
|
|
822
|
+
type: SignwellSDK::FieldType::OrSymbol,
|
|
823
|
+
x: Float,
|
|
824
|
+
y_: Float,
|
|
825
|
+
allow_other: T::Boolean,
|
|
826
|
+
api_id: String,
|
|
827
|
+
date_format: SignwellSDK::DateFormat::OrSymbol,
|
|
828
|
+
default_option: String,
|
|
829
|
+
fixed_width: T::Boolean,
|
|
830
|
+
height: Float,
|
|
831
|
+
label: String,
|
|
832
|
+
lock_sign_date: T::Boolean,
|
|
833
|
+
name: String,
|
|
834
|
+
options:
|
|
835
|
+
T::Array[
|
|
836
|
+
T.any(
|
|
837
|
+
String,
|
|
838
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption::OrHash
|
|
839
|
+
)
|
|
840
|
+
],
|
|
841
|
+
required: T::Boolean,
|
|
842
|
+
validation: SignwellSDK::TextValidation::OrSymbol,
|
|
843
|
+
value:
|
|
844
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Value::Variants,
|
|
845
|
+
width: Float
|
|
846
|
+
).returns(T.attached_class)
|
|
847
|
+
end
|
|
848
|
+
def self.new(
|
|
849
|
+
# The page number within the file. If the page does not exist within the file then
|
|
850
|
+
# the field won't be created.
|
|
851
|
+
page:,
|
|
852
|
+
# Unique identifier of the placeholder assigned to the field.
|
|
853
|
+
placeholder_id:,
|
|
854
|
+
# Field type of the field. Valid field types: initials, signatures, checkbox,
|
|
855
|
+
# date, and text. To autofill fields with contact data, use an autofill field
|
|
856
|
+
# type. To group checkbox fields, enter an api_id for each checkbox and add the
|
|
857
|
+
# checkbox_groups parameter.
|
|
858
|
+
type:,
|
|
859
|
+
# Horizontal value in the coordinates of the field (in pixels). Coordinates are
|
|
860
|
+
# specific to the page where fields are located.
|
|
861
|
+
x:,
|
|
862
|
+
# Vertical value in the coordinates of the field (in pixels). Coordinates are
|
|
863
|
+
# specific to the page where fields are located.
|
|
864
|
+
y_:,
|
|
865
|
+
# Whether to allow "Other" option with text input (for dropdown/select fields
|
|
866
|
+
# only)
|
|
867
|
+
allow_other: nil,
|
|
868
|
+
# Unique identifier of the field. Useful when needing to reference specific field
|
|
869
|
+
# values or update a document and its fields.
|
|
870
|
+
api_id: nil,
|
|
871
|
+
# Date fields only: date format to use for the field. Valid values: MM/DD/YYYY,
|
|
872
|
+
# DD/MM/YYYY, YYYY/MM/DD, Month DD, YYYY, and MM/DD/YYYY hh:mm:ss a. Defaults to
|
|
873
|
+
# MM/DD/YYYY.
|
|
874
|
+
date_format: nil,
|
|
875
|
+
# Default selected option (for dropdown/select fields only)
|
|
876
|
+
default_option: nil,
|
|
877
|
+
# Text fields only: whether the field width will stay fixed and text will display
|
|
878
|
+
# in multiple lines, rather than one long line. If set to `false` the field width
|
|
879
|
+
# will automatically grow horizontally to fit text on one line. Defaults to
|
|
880
|
+
# `false`.
|
|
881
|
+
fixed_width: nil,
|
|
882
|
+
# Height of the field (in pixels). Maximum height varies by field type:
|
|
883
|
+
# Signature/Initials (200px), others (74px). When using text tags if the height is
|
|
884
|
+
# greater than the maximum height, the height will be set to the maximum height.
|
|
885
|
+
height: nil,
|
|
886
|
+
# Text and Date fields only: label that is displayed when the field is empty.
|
|
887
|
+
label: nil,
|
|
888
|
+
# Date fields only: makes fields readonly and automatically populates with the
|
|
889
|
+
# date the recipient signed. Defaults to `false`.
|
|
890
|
+
lock_sign_date: nil,
|
|
891
|
+
# Checkbox fields only. At least 2 checkbox fields in an array of fields must be
|
|
892
|
+
# assigned to the same recipient and grouped with selection requirements.
|
|
893
|
+
name: nil,
|
|
894
|
+
# Array of dropdown options (for dropdown/select fields only)
|
|
895
|
+
options: nil,
|
|
896
|
+
# Whether the field must be completed by the recipient. Defaults to `true` except
|
|
897
|
+
# for checkbox type fields.
|
|
898
|
+
required: nil,
|
|
899
|
+
# Text fields only: optional validation for field values. Valid values: numbers,
|
|
900
|
+
# letters, email_address, us_phone_number, us_zip_code, us_ssn, us_age,
|
|
901
|
+
# alphanumeric, us_bank_routing_number, us_bank_account.
|
|
902
|
+
validation: nil,
|
|
903
|
+
# Varies according to the field type. Text fields accept strings or numbers. Date
|
|
904
|
+
# fields accept Iso8601 date strings. CheckBoxes accept booleans. Signature and
|
|
905
|
+
# Initials fields can't be signed through API requests. Autofill text fields
|
|
906
|
+
# accept strings or numbers.
|
|
907
|
+
value: nil,
|
|
908
|
+
# Width of the field (in pixels). For text fields, width will auto-grow unless
|
|
909
|
+
# `fixed_width` is true.
|
|
910
|
+
width: nil
|
|
911
|
+
)
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
sig do
|
|
915
|
+
override.returns(
|
|
916
|
+
{
|
|
917
|
+
page: Integer,
|
|
918
|
+
placeholder_id: String,
|
|
919
|
+
type: SignwellSDK::FieldType::OrSymbol,
|
|
920
|
+
x: Float,
|
|
921
|
+
y_: Float,
|
|
922
|
+
allow_other: T::Boolean,
|
|
923
|
+
api_id: String,
|
|
924
|
+
date_format: SignwellSDK::DateFormat::OrSymbol,
|
|
925
|
+
default_option: String,
|
|
926
|
+
fixed_width: T::Boolean,
|
|
927
|
+
height: Float,
|
|
928
|
+
label: String,
|
|
929
|
+
lock_sign_date: T::Boolean,
|
|
930
|
+
name: String,
|
|
931
|
+
options:
|
|
932
|
+
T::Array[
|
|
933
|
+
T.any(
|
|
934
|
+
String,
|
|
935
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption
|
|
936
|
+
)
|
|
937
|
+
],
|
|
938
|
+
required: T::Boolean,
|
|
939
|
+
validation: SignwellSDK::TextValidation::OrSymbol,
|
|
940
|
+
value:
|
|
941
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Value::Variants,
|
|
942
|
+
width: Float
|
|
943
|
+
}
|
|
944
|
+
)
|
|
945
|
+
end
|
|
946
|
+
def to_hash
|
|
947
|
+
end
|
|
948
|
+
|
|
949
|
+
# A dropdown option - either a simple string or a detailed object with name and
|
|
950
|
+
# optional api_id
|
|
951
|
+
module Option
|
|
952
|
+
extend SignwellSDK::Internal::Type::Union
|
|
953
|
+
|
|
954
|
+
Variants =
|
|
955
|
+
T.type_alias do
|
|
956
|
+
T.any(
|
|
957
|
+
String,
|
|
958
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption
|
|
959
|
+
)
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
class DetailedOption < SignwellSDK::Internal::Type::BaseModel
|
|
963
|
+
OrHash =
|
|
964
|
+
T.type_alias do
|
|
965
|
+
T.any(
|
|
966
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::DetailedOption,
|
|
967
|
+
SignwellSDK::Internal::AnyHash
|
|
968
|
+
)
|
|
969
|
+
end
|
|
970
|
+
|
|
971
|
+
# Option display name
|
|
972
|
+
sig { returns(String) }
|
|
973
|
+
attr_accessor :name
|
|
974
|
+
|
|
975
|
+
# Unique identifier for the option
|
|
976
|
+
sig { returns(T.nilable(String)) }
|
|
977
|
+
attr_reader :api_id
|
|
978
|
+
|
|
979
|
+
sig { params(api_id: String).void }
|
|
980
|
+
attr_writer :api_id
|
|
981
|
+
|
|
982
|
+
# Whether this is the special "Other" option
|
|
983
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
984
|
+
attr_reader :is_other
|
|
985
|
+
|
|
986
|
+
sig { params(is_other: T::Boolean).void }
|
|
987
|
+
attr_writer :is_other
|
|
988
|
+
|
|
989
|
+
# Detailed option object
|
|
990
|
+
sig do
|
|
991
|
+
params(
|
|
992
|
+
name: String,
|
|
993
|
+
api_id: String,
|
|
994
|
+
is_other: T::Boolean
|
|
995
|
+
).returns(T.attached_class)
|
|
996
|
+
end
|
|
997
|
+
def self.new(
|
|
998
|
+
# Option display name
|
|
999
|
+
name:,
|
|
1000
|
+
# Unique identifier for the option
|
|
1001
|
+
api_id: nil,
|
|
1002
|
+
# Whether this is the special "Other" option
|
|
1003
|
+
is_other: nil
|
|
1004
|
+
)
|
|
1005
|
+
end
|
|
1006
|
+
|
|
1007
|
+
sig do
|
|
1008
|
+
override.returns(
|
|
1009
|
+
{ name: String, api_id: String, is_other: T::Boolean }
|
|
1010
|
+
)
|
|
1011
|
+
end
|
|
1012
|
+
def to_hash
|
|
1013
|
+
end
|
|
1014
|
+
end
|
|
1015
|
+
|
|
1016
|
+
sig do
|
|
1017
|
+
override.returns(
|
|
1018
|
+
T::Array[
|
|
1019
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Option::Variants
|
|
1020
|
+
]
|
|
1021
|
+
)
|
|
1022
|
+
end
|
|
1023
|
+
def self.variants
|
|
1024
|
+
end
|
|
1025
|
+
end
|
|
1026
|
+
|
|
1027
|
+
# Varies according to the field type. Text fields accept strings or numbers. Date
|
|
1028
|
+
# fields accept Iso8601 date strings. CheckBoxes accept booleans. Signature and
|
|
1029
|
+
# Initials fields can't be signed through API requests. Autofill text fields
|
|
1030
|
+
# accept strings or numbers.
|
|
1031
|
+
module Value
|
|
1032
|
+
extend SignwellSDK::Internal::Type::Union
|
|
1033
|
+
|
|
1034
|
+
Variants = T.type_alias { T.any(String, T::Boolean, Float) }
|
|
1035
|
+
|
|
1036
|
+
sig do
|
|
1037
|
+
override.returns(
|
|
1038
|
+
T::Array[
|
|
1039
|
+
SignwellSDK::V1::DocumentTemplateCreateParams::Field::Value::Variants
|
|
1040
|
+
]
|
|
1041
|
+
)
|
|
1042
|
+
end
|
|
1043
|
+
def self.variants
|
|
1044
|
+
end
|
|
1045
|
+
end
|
|
1046
|
+
end
|
|
1047
|
+
end
|
|
1048
|
+
end
|
|
1049
|
+
end
|
|
1050
|
+
end
|