docspring 3.5.0 → 4.0.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 (505) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +361 -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 +123 -0
  8. data/Gemfile.lock +7 -7
  9. data/README.md +60 -53
  10. data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
  11. data/docs/AuthenticationCheck.md +18 -0
  12. data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
  13. data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
  14. data/docs/Client.md +890 -777
  15. data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
  16. data/docs/CombinedPdf.md +44 -0
  17. data/docs/CombinedPdfFiles.md +18 -0
  18. data/docs/CombinedPdfList.md +20 -0
  19. data/docs/CombinedPdfSource.md +26 -0
  20. data/docs/CombinedPdfSourceInput.md +88 -0
  21. data/docs/CombinedPdfSourcePdf.md +20 -0
  22. data/docs/CombinedPdfSourceType.md +15 -0
  23. data/docs/CombinedPdfState.md +15 -0
  24. data/docs/CopyTemplateRequest.md +22 -0
  25. data/docs/CreateCombinedPdfRequest.md +26 -0
  26. data/docs/CreateCustomFileFromUploadRequest.md +18 -0
  27. data/docs/CreateFolderRequest.md +20 -0
  28. data/docs/CreateSignatureRequestEventRequest.md +24 -0
  29. data/docs/CreateSignatureRequestTokenRequest.md +18 -0
  30. data/docs/CreateSubmissionBatchRequest.md +26 -0
  31. data/docs/CreateSubmissionRequest.md +36 -0
  32. data/docs/CreateTemplateRequest.md +94 -0
  33. data/docs/CreateWebhookRequest.md +38 -0
  34. data/docs/CustomFile.md +11 -3
  35. data/docs/CustomFileList.md +20 -0
  36. data/docs/CustomFileSourcePdf.md +20 -0
  37. data/docs/ErrorCode.md +15 -0
  38. data/docs/ErrorDetail.md +26 -0
  39. data/docs/ErrorInfo.md +32 -0
  40. data/docs/ErrorResponse.md +1 -3
  41. data/docs/ExpirationInterval.md +15 -0
  42. data/docs/FieldComparisonCondition.md +22 -0
  43. data/docs/FieldComparisonOperator.md +15 -0
  44. data/docs/FieldDisplayType.md +15 -0
  45. data/docs/FieldEqualsCondition.md +22 -0
  46. data/docs/FieldEqualsOperator.md +15 -0
  47. data/docs/FieldInCondition.md +22 -0
  48. data/docs/FieldOverride.md +142 -0
  49. data/docs/FieldPresenceCondition.md +20 -0
  50. data/docs/FieldPresenceOperator.md +15 -0
  51. data/docs/FieldRangeCondition.md +24 -0
  52. data/docs/FieldReimportState.md +15 -0
  53. data/docs/FieldSetupLogic.md +15 -0
  54. data/docs/FieldSetupNaming.md +15 -0
  55. data/docs/FieldSetupSource.md +15 -0
  56. data/docs/Folder.md +9 -5
  57. data/docs/FolderList.md +20 -0
  58. data/docs/GeneratedFile.md +32 -0
  59. data/docs/GeneratedFileState.md +15 -0
  60. data/docs/HtmlEngineOptions.md +36 -0
  61. data/docs/HtmlEngineOptionsInput.md +36 -0
  62. data/docs/ImageGravity.md +15 -0
  63. data/docs/ImageScaleType.md +15 -0
  64. data/docs/ModelCodeLanguage.md +15 -0
  65. data/docs/MoveFolderRequest.md +18 -0
  66. data/docs/MoveTemplateRequest.md +18 -0
  67. data/docs/NumberConditionType.md +15 -0
  68. data/docs/PageFormat.md +15 -0
  69. data/docs/PublishTemplateVersionRequest.md +20 -0
  70. data/docs/RenameFolderRequest.md +18 -0
  71. data/docs/RestoreTemplateVersionRequest.md +18 -0
  72. data/docs/ShapeType.md +15 -0
  73. data/docs/SignatureRequest.md +66 -0
  74. data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
  75. data/docs/SignatureRequestAuthType.md +15 -0
  76. data/docs/SignatureRequestEvent.md +32 -0
  77. data/docs/SignatureRequestEventType.md +15 -0
  78. data/docs/SignatureRequestInput.md +46 -0
  79. data/docs/SignatureRequestMessageType.md +15 -0
  80. data/docs/SignatureRequestState.md +15 -0
  81. data/docs/SignatureRequestToken.md +30 -0
  82. data/docs/SignatureRequestTokenType.md +15 -0
  83. data/docs/StringConditionType.md +15 -0
  84. data/docs/Submission.md +41 -47
  85. data/docs/SubmissionAction.md +6 -8
  86. data/docs/SubmissionActionState.md +15 -0
  87. data/docs/SubmissionActionType.md +15 -0
  88. data/docs/SubmissionBatch.md +16 -10
  89. data/docs/SubmissionBatchState.md +15 -0
  90. data/docs/SubmissionFiles.md +22 -0
  91. data/docs/SubmissionInput.md +38 -0
  92. data/docs/SubmissionList.md +20 -0
  93. data/docs/SubmissionSource.md +15 -0
  94. data/docs/SubmissionSourcePdf.md +20 -0
  95. data/docs/SubmissionState.md +15 -0
  96. data/docs/Template.md +73 -107
  97. data/docs/TemplateActor.md +26 -0
  98. data/docs/TemplateActorType.md +15 -0
  99. data/docs/TemplateDefaults.md +56 -0
  100. data/docs/TemplateDefaultsInput.md +56 -0
  101. data/docs/TemplateDocument.md +40 -0
  102. data/docs/TemplateDocumentState.md +15 -0
  103. data/docs/TemplateFieldDependency.md +26 -0
  104. data/docs/TemplateFieldDependencyAction.md +15 -0
  105. data/docs/TemplateFieldDependencyCondition.md +24 -0
  106. data/docs/TemplateFieldDependencyConditionInput.md +93 -0
  107. data/docs/TemplateFieldDependencyInput.md +26 -0
  108. data/docs/TemplateFieldDependencyMatch.md +15 -0
  109. data/docs/TemplateFieldDependencyOperator.md +15 -0
  110. data/docs/TemplateFieldLogicStatus.md +15 -0
  111. data/docs/TemplateFormMode.md +15 -0
  112. data/docs/TemplateModelCode.md +22 -0
  113. data/docs/TemplatePageAiError.md +15 -0
  114. data/docs/TemplatePageAiNamingStatus.md +15 -0
  115. data/docs/TemplatePageFieldsStatus.md +15 -0
  116. data/docs/TemplatePageImageStatus.md +15 -0
  117. data/docs/TemplatePageProcessingStatus.md +26 -0
  118. data/docs/TemplateSourcePdf.md +24 -0
  119. data/docs/TemplateSummary.md +90 -0
  120. data/docs/TemplateSummaryList.md +20 -0
  121. data/docs/TemplateType.md +15 -0
  122. data/docs/TemplateVersion.md +24 -0
  123. data/docs/TemplateVersionType.md +15 -0
  124. data/docs/TextAlignment.md +15 -0
  125. data/docs/TextOverflow.md +15 -0
  126. data/docs/TextVerticalAlignment.md +15 -0
  127. data/docs/Typeface.md +15 -0
  128. data/docs/UpdateSignatureRequestRequest.md +34 -0
  129. data/docs/UpdateTemplateDocumentRequest.md +22 -0
  130. data/docs/UpdateTemplateRequest.md +80 -0
  131. data/docs/UpdateWebhookRequest.md +38 -0
  132. data/docs/UploadMethod.md +15 -0
  133. data/docs/UploadPresign.md +24 -0
  134. data/docs/UrlSourcePdf.md +20 -0
  135. data/docs/Webhook.md +20 -20
  136. data/docs/WebhookEventType.md +15 -0
  137. data/docs/WebhookList.md +20 -0
  138. data/docs/WebhookMode.md +15 -0
  139. data/docspring.gemspec +3 -3
  140. data/lib/docspring/api/client.rb +995 -942
  141. data/lib/docspring/api_client.rb +14 -6
  142. data/lib/docspring/api_error.rb +3 -3
  143. data/lib/docspring/api_model_base.rb +88 -0
  144. data/lib/docspring/configuration.rb +12 -7
  145. data/lib/docspring/models/ai_field_naming_language.rb +42 -0
  146. data/lib/docspring/models/authentication_check.rb +185 -0
  147. data/lib/docspring/models/barcode_symbology.rb +47 -0
  148. data/lib/docspring/models/check_character.rb +44 -0
  149. data/lib/docspring/models/combined_field_type.rb +41 -0
  150. data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
  151. data/lib/docspring/models/combined_pdf_files.rb +167 -0
  152. data/lib/docspring/models/combined_pdf_list.rb +200 -0
  153. data/lib/docspring/models/{update_webhook_data.rb → combined_pdf_source.rb} +107 -103
  154. data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
  155. data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
  156. data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
  157. data/lib/docspring/models/combined_pdf_state.rb +44 -0
  158. data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
  159. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
  160. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
  161. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
  162. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
  163. data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
  164. data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +53 -108
  165. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +97 -149
  166. data/lib/docspring/models/create_template_request.rb +601 -0
  167. data/lib/docspring/models/create_webhook_request.rb +368 -0
  168. data/lib/docspring/models/custom_file.rb +132 -95
  169. data/lib/docspring/models/custom_file_list.rb +200 -0
  170. data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
  171. data/lib/docspring/models/error_code.rb +60 -0
  172. data/lib/docspring/models/error_detail.rb +242 -0
  173. data/lib/docspring/models/error_info.rb +316 -0
  174. data/lib/docspring/models/error_response.rb +28 -138
  175. data/lib/docspring/models/expiration_interval.rb +42 -0
  176. data/lib/docspring/models/field_comparison_condition.rb +247 -0
  177. data/lib/docspring/models/field_comparison_operator.rb +43 -0
  178. data/lib/docspring/models/field_display_type.rb +45 -0
  179. data/lib/docspring/models/field_equals_condition.rb +247 -0
  180. data/lib/docspring/models/field_equals_operator.rb +41 -0
  181. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
  182. data/lib/docspring/models/field_override.rb +829 -0
  183. data/lib/docspring/models/field_presence_condition.rb +234 -0
  184. data/lib/docspring/models/field_presence_operator.rb +41 -0
  185. data/lib/docspring/models/field_range_condition.rb +234 -0
  186. data/lib/docspring/models/field_reimport_state.rb +43 -0
  187. data/lib/docspring/models/field_setup_logic.rb +41 -0
  188. data/lib/docspring/models/field_setup_naming.rb +41 -0
  189. data/lib/docspring/models/field_setup_source.rb +42 -0
  190. data/lib/docspring/models/folder.rb +134 -93
  191. data/lib/docspring/models/folder_list.rb +200 -0
  192. data/lib/docspring/models/generated_file.rb +326 -0
  193. data/lib/docspring/models/generated_file_state.rb +42 -0
  194. data/lib/docspring/models/html_engine_options.rb +416 -0
  195. data/lib/docspring/models/html_engine_options_input.rb +280 -0
  196. data/lib/docspring/models/image_gravity.rb +48 -0
  197. data/lib/docspring/models/image_scale_type.rb +42 -0
  198. data/lib/docspring/models/model_code_language.rb +48 -0
  199. data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
  200. data/lib/docspring/models/move_template_request.rb +171 -0
  201. data/lib/docspring/models/number_condition_type.rb +45 -0
  202. data/lib/docspring/models/page_format.rb +52 -0
  203. data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
  204. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
  205. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
  206. data/lib/docspring/models/shape_type.rb +45 -0
  207. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
  208. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
  209. data/lib/docspring/models/signature_request_auth_type.rb +46 -0
  210. data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
  211. data/lib/docspring/models/signature_request_event_type.rb +45 -0
  212. data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
  213. data/lib/docspring/models/signature_request_message_type.rb +48 -0
  214. data/lib/docspring/models/signature_request_state.rb +42 -0
  215. data/lib/docspring/models/signature_request_token.rb +369 -0
  216. data/lib/docspring/models/signature_request_token_type.rb +41 -0
  217. data/lib/docspring/models/string_condition_type.rb +44 -0
  218. data/lib/docspring/models/submission.rb +374 -339
  219. data/lib/docspring/models/submission_action.rb +64 -136
  220. data/lib/docspring/models/submission_action_state.rb +43 -0
  221. data/lib/docspring/models/submission_action_type.rb +46 -0
  222. data/lib/docspring/models/submission_batch.rb +157 -112
  223. data/lib/docspring/models/submission_batch_state.rb +42 -0
  224. data/lib/docspring/models/submission_files.rb +188 -0
  225. data/lib/docspring/models/submission_input.rb +274 -0
  226. data/lib/docspring/models/submission_list.rb +200 -0
  227. data/lib/docspring/models/submission_source.rb +43 -0
  228. data/lib/docspring/models/submission_source_pdf.rb +212 -0
  229. data/lib/docspring/models/submission_state.rb +52 -0
  230. data/lib/docspring/models/template.rb +485 -766
  231. data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +119 -105
  232. data/lib/docspring/models/template_actor_type.rb +42 -0
  233. data/lib/docspring/models/template_defaults.rb +395 -0
  234. data/lib/docspring/models/template_defaults_input.rb +395 -0
  235. data/lib/docspring/models/template_document.rb +396 -0
  236. data/lib/docspring/models/template_document_state.rb +44 -0
  237. data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
  238. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  239. data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
  240. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  241. data/lib/docspring/models/template_field_dependency_input.rb +285 -0
  242. data/lib/docspring/models/template_field_dependency_match.rb +41 -0
  243. data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
  244. data/lib/docspring/models/template_field_logic_status.rb +44 -0
  245. data/lib/docspring/models/template_form_mode.rb +42 -0
  246. data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
  247. data/lib/docspring/models/template_page_ai_error.rb +43 -0
  248. data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
  249. data/lib/docspring/models/template_page_fields_status.rb +44 -0
  250. data/lib/docspring/models/template_page_image_status.rb +41 -0
  251. data/lib/docspring/models/template_page_processing_status.rb +275 -0
  252. data/lib/docspring/models/{create_webhook_data.rb → template_source_pdf.rb} +92 -103
  253. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
  254. data/lib/docspring/models/template_summary_list.rb +200 -0
  255. data/lib/docspring/models/template_type.rb +41 -0
  256. data/lib/docspring/models/template_version.rb +238 -0
  257. data/lib/docspring/models/template_version_type.rb +42 -0
  258. data/lib/docspring/models/text_alignment.rb +43 -0
  259. data/lib/docspring/models/text_overflow.rb +41 -0
  260. data/lib/docspring/models/text_vertical_alignment.rb +42 -0
  261. data/lib/docspring/models/typeface.rb +56 -0
  262. data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
  263. data/lib/docspring/models/update_template_document_request.rb +205 -0
  264. data/lib/docspring/models/update_template_request.rb +514 -0
  265. data/lib/docspring/models/update_webhook_request.rb +344 -0
  266. data/lib/docspring/models/upload_method.rb +40 -0
  267. data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
  268. data/lib/docspring/models/url_source_pdf.rb +212 -0
  269. data/lib/docspring/models/webhook.rb +97 -107
  270. data/lib/docspring/models/webhook_event_type.rb +64 -0
  271. data/lib/docspring/models/webhook_list.rb +200 -0
  272. data/lib/docspring/models/webhook_mode.rb +41 -0
  273. data/lib/docspring/request_schemas.json +3187 -0
  274. data/lib/docspring/request_validator.rb +396 -0
  275. data/lib/docspring/version.rb +4 -4
  276. data/lib/docspring.rb +125 -53
  277. data/spec/api/client_spec.rb +304 -277
  278. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  279. data/spec/models/authentication_check_spec.rb +36 -0
  280. data/spec/models/barcode_symbology_spec.rb +30 -0
  281. data/spec/models/check_character_spec.rb +30 -0
  282. data/spec/models/combined_field_type_spec.rb +30 -0
  283. data/spec/models/combined_pdf_files_spec.rb +36 -0
  284. data/spec/models/combined_pdf_list_spec.rb +42 -0
  285. data/spec/models/combined_pdf_source_input_spec.rb +44 -0
  286. data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
  287. data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
  288. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  289. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
  290. data/spec/models/combined_pdf_state_spec.rb +30 -0
  291. data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
  292. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
  293. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
  294. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
  295. data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
  296. data/spec/models/create_signature_request_token_request_spec.rb +36 -0
  297. data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +13 -13
  298. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +24 -18
  299. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +40 -118
  300. data/spec/models/create_webhook_request_spec.rb +96 -0
  301. data/spec/models/custom_file_list_spec.rb +42 -0
  302. data/spec/models/custom_file_source_pdf_spec.rb +42 -0
  303. data/spec/models/custom_file_spec.rb +29 -5
  304. data/spec/models/error_code_spec.rb +30 -0
  305. data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
  306. data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
  307. data/spec/models/error_response_spec.rb +4 -14
  308. data/spec/models/expiration_interval_spec.rb +30 -0
  309. data/spec/models/field_comparison_condition_spec.rb +48 -0
  310. data/spec/models/field_comparison_operator_spec.rb +30 -0
  311. data/spec/models/field_display_type_spec.rb +30 -0
  312. data/spec/models/field_equals_condition_spec.rb +48 -0
  313. data/spec/models/field_equals_operator_spec.rb +30 -0
  314. data/spec/models/field_in_condition_spec.rb +48 -0
  315. data/spec/models/field_override_spec.rb +408 -0
  316. data/spec/models/field_presence_condition_spec.rb +42 -0
  317. data/spec/models/field_presence_operator_spec.rb +30 -0
  318. data/spec/models/field_range_condition_spec.rb +54 -0
  319. data/spec/models/field_reimport_state_spec.rb +30 -0
  320. data/spec/models/field_setup_logic_spec.rb +30 -0
  321. data/spec/models/field_setup_naming_spec.rb +30 -0
  322. data/spec/models/field_setup_source_spec.rb +30 -0
  323. data/spec/models/folder_list_spec.rb +42 -0
  324. data/spec/models/folder_spec.rb +16 -4
  325. data/spec/models/generated_file_spec.rb +78 -0
  326. data/spec/models/generated_file_state_spec.rb +30 -0
  327. data/spec/models/html_engine_options_input_spec.rb +90 -0
  328. data/spec/models/html_engine_options_spec.rb +90 -0
  329. data/spec/models/image_gravity_spec.rb +30 -0
  330. data/spec/models/image_scale_type_spec.rb +30 -0
  331. data/spec/models/model_code_language_spec.rb +30 -0
  332. data/spec/models/move_folder_request_spec.rb +36 -0
  333. data/spec/models/move_template_request_spec.rb +36 -0
  334. data/spec/models/number_condition_type_spec.rb +30 -0
  335. data/spec/models/page_format_spec.rb +30 -0
  336. data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
  337. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
  338. data/spec/models/restore_template_version_request_spec.rb +36 -0
  339. data/spec/models/shape_type_spec.rb +30 -0
  340. data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
  341. data/spec/models/signature_request_auth_type_spec.rb +30 -0
  342. data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
  343. data/spec/models/signature_request_event_type_spec.rb +30 -0
  344. data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
  345. data/spec/models/signature_request_message_type_spec.rb +30 -0
  346. data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
  347. data/spec/models/signature_request_state_spec.rb +30 -0
  348. data/spec/models/signature_request_token_spec.rb +72 -0
  349. data/spec/models/signature_request_token_type_spec.rb +30 -0
  350. data/spec/models/string_condition_type_spec.rb +30 -0
  351. data/spec/models/submission_action_spec.rb +4 -22
  352. data/spec/models/submission_action_state_spec.rb +30 -0
  353. data/spec/models/submission_action_type_spec.rb +30 -0
  354. data/spec/models/submission_batch_spec.rb +27 -13
  355. data/spec/models/submission_batch_state_spec.rb +30 -0
  356. data/spec/models/submission_files_spec.rb +48 -0
  357. data/spec/models/submission_input_spec.rb +96 -0
  358. data/spec/models/submission_list_spec.rb +42 -0
  359. data/spec/models/submission_source_pdf_spec.rb +42 -0
  360. data/spec/models/submission_source_spec.rb +30 -0
  361. data/spec/models/submission_spec.rb +26 -56
  362. data/spec/models/submission_state_spec.rb +30 -0
  363. data/spec/models/template_actor_spec.rb +60 -0
  364. data/spec/models/template_actor_type_spec.rb +30 -0
  365. data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
  366. data/spec/models/template_defaults_spec.rb +150 -0
  367. data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +21 -21
  368. data/spec/models/template_document_state_spec.rb +30 -0
  369. data/spec/models/template_field_dependency_action_spec.rb +30 -0
  370. data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
  371. data/spec/models/template_field_dependency_condition_spec.rb +54 -0
  372. data/spec/models/template_field_dependency_input_spec.rb +60 -0
  373. data/spec/models/template_field_dependency_match_spec.rb +30 -0
  374. data/spec/models/template_field_dependency_operator_spec.rb +30 -0
  375. data/spec/models/template_field_dependency_spec.rb +60 -0
  376. data/spec/models/template_field_logic_status_spec.rb +30 -0
  377. data/spec/models/template_form_mode_spec.rb +30 -0
  378. data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
  379. data/spec/models/template_page_ai_error_spec.rb +30 -0
  380. data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
  381. data/spec/models/template_page_fields_status_spec.rb +30 -0
  382. data/spec/models/template_page_image_status_spec.rb +30 -0
  383. data/spec/models/template_page_processing_status_spec.rb +60 -0
  384. data/spec/models/template_source_pdf_spec.rb +54 -0
  385. data/spec/models/template_spec.rb +40 -154
  386. data/spec/models/template_summary_list_spec.rb +42 -0
  387. data/spec/models/template_summary_spec.rb +252 -0
  388. data/spec/models/template_type_spec.rb +30 -0
  389. data/spec/models/template_version_spec.rb +54 -0
  390. data/spec/models/template_version_type_spec.rb +30 -0
  391. data/spec/models/text_alignment_spec.rb +30 -0
  392. data/spec/models/text_overflow_spec.rb +30 -0
  393. data/spec/models/text_vertical_alignment_spec.rb +30 -0
  394. data/spec/models/typeface_spec.rb +30 -0
  395. data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
  396. data/spec/models/update_template_document_request_spec.rb +48 -0
  397. data/spec/models/{submission_preview_spec.rb → update_template_request_spec.rb} +81 -41
  398. data/spec/models/update_webhook_request_spec.rb +96 -0
  399. data/spec/models/upload_method_spec.rb +30 -0
  400. data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
  401. data/spec/models/url_source_pdf_spec.rb +42 -0
  402. data/spec/models/webhook_event_type_spec.rb +30 -0
  403. data/spec/models/webhook_list_spec.rb +42 -0
  404. data/spec/models/webhook_mode_spec.rb +30 -0
  405. data/spec/models/webhook_spec.rb +4 -8
  406. data/spec/spec_helper.rb +3 -3
  407. metadata +485 -202
  408. data/docs/AddFieldsData.md +0 -18
  409. data/docs/BatchGeneratePdfs201Response.md +0 -28
  410. data/docs/CombinePdfsData.md +0 -28
  411. data/docs/CombinedSubmission.md +0 -44
  412. data/docs/CombinedSubmissionAction.md +0 -30
  413. data/docs/CopyTemplateOptions.md +0 -22
  414. data/docs/CreateCombinedSubmissionResponse.md +0 -26
  415. data/docs/CreateCustomFileData.md +0 -18
  416. data/docs/CreateCustomFileResponse.md +0 -24
  417. data/docs/CreateHtmlTemplate.md +0 -18
  418. data/docs/CreatePdfSubmissionData.md +0 -34
  419. data/docs/CreatePdfTemplate.md +0 -18
  420. data/docs/CreateSubmissionDataRequestData.md +0 -44
  421. data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
  422. data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
  423. data/docs/CreateSubmissionDataRequestResponse.md +0 -24
  424. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
  425. data/docs/CreateSubmissionResponse.md +0 -26
  426. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  427. data/docs/ForbiddenErrorResponse.md +0 -22
  428. data/docs/JsonSchema.md +0 -40
  429. data/docs/ListSubmissionsResponse.md +0 -22
  430. data/docs/MoveFolderData.md +0 -18
  431. data/docs/MoveTemplateData.md +0 -20
  432. data/docs/MultipleErrorsResponse.md +0 -20
  433. data/docs/PublishVersionData.md +0 -20
  434. data/docs/RestoreVersionData.md +0 -18
  435. data/docs/Submission422Response.md +0 -24
  436. data/docs/SubmissionBatchData.md +0 -26
  437. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  438. data/docs/SubmissionDataRequest.md +0 -60
  439. data/docs/SubmissionDataRequestEvent.md +0 -30
  440. data/docs/SubmissionDataRequestShow.md +0 -62
  441. data/docs/SubmissionDataRequestToken.md +0 -24
  442. data/docs/SubmissionPreview.md +0 -64
  443. data/docs/SuccessErrorResponse.md +0 -20
  444. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  445. data/docs/TemplateAddFieldsResponse.md +0 -22
  446. data/docs/TemplateDeleteResponse.md +0 -24
  447. data/docs/TemplateModelCodeResponse.md +0 -22
  448. data/docs/TemplatePreview.md +0 -116
  449. data/docs/TemplatePublishVersionResponse.md +0 -22
  450. data/docs/UpdateHtmlTemplate.md +0 -18
  451. data/docs/UpdatePdfTemplate.md +0 -18
  452. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  453. data/docs/UploadPresignResponse.md +0 -24
  454. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
  455. data/lib/docspring/models/combined_submission_action.rb +0 -384
  456. data/lib/docspring/models/create_combined_submission_response.rb +0 -324
  457. data/lib/docspring/models/create_custom_file_response.rb +0 -314
  458. data/lib/docspring/models/create_html_template.rb +0 -243
  459. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
  460. data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
  461. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
  462. data/lib/docspring/models/create_submission_response.rb +0 -324
  463. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  464. data/lib/docspring/models/forbidden_error_response.rb +0 -323
  465. data/lib/docspring/models/json_schema.rb +0 -329
  466. data/lib/docspring/models/list_submissions_response.rb +0 -283
  467. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  468. data/lib/docspring/models/submission422_response.rb +0 -299
  469. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  470. data/lib/docspring/models/submission_data_request.rb +0 -570
  471. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  472. data/lib/docspring/models/submission_preview.rb +0 -637
  473. data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
  474. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  475. data/lib/docspring/models/template_delete_response.rb +0 -300
  476. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  477. data/lib/docspring/models/update_html_template.rb +0 -243
  478. data/lib/docspring/models/update_pdf_template.rb +0 -243
  479. data/spec/models/add_fields_data_spec.rb +0 -36
  480. data/spec/models/combined_submission_action_spec.rb +0 -84
  481. data/spec/models/create_combined_submission_response_spec.rb +0 -64
  482. data/spec/models/create_custom_file_response_spec.rb +0 -58
  483. data/spec/models/create_folder_data_spec.rb +0 -36
  484. data/spec/models/create_html_template_spec.rb +0 -36
  485. data/spec/models/create_pdf_template_spec.rb +0 -36
  486. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  487. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
  488. data/spec/models/create_submission_data_request_response_spec.rb +0 -58
  489. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
  490. data/spec/models/create_webhook_data_spec.rb +0 -36
  491. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  492. data/spec/models/forbidden_error_response_spec.rb +0 -56
  493. data/spec/models/move_folder_data_spec.rb +0 -36
  494. data/spec/models/multiple_errors_response_spec.rb +0 -46
  495. data/spec/models/restore_version_data_spec.rb +0 -36
  496. data/spec/models/submission422_response_spec.rb +0 -58
  497. data/spec/models/success_error_response_spec.rb +0 -46
  498. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  499. data/spec/models/template_add_fields_response_spec.rb +0 -52
  500. data/spec/models/template_delete_response_spec.rb +0 -58
  501. data/spec/models/template_publish_version_response_spec.rb +0 -52
  502. data/spec/models/update_html_template_spec.rb +0 -36
  503. data/spec/models/update_pdf_template_spec.rb +0 -36
  504. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  505. 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,143 @@ 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
