docspring 3.5.0 → 4.1.0

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 (588) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +445 -150
  3. data/.openapi-generator/VERSION +1 -1
  4. data/.rubocop.yml +1 -1
  5. data/.travis.yml +1 -1
  6. data/AGENTS.md +79 -19
  7. data/CHANGELOG.md +147 -0
  8. data/Gemfile.lock +7 -7
  9. data/README.md +69 -53
  10. data/docs/AddTemplateFieldsRequest.md +18 -0
  11. data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
  12. data/docs/AuthenticationCheck.md +18 -0
  13. data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
  14. data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
  15. data/docs/Client.md +1570 -786
  16. data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
  17. data/docs/CombinedPdf.md +44 -0
  18. data/docs/CombinedPdfFiles.md +18 -0
  19. data/docs/CombinedPdfList.md +20 -0
  20. data/docs/CombinedPdfSource.md +26 -0
  21. data/docs/CombinedPdfSourceInput.md +88 -0
  22. data/docs/CombinedPdfSourcePdf.md +20 -0
  23. data/docs/CombinedPdfSourceType.md +15 -0
  24. data/docs/CombinedPdfState.md +15 -0
  25. data/docs/CopyTemplateRequest.md +22 -0
  26. data/docs/CreateCombinedPdfRequest.md +26 -0
  27. data/docs/CreateCustomFileFromUploadRequest.md +18 -0
  28. data/docs/CreateFolderRequest.md +20 -0
  29. data/docs/CreateSignatureRequestEventRequest.md +24 -0
  30. data/docs/CreateSignatureRequestTokenRequest.md +18 -0
  31. data/docs/CreateSubmissionBatchRequest.md +28 -0
  32. data/docs/CreateSubmissionRequest.md +38 -0
  33. data/docs/CreateTemplateRequest.md +102 -0
  34. data/docs/CreateWebhookRequest.md +38 -0
  35. data/docs/CustomFile.md +11 -3
  36. data/docs/CustomFileList.md +20 -0
  37. data/docs/CustomFileSourcePdf.md +20 -0
  38. data/docs/ErrorCode.md +15 -0
  39. data/docs/ErrorDetail.md +26 -0
  40. data/docs/ErrorInfo.md +32 -0
  41. data/docs/ErrorResponse.md +1 -3
  42. data/docs/ExpirationInterval.md +15 -0
  43. data/docs/Field.md +198 -0
  44. data/docs/FieldComparisonCondition.md +22 -0
  45. data/docs/FieldComparisonOperator.md +15 -0
  46. data/docs/FieldDependency.md +22 -0
  47. data/docs/FieldDependencyInput.md +22 -0
  48. data/docs/FieldDisplayType.md +15 -0
  49. data/docs/FieldEqualsCondition.md +22 -0
  50. data/docs/FieldEqualsOperator.md +15 -0
  51. data/docs/FieldGroup.md +32 -0
  52. data/docs/FieldGroupInput.md +30 -0
  53. data/docs/FieldGroupType.md +15 -0
  54. data/docs/FieldInCondition.md +22 -0
  55. data/docs/FieldInput.md +196 -0
  56. data/docs/FieldOverride.md +142 -0
  57. data/docs/FieldPresenceCondition.md +20 -0
  58. data/docs/FieldPresenceOperator.md +15 -0
  59. data/docs/FieldRangeCondition.md +24 -0
  60. data/docs/FieldReimportState.md +15 -0
  61. data/docs/FieldSetupLogic.md +15 -0
  62. data/docs/FieldSetupNaming.md +15 -0
  63. data/docs/FieldSetupSource.md +15 -0
  64. data/docs/FieldType.md +15 -0
  65. data/docs/Folder.md +9 -5
  66. data/docs/FolderList.md +20 -0
  67. data/docs/GenerateFilesFormat.md +15 -0
  68. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  69. data/docs/GeneratedFile.md +32 -0
  70. data/docs/GeneratedFileState.md +15 -0
  71. data/docs/HtmlEngineOptions.md +36 -0
  72. data/docs/HtmlEngineOptionsInput.md +36 -0
  73. data/docs/ImageGravity.md +15 -0
  74. data/docs/ImageScaleType.md +15 -0
  75. data/docs/ModelCodeLanguage.md +15 -0
  76. data/docs/MoveFolderRequest.md +18 -0
  77. data/docs/MoveTemplateRequest.md +18 -0
  78. data/docs/NumberConditionType.md +15 -0
  79. data/docs/OutputFormat.md +15 -0
  80. data/docs/PageFormat.md +15 -0
  81. data/docs/PageImage.md +34 -0
  82. data/docs/PageImages.md +24 -0
  83. data/docs/PredefinedField.md +30 -0
  84. data/docs/PredefinedFieldInput.md +30 -0
  85. data/docs/PublishTemplateVersionRequest.md +20 -0
  86. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  87. data/docs/RenameFolderRequest.md +18 -0
  88. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  89. data/docs/RestoreTemplateVersionRequest.md +18 -0
  90. data/docs/ShapeType.md +15 -0
  91. data/docs/SignatureRequest.md +66 -0
  92. data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
  93. data/docs/SignatureRequestAuthType.md +15 -0
  94. data/docs/SignatureRequestEvent.md +32 -0
  95. data/docs/SignatureRequestEventType.md +15 -0
  96. data/docs/SignatureRequestInput.md +46 -0
  97. data/docs/SignatureRequestMessageType.md +15 -0
  98. data/docs/SignatureRequestState.md +15 -0
  99. data/docs/SignatureRequestToken.md +30 -0
  100. data/docs/SignatureRequestTokenType.md +15 -0
  101. data/docs/StringConditionType.md +15 -0
  102. data/docs/Submission.md +43 -47
  103. data/docs/SubmissionAction.md +6 -8
  104. data/docs/SubmissionActionState.md +15 -0
  105. data/docs/SubmissionActionType.md +15 -0
  106. data/docs/SubmissionBatch.md +16 -10
  107. data/docs/SubmissionBatchState.md +15 -0
  108. data/docs/SubmissionFiles.md +24 -0
  109. data/docs/SubmissionInput.md +40 -0
  110. data/docs/SubmissionList.md +20 -0
  111. data/docs/SubmissionSource.md +15 -0
  112. data/docs/SubmissionSourcePdf.md +20 -0
  113. data/docs/SubmissionState.md +15 -0
  114. data/docs/SubmissionValidation.md +24 -0
  115. data/docs/Template.md +79 -107
  116. data/docs/TemplateActor.md +26 -0
  117. data/docs/TemplateActorType.md +15 -0
  118. data/docs/TemplateDefaults.md +56 -0
  119. data/docs/TemplateDefaultsInput.md +56 -0
  120. data/docs/TemplateDiff.md +30 -0
  121. data/docs/TemplateDiffSummary.md +28 -0
  122. data/docs/TemplateDocument.md +40 -0
  123. data/docs/TemplateDocumentState.md +15 -0
  124. data/docs/TemplateFieldChange.md +24 -0
  125. data/docs/TemplateFieldChanges.md +24 -0
  126. data/docs/TemplateFieldDependency.md +26 -0
  127. data/docs/TemplateFieldDependencyAction.md +15 -0
  128. data/docs/TemplateFieldDependencyCondition.md +24 -0
  129. data/docs/TemplateFieldDependencyConditionInput.md +93 -0
  130. data/docs/TemplateFieldDependencyInput.md +26 -0
  131. data/docs/TemplateFieldDependencyMatch.md +15 -0
  132. data/docs/TemplateFieldDependencyOperator.md +15 -0
  133. data/docs/TemplateFieldLogicStatus.md +15 -0
  134. data/docs/TemplateFieldMove.md +22 -0
  135. data/docs/TemplateFields.md +22 -0
  136. data/docs/TemplateFormMode.md +15 -0
  137. data/docs/TemplateModelCode.md +22 -0
  138. data/docs/TemplatePageAiError.md +15 -0
  139. data/docs/TemplatePageAiNamingStatus.md +15 -0
  140. data/docs/TemplatePageFieldsStatus.md +15 -0
  141. data/docs/TemplatePageImageStatus.md +15 -0
  142. data/docs/TemplatePageImages.md +24 -0
  143. data/docs/TemplatePageProcessingStatus.md +26 -0
  144. data/docs/TemplateSourcePdf.md +24 -0
  145. data/docs/TemplateSummary.md +90 -0
  146. data/docs/TemplateSummaryList.md +20 -0
  147. data/docs/TemplateType.md +15 -0
  148. data/docs/TemplateVersion.md +24 -0
  149. data/docs/TemplateVersionType.md +15 -0
  150. data/docs/TextAlignment.md +15 -0
  151. data/docs/TextOverflow.md +15 -0
  152. data/docs/TextVerticalAlignment.md +15 -0
  153. data/docs/Typeface.md +15 -0
  154. data/docs/UpdateSignatureRequestRequest.md +34 -0
  155. data/docs/UpdateTemplateDocumentRequest.md +26 -0
  156. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  157. data/docs/UpdateTemplateRequest.md +86 -0
  158. data/docs/UpdateWebhookRequest.md +38 -0
  159. data/docs/UploadMethod.md +15 -0
  160. data/docs/UploadPresign.md +24 -0
  161. data/docs/UrlSourcePdf.md +20 -0
  162. data/docs/ValidateSubmissionRequest.md +38 -0
  163. data/docs/Webhook.md +20 -20
  164. data/docs/WebhookEventType.md +15 -0
  165. data/docs/WebhookList.md +20 -0
  166. data/docs/WebhookMode.md +15 -0
  167. data/docspring.gemspec +3 -3
  168. data/lib/docspring/api/client.rb +1606 -905
  169. data/lib/docspring/api_client.rb +14 -6
  170. data/lib/docspring/api_error.rb +3 -3
  171. data/lib/docspring/api_model_base.rb +88 -0
  172. data/lib/docspring/configuration.rb +12 -7
  173. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  174. data/lib/docspring/models/ai_field_naming_language.rb +42 -0
  175. data/lib/docspring/models/authentication_check.rb +185 -0
  176. data/lib/docspring/models/barcode_symbology.rb +47 -0
  177. data/lib/docspring/models/check_character.rb +44 -0
  178. data/lib/docspring/models/combined_field_type.rb +41 -0
  179. data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
  180. data/lib/docspring/models/combined_pdf_files.rb +167 -0
  181. data/lib/docspring/models/combined_pdf_list.rb +200 -0
  182. data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
  183. data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
  184. data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
  185. data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
  186. data/lib/docspring/models/combined_pdf_state.rb +44 -0
  187. data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
  188. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
  189. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
  190. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
  191. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
  192. data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
  193. data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
  194. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
  195. data/lib/docspring/models/create_template_request.rb +646 -0
  196. data/lib/docspring/models/create_webhook_request.rb +368 -0
  197. data/lib/docspring/models/custom_file.rb +132 -95
  198. data/lib/docspring/models/custom_file_list.rb +200 -0
  199. data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
  200. data/lib/docspring/models/error_code.rb +60 -0
  201. data/lib/docspring/models/error_detail.rb +242 -0
  202. data/lib/docspring/models/error_info.rb +316 -0
  203. data/lib/docspring/models/error_response.rb +28 -138
  204. data/lib/docspring/models/expiration_interval.rb +42 -0
  205. data/lib/docspring/models/field.rb +2217 -0
  206. data/lib/docspring/models/field_comparison_condition.rb +247 -0
  207. data/lib/docspring/models/field_comparison_operator.rb +43 -0
  208. data/lib/docspring/models/field_dependency.rb +246 -0
  209. data/lib/docspring/models/field_dependency_input.rb +246 -0
  210. data/lib/docspring/models/field_display_type.rb +45 -0
  211. data/lib/docspring/models/field_equals_condition.rb +247 -0
  212. data/lib/docspring/models/field_equals_operator.rb +41 -0
  213. data/lib/docspring/models/field_group.rb +368 -0
  214. data/lib/docspring/models/field_group_input.rb +247 -0
  215. data/lib/docspring/models/field_group_type.rb +41 -0
  216. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
  217. data/lib/docspring/models/field_input.rb +1109 -0
  218. data/lib/docspring/models/field_override.rb +829 -0
  219. data/lib/docspring/models/field_presence_condition.rb +234 -0
  220. data/lib/docspring/models/field_presence_operator.rb +41 -0
  221. data/lib/docspring/models/field_range_condition.rb +234 -0
  222. data/lib/docspring/models/field_reimport_state.rb +43 -0
  223. data/lib/docspring/models/field_setup_logic.rb +41 -0
  224. data/lib/docspring/models/field_setup_naming.rb +41 -0
  225. data/lib/docspring/models/field_setup_source.rb +42 -0
  226. data/lib/docspring/models/field_type.rb +54 -0
  227. data/lib/docspring/models/folder.rb +134 -93
  228. data/lib/docspring/models/folder_list.rb +200 -0
  229. data/lib/docspring/models/generate_files_format.rb +40 -0
  230. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  231. data/lib/docspring/models/generated_file.rb +326 -0
  232. data/lib/docspring/models/generated_file_state.rb +42 -0
  233. data/lib/docspring/models/html_engine_options.rb +416 -0
  234. data/lib/docspring/models/html_engine_options_input.rb +280 -0
  235. data/lib/docspring/models/image_gravity.rb +48 -0
  236. data/lib/docspring/models/image_scale_type.rb +42 -0
  237. data/lib/docspring/models/model_code_language.rb +48 -0
  238. data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
  239. data/lib/docspring/models/move_template_request.rb +171 -0
  240. data/lib/docspring/models/number_condition_type.rb +45 -0
  241. data/lib/docspring/models/output_format.rb +41 -0
  242. data/lib/docspring/models/page_format.rb +52 -0
  243. data/lib/docspring/models/page_image.rb +359 -0
  244. data/lib/docspring/models/page_images.rb +248 -0
  245. data/lib/docspring/models/predefined_field.rb +287 -0
  246. data/lib/docspring/models/predefined_field_input.rb +287 -0
  247. data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
  248. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  249. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
  250. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  251. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
  252. data/lib/docspring/models/shape_type.rb +45 -0
  253. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
  254. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
  255. data/lib/docspring/models/signature_request_auth_type.rb +46 -0
  256. data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
  257. data/lib/docspring/models/signature_request_event_type.rb +45 -0
  258. data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
  259. data/lib/docspring/models/signature_request_message_type.rb +48 -0
  260. data/lib/docspring/models/signature_request_state.rb +42 -0
  261. data/lib/docspring/models/signature_request_token.rb +369 -0
  262. data/lib/docspring/models/signature_request_token_type.rb +41 -0
  263. data/lib/docspring/models/string_condition_type.rb +44 -0
  264. data/lib/docspring/models/submission.rb +399 -335
  265. data/lib/docspring/models/submission_action.rb +64 -136
  266. data/lib/docspring/models/submission_action_state.rb +43 -0
  267. data/lib/docspring/models/submission_action_type.rb +46 -0
  268. data/lib/docspring/models/submission_batch.rb +157 -112
  269. data/lib/docspring/models/submission_batch_state.rb +42 -0
  270. data/lib/docspring/models/submission_files.rb +197 -0
  271. data/lib/docspring/models/submission_input.rb +296 -0
  272. data/lib/docspring/models/submission_list.rb +200 -0
  273. data/lib/docspring/models/submission_source.rb +43 -0
  274. data/lib/docspring/models/submission_source_pdf.rb +212 -0
  275. data/lib/docspring/models/submission_state.rb +52 -0
  276. data/lib/docspring/models/submission_validation.rb +234 -0
  277. data/lib/docspring/models/template.rb +528 -736
  278. data/lib/docspring/models/template_actor.rb +259 -0
  279. data/lib/docspring/models/template_actor_type.rb +42 -0
  280. data/lib/docspring/models/template_defaults.rb +395 -0
  281. data/lib/docspring/models/template_defaults_input.rb +395 -0
  282. data/lib/docspring/models/template_diff.rb +321 -0
  283. data/lib/docspring/models/template_diff_summary.rb +320 -0
  284. data/lib/docspring/models/template_document.rb +396 -0
  285. data/lib/docspring/models/template_document_state.rb +46 -0
  286. data/lib/docspring/models/template_field_change.rb +266 -0
  287. data/lib/docspring/models/template_field_changes.rb +274 -0
  288. data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
  289. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  290. data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
  291. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  292. data/lib/docspring/models/template_field_dependency_input.rb +285 -0
  293. data/lib/docspring/models/template_field_dependency_match.rb +41 -0
  294. data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
  295. data/lib/docspring/models/template_field_logic_status.rb +44 -0
  296. data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
  297. data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
  298. data/lib/docspring/models/template_form_mode.rb +42 -0
  299. data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
  300. data/lib/docspring/models/template_page_ai_error.rb +43 -0
  301. data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
  302. data/lib/docspring/models/template_page_fields_status.rb +44 -0
  303. data/lib/docspring/models/template_page_image_status.rb +41 -0
  304. data/lib/docspring/models/template_page_images.rb +254 -0
  305. data/lib/docspring/models/template_page_processing_status.rb +275 -0
  306. data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
  307. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
  308. data/lib/docspring/models/template_summary_list.rb +200 -0
  309. data/lib/docspring/models/template_type.rb +41 -0
  310. data/lib/docspring/models/template_version.rb +238 -0
  311. data/lib/docspring/models/template_version_type.rb +42 -0
  312. data/lib/docspring/models/text_alignment.rb +43 -0
  313. data/lib/docspring/models/text_overflow.rb +41 -0
  314. data/lib/docspring/models/text_vertical_alignment.rb +42 -0
  315. data/lib/docspring/models/typeface.rb +56 -0
  316. data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
  317. data/lib/docspring/models/update_template_document_request.rb +208 -0
  318. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  319. data/lib/docspring/models/update_template_request.rb +551 -0
  320. data/lib/docspring/models/update_webhook_request.rb +344 -0
  321. data/lib/docspring/models/upload_method.rb +40 -0
  322. data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
  323. data/lib/docspring/models/url_source_pdf.rb +212 -0
  324. data/lib/docspring/models/validate_submission_request.rb +288 -0
  325. data/lib/docspring/models/webhook.rb +97 -107
  326. data/lib/docspring/models/webhook_event_type.rb +64 -0
  327. data/lib/docspring/models/webhook_list.rb +200 -0
  328. data/lib/docspring/models/webhook_mode.rb +41 -0
  329. data/lib/docspring/request_schemas.json +4967 -0
  330. data/lib/docspring/request_validator.rb +396 -0
  331. data/lib/docspring/version.rb +4 -4
  332. data/lib/docspring.rb +153 -53
  333. data/spec/api/client_spec.rb +411 -265
  334. data/spec/models/add_template_fields_request_spec.rb +36 -0
  335. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  336. data/spec/models/authentication_check_spec.rb +36 -0
  337. data/spec/models/barcode_symbology_spec.rb +30 -0
  338. data/spec/models/check_character_spec.rb +30 -0
  339. data/spec/models/combined_field_type_spec.rb +30 -0
  340. data/spec/models/combined_pdf_files_spec.rb +36 -0
  341. data/spec/models/combined_pdf_list_spec.rb +42 -0
  342. data/spec/models/combined_pdf_source_input_spec.rb +44 -0
  343. data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
  344. data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
  345. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  346. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
  347. data/spec/models/combined_pdf_state_spec.rb +30 -0
  348. data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
  349. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
  350. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
  351. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
  352. data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
  353. data/spec/models/create_signature_request_token_request_spec.rb +36 -0
  354. data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
  355. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
  356. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
  357. data/spec/models/create_webhook_request_spec.rb +96 -0
  358. data/spec/models/custom_file_list_spec.rb +42 -0
  359. data/spec/models/custom_file_source_pdf_spec.rb +42 -0
  360. data/spec/models/custom_file_spec.rb +29 -5
  361. data/spec/models/error_code_spec.rb +30 -0
  362. data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
  363. data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
  364. data/spec/models/error_response_spec.rb +4 -14
  365. data/spec/models/expiration_interval_spec.rb +30 -0
  366. data/spec/models/field_comparison_condition_spec.rb +48 -0
  367. data/spec/models/field_comparison_operator_spec.rb +30 -0
  368. data/spec/models/field_dependency_input_spec.rb +48 -0
  369. data/spec/models/field_dependency_spec.rb +48 -0
  370. data/spec/models/field_display_type_spec.rb +30 -0
  371. data/spec/models/field_equals_condition_spec.rb +48 -0
  372. data/spec/models/field_equals_operator_spec.rb +30 -0
  373. data/spec/models/field_group_input_spec.rb +72 -0
  374. data/spec/models/field_group_spec.rb +78 -0
  375. data/spec/models/field_group_type_spec.rb +30 -0
  376. data/spec/models/field_in_condition_spec.rb +48 -0
  377. data/spec/models/field_input_spec.rb +570 -0
  378. data/spec/models/field_override_spec.rb +408 -0
  379. data/spec/models/field_presence_condition_spec.rb +42 -0
  380. data/spec/models/field_presence_operator_spec.rb +30 -0
  381. data/spec/models/field_range_condition_spec.rb +54 -0
  382. data/spec/models/field_reimport_state_spec.rb +30 -0
  383. data/spec/models/field_setup_logic_spec.rb +30 -0
  384. data/spec/models/field_setup_naming_spec.rb +30 -0
  385. data/spec/models/field_setup_source_spec.rb +30 -0
  386. data/spec/models/field_spec.rb +576 -0
  387. data/spec/models/field_type_spec.rb +30 -0
  388. data/spec/models/folder_list_spec.rb +42 -0
  389. data/spec/models/folder_spec.rb +16 -4
  390. data/spec/models/generate_files_format_spec.rb +30 -0
  391. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  392. data/spec/models/generated_file_spec.rb +78 -0
  393. data/spec/models/generated_file_state_spec.rb +30 -0
  394. data/spec/models/html_engine_options_input_spec.rb +90 -0
  395. data/spec/models/html_engine_options_spec.rb +90 -0
  396. data/spec/models/image_gravity_spec.rb +30 -0
  397. data/spec/models/image_scale_type_spec.rb +30 -0
  398. data/spec/models/model_code_language_spec.rb +30 -0
  399. data/spec/models/move_folder_request_spec.rb +36 -0
  400. data/spec/models/move_template_request_spec.rb +36 -0
  401. data/spec/models/number_condition_type_spec.rb +30 -0
  402. data/spec/models/output_format_spec.rb +30 -0
  403. data/spec/models/page_format_spec.rb +30 -0
  404. data/spec/models/page_image_spec.rb +84 -0
  405. data/spec/models/page_images_spec.rb +54 -0
  406. data/spec/models/predefined_field_input_spec.rb +72 -0
  407. data/spec/models/predefined_field_spec.rb +72 -0
  408. data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
  409. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  410. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
  411. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  412. data/spec/models/restore_template_version_request_spec.rb +36 -0
  413. data/spec/models/shape_type_spec.rb +30 -0
  414. data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
  415. data/spec/models/signature_request_auth_type_spec.rb +30 -0
  416. data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
  417. data/spec/models/signature_request_event_type_spec.rb +30 -0
  418. data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
  419. data/spec/models/signature_request_message_type_spec.rb +30 -0
  420. data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
  421. data/spec/models/signature_request_state_spec.rb +30 -0
  422. data/spec/models/signature_request_token_spec.rb +72 -0
  423. data/spec/models/signature_request_token_type_spec.rb +30 -0
  424. data/spec/models/string_condition_type_spec.rb +30 -0
  425. data/spec/models/submission_action_spec.rb +4 -22
  426. data/spec/models/submission_action_state_spec.rb +30 -0
  427. data/spec/models/submission_action_type_spec.rb +30 -0
  428. data/spec/models/submission_batch_spec.rb +27 -13
  429. data/spec/models/submission_batch_state_spec.rb +30 -0
  430. data/spec/models/submission_files_spec.rb +54 -0
  431. data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
  432. data/spec/models/submission_list_spec.rb +42 -0
  433. data/spec/models/submission_source_pdf_spec.rb +42 -0
  434. data/spec/models/submission_source_spec.rb +30 -0
  435. data/spec/models/submission_spec.rb +27 -51
  436. data/spec/models/submission_state_spec.rb +30 -0
  437. data/spec/models/submission_validation_spec.rb +54 -0
  438. data/spec/models/template_actor_spec.rb +60 -0
  439. data/spec/models/template_actor_type_spec.rb +30 -0
  440. data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
  441. data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
  442. data/spec/models/template_diff_spec.rb +72 -0
  443. data/spec/models/template_diff_summary_spec.rb +66 -0
  444. data/spec/models/template_document_spec.rb +102 -0
  445. data/spec/models/template_document_state_spec.rb +30 -0
  446. data/spec/models/template_field_change_spec.rb +54 -0
  447. data/spec/models/template_field_changes_spec.rb +54 -0
  448. data/spec/models/template_field_dependency_action_spec.rb +30 -0
  449. data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
  450. data/spec/models/template_field_dependency_condition_spec.rb +54 -0
  451. data/spec/models/template_field_dependency_input_spec.rb +60 -0
  452. data/spec/models/template_field_dependency_match_spec.rb +30 -0
  453. data/spec/models/template_field_dependency_operator_spec.rb +30 -0
  454. data/spec/models/template_field_dependency_spec.rb +60 -0
  455. data/spec/models/template_field_logic_status_spec.rb +30 -0
  456. data/spec/models/template_field_move_spec.rb +48 -0
  457. data/spec/models/template_fields_spec.rb +48 -0
  458. data/spec/models/template_form_mode_spec.rb +30 -0
  459. data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
  460. data/spec/models/template_page_ai_error_spec.rb +30 -0
  461. data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
  462. data/spec/models/template_page_fields_status_spec.rb +30 -0
  463. data/spec/models/template_page_image_status_spec.rb +30 -0
  464. data/spec/models/template_page_images_spec.rb +54 -0
  465. data/spec/models/template_page_processing_status_spec.rb +60 -0
  466. data/spec/models/template_source_pdf_spec.rb +54 -0
  467. data/spec/models/template_spec.rb +44 -140
  468. data/spec/models/template_summary_list_spec.rb +42 -0
  469. data/spec/models/template_summary_spec.rb +252 -0
  470. data/spec/models/template_type_spec.rb +30 -0
  471. data/spec/models/template_version_spec.rb +54 -0
  472. data/spec/models/template_version_type_spec.rb +30 -0
  473. data/spec/models/text_alignment_spec.rb +30 -0
  474. data/spec/models/text_overflow_spec.rb +30 -0
  475. data/spec/models/text_vertical_alignment_spec.rb +30 -0
  476. data/spec/models/typeface_spec.rb +30 -0
  477. data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
  478. data/spec/models/update_template_document_request_spec.rb +60 -0
  479. data/spec/models/update_template_fields_request_spec.rb +36 -0
  480. data/spec/models/update_template_request_spec.rb +240 -0
  481. data/spec/models/update_webhook_request_spec.rb +96 -0
  482. data/spec/models/upload_method_spec.rb +30 -0
  483. data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
  484. data/spec/models/url_source_pdf_spec.rb +42 -0
  485. data/spec/models/validate_submission_request_spec.rb +96 -0
  486. data/spec/models/webhook_event_type_spec.rb +30 -0
  487. data/spec/models/webhook_list_spec.rb +42 -0
  488. data/spec/models/webhook_mode_spec.rb +30 -0
  489. data/spec/models/webhook_spec.rb +4 -8
  490. data/spec/spec_helper.rb +3 -3
  491. metadata +597 -202
  492. data/docs/AddFieldsData.md +0 -18
  493. data/docs/BatchGeneratePdfs201Response.md +0 -28
  494. data/docs/CombinePdfsData.md +0 -28
  495. data/docs/CombinedSubmission.md +0 -44
  496. data/docs/CombinedSubmissionAction.md +0 -30
  497. data/docs/CopyTemplateOptions.md +0 -22
  498. data/docs/CreateCombinedSubmissionResponse.md +0 -26
  499. data/docs/CreateCustomFileData.md +0 -18
  500. data/docs/CreateCustomFileResponse.md +0 -24
  501. data/docs/CreateHtmlTemplate.md +0 -18
  502. data/docs/CreatePdfSubmissionData.md +0 -34
  503. data/docs/CreatePdfTemplate.md +0 -18
  504. data/docs/CreateSubmissionDataRequestData.md +0 -44
  505. data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
  506. data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
  507. data/docs/CreateSubmissionDataRequestResponse.md +0 -24
  508. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
  509. data/docs/CreateSubmissionResponse.md +0 -26
  510. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  511. data/docs/ForbiddenErrorResponse.md +0 -22
  512. data/docs/JsonSchema.md +0 -40
  513. data/docs/ListSubmissionsResponse.md +0 -22
  514. data/docs/MoveFolderData.md +0 -18
  515. data/docs/MoveTemplateData.md +0 -20
  516. data/docs/MultipleErrorsResponse.md +0 -20
  517. data/docs/PublishVersionData.md +0 -20
  518. data/docs/RestoreVersionData.md +0 -18
  519. data/docs/Submission422Response.md +0 -24
  520. data/docs/SubmissionBatchData.md +0 -26
  521. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  522. data/docs/SubmissionDataRequest.md +0 -60
  523. data/docs/SubmissionDataRequestEvent.md +0 -30
  524. data/docs/SubmissionDataRequestShow.md +0 -62
  525. data/docs/SubmissionDataRequestToken.md +0 -24
  526. data/docs/SubmissionPreview.md +0 -64
  527. data/docs/SuccessErrorResponse.md +0 -20
  528. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  529. data/docs/TemplateAddFieldsResponse.md +0 -22
  530. data/docs/TemplateDeleteResponse.md +0 -24
  531. data/docs/TemplateModelCodeResponse.md +0 -22
  532. data/docs/TemplatePreview.md +0 -116
  533. data/docs/TemplatePublishVersionResponse.md +0 -22
  534. data/docs/UpdateHtmlTemplate.md +0 -18
  535. data/docs/UpdatePdfTemplate.md +0 -18
  536. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  537. data/docs/UploadPresignResponse.md +0 -24
  538. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
  539. data/lib/docspring/models/combined_submission_action.rb +0 -384
  540. data/lib/docspring/models/create_combined_submission_response.rb +0 -324
  541. data/lib/docspring/models/create_custom_file_response.rb +0 -314
  542. data/lib/docspring/models/create_html_template.rb +0 -243
  543. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
  544. data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
  545. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
  546. data/lib/docspring/models/create_submission_response.rb +0 -324
  547. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  548. data/lib/docspring/models/forbidden_error_response.rb +0 -323
  549. data/lib/docspring/models/json_schema.rb +0 -329
  550. data/lib/docspring/models/list_submissions_response.rb +0 -283
  551. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  552. data/lib/docspring/models/submission422_response.rb +0 -299
  553. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  554. data/lib/docspring/models/submission_data_request.rb +0 -570
  555. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  556. data/lib/docspring/models/submission_preview.rb +0 -637
  557. data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
  558. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  559. data/lib/docspring/models/template_delete_response.rb +0 -300
  560. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  561. data/lib/docspring/models/update_html_template.rb +0 -243
  562. data/spec/models/add_fields_data_spec.rb +0 -36
  563. data/spec/models/combined_submission_action_spec.rb +0 -84
  564. data/spec/models/create_combined_submission_response_spec.rb +0 -64
  565. data/spec/models/create_custom_file_response_spec.rb +0 -58
  566. data/spec/models/create_folder_data_spec.rb +0 -36
  567. data/spec/models/create_html_template_spec.rb +0 -36
  568. data/spec/models/create_pdf_template_spec.rb +0 -36
  569. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  570. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
  571. data/spec/models/create_submission_data_request_response_spec.rb +0 -58
  572. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
  573. data/spec/models/create_webhook_data_spec.rb +0 -36
  574. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  575. data/spec/models/forbidden_error_response_spec.rb +0 -56
  576. data/spec/models/move_folder_data_spec.rb +0 -36
  577. data/spec/models/multiple_errors_response_spec.rb +0 -46
  578. data/spec/models/restore_version_data_spec.rb +0 -36
  579. data/spec/models/submission422_response_spec.rb +0 -58
  580. data/spec/models/success_error_response_spec.rb +0 -46
  581. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  582. data/spec/models/template_add_fields_response_spec.rb +0 -52
  583. data/spec/models/template_delete_response_spec.rb +0 -58
  584. data/spec/models/template_publish_version_response_spec.rb +0 -52
  585. data/spec/models/update_html_template_spec.rb +0 -36
  586. data/spec/models/update_pdf_template_spec.rb +0 -36
  587. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  588. data/spec/models/update_webhook_data_spec.rb +0 -36
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
5
 
