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