135
+ # The HTML of an HTML template, as a Liquid template. Null for PDF templates.
136
+ attr_accessor :html
125
137
 
126
- attr_accessor :footer_html
138
+ # The SCSS of an HTML template.
139
+ attr_accessor :scss
127
140
 
141
+ # The HTML printed at the top of each page of an HTML template.
128
142
  attr_accessor :header_html
129
143
 
130
- attr_accessor :html_engine_options
131
-
132
- attr_accessor :html
133
-
134
- attr_accessor :predefined_fields
135
-
136
- attr_accessor :scss
144
+ # The HTML printed at the bottom of each page of an HTML template.
145
+ attr_accessor :footer_html
137
146
 
138
- attr_accessor :shared_field_data
147
+ # How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
148
+ attr_accessor :html_engine_options
139
149
 
140
- attr_accessor :template_schema_version
150
+ # The token that opens the template in the embedded template editor.
151
+ attr_accessor :embed_edit_token
141
152
 
153
+ # The template's published versions, newest first (up to 100).
142
154
  attr_accessor :versions
143
155
 
144
156
  class EnumAttributeValidator
@@ -166,68 +178,51 @@ module DocSpring
166
178
  # Attribute mapping from ruby-style variable name to JSON key.
167
179
  def self.attribute_map