6
- The version of the OpenAPI document: v1
6
+ The version of the OpenAPI document: v2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.16.0-DOCSPRING
9
+ Generator version: 7.26.0-DOCSPRING
10
10
 
11
11
  =end
12
12
 
@@ -14,131 +14,152 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DocSpring
17
- class Template
18
- attr_accessor :add_data_request_submission_id_footers
17
+ # A template that generates PDFs from submission data.
18
+ class Template < ApiModelBase
19
+ # The template's ID.
20
+ attr_accessor :id
19
21
 
20
- attr_accessor :allow_additional_properties
22
+ # The template's name.
23
+ attr_accessor :name
21
24
 
25
+ # Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests.
22
26
  attr_accessor :description
23
27
 
24
- attr_accessor :document_filename
25
-
26
- attr_accessor :document_md5
28
+ # `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created.
29
+ attr_accessor :template_type
27
30
 
28
- attr_accessor :document_parse_error
31
+ # Whether the template can generate PDFs. HTML templates are always ready. A PDF template is ready once its document has been processed (`document.state` is `processed`).
32
+ attr_accessor :ready
29
33
 
30
- attr_accessor :document_processed
34
+ # The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet.
35
+ attr_accessor :document
31
36
 
32
- attr_accessor :document_state
37
+ # The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions.
38
+ attr_accessor :parent_folder_id
33
39
 