168
180
  {
169
- :'add_data_request_submission_id_footers' => :'add_data_request_submission_id_footers',
170
- :'allow_additional_properties' => :'allow_additional_properties',
181
+ :'id' => :'id',
182
+ :'name' => :'name',
171
183
  :'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',
184
+ :'template_type' => :'template_type',
185
+ :'ready' => :'ready',
186
+ :'document' => :'document',
187
+ :'parent_folder_id' => :'parent_folder_id',
188
+ :'path' => :'path',
189
+ :'version' => :'version',
190
+ :'latest_version' => :'latest_version',
191
+ :'version_published_at' => :'version_published_at',
192
+ :'locked' => :'locked',
193
+ :'add_signature_request_submission_id_footers' => :'add_signature_request_submission_id_footers',
194
+ :'ai_field_naming_language' => :'ai_field_naming_language',
195
+ :'allow_additional_properties' => :'allow_additional_properties',
196
+ :'allow_skipping_optional_fields' => :'allow_skipping_optional_fields',
197
+ :'default_form_mode' => :'default_form_mode',
178
198
  :'editable_submissions' => :'editable_submissions',
179
199
  :'embed_domains' => :'embed_domains',
180
200
  :'embed_edit_allow_settings' => :'embed_edit_allow_settings',
181
201
  :'embed_edit_allow_versioning' => :'embed_edit_allow_versioning',
182
202
  :'embed_edit_allow_document_replacement' => :'embed_edit_allow_document_replacement',
183
- :'encrypt_pdfs_password' => :'encrypt_pdfs_password',
184
203
  :'encrypt_pdfs' => :'encrypt_pdfs',
185
- :'expiration_interval' => :'expiration_interval',
186
- :'expire_after' => :'expire_after',
204
+ :'has_encrypt_pdfs_password' => :'has_encrypt_pdfs_password',
187
205
  :'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',
206
+ :'expire_after' => :'expire_after',
207
+ :'expiration_interval' => :'expiration_interval',
193
208
  :'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
209
  :'parse_dates_using_template_date_format' => :'parse_dates_using_template_date_format',
199
- :'path' => :'path',
200
- :'permanent_document_url' => :'permanent_document_url',
201
210
  :'public_submissions' => :'public_submissions',
202
211
  :'public_web_form' => :'public_web_form',
203
212
  :'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',
213
+ :'has_slack_webhook_url' => :'has_slack_webhook_url',
213
214
  :'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',
215
+ :'last_changed_by' => :'last_changed_by',
216
+ :'created_at' => :'created_at',
217
+ :'updated_at' => :'updated_at',
219
218
  :'defaults' => :'defaults',
220
219
  :'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
220
  :'html' => :'html',
227
- :'predefined_fields' => :'predefined_fields',
228
221
  :'scss' => :'scss',
229
- :'shared_field_data' => :'shared_field_data',
230
- :'template_schema_version' => :'template_schema_version',
222
+ :'header_html' => :'header_html',
223
+ :'footer_html' => :'footer_html',
224
+ :'html_engine_options' => :'html_engine_options',
225
+ :'embed_edit_token' => :'embed_edit_token',
231
226
  :'versions' => :'versions'
232
227
  }