34
- attr_accessor :document_url
40
+ # The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
41
+ attr_accessor :path
35
42
 
36
- attr_accessor :editable_submissions
43
+ # The published version this is, such as `1.2.0`. Null for the draft.
44
+ attr_accessor :version
37
45
 
38
- attr_accessor :embed_domains
46
+ # The template's latest published version. Null if no version has been published.
47
+ attr_accessor :latest_version
39
48
 
40
- attr_accessor :embed_edit_allow_settings
49
+ # When this version was published. Null for the draft.
50
+ attr_accessor :version_published_at
41
51
 
42
- attr_accessor :embed_edit_allow_versioning
52
+ # A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
53
+ attr_accessor :locked
43
54
 
44
- attr_accessor :embed_edit_allow_document_replacement
55
+ # Print the submission ID in the footer of each page of PDFs signed through signature requests.
56
+ attr_accessor :add_signature_request_submission_id_footers
45
57
 
46
- attr_accessor :encrypt_pdfs_password
58
+ # The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates.
59
+ attr_accessor :ai_field_naming_language
47
60
 
48
- attr_accessor :encrypt_pdfs
61
+ # Accept submission data with properties that aren't fields of the template.
62
+ attr_accessor :allow_additional_properties
49
63
 
50
- attr_accessor :expiration_interval
64
+ # Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it.
65
+ attr_accessor :allow_skipping_optional_fields
51
66
 
52
- attr_accessor :expire_after
67
+ # The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). HTML templates have no visual form, so `web` is the only value they accept.
68
+ attr_accessor :default_form_mode
53
69
 
54
- attr_accessor :expire_submissions
70
+ # Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
71
+ attr_accessor :editable_submissions
55
72
 
56
- attr_accessor :external_predefined_fields_template_id
73
+ # The sites where the template's signature requests, forms and embedded template editor can be loaded: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work). When it's empty, live signature requests don't load on any site, and the embedded template editor loads on every site.
74
+ attr_accessor :embed_domains
57
75
 
58
- attr_accessor :external_predefined_fields_template_name
76
+ # Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on).
77
+ attr_accessor :embed_edit_allow_settings
59
78
 
60
- attr_accessor :first_template
79
+ # Allow the embedded template editor to publish, restore, compare and delete published versions.
80
+ attr_accessor :embed_edit_allow_versioning
61
81
 
62
- attr_accessor :id
82
+ # Allow the embedded template editor to replace the template's PDF.
83
+ attr_accessor :embed_edit_allow_document_replacement
63
84
 
64
- attr_accessor :locked
85
+ # Encrypt generated PDFs with `encrypt_pdfs_password`.
86
+ attr_accessor :encrypt_pdfs
65
87
 
66
- attr_accessor :merge_audit_trail_pdf
88
+ # Whether `encrypt_pdfs_password` is set.
89
+ attr_accessor :has_encrypt_pdfs_password
67
90
 
68
- attr_accessor :name
91
+ # Delete each submission's data and PDF after `expire_after` `expiration_interval`.
92
+ attr_accessor :expire_submissions
69
93
 
70
- attr_accessor :page_count
94
+ # How many `expiration_interval`s a submission's data and PDF are kept for, when `expire_submissions` is on. At most 5256000 (10 years in minutes).
95
+ attr_accessor :expire_after
71
96
 
72
- attr_accessor :page_dimensions
97
+ # The unit of `expire_after`.
98
+ attr_accessor :expiration_interval
73
99
 
74
- attr_accessor :parent_folder_id
100
+ # Add the audit trail to the end of PDFs signed through signature requests.
101
+ attr_accessor :merge_audit_trail_pdf
75
102
 
103
+ # Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way.
76
104
  attr_accessor :parse_dates_using_template_date_format
77
105
 
78
- attr_accessor :path
79
-
80
- attr_accessor :permanent_document_url
81
-
106
+ # Allow anyone with a submission's ID to download its PDF.
82
107
  attr_accessor :public_submissions
83
108
 
109
+ # Allow anyone to fill in the template's web form.
84
110
  attr_accessor :public_web_form
85
111
 
112
+ # Where the web form sends people after they submit it.
86
113
  attr_accessor :redirect_url
87
114
 
88
- attr_accessor :slack_webhook_url
89
-
90
- attr_accessor :template_type
91
-
92
- attr_accessor :updated_at
93
-
94
- attr_accessor :version_published_at
95
-
96
- attr_accessor :version
97
-
98
- attr_accessor :webhook_url
99
-
100
- attr_accessor :embed_edit_token
101
-
102
- attr_accessor :demo
103
-
104
- attr_accessor :latest_version
115
+ # Whether `slack_webhook_url` is set.
116
+ attr_accessor :has_slack_webhook_url
105
117
 
118
+ # When the draft was last changed.
106
119
  attr_accessor :last_changed_at
107
120
 
108
- attr_accessor :last_changed_by_type
109
-
110
- attr_accessor :last_changed_by_id
121
+ # Who last changed the draft: a user in your account, an API token, or someone using the embedded template editor. Null if no change has been recorded.
122
+ attr_accessor :last_changed_by
111
123
 
112
- attr_accessor :last_changed_by_external_name
124
+ # When the template was created.
125
+ attr_accessor :created_at
113
126
 
114
- attr_accessor :last_changed_by_external_email
115
-
116
- attr_accessor :last_changed_by_external_id
127
+ # When the template was last updated.
128
+ attr_accessor :updated_at
117
129
 
118
130
  attr_accessor :defaults
119
131
 
132
+ # Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields.
120
133
  attr_accessor :field_dependencies
121
134
 