233
228
  end
@@ -245,109 +240,88 @@ module DocSpring
245
240
  # Attribute type mapping.
246
241
  def self.openapi_types
247
242
  {
248
- :'add_data_request_submission_id_footers' => :'Boolean',
249
- :'allow_additional_properties' => :'Boolean',
243
+ :'id' => :'String',
244
+ :'name' => :'String',
250
245
  :'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',
246
+ :'template_type' => :'TemplateType',
247
+ :'ready' => :'Boolean',
248
+ :'document' => :'TemplateDocument',
249
+ :'parent_folder_id' => :'String',
250
+ :'path' => :'String',
251
+ :'version' => :'String',
252
+ :'latest_version' => :'String',
253
+ :'version_published_at' => :'Time',
254
+ :'locked' => :'Boolean',
255
+ :'add_signature_request_submission_id_footers' => :'Boolean',
256
+ :'ai_field_naming_language' => :'AiFieldNamingLanguage',
257
+ :'allow_additional_properties' => :'Boolean',
258
+ :'allow_skipping_optional_fields' => :'Boolean',
259
+ :'default_form_mode' => :'TemplateFormMode',
257
260
  :'editable_submissions' => :'Boolean',
258
- :'embed_domains' => :'String',
261
+ :'embed_domains' => :'Array<String>',
259
262
  :'embed_edit_allow_settings' => :'Boolean',
260
263
  :'embed_edit_allow_versioning' => :'Boolean',
261
264
  :'embed_edit_allow_document_replacement' => :'Boolean',
262
- :'encrypt_pdfs_password' => :'String',
263
265
  :'encrypt_pdfs' => :'Boolean',
264
- :'expiration_interval' => :'String',
265
- :'expire_after' => :'Integer',
266
+ :'has_encrypt_pdfs_password' => :'Boolean',
266
267
  :'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',
268
+ :'expire_after' => :'Integer',
269
+ :'expiration_interval' => :'ExpirationInterval',
272
270
  :'merge_audit_trail_pdf' => :'Boolean',
273
- :'name' => :'String',
274
- :'page_count' => :'Integer',
275
- :'page_dimensions' => :'Array<Array<Float>>',
276
- :'parent_folder_id' => :'String',
277
271
  :'parse_dates_using_template_date_format' => :'Boolean',
278
- :'path' => :'String',
279
- :'permanent_document_url' => :'String',
280
272
  :'public_submissions' => :'Boolean',
281
273
  :'public_web_form' => :'Boolean',
282
274
  :'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',
275
+ :'has_slack_webhook_url' => :'Boolean',
276
+ :'last_changed_at' => :'Time',
277
+ :'last_changed_by' => :'TemplateActor',
278
+ :'created_at' => :'Time',
279
+ :'updated_at' => :'Time',
280
+ :'defaults' => :'TemplateDefaults',
281
+ :'field_dependencies' => :'Array<TemplateFieldDependency>',
305
282
  :'html' => :'String',
306
- :'predefined_fields' => :'Array<Object>',
307
283
  :'scss' => :'String',
308
- :'shared_field_data' => :'Object',
309
- :'template_schema_version' => :'Integer',
310
- :'versions' => :'Array<Object>'
284
+ :'header_html' => :'String',
285
+ :'footer_html' => :'String',
286
+ :'html_engine_options' => :'HtmlEngineOptions',
287
+ :'embed_edit_token' => :'String',
288
+ :'versions' => :'Array<TemplateVersion>'
311
289
  }
312
290
  end
313
291
 
314
292
  # List of attributes with nullable: true
315
293
  def self.openapi_nullable
316
294
  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
295
  :'name',
327
- :'page_dimensions',
296
+ :'description',
297
+ :'document',
328
298
  :'parent_folder_id',
329
- :'permanent_document_url',
330
- :'redirect_url',
331
- :'slack_webhook_url',
332
- :'updated_at',
333
- :'version_published_at',
334
299
  :'version',
335
- :'webhook_url',
336
- :'embed_edit_token',
337
300
  :'latest_version',
301
+ :'version_published_at',
302
+ :'ai_field_naming_language',
303
+ :'redirect_url',
338
304
  :'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',
305
+ :'last_changed_by',
346
306
  :'html',
347
307
  :'scss',
308
+ :'header_html',
309
+ :'footer_html',
310
+ :'html_engine_options',
311
+ :'embed_edit_token',
348
312
  ])
349
313
  end
350
314
 
315
+ # Returns attribute type mapping
316
+ def self.acceptable_openapi_types
317
+ openapi_types
318
+ end
319
+
320
+ # Returns the nullable attributes
321
+ def self.acceptable_openapi_nullable
322
+ openapi_nullable
323
+ end
324
+
351
325
  # Initializes the object
352
326
  # @param [Hash] attributes Model attributes in the form of hash
353
327
  def initialize(attributes = {})
@@ -364,16 +338,16 @@ module DocSpring
364
338
  h[k.to_sym] = v
365
339
  }
366
340
 
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']
341
+ if attributes.key?(:'id')
342
+ self.id = attributes[:'id']
369
343
  else
370
- self.add_data_request_submission_id_footers = nil
344
+ self.id = nil
371
345
  end
372
346
 
373
- if attributes.key?(:'allow_additional_properties')
374
- self.allow_additional_properties = attributes[:'allow_additional_properties']
347
+ if attributes.key?(:'name')
348
+ self.name = attributes[:'name']
375
349
  else
376
- self.allow_additional_properties = nil
350
+ self.name = nil
377
351
  end
378
352
 
379
353
  if attributes.key?(:'description')
@@ -382,162 +356,156 @@ module DocSpring
382
356
  self.description = nil
383
357
  end
384
358
 
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']
359
+ if attributes.key?(:'template_type')
360
+ self.template_type = attributes[:'template_type']
393
361
  else
394
- self.document_md5 = nil
362
+ self.template_type = nil
395
363
  end
396
364
 
397
- if attributes.key?(:'document_parse_error')
398
- self.document_parse_error = attributes[:'document_parse_error']
365
+ if attributes.key?(:'ready')
366
+ self.ready = attributes[:'ready']
399
367
  else
400
- self.document_parse_error = nil
368
+ self.ready = nil
401
369
  end
402
370
 
403
- if attributes.key?(:'document_processed')
404
- self.document_processed = attributes[:'document_processed']
371
+ if attributes.key?(:'document')
372
+ self.document = attributes[:'document']
405
373
  else
406
- self.document_processed = nil
374
+ self.document = nil
407
375
  end
408
376
 
409
- if attributes.key?(:'document_state')
410
- self.document_state = attributes[:'document_state']
377
+ if attributes.key?(:'parent_folder_id')
378
+ self.parent_folder_id = attributes[:'parent_folder_id']
411
379
  else
412
- self.document_state = nil
380
+ self.parent_folder_id = nil
413
381
  end
414
382
 
415
- if attributes.key?(:'document_url')
416
- self.document_url = attributes[:'document_url']
383
+ if attributes.key?(:'path')
384
+ self.path = attributes[:'path']
417
385
  else
418
- self.document_url = nil
386
+ self.path = nil
419
387
  end
420
388
 
421
- if attributes.key?(:'editable_submissions')
422
- self.editable_submissions = attributes[:'editable_submissions']
389
+ if attributes.key?(:'version')
390
+ self.version = attributes[:'version']
423
391
  else
424
- self.editable_submissions = nil
392
+ self.version = nil
425
393
  end
426
394
 
427
- if attributes.key?(:'embed_domains')
428
- self.embed_domains = attributes[:'embed_domains']
395
+ if attributes.key?(:'latest_version')
396
+ self.latest_version = attributes[:'latest_version']
429
397
  else
430
- self.embed_domains = nil
398
+ self.latest_version = nil
431
399
  end
432
400
 
433
- if attributes.key?(:'embed_edit_allow_settings')
434
- self.embed_edit_allow_settings = attributes[:'embed_edit_allow_settings']
401
+ if attributes.key?(:'version_published_at')
402
+ self.version_published_at = attributes[:'version_published_at']
435
403
  else
436
- self.embed_edit_allow_settings = nil
404
+ self.version_published_at = nil
437
405
  end
438
406
 
439
- if attributes.key?(:'embed_edit_allow_versioning')
440
- self.embed_edit_allow_versioning = attributes[:'embed_edit_allow_versioning']
407
+ if attributes.key?(:'locked')
408
+ self.locked = attributes[:'locked']
441
409
  else
442
- self.embed_edit_allow_versioning = nil
410
+ self.locked = nil
443
411
  end
444
412
 
445
- if attributes.key?(:'embed_edit_allow_document_replacement')
446
- self.embed_edit_allow_document_replacement = attributes[:'embed_edit_allow_document_replacement']
413
+ if attributes.key?(:'add_signature_request_submission_id_footers')
414
+ self.add_signature_request_submission_id_footers = attributes[:'add_signature_request_submission_id_footers']
447
415
  else
448
- self.embed_edit_allow_document_replacement = nil
416
+ self.add_signature_request_submission_id_footers = nil
449
417
  end
450
418
 
451
- if attributes.key?(:'encrypt_pdfs_password')
452
- self.encrypt_pdfs_password = attributes[:'encrypt_pdfs_password']
419
+ if attributes.key?(:'ai_field_naming_language')
420
+ self.ai_field_naming_language = attributes[:'ai_field_naming_language']
453
421
  else
454
- self.encrypt_pdfs_password = nil
422
+ self.ai_field_naming_language = nil
455
423
  end
456
424
 
457
- if attributes.key?(:'encrypt_pdfs')
458
- self.encrypt_pdfs = attributes[:'encrypt_pdfs']
425
+ if attributes.key?(:'allow_additional_properties')
426
+ self.allow_additional_properties = attributes[:'allow_additional_properties']
459
427
  else
460
- self.encrypt_pdfs = nil
428
+ self.allow_additional_properties = nil
461
429
  end
462
430
 
463
- if attributes.key?(:'expiration_interval')
464
- self.expiration_interval = attributes[:'expiration_interval']
431
+ if attributes.key?(:'allow_skipping_optional_fields')
432
+ self.allow_skipping_optional_fields = attributes[:'allow_skipping_optional_fields']
465
433
  else
466
- self.expiration_interval = nil
434
+ self.allow_skipping_optional_fields = nil
467
435
  end
468
436
 
469
- if attributes.key?(:'expire_after')
470
- self.expire_after = attributes[:'expire_after']
437
+ if attributes.key?(:'default_form_mode')
438
+ self.default_form_mode = attributes[:'default_form_mode']
471
439
  else
472
- self.expire_after = nil
440
+ self.default_form_mode = nil
473
441
  end
474
442
 
475
- if attributes.key?(:'expire_submissions')
476
- self.expire_submissions = attributes[:'expire_submissions']
443
+ if attributes.key?(:'editable_submissions')
444
+ self.editable_submissions = attributes[:'editable_submissions']
477
445
  else
478
- self.expire_submissions = nil
446
+ self.editable_submissions = nil
479
447
  end
480
448
 
481
- if attributes.key?(:'external_predefined_fields_template_id')
482
- self.external_predefined_fields_template_id = attributes[:'external_predefined_fields_template_id']
449
+ if attributes.key?(:'embed_domains')
450
+ if (value = attributes[:'embed_domains']).is_a?(Array)
451
+ self.embed_domains = value
452
+ end
483
453
  else
484
- self.external_predefined_fields_template_id = nil
454
+ self.embed_domains = nil
485
455
  end
486
456
 
487
- if attributes.key?(:'external_predefined_fields_template_name')
488
- self.external_predefined_fields_template_name = attributes[:'external_predefined_fields_template_name']
457
+ if attributes.key?(:'embed_edit_allow_settings')
458
+ self.embed_edit_allow_settings = attributes[:'embed_edit_allow_settings']
489
459
  else
490
- self.external_predefined_fields_template_name = nil
460
+ self.embed_edit_allow_settings = nil
491
461
  end
492
462
 
493
- if attributes.key?(:'first_template')
494
- self.first_template = attributes[:'first_template']
463
+ if attributes.key?(:'embed_edit_allow_versioning')
464
+ self.embed_edit_allow_versioning = attributes[:'embed_edit_allow_versioning']
495
465
  else
496
- self.first_template = nil
466
+ self.embed_edit_allow_versioning = nil
497
467
  end
498
468
 
499
- if attributes.key?(:'id')
500
- self.id = attributes[:'id']
469
+ if attributes.key?(:'embed_edit_allow_document_replacement')
470
+ self.embed_edit_allow_document_replacement = attributes[:'embed_edit_allow_document_replacement']
501
471
  else
502
- self.id = nil
472
+ self.embed_edit_allow_document_replacement = nil
503
473
  end
504
474
 