122
- attr_accessor :field_order
123
-
124
- attr_accessor :fields
125
-
126
- attr_accessor :footer_html
135
+ # The groups of the template's fields, with their settings. A field's name puts it in groups: `address/city` is in the group `address`, and `items/0/price` is in the list `items` and its items' group `items/~`.
136
+ attr_accessor :field_groups
127
137
 
128
- attr_accessor :header_html
138
+ # The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off.
139
+ attr_accessor :predefined_fields
129
140
 
130
- attr_accessor :html_engine_options
141
+ # Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for.
142
+ attr_accessor :predefined_fields_sample_data
131
143
 
144
+ # The HTML of an HTML template, as a Liquid template. Null for PDF templates.
132
145
  attr_accessor :html
133
146
 
134
- attr_accessor :predefined_fields
135
-
147
+ # The SCSS of an HTML template.
136
148
  attr_accessor :scss
137
149
 
138
- attr_accessor :shared_field_data
150
+ # The HTML printed at the top of each page of an HTML template.
151
+ attr_accessor :header_html
152
+
153
+ # The HTML printed at the bottom of each page of an HTML template.
154
+ attr_accessor :footer_html
139
155
 
140
- attr_accessor :template_schema_version
156
+ # How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
157
+ attr_accessor :html_engine_options
158
+
159
+ # The token that opens the template in the embedded template editor.
160
+ attr_accessor :embed_edit_token
141
161
 
162
+ # The template's published versions, newest first (up to 100).
142
163
  attr_accessor :versions
143
164
 
144
165
  class EnumAttributeValidator
@@ -166,68 +187,54 @@ module DocSpring
166
187
  # Attribute mapping from ruby-style variable name to JSON key.
167
188
  def self.attribute_map
168
189
  {
169
- :'add_data_request_submission_id_footers' => :'add_data_request_submission_id_footers',
170
- :'allow_additional_properties' => :'allow_additional_properties',
190
+ :'id' => :'id',
191
+ :'name' => :'name',
171
192
  :'description' => :'description',
172
- :'document_filename' => :'document_filename',
173
- :'document_md5' => :'document_md5',
174
- :'document_parse_error' => :'document_parse_error',
175
- :'document_processed' => :'document_processed',
176
- :'document_state' => :'document_state',
177
- :'document_url' => :'document_url',
193
+ :'template_type' => :'template_type',
194
+ :'ready' => :'ready',
195
+ :'document' => :'document',
196
+ :'parent_folder_id' => :'parent_folder_id',
197
+ :'path' => :'path',
198
+ :'version' => :'version',
199
+ :'latest_version' => :'latest_version',
200
+ :'version_published_at' => :'version_published_at',
201
+ :'locked' => :'locked',
202
+ :'add_signature_request_submission_id_footers' => :'add_signature_request_submission_id_footers',
203
+ :'ai_field_naming_language' => :'ai_field_naming_language',
204
+ :'allow_additional_properties' => :'allow_additional_properties',
205
+ :'allow_skipping_optional_fields' => :'allow_skipping_optional_fields',
206
+ :'default_form_mode' => :'default_form_mode',
178
207
  :'editable_submissions' => :'editable_submissions',
179
208
  :'embed_domains' => :'embed_domains',
180
209
  :'embed_edit_allow_settings' => :'embed_edit_allow_settings',
181
210
  :'embed_edit_allow_versioning' => :'embed_edit_allow_versioning',
182
211
  :'embed_edit_allow_document_replacement' => :'embed_edit_allow_document_replacement',
183
- :'encrypt_pdfs_password' => :'encrypt_pdfs_password',
184
212
  :'encrypt_pdfs' => :'encrypt_pdfs',
185
- :'expiration_interval' => :'expiration_interval',
186
- :'expire_after' => :'expire_after',
213
+ :'has_encrypt_pdfs_password' => :'has_encrypt_pdfs_password',
187
214
  :'expire_submissions' => :'expire_submissions',
188
- :'external_predefined_fields_template_id' => :'external_predefined_fields_template_id',
189
- :'external_predefined_fields_template_name' => :'external_predefined_fields_template_name',
190
- :'first_template' => :'first_template',
191
- :'id' => :'id',
192
- :'locked' => :'locked',
215
+ :'expire_after' => :'expire_after',
216
+ :'expiration_interval' => :'expiration_interval',
193
217
  :'merge_audit_trail_pdf' => :'merge_audit_trail_pdf',
194
- :'name' => :'name',
195
- :'page_count' => :'page_count',
196
- :'page_dimensions' => :'page_dimensions',
197
- :'parent_folder_id' => :'parent_folder_id',
198
218
  :'parse_dates_using_template_date_format' => :'parse_dates_using_template_date_format',
199
- :'path' => :'path',
200
- :'permanent_document_url' => :'permanent_document_url',
201
219
  :'public_submissions' => :'public_submissions',
202
220
  :'public_web_form' => :'public_web_form',
203
221
  :'redirect_url' => :'redirect_url',
204
- :'slack_webhook_url' => :'slack_webhook_url',
205
- :'template_type' => :'template_type',
206
- :'updated_at' => :'updated_at',
207
- :'version_published_at' => :'version_published_at',
208
- :'version' => :'version',
209
- :'webhook_url' => :'webhook_url',
210
- :'embed_edit_token' => :'embed_edit_token',
211
- :'demo' => :'demo',
212
- :'latest_version' => :'latest_version',
222
+ :'has_slack_webhook_url' => :'has_slack_webhook_url',
213
223
  :'last_changed_at' => :'last_changed_at',
214
- :'last_changed_by_type' => :'last_changed_by_type',
215
- :'last_changed_by_id' => :'last_changed_by_id',
216
- :'last_changed_by_external_name' => :'last_changed_by_external_name',
217
- :'last_changed_by_external_email' => :'last_changed_by_external_email',
218
- :'last_changed_by_external_id' => :'last_changed_by_external_id',
224
+ :'last_changed_by' => :'last_changed_by',
225
+ :'created_at' => :'created_at',
226
+ :'updated_at' => :'updated_at',
219
227
  :'defaults' => :'defaults',
220
228
  :'field_dependencies' => :'field_dependencies',
221
- :'field_order' => :'field_order',
222
- :'fields' => :'fields',
223
- :'footer_html' => :'footer_html',
224
- :'header_html' => :'header_html',
225
- :'html_engine_options' => :'html_engine_options',
226
- :'html' => :'html',
229
+ :'field_groups' => :'field_groups',
227
230
  :'predefined_fields' => :'predefined_fields',
231
+ :'predefined_fields_sample_data' => :'predefined_fields_sample_data',
232
+ :'html' => :'html',
228
233
  :'scss' => :'scss',
229
- :'shared_field_data' => :'shared_field_data',
230
- :'template_schema_version' => :'template_schema_version',
234
+ :'header_html' => :'header_html',
235
+ :'footer_html' => :'footer_html',
236
+ :'html_engine_options' => :'html_engine_options',
237
+ :'embed_edit_token' => :'embed_edit_token',
231
238
  :'versions' => :'versions'
232
239
  }
233
240
  end
@@ -245,109 +252,92 @@ module DocSpring
245
252
  # Attribute type mapping.
246
253
  def self.openapi_types
247
254
  {
248
- :'add_data_request_submission_id_footers' => :'Boolean',
249
- :'allow_additional_properties' => :'Boolean',
255
+ :'id' => :'String',
256
+ :'name' => :'String',
250
257
  :'description' => :'String',
251
- :'document_filename' => :'String',
252
- :'document_md5' => :'String',
253
- :'document_parse_error' => :'Boolean',
254
- :'document_processed' => :'Boolean',
255
- :'document_state' => :'String',
256
- :'document_url' => :'String',
258
+ :'template_type' => :'TemplateType',
259
+ :'ready' => :'Boolean',
260
+ :'document' => :'TemplateDocument',
261
+ :'parent_folder_id' => :'String',
262
+ :'path' => :'String',
263
+ :'version' => :'String',
264
+ :'latest_version' => :'String',
265
+ :'version_published_at' => :'Time',
266
+ :'locked' => :'Boolean',
267
+ :'add_signature_request_submission_id_footers' => :'Boolean',
268
+ :'ai_field_naming_language' => :'AiFieldNamingLanguage',
269
+ :'allow_additional_properties' => :'Boolean',
270
+ :'allow_skipping_optional_fields' => :'Boolean',
271
+ :'default_form_mode' => :'TemplateFormMode',
257
272
  :'editable_submissions' => :'Boolean',
258
- :'embed_domains' => :'String',
273
+ :'embed_domains' => :'Array<String>',
259
274
  :'embed_edit_allow_settings' => :'Boolean',
260
275
  :'embed_edit_allow_versioning' => :'Boolean',
261
276
  :'embed_edit_allow_document_replacement' => :'Boolean',
262
- :'encrypt_pdfs_password' => :'String',
263
277
  :'encrypt_pdfs' => :'Boolean',
264
- :'expiration_interval' => :'String',
265
- :'expire_after' => :'Integer',
278
+ :'has_encrypt_pdfs_password' => :'Boolean',
266
279
  :'expire_submissions' => :'Boolean',
267
- :'external_predefined_fields_template_id' => :'String',
268
- :'external_predefined_fields_template_name' => :'String',
269
- :'first_template' => :'Boolean',
270
- :'id' => :'String',
271
- :'locked' => :'Boolean',
280
+ :'expire_after' => :'Integer',
281
+ :'expiration_interval' => :'ExpirationInterval',
272
282
  :'merge_audit_trail_pdf' => :'Boolean',
273
- :'name' => :'String',
274
- :'page_count' => :'Integer',
275
- :'page_dimensions' => :'Array<Array<Float>>',
276
- :'parent_folder_id' => :'String',
277
283
  :'parse_dates_using_template_date_format' => :'Boolean',
278
- :'path' => :'String',
279
- :'permanent_document_url' => :'String',
280
284
  :'public_submissions' => :'Boolean',
281
285
  :'public_web_form' => :'Boolean',
282
286
  :'redirect_url' => :'String',
283
- :'slack_webhook_url' => :'String',
284
- :'template_type' => :'String',
285
- :'updated_at' => :'String',
286
- :'version_published_at' => :'String',
287
- :'version' => :'String',
288
- :'webhook_url' => :'String',
289
- :'embed_edit_token' => :'String',
290
- :'demo' => :'Boolean',
291
- :'latest_version' => :'String',
292
- :'last_changed_at' => :'String',
293
- :'last_changed_by_type' => :'String',
294
- :'last_changed_by_id' => :'String',
295
- :'last_changed_by_external_name' => :'String',
296
- :'last_changed_by_external_email' => :'String',
297
- :'last_changed_by_external_id' => :'String',
298
- :'defaults' => :'Object',
299
- :'field_dependencies' => :'Array<Object>',
300
- :'field_order' => :'Array<Array<Float>>',
301
- :'fields' => :'Object',
302
- :'footer_html' => :'String',
303
- :'header_html' => :'String',
304
- :'html_engine_options' => :'Object',
287
+ :'has_slack_webhook_url' => :'Boolean',
288
+ :'last_changed_at' => :'Time',
289
+ :'last_changed_by' => :'TemplateActor',
290
+ :'created_at' => :'Time',
291
+ :'updated_at' => :'Time',
292
+ :'defaults' => :'TemplateDefaults',
293
+ :'field_dependencies' => :'Array<TemplateFieldDependency>',
294
+ :'field_groups' => :'Array<FieldGroup>',
295
+ :'predefined_fields' => :'Array<PredefinedField>',
296
+ :'predefined_fields_sample_data' => :'Hash<String, Object>',
305
297
  :'html' => :'String',
306
- :'predefined_fields' => :'Array<Object>',
307
298
  :'scss' => :'String',
308
- :'shared_field_data' => :'Object',
309
- :'template_schema_version' => :'Integer',
310
- :'versions' => :'Array<Object>'
299
+ :'header_html' => :'String',
300
+ :'footer_html' => :'String',
301
+ :'html_engine_options' => :'HtmlEngineOptions',
302
+ :'embed_edit_token' => :'String',
303
+ :'versions' => :'Array<TemplateVersion>'
311
304
  }
312
305
  end
313
306
 
314
307
  # List of attributes with nullable: true
315
308
  def self.openapi_nullable
316
309
  Set.new([
317
- :'description',
318
- :'document_filename',
319
- :'document_md5',
320
- :'document_url',
321
- :'embed_domains',
322
- :'encrypt_pdfs_password',
323
- :'external_predefined_fields_template_id',
324
- :'external_predefined_fields_template_name',
325
- :'id',
326
310
  :'name',
327
- :'page_dimensions',
311
+ :'description',
312
+ :'document',
328
313
  :'parent_folder_id',
329
- :'permanent_document_url',
330
- :'redirect_url',
331
- :'slack_webhook_url',
332
- :'updated_at',
333
- :'version_published_at',
334
314
  :'version',
335
- :'webhook_url',
336
- :'embed_edit_token',
337
315
  :'latest_version',
316
+ :'version_published_at',
317
+ :'ai_field_naming_language',
318
+ :'redirect_url',
338
319
  :'last_changed_at',
339
- :'last_changed_by_type',
340
- :'last_changed_by_id',
341
- :'last_changed_by_external_name',
342
- :'last_changed_by_external_email',
343
- :'last_changed_by_external_id',
344
- :'footer_html',
345
- :'header_html',
320
+ :'last_changed_by',
321
+ :'predefined_fields_sample_data',
346
322
  :'html',
347
323
  :'scss',
324
+ :'header_html',
325
+ :'footer_html',
326
+ :'html_engine_options',
327
+ :'embed_edit_token',
348
328
  ])