505
- if attributes.key?(:'locked')
506
- self.locked = attributes[:'locked']
475
+ if attributes.key?(:'encrypt_pdfs')
476
+ self.encrypt_pdfs = attributes[:'encrypt_pdfs']
507
477
  else
508
- self.locked = nil
478
+ self.encrypt_pdfs = nil
509
479
  end
510
480
 
511
- if attributes.key?(:'merge_audit_trail_pdf')
512
- self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf']
481
+ if attributes.key?(:'has_encrypt_pdfs_password')
482
+ self.has_encrypt_pdfs_password = attributes[:'has_encrypt_pdfs_password']
513
483
  else
514
- self.merge_audit_trail_pdf = nil
484
+ self.has_encrypt_pdfs_password = nil
515
485
  end
516
486
 
517
- if attributes.key?(:'name')
518
- self.name = attributes[:'name']
487
+ if attributes.key?(:'expire_submissions')
488
+ self.expire_submissions = attributes[:'expire_submissions']
519
489
  else
520
- self.name = nil
490
+ self.expire_submissions = nil
521
491
  end
522
492
 
523
- if attributes.key?(:'page_count')
524
- self.page_count = attributes[:'page_count']
493
+ if attributes.key?(:'expire_after')
494
+ self.expire_after = attributes[:'expire_after']
525
495
  else
526
- self.page_count = nil
496
+ self.expire_after = nil
527
497
  end
528
498
 
529
- if attributes.key?(:'page_dimensions')
530
- if (value = attributes[:'page_dimensions']).is_a?(Array)
531
- self.page_dimensions = value
532
- end
499
+ if attributes.key?(:'expiration_interval')
500
+ self.expiration_interval = attributes[:'expiration_interval']
533
501
  else
534
- self.page_dimensions = nil
502
+ self.expiration_interval = nil
535
503
  end
536
504
 
537
- if attributes.key?(:'parent_folder_id')
538
- self.parent_folder_id = attributes[:'parent_folder_id']
505
+ if attributes.key?(:'merge_audit_trail_pdf')
506
+ self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf']
539
507
  else
540
- self.parent_folder_id = nil
508
+ self.merge_audit_trail_pdf = nil
541
509
  end
542
510
 
543
511
  if attributes.key?(:'parse_dates_using_template_date_format')
@@ -546,18 +514,6 @@ module DocSpring
546
514
  self.parse_dates_using_template_date_format = nil
547
515
  end
548
516
 
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
517
  if attributes.key?(:'public_submissions')
562
518
  self.public_submissions = attributes[:'public_submissions']
563
519
  else
@@ -576,56 +532,10 @@ module DocSpring
576
532
  self.redirect_url = nil
577
533
  end
578
534
 
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']
621
- else
622
- self.demo = nil
623
- end
624
-
625
- if attributes.key?(:'latest_version')
626
- self.latest_version = attributes[:'latest_version']
535
+ if attributes.key?(:'has_slack_webhook_url')
536
+ self.has_slack_webhook_url = attributes[:'has_slack_webhook_url']
627
537
  else
628
- self.latest_version = nil
538
+ self.has_slack_webhook_url = nil
629
539
  end
630
540
 
631
541
  if attributes.key?(:'last_changed_at')
@@ -634,34 +544,22 @@ module DocSpring
634
544
  self.last_changed_at = nil
635
545
  end
636
546
 
637
- if attributes.key?(:'last_changed_by_type')
638
- self.last_changed_by_type = attributes[:'last_changed_by_type']
639
- else
640
- self.last_changed_by_type = nil
641
- end
642
-
643
- if attributes.key?(:'last_changed_by_id')
644
- self.last_changed_by_id = attributes[:'last_changed_by_id']
547
+ if attributes.key?(:'last_changed_by')
548
+ self.last_changed_by = attributes[:'last_changed_by']
645
549
  else
646
- self.last_changed_by_id = nil
550
+ self.last_changed_by = nil
647
551
  end
648
552
 
649
- if attributes.key?(:'last_changed_by_external_name')
650
- self.last_changed_by_external_name = attributes[:'last_changed_by_external_name']
553
+ if attributes.key?(:'created_at')
554
+ self.created_at = attributes[:'created_at']
651
555
  else
652
- self.last_changed_by_external_name = nil
556
+ self.created_at = nil
653
557
  end
654
558
 
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']
559
+ if attributes.key?(:'updated_at')
560
+ self.updated_at = attributes[:'updated_at']
663
561
  else
664
- self.last_changed_by_external_id = nil
562
+ self.updated_at = nil
665
563
  end
666
564
 
667
565
  if attributes.key?(:'defaults')
@@ -678,68 +576,40 @@ module DocSpring
678
576
  self.field_dependencies = nil
679
577
  end
680
578
 
681
- if attributes.key?(:'field_order')
682
- if (value = attributes[:'field_order']).is_a?(Array)
683
- self.field_order = value
684
- end
685
- 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
579
  if attributes.key?(:'html')
714
580
  self.html = attributes[:'html']
715
581
  else
716
582
  self.html = nil
717
583
  end
718
584
 
719
- if attributes.key?(:'predefined_fields')
720
- if (value = attributes[:'predefined_fields']).is_a?(Array)
721
- self.predefined_fields = value
722
- end
585
+ if attributes.key?(:'scss')
586
+ self.scss = attributes[:'scss']
587
+ else
588
+ self.scss = nil
589
+ end
590
+
591
+ if attributes.key?(:'header_html')
592
+ self.header_html = attributes[:'header_html']
723
593
  else
724
- self.predefined_fields = nil
594
+ self.header_html = nil
725
595
  end
726
596
 
727
- if attributes.key?(:'scss')
728
- self.scss = attributes[:'scss']
597
+ if attributes.key?(:'footer_html')
598
+ self.footer_html = attributes[:'footer_html']
729
599
  else
730
- self.scss = nil
600
+ self.footer_html = nil
731
601
  end
732
602
 
733
- if attributes.key?(:'shared_field_data')
734
- self.shared_field_data = attributes[:'shared_field_data']
603
+ if attributes.key?(:'html_engine_options')
604
+ self.html_engine_options = attributes[:'html_engine_options']
735
605
  else
736
- self.shared_field_data = nil
606
+ self.html_engine_options = nil
737
607
  end
738
608
 
739
- if attributes.key?(:'template_schema_version')
740
- self.template_schema_version = attributes[:'template_schema_version']
609
+ if attributes.key?(:'embed_edit_token')
610
+ self.embed_edit_token = attributes[:'embed_edit_token']
741
611
  else
742
- self.template_schema_version = nil
612
+ self.embed_edit_token = nil
743
613
  end
744
614
 
745
615
  if attributes.key?(:'versions')
@@ -756,30 +626,50 @@ module DocSpring
756
626
  def list_invalid_properties
757
627
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
758
628
  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.')
629
+ if @id.nil?
630
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
761
631
  end
762
632
 
763
- if @allow_additional_properties.nil?
764
- invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
633
+ if @template_type.nil?
634
+ invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
635
+ end
636
+
637
+ if @ready.nil?
638
+ invalid_properties.push('invalid value for "ready", ready cannot be nil.')
639
+ end
640
+
641
+ if @path.nil?
642
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
643
+ end
644
+
645
+ if @locked.nil?
646
+ invalid_properties.push('invalid value for "locked", locked cannot be nil.')
647
+ end
648
+
649
+ if @add_signature_request_submission_id_footers.nil?
650
+ invalid_properties.push('invalid value for "add_signature_request_submission_id_footers", add_signature_request_submission_id_footers cannot be nil.')
765
651
  end
766
652
 
767
- if @document_parse_error.nil?
768
- invalid_properties.push('invalid value for "document_parse_error", document_parse_error cannot be nil.')
653
+ if @allow_additional_properties.nil?
654
+ invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
769
655
  end
770
656
 
771
- if @document_processed.nil?
772
- invalid_properties.push('invalid value for "document_processed", document_processed cannot be nil.')
657
+ if @allow_skipping_optional_fields.nil?
658
+ invalid_properties.push('invalid value for "allow_skipping_optional_fields", allow_skipping_optional_fields cannot be nil.')
773
659
  end
774
660
 
775
- if @document_state.nil?
776
- invalid_properties.push('invalid value for "document_state", document_state cannot be nil.')
661
+ if @default_form_mode.nil?
662
+ invalid_properties.push('invalid value for "default_form_mode", default_form_mode cannot be nil.')
777
663
  end
778
664
 
779
665
  if @editable_submissions.nil?
780
666
  invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.')
781
667
  end
782
668
 
669
+ if @embed_domains.nil?
670
+ invalid_properties.push('invalid value for "embed_domains", embed_domains cannot be nil.')
671
+ end
672
+
783
673
  if @embed_edit_allow_settings.nil?
784
674
  invalid_properties.push('invalid value for "embed_edit_allow_settings", embed_edit_allow_settings cannot be nil.')
785
675
  end
@@ -796,42 +686,30 @@ module DocSpring
796
686
  invalid_properties.push('invalid value for "encrypt_pdfs", encrypt_pdfs cannot be nil.')
797
687
  end
798
688
 
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.')
689
+ if @has_encrypt_pdfs_password.nil?
690
+ invalid_properties.push('invalid value for "has_encrypt_pdfs_password", has_encrypt_pdfs_password cannot be nil.')
805
691
  end
806
692
 
807
693
  if @expire_submissions.nil?
808
694
  invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.')
809
695
  end
810
696
 
811
- if @first_template.nil?
812
- invalid_properties.push('invalid value for "first_template", first_template cannot be nil.')
697
+ if @expire_after.nil?
698
+ invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
813
699
  end
814
700
 
815
- if @locked.nil?
816
- invalid_properties.push('invalid value for "locked", locked cannot be nil.')
701
+ if @expiration_interval.nil?
702
+ invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.')
817
703
  end
818
704
 
819
705
  if @merge_audit_trail_pdf.nil?
820
706
  invalid_properties.push('invalid value for "merge_audit_trail_pdf", merge_audit_trail_pdf cannot be nil.')
821
707
  end
822
708
 
823
- if @page_count.nil?
824
- invalid_properties.push('invalid value for "page_count", page_count cannot be nil.')
825
- end
826
-
827
709
  if @parse_dates_using_template_date_format.nil?
828
710
  invalid_properties.push('invalid value for "parse_dates_using_template_date_format", parse_dates_using_template_date_format cannot be nil.')
829
711
  end
830
712
 
831
- if @path.nil?
832
- invalid_properties.push('invalid value for "path", path cannot be nil.')
833
- end
834
-
835
713
  if @public_submissions.nil?
836
714
  invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.')
837
715
  end
@@ -840,12 +718,16 @@ module DocSpring
840
718
  invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.')
841
719
  end
842
720
 
843
- if @template_type.nil?
844
- invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
721
+ if @has_slack_webhook_url.nil?
722
+ invalid_properties.push('invalid value for "has_slack_webhook_url", has_slack_webhook_url cannot be nil.')
845
723
  end
846
724
 
847
- if @demo.nil?
848
- invalid_properties.push('invalid value for "demo", demo cannot be nil.')
725
+ if @created_at.nil?
726
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
727
+ end
728
+
729
+ if @updated_at.nil?
730
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
849
731
  end
850
732
 
851
733
  if @defaults.nil?
@@ -856,30 +738,6 @@ module DocSpring
856
738
  invalid_properties.push('invalid value for "field_dependencies", field_dependencies cannot be nil.')
857
739
  end
858
740
 
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.')
869
- end
870
-
871
- if @predefined_fields.nil?
872
- invalid_properties.push('invalid value for "predefined_fields", predefined_fields cannot be nil.')
873
- end
874
-
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
741
  if @versions.nil?
884
742
  invalid_properties.push('invalid value for "versions", versions cannot be nil.')
885
743
  end
@@ -891,55 +749,96 @@ module DocSpring
891
749
  # @return true if the model is valid
892
750
  def valid?
893
751
  warn '[DEPRECATED] the `valid?` method is obsolete'
894
- return false if @add_data_request_submission_id_footers.nil?
752
+ return false if @id.nil?
753
+ return false if @template_type.nil?
754
+ return false if @ready.nil?
755
+ return false if @path.nil?
756
+ return false if @locked.nil?
757
+ return false if @add_signature_request_submission_id_footers.nil?
895
758
  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)
759
+ return false if @allow_skipping_optional_fields.nil?
760
+ return false if @default_form_mode.nil?
901
761
  return false if @editable_submissions.nil?
762
+ return false if @embed_domains.nil?
902
763
  return false if @embed_edit_allow_settings.nil?
903
764
  return false if @embed_edit_allow_versioning.nil?
904
765
  return false if @embed_edit_allow_document_replacement.nil?
905
766
  return false if @encrypt_pdfs.nil?
906
- return false if @expiration_interval.nil?
907
- return false if @expire_after.nil?
767
+ return false if @has_encrypt_pdfs_password.nil?
908
768
  return false if @expire_submissions.nil?
909
- return false if @first_template.nil?
910
- return false if @locked.nil?
769
+ return false if @expire_after.nil?
770
+ return false if @expiration_interval.nil?
911
771
  return false if @merge_audit_trail_pdf.nil?
912
- return false if @page_count.nil?
913
772
  return false if @parse_dates_using_template_date_format.nil?
914
- return false if @path.nil?
915
773
  return false if @public_submissions.nil?
916
774
  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)
775
+ return false if @has_slack_webhook_url.nil?
776
+ return false if @created_at.nil?
777
+ return false if @updated_at.nil?
923
778
  return false if @defaults.nil?
924
779
  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?
928
- return false if @predefined_fields.nil?
929
- return false if @shared_field_data.nil?
930
- return false if @template_schema_version.nil?
931
780
  return false if @versions.nil?
932
781
  true
933
782
  end
934
783
 
935
784
  # 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'
785
+ # @param [Object] id Value to be assigned
786
+ def id=(id)
787
+ if id.nil?
788
+ fail ArgumentError, 'id cannot be nil'
789
+ end
790
+
791
+ @id = id
792
+ end
793
+
794
+ # Custom attribute writer method with validation
795
+ # @param [Object] template_type Value to be assigned
796
+ def template_type=(template_type)
797
+ if template_type.nil?
798
+ fail ArgumentError, 'template_type cannot be nil'
799
+ end
800
+
801
+ @template_type = template_type
802
+ end
803
+
804
+ # Custom attribute writer method with validation
805
+ # @param [Object] ready Value to be assigned
806
+ def ready=(ready)
807
+ if ready.nil?
808
+ fail ArgumentError, 'ready cannot be nil'
809
+ end
810
+
811
+ @ready = ready
812
+ end
813
+
814
+ # Custom attribute writer method with validation
815
+ # @param [Object] path Value to be assigned
816
+ def path=(path)
817
+ if path.nil?
818
+ fail ArgumentError, 'path cannot be nil'
819
+ end
820
+
821
+ @path = path
822
+ end
823
+
824
+ # Custom attribute writer method with validation
825
+ # @param [Object] locked Value to be assigned
826
+ def locked=(locked)
827
+ if locked.nil?
828
+ fail ArgumentError, 'locked cannot be nil'
829
+ end
830
+
831
+ @locked = locked
832
+ end
833
+
834
+ # Custom attribute writer method with validation
835
+ # @param [Object] add_signature_request_submission_id_footers Value to be assigned
836
+ def add_signature_request_submission_id_footers=(add_signature_request_submission_id_footers)
837
+ if add_signature_request_submission_id_footers.nil?
838
+ fail ArgumentError, 'add_signature_request_submission_id_footers cannot be nil'
940
839
  end
941
840
 
942
- @add_data_request_submission_id_footers = add_data_request_submission_id_footers
841
+ @add_signature_request_submission_id_footers = add_signature_request_submission_id_footers
943
842
  end
944
843
 
945
844
  # Custom attribute writer method with validation
@@ -953,34 +852,23 @@ module DocSpring
953
852
  end
954
853
 
955
854
  # 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'
855
+ # @param [Object] allow_skipping_optional_fields Value to be assigned
856
+ def allow_skipping_optional_fields=(allow_skipping_optional_fields)
857
+ if allow_skipping_optional_fields.nil?
858
+ fail ArgumentError, 'allow_skipping_optional_fields cannot be nil'
960
859
  end
961
860
 
962
- @document_parse_error = document_parse_error
861
+ @allow_skipping_optional_fields = allow_skipping_optional_fields
963
862
  end
964
863
 
965
864
  # 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'
865
+ # @param [Object] default_form_mode Value to be assigned
866
+ def default_form_mode=(default_form_mode)
867
+ if default_form_mode.nil?
868
+ fail ArgumentError, 'default_form_mode cannot be nil'
970
869
  end
971
870
 
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
871
+ @default_form_mode = default_form_mode
984
872
  end
985
873
 
986
874
  # Custom attribute writer method with validation
@@ -993,6 +881,16 @@ module DocSpring
993
881
  @editable_submissions = editable_submissions
994
882
  end
995
883
 
884
+ # Custom attribute writer method with validation
885
+ # @param [Object] embed_domains Value to be assigned
886
+ def embed_domains=(embed_domains)
887
+ if embed_domains.nil?
888
+ fail ArgumentError, 'embed_domains cannot be nil'
889
+ end
890
+
891
+ @embed_domains = embed_domains
892
+ end
893
+
996
894
  # Custom attribute writer method with validation
997
895
  # @param [Object] embed_edit_allow_settings Value to be assigned
998
896
  def embed_edit_allow_settings=(embed_edit_allow_settings)
@@ -1034,23 +932,13 @@ module DocSpring
1034
932
  end
1035
933
 
1036
934
  # 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'
935
+ # @param [Object] has_encrypt_pdfs_password Value to be assigned
936
+ def has_encrypt_pdfs_password=(has_encrypt_pdfs_password)
937
+ if has_encrypt_pdfs_password.nil?
938
+ fail ArgumentError, 'has_encrypt_pdfs_password cannot be nil'
1051
939
  end
1052
940
 
1053
- @expire_after = expire_after
941
+ @has_encrypt_pdfs_password = has_encrypt_pdfs_password
1054
942
  end
1055
943
 
1056
944
  # Custom attribute writer method with validation
@@ -1064,23 +952,23 @@ module DocSpring
1064
952
  end
1065
953
 