349
329
  end
350
330
 
331
+ # Returns attribute type mapping
332
+ def self.acceptable_openapi_types
333
+ openapi_types
334
+ end
335
+
336
+ # Returns the nullable attributes
337
+ def self.acceptable_openapi_nullable
338
+ openapi_nullable
339
+ end
340
+
351
341
  # Initializes the object
352
342
  # @param [Hash] attributes Model attributes in the form of hash
353
343
  def initialize(attributes = {})
@@ -364,16 +354,16 @@ module DocSpring
364
354
  h[k.to_sym] = v
365
355
  }
366
356
 
367
- if attributes.key?(:'add_data_request_submission_id_footers')
368
- self.add_data_request_submission_id_footers = attributes[:'add_data_request_submission_id_footers']
357
+ if attributes.key?(:'id')
358
+ self.id = attributes[:'id']
369
359
  else
370
- self.add_data_request_submission_id_footers = nil
360
+ self.id = nil
371
361
  end
372
362
 
373
- if attributes.key?(:'allow_additional_properties')
374
- self.allow_additional_properties = attributes[:'allow_additional_properties']
363
+ if attributes.key?(:'name')
364
+ self.name = attributes[:'name']
375
365
  else
376
- self.allow_additional_properties = nil
366
+ self.name = nil
377
367
  end
378
368
 
379
369
  if attributes.key?(:'description')
@@ -382,162 +372,156 @@ module DocSpring
382
372
  self.description = nil
383
373
  end
384
374
 
385
- if attributes.key?(:'document_filename')
386
- self.document_filename = attributes[:'document_filename']
387
- else
388
- self.document_filename = nil
389
- end
390
-
391
- if attributes.key?(:'document_md5')
392
- self.document_md5 = attributes[:'document_md5']
375
+ if attributes.key?(:'template_type')
376
+ self.template_type = attributes[:'template_type']
393
377
  else
394
- self.document_md5 = nil
378
+ self.template_type = nil
395
379
  end
396
380
 
397
- if attributes.key?(:'document_parse_error')
398
- self.document_parse_error = attributes[:'document_parse_error']
381
+ if attributes.key?(:'ready')
382
+ self.ready = attributes[:'ready']
399
383
  else
400
- self.document_parse_error = nil
384
+ self.ready = nil
401
385
  end
402
386
 
403
- if attributes.key?(:'document_processed')
404
- self.document_processed = attributes[:'document_processed']
387
+ if attributes.key?(:'document')
388
+ self.document = attributes[:'document']
405
389
  else
406
- self.document_processed = nil
390
+ self.document = nil
407
391
  end
408
392
 
409
- if attributes.key?(:'document_state')
410
- self.document_state = attributes[:'document_state']
393
+ if attributes.key?(:'parent_folder_id')
394
+ self.parent_folder_id = attributes[:'parent_folder_id']
411
395
  else
412
- self.document_state = nil
396
+ self.parent_folder_id = nil
413
397
  end
414
398
 
415
- if attributes.key?(:'document_url')
416
- self.document_url = attributes[:'document_url']
399
+ if attributes.key?(:'path')
400
+ self.path = attributes[:'path']
417
401
  else
418
- self.document_url = nil
402
+ self.path = nil
419
403
  end
420
404
 
421
- if attributes.key?(:'editable_submissions')
422
- self.editable_submissions = attributes[:'editable_submissions']
405
+ if attributes.key?(:'version')
406
+ self.version = attributes[:'version']
423
407
  else
424
- self.editable_submissions = nil
408
+ self.version = nil
425
409
  end
426
410
 
427
- if attributes.key?(:'embed_domains')
428
- self.embed_domains = attributes[:'embed_domains']
411
+ if attributes.key?(:'latest_version')
412
+ self.latest_version = attributes[:'latest_version']
429
413
  else
430
- self.embed_domains = nil
414
+ self.latest_version = nil
431
415
  end
432
416
 
433
- if attributes.key?(:'embed_edit_allow_settings')
434
- self.embed_edit_allow_settings = attributes[:'embed_edit_allow_settings']
417
+ if attributes.key?(:'version_published_at')
418
+ self.version_published_at = attributes[:'version_published_at']
435
419
  else
436
- self.embed_edit_allow_settings = nil
420
+ self.version_published_at = nil
437
421
  end
438
422
 
439
- if attributes.key?(:'embed_edit_allow_versioning')
440
- self.embed_edit_allow_versioning = attributes[:'embed_edit_allow_versioning']
423
+ if attributes.key?(:'locked')
424
+ self.locked = attributes[:'locked']
441
425
  else
442
- self.embed_edit_allow_versioning = nil
426
+ self.locked = nil
443
427
  end
444
428
 
445
- if attributes.key?(:'embed_edit_allow_document_replacement')
446
- self.embed_edit_allow_document_replacement = attributes[:'embed_edit_allow_document_replacement']
429
+ if attributes.key?(:'add_signature_request_submission_id_footers')
430
+ self.add_signature_request_submission_id_footers = attributes[:'add_signature_request_submission_id_footers']
447
431
  else
448
- self.embed_edit_allow_document_replacement = nil
432
+ self.add_signature_request_submission_id_footers = nil
449
433
  end
450
434
 
451
- if attributes.key?(:'encrypt_pdfs_password')
452
- self.encrypt_pdfs_password = attributes[:'encrypt_pdfs_password']
435
+ if attributes.key?(:'ai_field_naming_language')
436
+ self.ai_field_naming_language = attributes[:'ai_field_naming_language']
453
437
  else
454
- self.encrypt_pdfs_password = nil
438
+ self.ai_field_naming_language = nil
455
439
  end
456
440
 
457
- if attributes.key?(:'encrypt_pdfs')
458
- self.encrypt_pdfs = attributes[:'encrypt_pdfs']
441
+ if attributes.key?(:'allow_additional_properties')
442
+ self.allow_additional_properties = attributes[:'allow_additional_properties']
459
443
  else
460
- self.encrypt_pdfs = nil
444
+ self.allow_additional_properties = nil
461
445
  end
462
446
 
463
- if attributes.key?(:'expiration_interval')
464
- self.expiration_interval = attributes[:'expiration_interval']
447
+ if attributes.key?(:'allow_skipping_optional_fields')
448
+ self.allow_skipping_optional_fields = attributes[:'allow_skipping_optional_fields']
465
449
  else
466
- self.expiration_interval = nil
450
+ self.allow_skipping_optional_fields = nil
467
451
  end
468
452
 
469
- if attributes.key?(:'expire_after')
470
- self.expire_after = attributes[:'expire_after']
453
+ if attributes.key?(:'default_form_mode')
454
+ self.default_form_mode = attributes[:'default_form_mode']
471
455
  else
472
- self.expire_after = nil
456
+ self.default_form_mode = nil
473
457
  end
474
458
 
475
- if attributes.key?(:'expire_submissions')
476
- self.expire_submissions = attributes[:'expire_submissions']
459
+ if attributes.key?(:'editable_submissions')
460
+ self.editable_submissions = attributes[:'editable_submissions']
477
461
  else
478
- self.expire_submissions = nil
462
+ self.editable_submissions = nil
479
463
  end
480
464
 
481
- if attributes.key?(:'external_predefined_fields_template_id')
482
- self.external_predefined_fields_template_id = attributes[:'external_predefined_fields_template_id']
465
+ if attributes.key?(:'embed_domains')
466
+ if (value = attributes[:'embed_domains']).is_a?(Array)
467
+ self.embed_domains = value
468
+ end
483
469
  else
484
- self.external_predefined_fields_template_id = nil
470
+ self.embed_domains = nil
485
471
  end
486
472
 
487
- if attributes.key?(:'external_predefined_fields_template_name')
488
- self.external_predefined_fields_template_name = attributes[:'external_predefined_fields_template_name']
473
+ if attributes.key?(:'embed_edit_allow_settings')
474
+ self.embed_edit_allow_settings = attributes[:'embed_edit_allow_settings']
489
475
  else
490
- self.external_predefined_fields_template_name = nil
476
+ self.embed_edit_allow_settings = nil
491
477
  end
492
478
 
493
- if attributes.key?(:'first_template')
494
- self.first_template = attributes[:'first_template']
479
+ if attributes.key?(:'embed_edit_allow_versioning')
480
+ self.embed_edit_allow_versioning = attributes[:'embed_edit_allow_versioning']
495
481
  else
496
- self.first_template = nil
482
+ self.embed_edit_allow_versioning = nil
497
483
  end
498
484
 
499
- if attributes.key?(:'id')
500
- self.id = attributes[:'id']
485
+ if attributes.key?(:'embed_edit_allow_document_replacement')
486
+ self.embed_edit_allow_document_replacement = attributes[:'embed_edit_allow_document_replacement']
501
487
  else
502
- self.id = nil
488
+ self.embed_edit_allow_document_replacement = nil
503
489
  end
504
490
 
505
- if attributes.key?(:'locked')
506
- self.locked = attributes[:'locked']
491
+ if attributes.key?(:'encrypt_pdfs')
492
+ self.encrypt_pdfs = attributes[:'encrypt_pdfs']
507
493
  else
508
- self.locked = nil
494
+ self.encrypt_pdfs = nil
509
495
  end
510
496
 
511
- if attributes.key?(:'merge_audit_trail_pdf')
512
- self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf']
497
+ if attributes.key?(:'has_encrypt_pdfs_password')
498
+ self.has_encrypt_pdfs_password = attributes[:'has_encrypt_pdfs_password']
513
499
  else
514
- self.merge_audit_trail_pdf = nil
500
+ self.has_encrypt_pdfs_password = nil
515
501
  end
516
502
 
517
- if attributes.key?(:'name')
518
- self.name = attributes[:'name']
503
+ if attributes.key?(:'expire_submissions')
504
+ self.expire_submissions = attributes[:'expire_submissions']
519
505
  else
520
- self.name = nil
506
+ self.expire_submissions = nil
521
507
  end
522
508
 
523
- if attributes.key?(:'page_count')
524
- self.page_count = attributes[:'page_count']
509
+ if attributes.key?(:'expire_after')
510
+ self.expire_after = attributes[:'expire_after']
525
511
  else
526
- self.page_count = nil
512
+ self.expire_after = nil
527
513
  end
528
514
 
529
- if attributes.key?(:'page_dimensions')
530
- if (value = attributes[:'page_dimensions']).is_a?(Array)
531
- self.page_dimensions = value
532
- end
515
+ if attributes.key?(:'expiration_interval')
516
+ self.expiration_interval = attributes[:'expiration_interval']
533
517
  else
534
- self.page_dimensions = nil
518
+ self.expiration_interval = nil
535
519
  end
536
520
 
537
- if attributes.key?(:'parent_folder_id')
538
- self.parent_folder_id = attributes[:'parent_folder_id']
521
+ if attributes.key?(:'merge_audit_trail_pdf')
522
+ self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf']
539
523
  else
540
- self.parent_folder_id = nil
524
+ self.merge_audit_trail_pdf = nil
541
525
  end
542
526
 
543
527
  if attributes.key?(:'parse_dates_using_template_date_format')
@@ -546,18 +530,6 @@ module DocSpring
546
530
  self.parse_dates_using_template_date_format = nil
547
531
  end
548
532
 
549
- if attributes.key?(:'path')
550
- self.path = attributes[:'path']
551
- else
552
- self.path = nil
553
- end
554
-
555
- if attributes.key?(:'permanent_document_url')
556
- self.permanent_document_url = attributes[:'permanent_document_url']
557
- else
558
- self.permanent_document_url = nil
559
- end
560
-
561
533
  if attributes.key?(:'public_submissions')
562
534
  self.public_submissions = attributes[:'public_submissions']
563
535
  else
@@ -576,56 +548,10 @@ module DocSpring
576
548
  self.redirect_url = nil
577
549
  end
578
550
 
579
- if attributes.key?(:'slack_webhook_url')
580
- self.slack_webhook_url = attributes[:'slack_webhook_url']
581
- else
582
- self.slack_webhook_url = nil
583
- end
584
-
585
- if attributes.key?(:'template_type')
586
- self.template_type = attributes[:'template_type']
587
- else
588
- self.template_type = nil
589
- end
590
-
591
- if attributes.key?(:'updated_at')
592
- self.updated_at = attributes[:'updated_at']
593
- else
594
- self.updated_at = nil
595
- end
596
-
597
- if attributes.key?(:'version_published_at')
598
- self.version_published_at = attributes[:'version_published_at']
599
- else
600
- self.version_published_at = nil
601
- end
602
-
603
- if attributes.key?(:'version')
604
- self.version = attributes[:'version']
605
- else
606
- self.version = nil
607
- end
608
-
609
- if attributes.key?(:'webhook_url')
610
- self.webhook_url = attributes[:'webhook_url']
611
- else
612
- self.webhook_url = nil
613
- end
614
-
615
- if attributes.key?(:'embed_edit_token')
616
- self.embed_edit_token = attributes[:'embed_edit_token']
617
- end
618
-
619
- if attributes.key?(:'demo')
620
- self.demo = attributes[:'demo']
551
+ if attributes.key?(:'has_slack_webhook_url')
552
+ self.has_slack_webhook_url = attributes[:'has_slack_webhook_url']
621
553
  else