1066
954
  # 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'
955
+ # @param [Object] expire_after Value to be assigned
956
+ def expire_after=(expire_after)
957
+ if expire_after.nil?
958
+ fail ArgumentError, 'expire_after cannot be nil'
1071
959
  end
1072
960
 
1073
- @first_template = first_template
961
+ @expire_after = expire_after
1074
962
  end
1075
963
 
1076
964
  # 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'
965
+ # @param [Object] expiration_interval Value to be assigned
966
+ def expiration_interval=(expiration_interval)
967
+ if expiration_interval.nil?
968
+ fail ArgumentError, 'expiration_interval cannot be nil'
1081
969
  end
1082
970
 
1083
- @locked = locked
971
+ @expiration_interval = expiration_interval
1084
972
  end
1085
973
 
1086
974
  # Custom attribute writer method with validation
@@ -1093,16 +981,6 @@ module DocSpring
1093
981
  @merge_audit_trail_pdf = merge_audit_trail_pdf
1094
982
  end
1095
983
 
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
984
  # Custom attribute writer method with validation
1107
985
  # @param [Object] parse_dates_using_template_date_format Value to be assigned
1108
986
  def parse_dates_using_template_date_format=(parse_dates_using_template_date_format)
@@ -1113,16 +991,6 @@ module DocSpring
1113
991
  @parse_dates_using_template_date_format = parse_dates_using_template_date_format
1114
992
  end
1115
993
 
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
994
  # Custom attribute writer method with validation
1127
995
  # @param [Object] public_submissions Value to be assigned
1128
996
  def public_submissions=(public_submissions)
@@ -1143,36 +1011,34 @@ module DocSpring
1143
1011
  @public_web_form = public_web_form
1144
1012
  end
1145
1013
 
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}."
1014
+ # Custom attribute writer method with validation
1015
+ # @param [Object] has_slack_webhook_url Value to be assigned
1016
+ def has_slack_webhook_url=(has_slack_webhook_url)
1017
+ if has_slack_webhook_url.nil?
1018
+ fail ArgumentError, 'has_slack_webhook_url cannot be nil'
1153
1019
  end
1154
- @template_type = template_type
1020
+
1021
+ @has_slack_webhook_url = has_slack_webhook_url
1155
1022
  end
1156
1023
 
1157
1024
  # 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'
1025
+ # @param [Object] created_at Value to be assigned
1026
+ def created_at=(created_at)
1027
+ if created_at.nil?
1028
+ fail ArgumentError, 'created_at cannot be nil'
1162
1029
  end
1163
1030
 
1164
- @demo = demo
1031
+ @created_at = created_at
1165
1032
  end
1166
1033
 
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}."
1034
+ # Custom attribute writer method with validation
1035
+ # @param [Object] updated_at Value to be assigned
1036
+ def updated_at=(updated_at)
1037
+ if updated_at.nil?
1038
+ fail ArgumentError, 'updated_at cannot be nil'
1174
1039
  end
1175
- @last_changed_by_type = last_changed_by_type
1040
+
1041
+ @updated_at = updated_at
1176
1042
  end
1177
1043
 
1178
1044
  # Custom attribute writer method with validation
@@ -1195,66 +1061,6 @@ module DocSpring
1195
1061
  @field_dependencies = field_dependencies
1196
1062
  end
1197
1063
 
1198
- # 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'
1223
- end
1224
-
1225
- @html_engine_options = html_engine_options
1226
- end
1227
-
1228
- # Custom attribute writer method with validation
1229
- # @param [Object] predefined_fields Value to be assigned
1230
- def predefined_fields=(predefined_fields)
1231
- if predefined_fields.nil?
1232
- fail ArgumentError, 'predefined_fields cannot be nil'
1233
- end
1234
-
1235
- @predefined_fields = predefined_fields
1236
- end
1237
-
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
1064
  # Custom attribute writer method with validation
1259
1065
  # @param [Object] versions Value to be assigned
1260
1066
  def versions=(versions)
@@ -1270,68 +1076,51 @@ module DocSpring
1270
1076
  def ==(o)
1271
1077
  return true if self.equal?(o)
1272
1078
  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 &&
1079
+ id == o.id &&
1080
+ name == o.name &&
1275
1081
  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 &&
1082
+ template_type == o.template_type &&
1083
+ ready == o.ready &&
1084
+ document == o.document &&
1085
+ parent_folder_id == o.parent_folder_id &&
1086
+ path == o.path &&
1087
+ version == o.version &&
1088
+ latest_version == o.latest_version &&
1089
+ version_published_at == o.version_published_at &&
1090
+ locked == o.locked &&
1091
+ add_signature_request_submission_id_footers == o.add_signature_request_submission_id_footers &&
1092
+ ai_field_naming_language == o.ai_field_naming_language &&
1093
+ allow_additional_properties == o.allow_additional_properties &&
1094
+ allow_skipping_optional_fields == o.allow_skipping_optional_fields &&
1095
+ default_form_mode == o.default_form_mode &&
1282
1096
  editable_submissions == o.editable_submissions &&
1283
1097
  embed_domains == o.embed_domains &&
1284
1098
  embed_edit_allow_settings == o.embed_edit_allow_settings &&
1285
1099
  embed_edit_allow_versioning == o.embed_edit_allow_versioning &&
1286
1100
  embed_edit_allow_document_replacement == o.embed_edit_allow_document_replacement &&
1287
- encrypt_pdfs_password == o.encrypt_pdfs_password &&
1288
1101
  encrypt_pdfs == o.encrypt_pdfs &&
1289
- expiration_interval == o.expiration_interval &&
1290
- expire_after == o.expire_after &&
1102
+ has_encrypt_pdfs_password == o.has_encrypt_pdfs_password &&
1291
1103
  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 &&
1104
+ expire_after == o.expire_after &&
1105
+ expiration_interval == o.expiration_interval &&
1297
1106
  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
1107
  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
1108
  public_submissions == o.public_submissions &&
1306
1109
  public_web_form == o.public_web_form &&
1307
1110
  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 &&
1111
+ has_slack_webhook_url == o.has_slack_webhook_url &&
1317
1112
  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 &&
1113
+ last_changed_by == o.last_changed_by &&
1114
+ created_at == o.created_at &&
1115
+ updated_at == o.updated_at &&
1323
1116
  defaults == o.defaults &&
1324
1117
  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
1118
  html == o.html &&
1331
- predefined_fields == o.predefined_fields &&
1332
1119
  scss == o.scss &&
1333
- shared_field_data == o.shared_field_data &&
1334
- template_schema_version == o.template_schema_version &&
1120
+ header_html == o.header_html &&
1121
+ footer_html == o.footer_html &&
1122
+ html_engine_options == o.html_engine_options &&
1123
+ embed_edit_token == o.embed_edit_token &&
1335
1124
  versions == o.versions
1336
1125
  end
1337
1126
 
@@ -1344,7 +1133,7 @@ module DocSpring
1344
1133
  # Calculates hash code according to all attributes.
1345
1134
  # @return [Integer] Hash code
1346
1135
  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
1136
+ [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, html, scss, header_html, footer_html, html_engine_options, embed_edit_token, versions].hash
1348
1137
  end
1349
1138
 
1350
1139
  # Builds the object from hash
@@ -1353,18 +1142,20 @@ module DocSpring
1353
1142
  def self.build_from_hash(attributes)
1354
1143
  return nil unless attributes.is_a?(Hash)
1355
1144
  attributes = attributes.transform_keys(&:to_sym)
1145
+ # include attributes inherited from allOf parents (the nearest declaration wins)
1146
+ map = acceptable_attribute_map
1356
1147
  transformed_hash = {}
1357
- openapi_types.each_pair do |key, type|
1358
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
1148
+ acceptable_openapi_types.each_pair do |key, type|
1149
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
1359
1150
  transformed_hash["#{key}"] = nil
1360
1151
  elsif type =~ /\AArray<(.*)>/i
1361
1152
  # check to ensure the input is an array given that the attribute
1362
1153
  # 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) }
1154
+ if attributes[map[key]].is_a?(Array)
1155
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
1365
1156
  end
1366
- elsif !attributes[attribute_map[key]].nil?
1367
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
1157
+ elsif !attributes[map[key]].nil?
1158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
1368
1159
  end
1369
1160
  end
1370
1161
  # Responses can include enum values added after this client was released, so the enum setters
@@ -1376,69 +1167,15 @@ module DocSpring
1376
1167
  end
1377
1168
  end
1378
1169
 
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
1170
  # Returns the object in the form of hash
1435
1171
  # @return [Hash] Returns the object in the form of hash
1436
1172
  def to_hash
1437
1173
  hash = {}
1438
- self.class.attribute_map.each_pair do |attr, param|
1174
+ # include attributes inherited from allOf parents (the nearest declaration wins)
1175
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
1439
1176
  value = self.send(attr)
1440
1177
  if value.nil?
1441
- is_nullable = self.class.openapi_nullable.include?(attr)
1178
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
1442
1179
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1443
1180
  end
1444
1181
 
@@ -1447,24 +1184,6 @@ module DocSpring
1447
1184
  hash
1448
1185
  end
1449
1186
 
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
1187
  end
1469
1188
 
1470
1189
  end