622
- self.demo = nil
623
- end
624
-
625
- if attributes.key?(:'latest_version')
626
- self.latest_version = attributes[:'latest_version']
627
- else
628
- self.latest_version = nil
554
+ self.has_slack_webhook_url = nil
629
555
  end
630
556
 
631
557
  if attributes.key?(:'last_changed_at')
@@ -634,34 +560,22 @@ module DocSpring
634
560
  self.last_changed_at = nil
635
561
  end
636
562
 
637
- if attributes.key?(:'last_changed_by_type')
638
- self.last_changed_by_type = attributes[:'last_changed_by_type']
563
+ if attributes.key?(:'last_changed_by')
564
+ self.last_changed_by = attributes[:'last_changed_by']
639
565
  else
640
- self.last_changed_by_type = nil
566
+ self.last_changed_by = nil
641
567
  end
642
568
 
643
- if attributes.key?(:'last_changed_by_id')
644
- self.last_changed_by_id = attributes[:'last_changed_by_id']
569
+ if attributes.key?(:'created_at')
570
+ self.created_at = attributes[:'created_at']
645
571
  else
646
- self.last_changed_by_id = nil
572
+ self.created_at = nil
647
573
  end
648
574
 
649
- if attributes.key?(:'last_changed_by_external_name')
650
- self.last_changed_by_external_name = attributes[:'last_changed_by_external_name']
651
- else
652
- self.last_changed_by_external_name = nil
653
- end
654
-
655
- if attributes.key?(:'last_changed_by_external_email')
656
- self.last_changed_by_external_email = attributes[:'last_changed_by_external_email']
657
- else
658
- self.last_changed_by_external_email = nil
659
- end
660
-
661
- if attributes.key?(:'last_changed_by_external_id')
662
- self.last_changed_by_external_id = attributes[:'last_changed_by_external_id']
575
+ if attributes.key?(:'updated_at')
576
+ self.updated_at = attributes[:'updated_at']
663
577
  else
664
- self.last_changed_by_external_id = nil
578
+ self.updated_at = nil
665
579
  end
666
580
 
667
581
  if attributes.key?(:'defaults')
@@ -678,42 +592,12 @@ module DocSpring
678
592
  self.field_dependencies = nil
679
593
  end
680
594
 
681
- if attributes.key?(:'field_order')
682
- if (value = attributes[:'field_order']).is_a?(Array)
683
- self.field_order = value
595
+ if attributes.key?(:'field_groups')
596
+ if (value = attributes[:'field_groups']).is_a?(Array)
597
+ self.field_groups = value
684
598
  end
685
599
  else
686
- self.field_order = nil
687
- end
688
-
689
- if attributes.key?(:'fields')
690
- self.fields = attributes[:'fields']
691
- else
692
- self.fields = nil
693
- end
694
-
695
- if attributes.key?(:'footer_html')
696
- self.footer_html = attributes[:'footer_html']
697
- else
698
- self.footer_html = nil
699
- end
700
-
701
- if attributes.key?(:'header_html')
702
- self.header_html = attributes[:'header_html']
703
- else
704
- self.header_html = nil
705
- end
706
-
707
- if attributes.key?(:'html_engine_options')
708
- self.html_engine_options = attributes[:'html_engine_options']
709
- else
710
- self.html_engine_options = nil
711
- end
712
-
713
- if attributes.key?(:'html')
714
- self.html = attributes[:'html']
715
- else
716
- self.html = nil
600
+ self.field_groups = nil
717
601
  end
718
602
 
719
603
  if attributes.key?(:'predefined_fields')
@@ -724,22 +608,48 @@ module DocSpring
724
608
  self.predefined_fields = nil
725
609
  end
726
610
 
611
+ if attributes.key?(:'predefined_fields_sample_data')
612
+ if (value = attributes[:'predefined_fields_sample_data']).is_a?(Hash) || value.nil?
613
+ self.predefined_fields_sample_data = value
614
+ end
615
+ else
616
+ self.predefined_fields_sample_data = nil
617
+ end
618
+
619
+ if attributes.key?(:'html')
620
+ self.html = attributes[:'html']
621
+ else
622
+ self.html = nil
623
+ end
624
+
727
625
  if attributes.key?(:'scss')
728
626
  self.scss = attributes[:'scss']
729
627
  else
730
628
  self.scss = nil
731
629
  end
732
630
 
733
- if attributes.key?(:'shared_field_data')
734
- self.shared_field_data = attributes[:'shared_field_data']
631
+ if attributes.key?(:'header_html')
632
+ self.header_html = attributes[:'header_html']
633
+ else
634
+ self.header_html = nil
635
+ end
636
+
637
+ if attributes.key?(:'footer_html')
638
+ self.footer_html = attributes[:'footer_html']
639
+ else
640
+ self.footer_html = nil
641
+ end
642
+
643
+ if attributes.key?(:'html_engine_options')
644
+ self.html_engine_options = attributes[:'html_engine_options']
735
645
  else
736
- self.shared_field_data = nil
646
+ self.html_engine_options = nil
737
647
  end
738
648
 
739
- if attributes.key?(:'template_schema_version')
740
- self.template_schema_version = attributes[:'template_schema_version']
649
+ if attributes.key?(:'embed_edit_token')
650
+ self.embed_edit_token = attributes[:'embed_edit_token']
741
651
  else
742
- self.template_schema_version = nil
652
+ self.embed_edit_token = nil
743
653
  end
744
654
 
745
655
  if attributes.key?(:'versions')
@@ -756,30 +666,50 @@ module DocSpring
756
666
  def list_invalid_properties
757
667
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
758
668
  invalid_properties = Array.new
759
- if @add_data_request_submission_id_footers.nil?
760
- invalid_properties.push('invalid value for "add_data_request_submission_id_footers", add_data_request_submission_id_footers cannot be nil.')
669
+ if @id.nil?
670
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
761
671
  end
762
672
 
763
- if @allow_additional_properties.nil?
764
- invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
673
+ if @template_type.nil?
674
+ invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
765
675
  end
766
676
 
767
- if @document_parse_error.nil?
768
- invalid_properties.push('invalid value for "document_parse_error", document_parse_error cannot be nil.')
677
+ if @ready.nil?
678
+ invalid_properties.push('invalid value for "ready", ready cannot be nil.')
769
679
  end
770
680
 
771
- if @document_processed.nil?
772
- invalid_properties.push('invalid value for "document_processed", document_processed cannot be nil.')
681
+ if @path.nil?
682
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
683
+ end
684
+
685
+ if @locked.nil?
686
+ invalid_properties.push('invalid value for "locked", locked cannot be nil.')
687
+ end
688
+
689
+ if @add_signature_request_submission_id_footers.nil?
690
+ invalid_properties.push('invalid value for "add_signature_request_submission_id_footers", add_signature_request_submission_id_footers cannot be nil.')
773
691
  end
774
692
 
775
- if @document_state.nil?
776
- invalid_properties.push('invalid value for "document_state", document_state cannot be nil.')
693
+ if @allow_additional_properties.nil?
694
+ invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
695
+ end
696
+
697
+ if @allow_skipping_optional_fields.nil?
698
+ invalid_properties.push('invalid value for "allow_skipping_optional_fields", allow_skipping_optional_fields cannot be nil.')
699
+ end
700
+
701
+ if @default_form_mode.nil?
702
+ invalid_properties.push('invalid value for "default_form_mode", default_form_mode cannot be nil.')
777
703
  end
778
704
 
779
705
  if @editable_submissions.nil?
780
706
  invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.')
781
707
  end
782
708
 
709
+ if @embed_domains.nil?
710
+ invalid_properties.push('invalid value for "embed_domains", embed_domains cannot be nil.')
711
+ end
712
+
783
713
  if @embed_edit_allow_settings.nil?
784
714
  invalid_properties.push('invalid value for "embed_edit_allow_settings", embed_edit_allow_settings cannot be nil.')
785
715
  end
@@ -796,42 +726,30 @@ module DocSpring
796
726
  invalid_properties.push('invalid value for "encrypt_pdfs", encrypt_pdfs cannot be nil.')
797
727
  end
798
728
 
799
- if @expiration_interval.nil?
800
- invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.')
801
- end
802
-
803
- if @expire_after.nil?
804
- invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
729
+ if @has_encrypt_pdfs_password.nil?
730
+ invalid_properties.push('invalid value for "has_encrypt_pdfs_password", has_encrypt_pdfs_password cannot be nil.')
805
731
  end
806
732
 
807
733
  if @expire_submissions.nil?
808
734
  invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.')
809
735
  end
810
736
 
811
- if @first_template.nil?
812
- invalid_properties.push('invalid value for "first_template", first_template cannot be nil.')
737
+ if @expire_after.nil?
738
+ invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
813
739
  end
814
740
 
815
- if @locked.nil?
816
- invalid_properties.push('invalid value for "locked", locked cannot be nil.')
741
+ if @expiration_interval.nil?
742
+ invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.')
817
743
  end
818
744
 
819
745
  if @merge_audit_trail_pdf.nil?
820
746
  invalid_properties.push('invalid value for "merge_audit_trail_pdf", merge_audit_trail_pdf cannot be nil.')
821
747
  end
822
748
 
823
- if @page_count.nil?
824
- invalid_properties.push('invalid value for "page_count", page_count cannot be nil.')
825
- end
826
-
827
749
  if @parse_dates_using_template_date_format.nil?
828
750
  invalid_properties.push('invalid value for "parse_dates_using_template_date_format", parse_dates_using_template_date_format cannot be nil.')
829
751
  end
830
752
 
831
- if @path.nil?
832
- invalid_properties.push('invalid value for "path", path cannot be nil.')
833
- end
834
-
835
753
  if @public_submissions.nil?
836
754
  invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.')
837
755
  end
@@ -840,12 +758,16 @@ module DocSpring
840
758
  invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.')
841
759
  end
842
760
 
843
- if @template_type.nil?
844
- invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
761
+ if @has_slack_webhook_url.nil?
762
+ invalid_properties.push('invalid value for "has_slack_webhook_url", has_slack_webhook_url cannot be nil.')
845
763
  end
846
764
 
847
- if @demo.nil?
848
- invalid_properties.push('invalid value for "demo", demo cannot be nil.')
765
+ if @created_at.nil?
766
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
767
+ end
768
+
769
+ if @updated_at.nil?
770
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
849
771
  end
850
772
 
851
773
  if @defaults.nil?
@@ -856,30 +778,14 @@ module DocSpring
856
778
  invalid_properties.push('invalid value for "field_dependencies", field_dependencies cannot be nil.')
857
779
  end
858
780
 
859
- if @field_order.nil?
860
- invalid_properties.push('invalid value for "field_order", field_order cannot be nil.')
861
- end
862
-
863
- if @fields.nil?
864
- invalid_properties.push('invalid value for "fields", fields cannot be nil.')
865
- end
866
-
867
- if @html_engine_options.nil?
868
- invalid_properties.push('invalid value for "html_engine_options", html_engine_options cannot be nil.')
781
+ if @field_groups.nil?
782
+ invalid_properties.push('invalid value for "field_groups", field_groups cannot be nil.')
869
783
  end
870
784
 
871
785
  if @predefined_fields.nil?
872
786
  invalid_properties.push('invalid value for "predefined_fields", predefined_fields cannot be nil.')
873
787
  end
874
788
 
875
- if @shared_field_data.nil?
876
- invalid_properties.push('invalid value for "shared_field_data", shared_field_data cannot be nil.')
877
- end
878
-
879
- if @template_schema_version.nil?
880
- invalid_properties.push('invalid value for "template_schema_version", template_schema_version cannot be nil.')
881
- end
882
-
883
789
  if @versions.nil?
884
790
  invalid_properties.push('invalid value for "versions", versions cannot be nil.')
885
791
  end
@@ -891,55 +797,98 @@ module DocSpring
891
797
  # @return true if the model is valid
892
798
  def valid?
893
799
  warn '[DEPRECATED] the `valid?` method is obsolete'
894
- return false if @add_data_request_submission_id_footers.nil?
800
+ return false if @id.nil?
801
+ return false if @template_type.nil?
802
+ return false if @ready.nil?
803
+ return false if @path.nil?
804
+ return false if @locked.nil?
805
+ return false if @add_signature_request_submission_id_footers.nil?
895
806
  return false if @allow_additional_properties.nil?
896
- return false if @document_parse_error.nil?
897
- return false if @document_processed.nil?
898
- return false if @document_state.nil?
899
- document_state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "password_required", "malformed_pdf", "unknown_error"])
900
- return false unless document_state_validator.valid?(@document_state)
807
+ return false if @allow_skipping_optional_fields.nil?
808
+ return false if @default_form_mode.nil?
901
809
  return false if @editable_submissions.nil?
810
+ return false if @embed_domains.nil?
902
811
  return false if @embed_edit_allow_settings.nil?
903
812
  return false if @embed_edit_allow_versioning.nil?
904
813
  return false if @embed_edit_allow_document_replacement.nil?
905
814
  return false if @encrypt_pdfs.nil?
906
- return false if @expiration_interval.nil?
907
- return false if @expire_after.nil?
815
+ return false if @has_encrypt_pdfs_password.nil?
908
816
  return false if @expire_submissions.nil?
909
- return false if @first_template.nil?
910
- return false if @locked.nil?
817
+ return false if @expire_after.nil?
818
+ return false if @expiration_interval.nil?
911
819
  return false if @merge_audit_trail_pdf.nil?
912
- return false if @page_count.nil?
913
820
  return false if @parse_dates_using_template_date_format.nil?
914
- return false if @path.nil?
915
821
  return false if @public_submissions.nil?
916
822
  return false if @public_web_form.nil?
917
- return false if @template_type.nil?
918
- template_type_validator = EnumAttributeValidator.new('String', ["pdf", "html"])
919
- return false unless template_type_validator.valid?(@template_type)
920
- return false if @demo.nil?
921
- last_changed_by_type_validator = EnumAttributeValidator.new('String', ["user", "api", "external_user"])
922
- return false unless last_changed_by_type_validator.valid?(@last_changed_by_type)
823
+ return false if @has_slack_webhook_url.nil?
824
+ return false if @created_at.nil?
825
+ return false if @updated_at.nil?
923
826
  return false if @defaults.nil?
924
827
  return false if @field_dependencies.nil?
925
- return false if @field_order.nil?
926
- return false if @fields.nil?
927
- return false if @html_engine_options.nil?
828
+ return false if @field_groups.nil?
928
829
  return false if @predefined_fields.nil?
929
- return false if @shared_field_data.nil?
930
- return false if @template_schema_version.nil?
931
830
  return false if @versions.nil?
932
831
  true
933
832
  end
934
833
 
935
834
  # Custom attribute writer method with validation
936
- # @param [Object] add_data_request_submission_id_footers Value to be assigned
937
- def add_data_request_submission_id_footers=(add_data_request_submission_id_footers)
938
- if add_data_request_submission_id_footers.nil?
939
- fail ArgumentError, 'add_data_request_submission_id_footers cannot be nil'
835
+ # @param [Object] id Value to be assigned
836
+ def id=(id)
837
+ if id.nil?
838
+ fail ArgumentError, 'id cannot be nil'
839
+ end
840
+
841
+ @id = id
842
+ end
843
+
844
+ # Custom attribute writer method with validation
845
+ # @param [Object] template_type Value to be assigned
846
+ def template_type=(template_type)
847
+ if template_type.nil?
848
+ fail ArgumentError, 'template_type cannot be nil'
849
+ end
850
+
851
+ @template_type = template_type
852
+ end
853
+
854
+ # Custom attribute writer method with validation
855
+ # @param [Object] ready Value to be assigned
856
+ def ready=(ready)
857
+ if ready.nil?
858
+ fail ArgumentError, 'ready cannot be nil'
859
+ end
860
+
861
+ @ready = ready
862
+ end
863
+
864
+ # Custom attribute writer method with validation
865
+ # @param [Object] path Value to be assigned
866
+ def path=(path)
867
+ if path.nil?
868
+ fail ArgumentError, 'path cannot be nil'
869
+ end
870
+
871
+ @path = path
872
+ end
873
+
874
+ # Custom attribute writer method with validation
875
+ # @param [Object] locked Value to be assigned
876
+ def locked=(locked)
877
+ if locked.nil?
878
+ fail ArgumentError, 'locked cannot be nil'
879
+ end
880
+
881
+ @locked = locked
882
+ end
883
+
884
+ # Custom attribute writer method with validation
885
+ # @param [Object] add_signature_request_submission_id_footers Value to be assigned
886
+ def add_signature_request_submission_id_footers=(add_signature_request_submission_id_footers)
887
+ if add_signature_request_submission_id_footers.nil?
888
+ fail ArgumentError, 'add_signature_request_submission_id_footers cannot be nil'
940
889
  end
941
890
 
942
- @add_data_request_submission_id_footers = add_data_request_submission_id_footers
891
+ @add_signature_request_submission_id_footers = add_signature_request_submission_id_footers
943
892
  end
944
893
 
945
894
  # Custom attribute writer method with validation
@@ -953,34 +902,23 @@ module DocSpring
953
902
  end
954
903
 
955
904
  # Custom attribute writer method with validation
956
- # @param [Object] document_parse_error Value to be assigned
957
- def document_parse_error=(document_parse_error)
958
- if document_parse_error.nil?
959
- fail ArgumentError, 'document_parse_error cannot be nil'
905
+ # @param [Object] allow_skipping_optional_fields Value to be assigned
906
+ def allow_skipping_optional_fields=(allow_skipping_optional_fields)
907
+ if allow_skipping_optional_fields.nil?
908
+ fail ArgumentError, 'allow_skipping_optional_fields cannot be nil'
960
909
  end
961
910
 
962
- @document_parse_error = document_parse_error
911
+ @allow_skipping_optional_fields = allow_skipping_optional_fields
963
912
  end
964
913
 
965
914
  # Custom attribute writer method with validation
966
- # @param [Object] document_processed Value to be assigned
967
- def document_processed=(document_processed)
968
- if document_processed.nil?
969
- fail ArgumentError, 'document_processed cannot be nil'
915
+ # @param [Object] default_form_mode Value to be assigned
916
+ def default_form_mode=(default_form_mode)
917
+ if default_form_mode.nil?
918
+ fail ArgumentError, 'default_form_mode cannot be nil'
970
919
  end
971
920
 
972
- @document_processed = document_processed
973
- end
974
-
975
- # Custom attribute writer method checking allowed values (enum).
976
- # @param [Object] document_state Object to be assigned
977
- def document_state=(document_state)
978
- validator = EnumAttributeValidator.new('String', ["pending", "processed", "password_required", "malformed_pdf", "unknown_error"])
979
- # build_from_hash accepts enum values this client doesn't know about yet
980
- unless defined?(@_skip_enum_validation) || validator.valid?(document_state)
981
- fail ArgumentError, "invalid value for \"document_state\", must be one of #{validator.allowable_values}."
982
- end
983
- @document_state = document_state
921
+ @default_form_mode = default_form_mode
984
922
  end
985
923
 
986
924
  # Custom attribute writer method with validation
@@ -993,6 +931,16 @@ module DocSpring
993
931
  @editable_submissions = editable_submissions
994
932
  end
995
933
 
934
+ # Custom attribute writer method with validation
935
+ # @param [Object] embed_domains Value to be assigned
936
+ def embed_domains=(embed_domains)
937
+ if embed_domains.nil?
938
+ fail ArgumentError, 'embed_domains cannot be nil'
939
+ end
940
+
941
+ @embed_domains = embed_domains
942
+ end
943
+
996
944
  # Custom attribute writer method with validation
997
945
  # @param [Object] embed_edit_allow_settings Value to be assigned
998
946
  def embed_edit_allow_settings=(embed_edit_allow_settings)
@@ -1034,23 +982,13 @@ module DocSpring
1034
982
  end
1035
983
 
1036
984
  # Custom attribute writer method with validation
1037
- # @param [Object] expiration_interval Value to be assigned
1038
- def expiration_interval=(expiration_interval)
1039
- if expiration_interval.nil?
1040
- fail ArgumentError, 'expiration_interval cannot be nil'
1041
- end
1042
-
1043
- @expiration_interval = expiration_interval
1044
- end
1045
-
1046
- # Custom attribute writer method with validation
1047
- # @param [Object] expire_after Value to be assigned
1048
- def expire_after=(expire_after)
1049
- if expire_after.nil?
1050
- fail ArgumentError, 'expire_after cannot be nil'
985
+ # @param [Object] has_encrypt_pdfs_password Value to be assigned
986
+ def has_encrypt_pdfs_password=(has_encrypt_pdfs_password)
987
+ if has_encrypt_pdfs_password.nil?
988
+ fail ArgumentError, 'has_encrypt_pdfs_password cannot be nil'
1051
989
  end
1052
990
 
1053
- @expire_after = expire_after
991
+ @has_encrypt_pdfs_password = has_encrypt_pdfs_password
1054
992
  end
1055
993
 
1056
994
  # Custom attribute writer method with validation
@@ -1064,23 +1002,23 @@ module DocSpring
1064
1002
  end
1065
1003
 
1066
1004
  # Custom attribute writer method with validation
1067
- # @param [Object] first_template Value to be assigned
1068
- def first_template=(first_template)
1069
- if first_template.nil?
1070
- fail ArgumentError, 'first_template cannot be nil'
1005
+ # @param [Object] expire_after Value to be assigned
1006
+ def expire_after=(expire_after)
1007
+ if expire_after.nil?
1008
+ fail ArgumentError, 'expire_after cannot be nil'
1071
1009
  end
1072
1010
 
1073
- @first_template = first_template
1011
+ @expire_after = expire_after
1074
1012
  end
1075
1013
 
1076
1014
  # Custom attribute writer method with validation
1077
- # @param [Object] locked Value to be assigned
1078
- def locked=(locked)
1079
- if locked.nil?
1080
- fail ArgumentError, 'locked cannot be nil'
1015
+ # @param [Object] expiration_interval Value to be assigned
1016
+ def expiration_interval=(expiration_interval)
1017
+ if expiration_interval.nil?
1018
+ fail ArgumentError, 'expiration_interval cannot be nil'
1081
1019
  end
1082
1020
 
1083
- @locked = locked
1021
+ @expiration_interval = expiration_interval
1084
1022
  end
1085
1023
 
1086
1024
  # Custom attribute writer method with validation
@@ -1093,16 +1031,6 @@ module DocSpring
1093
1031
  @merge_audit_trail_pdf = merge_audit_trail_pdf
1094
1032
  end
1095
1033
 
1096
- # Custom attribute writer method with validation
1097
- # @param [Object] page_count Value to be assigned
1098
- def page_count=(page_count)
1099
- if page_count.nil?
1100
- fail ArgumentError, 'page_count cannot be nil'
1101
- end
1102
-
1103
- @page_count = page_count
1104
- end
1105
-
1106
1034
  # Custom attribute writer method with validation
1107
1035
  # @param [Object] parse_dates_using_template_date_format Value to be assigned
1108
1036
  def parse_dates_using_template_date_format=(parse_dates_using_template_date_format)
@@ -1113,16 +1041,6 @@ module DocSpring
1113
1041
  @parse_dates_using_template_date_format = parse_dates_using_template_date_format
1114
1042
  end
1115
1043
 
1116
- # Custom attribute writer method with validation
1117
- # @param [Object] path Value to be assigned
1118
- def path=(path)
1119
- if path.nil?
1120
- fail ArgumentError, 'path cannot be nil'
1121
- end
1122
-
1123
- @path = path
1124
- end
1125
-
1126
1044
  # Custom attribute writer method with validation
1127
1045
  # @param [Object] public_submissions Value to be assigned
1128
1046
  def public_submissions=(public_submissions)
@@ -1143,36 +1061,34 @@ module DocSpring
1143
1061
  @public_web_form = public_web_form
1144
1062
  end
1145
1063
 
1146
- # Custom attribute writer method checking allowed values (enum).
1147
- # @param [Object] template_type Object to be assigned
1148
- def template_type=(template_type)
1149
- validator = EnumAttributeValidator.new('String', ["pdf", "html"])
1150
- # build_from_hash accepts enum values this client doesn't know about yet
1151
- unless defined?(@_skip_enum_validation) || validator.valid?(template_type)
1152
- fail ArgumentError, "invalid value for \"template_type\", must be one of #{validator.allowable_values}."
1064
+ # Custom attribute writer method with validation
1065
+ # @param [Object] has_slack_webhook_url Value to be assigned
1066
+ def has_slack_webhook_url=(has_slack_webhook_url)
1067
+ if has_slack_webhook_url.nil?
1068
+ fail ArgumentError, 'has_slack_webhook_url cannot be nil'
1153
1069
  end
1154
- @template_type = template_type
1070
+
1071
+ @has_slack_webhook_url = has_slack_webhook_url
1155
1072
  end
1156
1073
 
1157
1074
  # Custom attribute writer method with validation
1158
- # @param [Object] demo Value to be assigned
1159
- def demo=(demo)
1160
- if demo.nil?
1161
- fail ArgumentError, 'demo cannot be nil'
1075
+ # @param [Object] created_at Value to be assigned
1076
+ def created_at=(created_at)
1077
+ if created_at.nil?
1078
+ fail ArgumentError, 'created_at cannot be nil'
1162
1079
  end
1163
1080
 
1164
- @demo = demo
1081
+ @created_at = created_at
1165
1082
  end
1166
1083
 
1167
- # Custom attribute writer method checking allowed values (enum).
1168
- # @param [Object] last_changed_by_type Object to be assigned
1169
- def last_changed_by_type=(last_changed_by_type)
1170
- validator = EnumAttributeValidator.new('String', ["user", "api", "external_user"])
1171
- # build_from_hash accepts enum values this client doesn't know about yet
1172
- unless defined?(@_skip_enum_validation) || validator.valid?(last_changed_by_type)
1173
- fail ArgumentError, "invalid value for \"last_changed_by_type\", must be one of #{validator.allowable_values}."
1084
+ # Custom attribute writer method with validation
1085
+ # @param [Object] updated_at Value to be assigned
1086
+ def updated_at=(updated_at)
1087
+ if updated_at.nil?
1088
+ fail ArgumentError, 'updated_at cannot be nil'
1174
1089
  end
1175
- @last_changed_by_type = last_changed_by_type
1090
+
1091
+ @updated_at = updated_at
1176
1092
  end
1177
1093
 
1178
1094
  # Custom attribute writer method with validation
@@ -1196,33 +1112,13 @@ module DocSpring
1196
1112
  end
1197
1113
 
1198
1114
  # Custom attribute writer method with validation
1199
- # @param [Object] field_order Value to be assigned
1200
- def field_order=(field_order)
1201
- if field_order.nil?
1202
- fail ArgumentError, 'field_order cannot be nil'
1203
- end
1204
-
1205
- @field_order = field_order
1206
- end
1207
-
1208
- # Custom attribute writer method with validation
1209
- # @param [Object] fields Value to be assigned
1210
- def fields=(fields)
1211
- if fields.nil?
1212
- fail ArgumentError, 'fields cannot be nil'
1213
- end
1214
-
1215
- @fields = fields
1216
- end
1217
-
1218
- # Custom attribute writer method with validation
1219
- # @param [Object] html_engine_options Value to be assigned
1220
- def html_engine_options=(html_engine_options)
1221
- if html_engine_options.nil?
1222
- fail ArgumentError, 'html_engine_options cannot be nil'
1115
+ # @param [Object] field_groups Value to be assigned
1116
+ def field_groups=(field_groups)
1117
+ if field_groups.nil?
1118
+ fail ArgumentError, 'field_groups cannot be nil'
1223
1119
  end
1224
1120
 
1225
- @html_engine_options = html_engine_options
1121
+ @field_groups = field_groups
1226
1122
  end
1227
1123
 
1228
1124
  # Custom attribute writer method with validation
@@ -1235,26 +1131,6 @@ module DocSpring
1235
1131
  @predefined_fields = predefined_fields
1236
1132
  end
1237
1133
 
1238
- # Custom attribute writer method with validation
1239
- # @param [Object] shared_field_data Value to be assigned
1240
- def shared_field_data=(shared_field_data)
1241
- if shared_field_data.nil?
1242
- fail ArgumentError, 'shared_field_data cannot be nil'
1243
- end
1244
-
1245
- @shared_field_data = shared_field_data
1246
- end
1247
-
1248
- # Custom attribute writer method with validation
1249
- # @param [Object] template_schema_version Value to be assigned
1250
- def template_schema_version=(template_schema_version)
1251
- if template_schema_version.nil?
1252
- fail ArgumentError, 'template_schema_version cannot be nil'
1253
- end
1254
-
1255
- @template_schema_version = template_schema_version
1256
- end
1257
-
1258
1134
  # Custom attribute writer method with validation
1259
1135
  # @param [Object] versions Value to be assigned
1260
1136
  def versions=(versions)
@@ -1270,68 +1146,54 @@ module DocSpring
1270
1146
  def ==(o)
1271
1147
  return true if self.equal?(o)
1272
1148
  self.class == o.class &&
1273
- add_data_request_submission_id_footers == o.add_data_request_submission_id_footers &&
1274
- allow_additional_properties == o.allow_additional_properties &&
1149
+ id == o.id &&
1150
+ name == o.name &&
1275
1151
  description == o.description &&
1276
- document_filename == o.document_filename &&
1277
- document_md5 == o.document_md5 &&
1278
- document_parse_error == o.document_parse_error &&
1279
- document_processed == o.document_processed &&
1280
- document_state == o.document_state &&
1281
- document_url == o.document_url &&
1152
+ template_type == o.template_type &&
1153
+ ready == o.ready &&
1154
+ document == o.document &&
1155
+ parent_folder_id == o.parent_folder_id &&
1156
+ path == o.path &&
1157
+ version == o.version &&
1158
+ latest_version == o.latest_version &&
1159
+ version_published_at == o.version_published_at &&
1160
+ locked == o.locked &&
1161
+ add_signature_request_submission_id_footers == o.add_signature_request_submission_id_footers &&
1162
+ ai_field_naming_language == o.ai_field_naming_language &&
1163
+ allow_additional_properties == o.allow_additional_properties &&
1164
+ allow_skipping_optional_fields == o.allow_skipping_optional_fields &&
1165
+ default_form_mode == o.default_form_mode &&
1282
1166
  editable_submissions == o.editable_submissions &&
1283
1167
  embed_domains == o.embed_domains &&
1284
1168
  embed_edit_allow_settings == o.embed_edit_allow_settings &&
1285
1169
  embed_edit_allow_versioning == o.embed_edit_allow_versioning &&
1286
1170
  embed_edit_allow_document_replacement == o.embed_edit_allow_document_replacement &&
1287
- encrypt_pdfs_password == o.encrypt_pdfs_password &&
1288
1171
  encrypt_pdfs == o.encrypt_pdfs &&
1289
- expiration_interval == o.expiration_interval &&
1290
- expire_after == o.expire_after &&
1172
+ has_encrypt_pdfs_password == o.has_encrypt_pdfs_password &&
1291
1173
  expire_submissions == o.expire_submissions &&
1292
- external_predefined_fields_template_id == o.external_predefined_fields_template_id &&
1293
- external_predefined_fields_template_name == o.external_predefined_fields_template_name &&
1294
- first_template == o.first_template &&
1295
- id == o.id &&
1296
- locked == o.locked &&
1174
+ expire_after == o.expire_after &&
1175
+ expiration_interval == o.expiration_interval &&
1297
1176
  merge_audit_trail_pdf == o.merge_audit_trail_pdf &&
1298
- name == o.name &&
1299
- page_count == o.page_count &&
1300
- page_dimensions == o.page_dimensions &&
1301
- parent_folder_id == o.parent_folder_id &&
1302
1177
  parse_dates_using_template_date_format == o.parse_dates_using_template_date_format &&
1303
- path == o.path &&
1304
- permanent_document_url == o.permanent_document_url &&
1305
1178
  public_submissions == o.public_submissions &&
1306
1179
  public_web_form == o.public_web_form &&
1307
1180
  redirect_url == o.redirect_url &&
1308
- slack_webhook_url == o.slack_webhook_url &&
1309
- template_type == o.template_type &&
1310
- updated_at == o.updated_at &&
1311
- version_published_at == o.version_published_at &&
1312
- version == o.version &&
1313
- webhook_url == o.webhook_url &&
1314
- embed_edit_token == o.embed_edit_token &&
1315
- demo == o.demo &&
1316
- latest_version == o.latest_version &&
1181
+ has_slack_webhook_url == o.has_slack_webhook_url &&
1317
1182
  last_changed_at == o.last_changed_at &&
1318
- last_changed_by_type == o.last_changed_by_type &&
1319
- last_changed_by_id == o.last_changed_by_id &&
1320
- last_changed_by_external_name == o.last_changed_by_external_name &&
1321
- last_changed_by_external_email == o.last_changed_by_external_email &&
1322
- last_changed_by_external_id == o.last_changed_by_external_id &&
1183
+ last_changed_by == o.last_changed_by &&
1184
+ created_at == o.created_at &&
1185
+ updated_at == o.updated_at &&
1323
1186
  defaults == o.defaults &&
1324
1187
  field_dependencies == o.field_dependencies &&
1325
- field_order == o.field_order &&
1326
- fields == o.fields &&
1327
- footer_html == o.footer_html &&
1328
- header_html == o.header_html &&
1329
- html_engine_options == o.html_engine_options &&
1330
- html == o.html &&
1188
+ field_groups == o.field_groups &&
1331
1189
  predefined_fields == o.predefined_fields &&
1190
+ predefined_fields_sample_data == o.predefined_fields_sample_data &&
1191
+ html == o.html &&
1332
1192
  scss == o.scss &&
1333
- shared_field_data == o.shared_field_data &&
1334
- template_schema_version == o.template_schema_version &&
1193
+ header_html == o.header_html &&
1194
+ footer_html == o.footer_html &&
1195
+ html_engine_options == o.html_engine_options &&
1196
+ embed_edit_token == o.embed_edit_token &&
1335
1197
  versions == o.versions
1336
1198
  end
1337
1199
 
@@ -1344,7 +1206,7 @@ module DocSpring
1344
1206
  # Calculates hash code according to all attributes.
1345
1207
  # @return [Integer] Hash code
1346
1208
  def hash
1347
- [add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, parse_dates_using_template_date_format, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, embed_edit_token, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, last_changed_by_external_name, last_changed_by_external_email, last_changed_by_external_id, defaults, field_dependencies, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, template_schema_version, versions].hash
1209
+ [id, name, description, template_type, ready, document, parent_folder_id, path, version, latest_version, version_published_at, locked, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_at, last_changed_by, created_at, updated_at, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions].hash
1348
1210
  end
1349
1211
 
1350
1212
  # Builds the object from hash
@@ -1353,18 +1215,20 @@ module DocSpring
1353
1215
  def self.build_from_hash(attributes)
1354
1216
  return nil unless attributes.is_a?(Hash)
1355
1217
  attributes = attributes.transform_keys(&:to_sym)
1218
+ # include attributes inherited from allOf parents (the nearest declaration wins)
1219
+ map = acceptable_attribute_map
1356
1220
  transformed_hash = {}
1357
- openapi_types.each_pair do |key, type|
1358
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
1221
+ acceptable_openapi_types.each_pair do |key, type|
1222
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
1359
1223
  transformed_hash["#{key}"] = nil
1360
1224
  elsif type =~ /\AArray<(.*)>/i
1361
1225
  # check to ensure the input is an array given that the attribute
1362
1226
  # is documented as an array but the input is not
1363
- if attributes[attribute_map[key]].is_a?(Array)
1364
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
1227
+ if attributes[map[key]].is_a?(Array)
1228
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
1365
1229
  end
1366
- elsif !attributes[attribute_map[key]].nil?
1367
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
1230
+ elsif !attributes[map[key]].nil?
1231
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
1368
1232
  end
1369
1233
  end
1370
1234
  # Responses can include enum values added after this client was released, so the enum setters
@@ -1376,69 +1240,15 @@ module DocSpring
1376
1240
  end
1377
1241
  end
1378
1242
 
1379
- # Deserializes the data based on type
1380
- # @param string type Data type
1381
- # @param string value Value to be deserialized
1382
- # @return [Object] Deserialized data
1383
- def self._deserialize(type, value)
1384
- case type.to_sym
1385
- when :Time
1386
- Time.parse(value)
1387
- when :Date
1388
- Date.parse(value)
1389
- when :String
1390
- value.to_s
1391
- when :Integer
1392
- value.to_i
1393
- when :Float
1394
- value.to_f
1395
- when :Boolean
1396
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1397
- true
1398
- else
1399
- false
1400
- end
1401
- when :Object
1402
- # generic object (usually a Hash), return directly
1403
- value
1404
- when /\AArray<(?<inner_type>.+)>\z/
1405
- inner_type = Regexp.last_match[:inner_type]
1406
- value.map { |v| _deserialize(inner_type, v) }
1407
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1408
- k_type = Regexp.last_match[:k_type]
1409
- v_type = Regexp.last_match[:v_type]
1410
- {}.tap do |hash|
1411
- value.each do |k, v|
1412
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1413
- end
1414
- end
1415
- else # model
1416
- # models (e.g. Pet) or oneOf
1417
- klass = DocSpring.const_get(type)
1418
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
1419
- end
1420
- end
1421
-
1422
- # Returns the string representation of the object
1423
- # @return [String] String presentation of the object
1424
- def to_s
1425
- to_hash.to_s
1426
- end
1427
-
1428
- # to_body is an alias to to_hash (backward compatibility)
1429
- # @return [Hash] Returns the object in the form of hash
1430
- def to_body
1431
- to_hash
1432
- end
1433
-
1434
1243
  # Returns the object in the form of hash
1435
1244
  # @return [Hash] Returns the object in the form of hash
1436
1245
  def to_hash
1437
1246
  hash = {}
1438
- self.class.attribute_map.each_pair do |attr, param|
1247
+ # include attributes inherited from allOf parents (the nearest declaration wins)
1248
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
1439
1249
  value = self.send(attr)
1440
1250
  if value.nil?
1441
- is_nullable = self.class.openapi_nullable.include?(attr)
1251
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
1442
1252
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1443
1253
  end
1444
1254
 
@@ -1447,24 +1257,6 @@ module DocSpring
1447
1257
  hash
1448
1258
  end
1449
1259
 
1450
- # Outputs non-array value in the form of hash
1451
- # For object, use to_hash. Otherwise, just return the value
1452
- # @param [Object] value Any valid value
1453
- # @return [Hash] Returns the value in the form of hash
1454
- def _to_hash(value)
1455
- if value.is_a?(Array)
1456
- value.compact.map { |v| _to_hash(v) }
1457
- elsif value.is_a?(Hash)
1458
- {}.tap do |hash|
1459
- value.each { |k, v| hash[k] = _to_hash(v) }
1460
- end
1461
- elsif value.respond_to? :to_hash
1462
- value.to_hash
1463
- else
1464
- value
1465
- end
1466
- end
1467
-
1468
1260
  end
1469
1261
 
1470
1262
  end