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,106 +14,118 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DocSpring
17
- class TemplatePreview
18
- attr_accessor :add_data_request_submission_id_footers
17
+ # A template in a list. Get a template by its ID for its HTML, defaults, field dependency rules and published versions.
18
+ class TemplateSummary < 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
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
25
30
 
26
- attr_accessor :document_md5
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
27
33
 
28
- attr_accessor :document_parse_error
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
29
36
 
30
- attr_accessor :document_processed
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
31
39
 
32
- attr_accessor :document_state
40
+ # The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
41
+ attr_accessor :path
33
42
 
34
- attr_accessor :document_url
43
+ # The published version this is, such as `1.2.0`. Null for the draft.
44
+ attr_accessor :version
35
45
 
36
- attr_accessor :editable_submissions
46
+ # The template's latest published version. Null if no version has been published.
47
+ attr_accessor :latest_version
37
48
 
38
- attr_accessor :embed_domains
49
+ # When this version was published. Null for the draft.
50
+ attr_accessor :version_published_at
39
51
 
40
- attr_accessor :embed_edit_allow_settings
52
+ # A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
53
+ attr_accessor :locked
41
54
 
42
- attr_accessor :embed_edit_allow_versioning
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
43
57
 
44
- attr_accessor :embed_edit_allow_document_replacement
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
45
60
 
46
- attr_accessor :encrypt_pdfs_password
61
+ # Accept submission data with properties that aren't fields of the template.
62
+ attr_accessor :allow_additional_properties
47
63
 
48
- attr_accessor :encrypt_pdfs
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
49
66
 
50
- attr_accessor :expiration_interval
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
51
69
 
52
- attr_accessor :expire_after
53
-
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
  class EnumAttributeValidator
119
131
  attr_reader :datatype
@@ -140,56 +152,43 @@ module DocSpring
140
152
  # Attribute mapping from ruby-style variable name to JSON key.
141
153
  def self.attribute_map
142
154
  {
143
- :'add_data_request_submission_id_footers' => :'add_data_request_submission_id_footers',
144
- :'allow_additional_properties' => :'allow_additional_properties',
155
+ :'id' => :'id',
156
+ :'name' => :'name',
145
157
  :'description' => :'description',
146
- :'document_filename' => :'document_filename',
147
- :'document_md5' => :'document_md5',
148
- :'document_parse_error' => :'document_parse_error',
149
- :'document_processed' => :'document_processed',
150
- :'document_state' => :'document_state',
151
- :'document_url' => :'document_url',
158
+ :'template_type' => :'template_type',
159
+ :'ready' => :'ready',
160
+ :'document' => :'document',
161
+ :'parent_folder_id' => :'parent_folder_id',
162
+ :'path' => :'path',
163
+ :'version' => :'version',
164
+ :'latest_version' => :'latest_version',
165
+ :'version_published_at' => :'version_published_at',
166
+ :'locked' => :'locked',
167
+ :'add_signature_request_submission_id_footers' => :'add_signature_request_submission_id_footers',
168
+ :'ai_field_naming_language' => :'ai_field_naming_language',
169
+ :'allow_additional_properties' => :'allow_additional_properties',
170
+ :'allow_skipping_optional_fields' => :'allow_skipping_optional_fields',
171
+ :'default_form_mode' => :'default_form_mode',
152
172
  :'editable_submissions' => :'editable_submissions',
153
173
  :'embed_domains' => :'embed_domains',
154
174
  :'embed_edit_allow_settings' => :'embed_edit_allow_settings',
155
175
  :'embed_edit_allow_versioning' => :'embed_edit_allow_versioning',
156
176
  :'embed_edit_allow_document_replacement' => :'embed_edit_allow_document_replacement',
157
- :'encrypt_pdfs_password' => :'encrypt_pdfs_password',
158
177
  :'encrypt_pdfs' => :'encrypt_pdfs',
159
- :'expiration_interval' => :'expiration_interval',
160
- :'expire_after' => :'expire_after',
178
+ :'has_encrypt_pdfs_password' => :'has_encrypt_pdfs_password',
161
179
  :'expire_submissions' => :'expire_submissions',
162
- :'external_predefined_fields_template_id' => :'external_predefined_fields_template_id',
163
- :'external_predefined_fields_template_name' => :'external_predefined_fields_template_name',
164
- :'first_template' => :'first_template',
165
- :'id' => :'id',
166
- :'locked' => :'locked',
180
+ :'expire_after' => :'expire_after',
181
+ :'expiration_interval' => :'expiration_interval',
167
182
  :'merge_audit_trail_pdf' => :'merge_audit_trail_pdf',
168
- :'name' => :'name',
169
- :'page_count' => :'page_count',
170
- :'page_dimensions' => :'page_dimensions',
171
- :'parent_folder_id' => :'parent_folder_id',
172
183
  :'parse_dates_using_template_date_format' => :'parse_dates_using_template_date_format',
173
- :'path' => :'path',
174
- :'permanent_document_url' => :'permanent_document_url',
175
184
  :'public_submissions' => :'public_submissions',
176
185
  :'public_web_form' => :'public_web_form',
177
186
  :'redirect_url' => :'redirect_url',
178
- :'slack_webhook_url' => :'slack_webhook_url',
179
- :'template_type' => :'template_type',
180
- :'updated_at' => :'updated_at',
181
- :'version_published_at' => :'version_published_at',
182
- :'version' => :'version',
183
- :'webhook_url' => :'webhook_url',
184
- :'embed_edit_token' => :'embed_edit_token',
185
- :'demo' => :'demo',
186
- :'latest_version' => :'latest_version',
187
+ :'has_slack_webhook_url' => :'has_slack_webhook_url',
187
188
  :'last_changed_at' => :'last_changed_at',
188
- :'last_changed_by_type' => :'last_changed_by_type',
189
- :'last_changed_by_id' => :'last_changed_by_id',
190
- :'last_changed_by_external_name' => :'last_changed_by_external_name',
191
- :'last_changed_by_external_email' => :'last_changed_by_external_email',
192
- :'last_changed_by_external_id' => :'last_changed_by_external_id'
189
+ :'last_changed_by' => :'last_changed_by',
190
+ :'created_at' => :'created_at',
191
+ :'updated_at' => :'updated_at'
193
192
  }
194
193
  end
195
194
 
@@ -206,118 +205,99 @@ module DocSpring
206
205
  # Attribute type mapping.
207
206
  def self.openapi_types
208
207
  {
209
- :'add_data_request_submission_id_footers' => :'Boolean',
210
- :'allow_additional_properties' => :'Boolean',
208
+ :'id' => :'String',
209
+ :'name' => :'String',
211
210
  :'description' => :'String',
212
- :'document_filename' => :'String',
213
- :'document_md5' => :'String',
214
- :'document_parse_error' => :'Boolean',
215
- :'document_processed' => :'Boolean',
216
- :'document_state' => :'String',
217
- :'document_url' => :'String',
211
+ :'template_type' => :'TemplateType',
212
+ :'ready' => :'Boolean',
213
+ :'document' => :'TemplateDocument',
214
+ :'parent_folder_id' => :'String',
215
+ :'path' => :'String',
216
+ :'version' => :'String',
217
+ :'latest_version' => :'String',
218
+ :'version_published_at' => :'Time',
219
+ :'locked' => :'Boolean',
220
+ :'add_signature_request_submission_id_footers' => :'Boolean',
221
+ :'ai_field_naming_language' => :'AiFieldNamingLanguage',
222
+ :'allow_additional_properties' => :'Boolean',
223
+ :'allow_skipping_optional_fields' => :'Boolean',
224
+ :'default_form_mode' => :'TemplateFormMode',
218
225
  :'editable_submissions' => :'Boolean',
219
- :'embed_domains' => :'String',
226
+ :'embed_domains' => :'Array<String>',
220
227
  :'embed_edit_allow_settings' => :'Boolean',
221
228
  :'embed_edit_allow_versioning' => :'Boolean',
222
229
  :'embed_edit_allow_document_replacement' => :'Boolean',
223
- :'encrypt_pdfs_password' => :'String',
224
230
  :'encrypt_pdfs' => :'Boolean',
225
- :'expiration_interval' => :'String',
226
- :'expire_after' => :'Integer',
231
+ :'has_encrypt_pdfs_password' => :'Boolean',
227
232
  :'expire_submissions' => :'Boolean',
228
- :'external_predefined_fields_template_id' => :'String',
229
- :'external_predefined_fields_template_name' => :'String',
230
- :'first_template' => :'Boolean',
231
- :'id' => :'String',
232
- :'locked' => :'Boolean',
233
+ :'expire_after' => :'Integer',
234
+ :'expiration_interval' => :'ExpirationInterval',
233
235
  :'merge_audit_trail_pdf' => :'Boolean',
234
- :'name' => :'String',
235
- :'page_count' => :'Integer',
236
- :'page_dimensions' => :'Array<Array<Float>>',
237
- :'parent_folder_id' => :'String',
238
236
  :'parse_dates_using_template_date_format' => :'Boolean',
239
- :'path' => :'String',
240
- :'permanent_document_url' => :'String',
241
237
  :'public_submissions' => :'Boolean',
242
238
  :'public_web_form' => :'Boolean',
243
239
  :'redirect_url' => :'String',
244
- :'slack_webhook_url' => :'String',
245
- :'template_type' => :'String',
246
- :'updated_at' => :'String',
247
- :'version_published_at' => :'String',
248
- :'version' => :'String',
249
- :'webhook_url' => :'String',
250
- :'embed_edit_token' => :'String',
251
- :'demo' => :'Boolean',
252
- :'latest_version' => :'String',
253
- :'last_changed_at' => :'String',
254
- :'last_changed_by_type' => :'String',
255
- :'last_changed_by_id' => :'String',
256
- :'last_changed_by_external_name' => :'String',
257
- :'last_changed_by_external_email' => :'String',
258
- :'last_changed_by_external_id' => :'String'
240
+ :'has_slack_webhook_url' => :'Boolean',
241
+ :'last_changed_at' => :'Time',
242
+ :'last_changed_by' => :'TemplateActor',
243
+ :'created_at' => :'Time',
244
+ :'updated_at' => :'Time'
259
245
  }
260
246
  end
261
247
 
262
248
  # List of attributes with nullable: true
263
249
  def self.openapi_nullable
264
250
  Set.new([
265
- :'description',
266
- :'document_filename',
267
- :'document_md5',
268
- :'document_url',
269
- :'embed_domains',
270
- :'encrypt_pdfs_password',
271
- :'external_predefined_fields_template_id',
272
- :'external_predefined_fields_template_name',
273
- :'id',
274
251
  :'name',
275
- :'page_dimensions',
252
+ :'description',
253
+ :'document',
276
254
  :'parent_folder_id',
277
- :'permanent_document_url',
278
- :'redirect_url',
279
- :'slack_webhook_url',
280
- :'updated_at',
281
- :'version_published_at',
282
255
  :'version',
283
- :'webhook_url',
284
- :'embed_edit_token',
285
256
  :'latest_version',
257
+ :'version_published_at',
258
+ :'ai_field_naming_language',
259
+ :'redirect_url',
286
260
  :'last_changed_at',
287
- :'last_changed_by_type',
288
- :'last_changed_by_id',
289
- :'last_changed_by_external_name',
290
- :'last_changed_by_external_email',
291
- :'last_changed_by_external_id'
261
+ :'last_changed_by',
292
262
  ])
293
263
  end
294
264
 
265
+ # Returns attribute type mapping
266
+ def self.acceptable_openapi_types
267
+ openapi_types
268
+ end
269
+
270
+ # Returns the nullable attributes
271
+ def self.acceptable_openapi_nullable
272
+ openapi_nullable
273
+ end
274
+
295
275
  # Initializes the object
296
276
  # @param [Hash] attributes Model attributes in the form of hash
297
277
  def initialize(attributes = {})
298
278
  if (!attributes.is_a?(Hash))
299
- fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplatePreview` initialize method"
279
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplateSummary` initialize method"
300
280
  end
301
281
 
302
282
  # check to see if the attribute exists and convert string to symbol for hash key
303
283
  acceptable_attribute_map = self.class.acceptable_attribute_map
304
284
  attributes = attributes.each_with_object({}) { |(k, v), h|
305
285
  if (!acceptable_attribute_map.key?(k.to_sym))
306
- fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplatePreview`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
286
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplateSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
307
287
  end
308
288
  h[k.to_sym] = v
309
289
  }
310
290
 
311
- if attributes.key?(:'add_data_request_submission_id_footers')
312
- self.add_data_request_submission_id_footers = attributes[:'add_data_request_submission_id_footers']
291
+ if attributes.key?(:'id')
292
+ self.id = attributes[:'id']
313
293
  else
314
- self.add_data_request_submission_id_footers = nil
294
+ self.id = nil
315
295
  end
316
296
 
317
- if attributes.key?(:'allow_additional_properties')
318
- self.allow_additional_properties = attributes[:'allow_additional_properties']
297
+ if attributes.key?(:'name')
298
+ self.name = attributes[:'name']
319
299
  else
320
- self.allow_additional_properties = nil
300
+ self.name = nil
321
301
  end
322
302
 
323
303
  if attributes.key?(:'description')
@@ -326,162 +306,156 @@ module DocSpring
326
306
  self.description = nil
327
307
  end
328
308
 
329
- if attributes.key?(:'document_filename')
330
- self.document_filename = attributes[:'document_filename']
331
- else
332
- self.document_filename = nil
333
- end
334
-
335
- if attributes.key?(:'document_md5')
336
- self.document_md5 = attributes[:'document_md5']
309
+ if attributes.key?(:'template_type')
310
+ self.template_type = attributes[:'template_type']
337
311
  else
338
- self.document_md5 = nil
312
+ self.template_type = nil
339
313
  end
340
314
 
341
- if attributes.key?(:'document_parse_error')
342
- self.document_parse_error = attributes[:'document_parse_error']
315
+ if attributes.key?(:'ready')
316
+ self.ready = attributes[:'ready']
343
317
  else
344
- self.document_parse_error = nil
318
+ self.ready = nil
345
319
  end
346
320
 
347
- if attributes.key?(:'document_processed')
348
- self.document_processed = attributes[:'document_processed']
321
+ if attributes.key?(:'document')
322
+ self.document = attributes[:'document']
349
323
  else
350
- self.document_processed = nil
324
+ self.document = nil
351
325
  end
352
326
 
353
- if attributes.key?(:'document_state')
354
- self.document_state = attributes[:'document_state']
327
+ if attributes.key?(:'parent_folder_id')
328
+ self.parent_folder_id = attributes[:'parent_folder_id']
355
329
  else
356
- self.document_state = nil
330
+ self.parent_folder_id = nil
357
331
  end
358
332
 
359
- if attributes.key?(:'document_url')
360
- self.document_url = attributes[:'document_url']
333
+ if attributes.key?(:'path')
334
+ self.path = attributes[:'path']
361
335
  else
362
- self.document_url = nil
336
+ self.path = nil
363
337
  end
364
338
 
365
- if attributes.key?(:'editable_submissions')
366
- self.editable_submissions = attributes[:'editable_submissions']
339
+ if attributes.key?(:'version')
340
+ self.version = attributes[:'version']
367
341
  else
368
- self.editable_submissions = nil
342
+ self.version = nil
369
343
  end
370
344
 
371
- if attributes.key?(:'embed_domains')
372
- self.embed_domains = attributes[:'embed_domains']
345
+ if attributes.key?(:'latest_version')
346
+ self.latest_version = attributes[:'latest_version']
373
347
  else
374
- self.embed_domains = nil
348
+ self.latest_version = nil
375
349
  end
376
350
 
377
- if attributes.key?(:'embed_edit_allow_settings')
378
- self.embed_edit_allow_settings = attributes[:'embed_edit_allow_settings']
351
+ if attributes.key?(:'version_published_at')
352
+ self.version_published_at = attributes[:'version_published_at']
379
353
  else
380
- self.embed_edit_allow_settings = nil
354
+ self.version_published_at = nil
381
355
  end
382
356
 
383
- if attributes.key?(:'embed_edit_allow_versioning')
384
- self.embed_edit_allow_versioning = attributes[:'embed_edit_allow_versioning']
357
+ if attributes.key?(:'locked')
358
+ self.locked = attributes[:'locked']
385
359
  else
386
- self.embed_edit_allow_versioning = nil
360
+ self.locked = nil
387
361
  end
388
362
 
389
- if attributes.key?(:'embed_edit_allow_document_replacement')
390
- self.embed_edit_allow_document_replacement = attributes[:'embed_edit_allow_document_replacement']
363
+ if attributes.key?(:'add_signature_request_submission_id_footers')
364
+ self.add_signature_request_submission_id_footers = attributes[:'add_signature_request_submission_id_footers']
391
365
  else
392
- self.embed_edit_allow_document_replacement = nil
366
+ self.add_signature_request_submission_id_footers = nil
393
367
  end
394
368
 
395
- if attributes.key?(:'encrypt_pdfs_password')
396
- self.encrypt_pdfs_password = attributes[:'encrypt_pdfs_password']
369
+ if attributes.key?(:'ai_field_naming_language')
370
+ self.ai_field_naming_language = attributes[:'ai_field_naming_language']
397
371
  else
398
- self.encrypt_pdfs_password = nil
372
+ self.ai_field_naming_language = nil
399
373
  end
400
374
 
401
- if attributes.key?(:'encrypt_pdfs')
402
- self.encrypt_pdfs = attributes[:'encrypt_pdfs']
375
+ if attributes.key?(:'allow_additional_properties')
376
+ self.allow_additional_properties = attributes[:'allow_additional_properties']
403
377
  else
404
- self.encrypt_pdfs = nil
378
+ self.allow_additional_properties = nil
405
379
  end
406
380
 
407
- if attributes.key?(:'expiration_interval')
408
- self.expiration_interval = attributes[:'expiration_interval']
381
+ if attributes.key?(:'allow_skipping_optional_fields')
382
+ self.allow_skipping_optional_fields = attributes[:'allow_skipping_optional_fields']
409
383
  else
410
- self.expiration_interval = nil
384
+ self.allow_skipping_optional_fields = nil
411
385
  end
412
386
 
413
- if attributes.key?(:'expire_after')
414
- self.expire_after = attributes[:'expire_after']
387
+ if attributes.key?(:'default_form_mode')
388
+ self.default_form_mode = attributes[:'default_form_mode']
415
389
  else
416
- self.expire_after = nil
390
+ self.default_form_mode = nil
417
391
  end
418
392
 
419
- if attributes.key?(:'expire_submissions')
420
- self.expire_submissions = attributes[:'expire_submissions']
393
+ if attributes.key?(:'editable_submissions')
394
+ self.editable_submissions = attributes[:'editable_submissions']
421
395
  else
422
- self.expire_submissions = nil
396
+ self.editable_submissions = nil
423
397
  end
424
398
 
425
- if attributes.key?(:'external_predefined_fields_template_id')
426
- self.external_predefined_fields_template_id = attributes[:'external_predefined_fields_template_id']
399
+ if attributes.key?(:'embed_domains')
400
+ if (value = attributes[:'embed_domains']).is_a?(Array)
401
+ self.embed_domains = value
402
+ end
427
403
  else
428
- self.external_predefined_fields_template_id = nil
404
+ self.embed_domains = nil
429
405
  end
430
406
 
431
- if attributes.key?(:'external_predefined_fields_template_name')
432
- self.external_predefined_fields_template_name = attributes[:'external_predefined_fields_template_name']
407
+ if attributes.key?(:'embed_edit_allow_settings')
408
+ self.embed_edit_allow_settings = attributes[:'embed_edit_allow_settings']
433
409
  else
434
- self.external_predefined_fields_template_name = nil
410
+ self.embed_edit_allow_settings = nil
435
411
  end
436
412
 
437
- if attributes.key?(:'first_template')
438
- self.first_template = attributes[:'first_template']
413
+ if attributes.key?(:'embed_edit_allow_versioning')
414
+ self.embed_edit_allow_versioning = attributes[:'embed_edit_allow_versioning']
439
415
  else
440
- self.first_template = nil
416
+ self.embed_edit_allow_versioning = nil
441
417
  end
442
418
 
443
- if attributes.key?(:'id')
444
- self.id = attributes[:'id']
419
+ if attributes.key?(:'embed_edit_allow_document_replacement')
420
+ self.embed_edit_allow_document_replacement = attributes[:'embed_edit_allow_document_replacement']
445
421
  else
446
- self.id = nil
422
+ self.embed_edit_allow_document_replacement = nil
447
423
  end
448
424
 
449
- if attributes.key?(:'locked')
450
- self.locked = attributes[:'locked']
425
+ if attributes.key?(:'encrypt_pdfs')
426
+ self.encrypt_pdfs = attributes[:'encrypt_pdfs']
451
427
  else
452
- self.locked = nil
428
+ self.encrypt_pdfs = nil
453
429
  end
454
430
 
455
- if attributes.key?(:'merge_audit_trail_pdf')
456
- self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf']
431
+ if attributes.key?(:'has_encrypt_pdfs_password')
432
+ self.has_encrypt_pdfs_password = attributes[:'has_encrypt_pdfs_password']
457
433
  else
458
- self.merge_audit_trail_pdf = nil
434
+ self.has_encrypt_pdfs_password = nil
459
435
  end
460
436
 
461
- if attributes.key?(:'name')
462
- self.name = attributes[:'name']
437
+ if attributes.key?(:'expire_submissions')
438
+ self.expire_submissions = attributes[:'expire_submissions']
463
439
  else
464
- self.name = nil
440
+ self.expire_submissions = nil
465
441
  end
466
442
 
467
- if attributes.key?(:'page_count')
468
- self.page_count = attributes[:'page_count']
443
+ if attributes.key?(:'expire_after')
444
+ self.expire_after = attributes[:'expire_after']
469
445
  else
470
- self.page_count = nil
446
+ self.expire_after = nil
471
447
  end
472
448
 
473
- if attributes.key?(:'page_dimensions')
474
- if (value = attributes[:'page_dimensions']).is_a?(Array)
475
- self.page_dimensions = value
476
- end
449
+ if attributes.key?(:'expiration_interval')
450
+ self.expiration_interval = attributes[:'expiration_interval']
477
451
  else
478
- self.page_dimensions = nil
452
+ self.expiration_interval = nil
479
453
  end
480
454
 
481
- if attributes.key?(:'parent_folder_id')
482
- self.parent_folder_id = attributes[:'parent_folder_id']
455
+ if attributes.key?(:'merge_audit_trail_pdf')
456
+ self.merge_audit_trail_pdf = attributes[:'merge_audit_trail_pdf']
483
457
  else
484
- self.parent_folder_id = nil
458
+ self.merge_audit_trail_pdf = nil
485
459
  end
486
460
 
487
461
  if attributes.key?(:'parse_dates_using_template_date_format')
@@ -490,18 +464,6 @@ module DocSpring
490
464
  self.parse_dates_using_template_date_format = nil
491
465
  end
492
466
 
493
- if attributes.key?(:'path')
494
- self.path = attributes[:'path']
495
- else
496
- self.path = nil
497
- end
498
-
499
- if attributes.key?(:'permanent_document_url')
500
- self.permanent_document_url = attributes[:'permanent_document_url']
501
- else
502
- self.permanent_document_url = nil
503
- end
504
-
505
467
  if attributes.key?(:'public_submissions')
506
468
  self.public_submissions = attributes[:'public_submissions']
507
469
  else
@@ -520,124 +482,86 @@ module DocSpring
520
482
  self.redirect_url = nil
521
483
  end
522
484
 
523
- if attributes.key?(:'slack_webhook_url')
524
- self.slack_webhook_url = attributes[:'slack_webhook_url']
485
+ if attributes.key?(:'has_slack_webhook_url')
486
+ self.has_slack_webhook_url = attributes[:'has_slack_webhook_url']
525
487
  else
526
- self.slack_webhook_url = nil
488
+ self.has_slack_webhook_url = nil
527
489
  end
528
490
 
529
- if attributes.key?(:'template_type')
530
- self.template_type = attributes[:'template_type']
531
- else
532
- self.template_type = nil
533
- end
534
-
535
- if attributes.key?(:'updated_at')
536
- self.updated_at = attributes[:'updated_at']
537
- else
538
- self.updated_at = nil
539
- end
540
-
541
- if attributes.key?(:'version_published_at')
542
- self.version_published_at = attributes[:'version_published_at']
543
- else
544
- self.version_published_at = nil
545
- end
546
-
547
- if attributes.key?(:'version')
548
- self.version = attributes[:'version']
549
- else
550
- self.version = nil
551
- end
552
-
553
- if attributes.key?(:'webhook_url')
554
- self.webhook_url = attributes[:'webhook_url']
491
+ if attributes.key?(:'last_changed_at')
492
+ self.last_changed_at = attributes[:'last_changed_at']
555
493
  else
556
- self.webhook_url = nil
557
- end
558
-
559
- if attributes.key?(:'embed_edit_token')
560
- self.embed_edit_token = attributes[:'embed_edit_token']
494
+ self.last_changed_at = nil
561
495
  end
562
496
 
563
- if attributes.key?(:'demo')
564
- self.demo = attributes[:'demo']
497
+ if attributes.key?(:'last_changed_by')
498
+ self.last_changed_by = attributes[:'last_changed_by']
565
499
  else
566
- self.demo = nil
500
+ self.last_changed_by = nil
567
501
  end
568
502
 
569
- if attributes.key?(:'latest_version')
570
- self.latest_version = attributes[:'latest_version']
503
+ if attributes.key?(:'created_at')
504
+ self.created_at = attributes[:'created_at']
571
505
  else
572
- self.latest_version = nil
506
+ self.created_at = nil
573
507
  end
574
508
 
575
- if attributes.key?(:'last_changed_at')
576
- self.last_changed_at = attributes[:'last_changed_at']
509
+ if attributes.key?(:'updated_at')
510
+ self.updated_at = attributes[:'updated_at']
577
511
  else
578
- self.last_changed_at = nil
512
+ self.updated_at = nil
579
513
  end
514
+ end
580
515
 
581
- if attributes.key?(:'last_changed_by_type')
582
- self.last_changed_by_type = attributes[:'last_changed_by_type']
583
- else
584
- self.last_changed_by_type = nil
516
+ # Show invalid properties with the reasons. Usually used together with valid?
517
+ # @return Array for valid properties with the reasons
518
+ def list_invalid_properties
519
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
520
+ invalid_properties = Array.new
521
+ if @id.nil?
522
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
585
523
  end
586
524
 
587
- if attributes.key?(:'last_changed_by_id')
588
- self.last_changed_by_id = attributes[:'last_changed_by_id']
589
- else
590
- self.last_changed_by_id = nil
525
+ if @template_type.nil?
526
+ invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
591
527
  end
592
528
 
593
- if attributes.key?(:'last_changed_by_external_name')
594
- self.last_changed_by_external_name = attributes[:'last_changed_by_external_name']
595
- else
596
- self.last_changed_by_external_name = nil
529
+ if @ready.nil?
530
+ invalid_properties.push('invalid value for "ready", ready cannot be nil.')
597
531
  end
598
532
 
599
- if attributes.key?(:'last_changed_by_external_email')
600
- self.last_changed_by_external_email = attributes[:'last_changed_by_external_email']
601
- else
602
- self.last_changed_by_external_email = nil
533
+ if @path.nil?
534
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
603
535
  end
604
536
 
605
- if attributes.key?(:'last_changed_by_external_id')
606
- self.last_changed_by_external_id = attributes[:'last_changed_by_external_id']
607
- else
608
- self.last_changed_by_external_id = nil
537
+ if @locked.nil?
538
+ invalid_properties.push('invalid value for "locked", locked cannot be nil.')
609
539
  end
610
- end
611
540
 
612
- # Show invalid properties with the reasons. Usually used together with valid?
613
- # @return Array for valid properties with the reasons
614
- def list_invalid_properties
615
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
616
- invalid_properties = Array.new
617
- if @add_data_request_submission_id_footers.nil?
618
- invalid_properties.push('invalid value for "add_data_request_submission_id_footers", add_data_request_submission_id_footers cannot be nil.')
541
+ if @add_signature_request_submission_id_footers.nil?
542
+ invalid_properties.push('invalid value for "add_signature_request_submission_id_footers", add_signature_request_submission_id_footers cannot be nil.')
619
543
  end
620
544
 
621
545
  if @allow_additional_properties.nil?
622
546
  invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
623
547
  end
624
548
 
625
- if @document_parse_error.nil?
626
- invalid_properties.push('invalid value for "document_parse_error", document_parse_error cannot be nil.')
627
- end
628
-
629
- if @document_processed.nil?
630
- invalid_properties.push('invalid value for "document_processed", document_processed cannot be nil.')
549
+ if @allow_skipping_optional_fields.nil?
550
+ invalid_properties.push('invalid value for "allow_skipping_optional_fields", allow_skipping_optional_fields cannot be nil.')
631
551
  end
632
552
 
633
- if @document_state.nil?
634
- invalid_properties.push('invalid value for "document_state", document_state cannot be nil.')
553
+ if @default_form_mode.nil?
554
+ invalid_properties.push('invalid value for "default_form_mode", default_form_mode cannot be nil.')
635
555
  end
636
556
 
637
557
  if @editable_submissions.nil?
638
558
  invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.')
639
559
  end
640
560
 
561
+ if @embed_domains.nil?
562
+ invalid_properties.push('invalid value for "embed_domains", embed_domains cannot be nil.')
563
+ end
564
+
641
565
  if @embed_edit_allow_settings.nil?
642
566
  invalid_properties.push('invalid value for "embed_edit_allow_settings", embed_edit_allow_settings cannot be nil.')
643
567
  end
@@ -654,42 +578,30 @@ module DocSpring
654
578
  invalid_properties.push('invalid value for "encrypt_pdfs", encrypt_pdfs cannot be nil.')
655
579
  end
656
580
 
657
- if @expiration_interval.nil?
658
- invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.')
659
- end
660
-
661
- if @expire_after.nil?
662
- invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
581
+ if @has_encrypt_pdfs_password.nil?
582
+ invalid_properties.push('invalid value for "has_encrypt_pdfs_password", has_encrypt_pdfs_password cannot be nil.')
663
583
  end
664
584
 
665
585
  if @expire_submissions.nil?
666
586
  invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.')
667
587
  end
668
588
 
669
- if @first_template.nil?
670
- invalid_properties.push('invalid value for "first_template", first_template cannot be nil.')
589
+ if @expire_after.nil?
590
+ invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
671
591
  end
672
592
 
673
- if @locked.nil?
674
- invalid_properties.push('invalid value for "locked", locked cannot be nil.')
593
+ if @expiration_interval.nil?
594
+ invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.')
675
595
  end
676
596
 
677
597
  if @merge_audit_trail_pdf.nil?
678
598
  invalid_properties.push('invalid value for "merge_audit_trail_pdf", merge_audit_trail_pdf cannot be nil.')
679
599
  end
680
600
 
681
- if @page_count.nil?
682
- invalid_properties.push('invalid value for "page_count", page_count cannot be nil.')
683
- end
684
-
685
601
  if @parse_dates_using_template_date_format.nil?
686
602
  invalid_properties.push('invalid value for "parse_dates_using_template_date_format", parse_dates_using_template_date_format cannot be nil.')
687
603
  end
688
604
 
689
- if @path.nil?
690
- invalid_properties.push('invalid value for "path", path cannot be nil.')
691
- end
692
-
693
605
  if @public_submissions.nil?
694
606
  invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.')
695
607
  end
@@ -698,12 +610,16 @@ module DocSpring
698
610
  invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.')
699
611
  end
700
612
 
701
- if @template_type.nil?
702
- invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
613
+ if @has_slack_webhook_url.nil?
614
+ invalid_properties.push('invalid value for "has_slack_webhook_url", has_slack_webhook_url cannot be nil.')
615
+ end
616
+
617
+ if @created_at.nil?
618
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
703
619
  end
704
620
 
705
- if @demo.nil?
706
- invalid_properties.push('invalid value for "demo", demo cannot be nil.')
621
+ if @updated_at.nil?
622
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
707
623
  end
708
624
 
709
625
  invalid_properties
@@ -713,46 +629,93 @@ module DocSpring
713
629
  # @return true if the model is valid
714
630
  def valid?
715
631
  warn '[DEPRECATED] the `valid?` method is obsolete'
716
- return false if @add_data_request_submission_id_footers.nil?
632
+ return false if @id.nil?
633
+ return false if @template_type.nil?
634
+ return false if @ready.nil?
635
+ return false if @path.nil?
636
+ return false if @locked.nil?
637
+ return false if @add_signature_request_submission_id_footers.nil?
717
638
  return false if @allow_additional_properties.nil?
718
- return false if @document_parse_error.nil?
719
- return false if @document_processed.nil?
720
- return false if @document_state.nil?
721
- document_state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "password_required", "malformed_pdf", "unknown_error"])
722
- return false unless document_state_validator.valid?(@document_state)
639
+ return false if @allow_skipping_optional_fields.nil?
640
+ return false if @default_form_mode.nil?
723
641
  return false if @editable_submissions.nil?
642
+ return false if @embed_domains.nil?
724
643
  return false if @embed_edit_allow_settings.nil?
725
644
  return false if @embed_edit_allow_versioning.nil?
726
645
  return false if @embed_edit_allow_document_replacement.nil?
727
646
  return false if @encrypt_pdfs.nil?
728
- return false if @expiration_interval.nil?
729
- return false if @expire_after.nil?
647
+ return false if @has_encrypt_pdfs_password.nil?
730
648
  return false if @expire_submissions.nil?
731
- return false if @first_template.nil?
732
- return false if @locked.nil?
649
+ return false if @expire_after.nil?
650
+ return false if @expiration_interval.nil?
733
651
  return false if @merge_audit_trail_pdf.nil?
734
- return false if @page_count.nil?
735
652
  return false if @parse_dates_using_template_date_format.nil?
736
- return false if @path.nil?
737
653
  return false if @public_submissions.nil?
738
654
  return false if @public_web_form.nil?
739
- return false if @template_type.nil?
740
- template_type_validator = EnumAttributeValidator.new('String', ["pdf", "html"])
741
- return false unless template_type_validator.valid?(@template_type)
742
- return false if @demo.nil?
743
- last_changed_by_type_validator = EnumAttributeValidator.new('String', ["user", "api", "external_user"])
744
- return false unless last_changed_by_type_validator.valid?(@last_changed_by_type)
655
+ return false if @has_slack_webhook_url.nil?
656
+ return false if @created_at.nil?
657
+ return false if @updated_at.nil?
745
658
  true
746
659
  end
747
660
 
748
661
  # Custom attribute writer method with validation
749
- # @param [Object] add_data_request_submission_id_footers Value to be assigned
750
- def add_data_request_submission_id_footers=(add_data_request_submission_id_footers)
751
- if add_data_request_submission_id_footers.nil?
752
- fail ArgumentError, 'add_data_request_submission_id_footers cannot be nil'
662
+ # @param [Object] id Value to be assigned
663
+ def id=(id)
664
+ if id.nil?
665
+ fail ArgumentError, 'id cannot be nil'
666
+ end
667
+
668
+ @id = id
669
+ end
670
+
671
+ # Custom attribute writer method with validation
672
+ # @param [Object] template_type Value to be assigned
673
+ def template_type=(template_type)
674
+ if template_type.nil?
675
+ fail ArgumentError, 'template_type cannot be nil'
676
+ end
677
+
678
+ @template_type = template_type
679
+ end
680
+
681
+ # Custom attribute writer method with validation
682
+ # @param [Object] ready Value to be assigned
683
+ def ready=(ready)
684
+ if ready.nil?
685
+ fail ArgumentError, 'ready cannot be nil'
686
+ end
687
+
688
+ @ready = ready
689
+ end
690
+
691
+ # Custom attribute writer method with validation
692
+ # @param [Object] path Value to be assigned
693
+ def path=(path)
694
+ if path.nil?
695
+ fail ArgumentError, 'path cannot be nil'
696
+ end
697
+
698
+ @path = path
699
+ end
700
+
701
+ # Custom attribute writer method with validation
702
+ # @param [Object] locked Value to be assigned
703
+ def locked=(locked)
704
+ if locked.nil?
705
+ fail ArgumentError, 'locked cannot be nil'
706
+ end
707
+
708
+ @locked = locked
709
+ end
710
+
711
+ # Custom attribute writer method with validation
712
+ # @param [Object] add_signature_request_submission_id_footers Value to be assigned
713
+ def add_signature_request_submission_id_footers=(add_signature_request_submission_id_footers)
714
+ if add_signature_request_submission_id_footers.nil?
715
+ fail ArgumentError, 'add_signature_request_submission_id_footers cannot be nil'
753
716
  end
754
717
 
755
- @add_data_request_submission_id_footers = add_data_request_submission_id_footers
718
+ @add_signature_request_submission_id_footers = add_signature_request_submission_id_footers
756
719
  end
757
720
 
758
721
  # Custom attribute writer method with validation
@@ -766,34 +729,23 @@ module DocSpring
766
729
  end
767
730
 
768
731
  # Custom attribute writer method with validation
769
- # @param [Object] document_parse_error Value to be assigned
770
- def document_parse_error=(document_parse_error)
771
- if document_parse_error.nil?
772
- fail ArgumentError, 'document_parse_error cannot be nil'
732
+ # @param [Object] allow_skipping_optional_fields Value to be assigned
733
+ def allow_skipping_optional_fields=(allow_skipping_optional_fields)
734
+ if allow_skipping_optional_fields.nil?
735
+ fail ArgumentError, 'allow_skipping_optional_fields cannot be nil'
773
736
  end
774
737
 
775
- @document_parse_error = document_parse_error
738
+ @allow_skipping_optional_fields = allow_skipping_optional_fields
776
739
  end
777
740
 
778
741
  # Custom attribute writer method with validation
779
- # @param [Object] document_processed Value to be assigned
780
- def document_processed=(document_processed)
781
- if document_processed.nil?
782
- fail ArgumentError, 'document_processed cannot be nil'
742
+ # @param [Object] default_form_mode Value to be assigned
743
+ def default_form_mode=(default_form_mode)
744
+ if default_form_mode.nil?
745
+ fail ArgumentError, 'default_form_mode cannot be nil'
783
746
  end
784
747
 
785
- @document_processed = document_processed
786
- end
787
-
788
- # Custom attribute writer method checking allowed values (enum).
789
- # @param [Object] document_state Object to be assigned
790
- def document_state=(document_state)
791
- validator = EnumAttributeValidator.new('String', ["pending", "processed", "password_required", "malformed_pdf", "unknown_error"])
792
- # build_from_hash accepts enum values this client doesn't know about yet
793
- unless defined?(@_skip_enum_validation) || validator.valid?(document_state)
794
- fail ArgumentError, "invalid value for \"document_state\", must be one of #{validator.allowable_values}."
795
- end
796
- @document_state = document_state
748
+ @default_form_mode = default_form_mode
797
749
  end
798
750
 
799
751
  # Custom attribute writer method with validation
@@ -806,6 +758,16 @@ module DocSpring
806
758
  @editable_submissions = editable_submissions
807
759
  end
808
760
 
761
+ # Custom attribute writer method with validation
762
+ # @param [Object] embed_domains Value to be assigned
763
+ def embed_domains=(embed_domains)
764
+ if embed_domains.nil?
765
+ fail ArgumentError, 'embed_domains cannot be nil'
766
+ end
767
+
768
+ @embed_domains = embed_domains
769
+ end
770
+
809
771
  # Custom attribute writer method with validation
810
772
  # @param [Object] embed_edit_allow_settings Value to be assigned
811
773
  def embed_edit_allow_settings=(embed_edit_allow_settings)
@@ -847,23 +809,13 @@ module DocSpring
847
809
  end
848
810
 
849
811
  # Custom attribute writer method with validation
850
- # @param [Object] expiration_interval Value to be assigned
851
- def expiration_interval=(expiration_interval)
852
- if expiration_interval.nil?
853
- fail ArgumentError, 'expiration_interval cannot be nil'
812
+ # @param [Object] has_encrypt_pdfs_password Value to be assigned
813
+ def has_encrypt_pdfs_password=(has_encrypt_pdfs_password)
814
+ if has_encrypt_pdfs_password.nil?
815
+ fail ArgumentError, 'has_encrypt_pdfs_password cannot be nil'
854
816
  end
855
817
 
856
- @expiration_interval = expiration_interval
857
- end
858
-
859
- # Custom attribute writer method with validation
860
- # @param [Object] expire_after Value to be assigned
861
- def expire_after=(expire_after)
862
- if expire_after.nil?
863
- fail ArgumentError, 'expire_after cannot be nil'
864
- end
865
-
866
- @expire_after = expire_after
818
+ @has_encrypt_pdfs_password = has_encrypt_pdfs_password
867
819
  end
868
820
 
869
821
  # Custom attribute writer method with validation
@@ -877,23 +829,23 @@ module DocSpring
877
829
  end
878
830
 
879
831
  # Custom attribute writer method with validation
880
- # @param [Object] first_template Value to be assigned
881
- def first_template=(first_template)
882
- if first_template.nil?
883
- fail ArgumentError, 'first_template cannot be nil'
832
+ # @param [Object] expire_after Value to be assigned
833
+ def expire_after=(expire_after)
834
+ if expire_after.nil?
835
+ fail ArgumentError, 'expire_after cannot be nil'
884
836
  end
885
837
 
886
- @first_template = first_template
838
+ @expire_after = expire_after
887
839
  end
888
840
 
889
841
  # Custom attribute writer method with validation
890
- # @param [Object] locked Value to be assigned
891
- def locked=(locked)
892
- if locked.nil?
893
- fail ArgumentError, 'locked cannot be nil'
842
+ # @param [Object] expiration_interval Value to be assigned
843
+ def expiration_interval=(expiration_interval)
844
+ if expiration_interval.nil?
845
+ fail ArgumentError, 'expiration_interval cannot be nil'
894
846
  end
895
847
 
896
- @locked = locked
848
+ @expiration_interval = expiration_interval
897
849
  end
898
850
 
899
851
  # Custom attribute writer method with validation
@@ -906,16 +858,6 @@ module DocSpring
906
858
  @merge_audit_trail_pdf = merge_audit_trail_pdf
907
859
  end
908
860
 
909
- # Custom attribute writer method with validation
910
- # @param [Object] page_count Value to be assigned
911
- def page_count=(page_count)
912
- if page_count.nil?
913
- fail ArgumentError, 'page_count cannot be nil'
914
- end
915
-
916
- @page_count = page_count
917
- end
918
-
919
861
  # Custom attribute writer method with validation
920
862
  # @param [Object] parse_dates_using_template_date_format Value to be assigned
921
863
  def parse_dates_using_template_date_format=(parse_dates_using_template_date_format)
@@ -926,16 +868,6 @@ module DocSpring
926
868
  @parse_dates_using_template_date_format = parse_dates_using_template_date_format
927
869
  end
928
870
 
929
- # Custom attribute writer method with validation
930
- # @param [Object] path Value to be assigned
931
- def path=(path)
932
- if path.nil?
933
- fail ArgumentError, 'path cannot be nil'
934
- end
935
-
936
- @path = path
937
- end
938
-
939
871
  # Custom attribute writer method with validation
940
872
  # @param [Object] public_submissions Value to be assigned
941
873
  def public_submissions=(public_submissions)
@@ -956,36 +888,34 @@ module DocSpring
956
888
  @public_web_form = public_web_form
957
889
  end
958
890
 
959
- # Custom attribute writer method checking allowed values (enum).
960
- # @param [Object] template_type Object to be assigned
961
- def template_type=(template_type)
962
- validator = EnumAttributeValidator.new('String', ["pdf", "html"])
963
- # build_from_hash accepts enum values this client doesn't know about yet
964
- unless defined?(@_skip_enum_validation) || validator.valid?(template_type)
965
- fail ArgumentError, "invalid value for \"template_type\", must be one of #{validator.allowable_values}."
891
+ # Custom attribute writer method with validation
892
+ # @param [Object] has_slack_webhook_url Value to be assigned
893
+ def has_slack_webhook_url=(has_slack_webhook_url)
894
+ if has_slack_webhook_url.nil?
895
+ fail ArgumentError, 'has_slack_webhook_url cannot be nil'
966
896
  end
967
- @template_type = template_type
897
+
898
+ @has_slack_webhook_url = has_slack_webhook_url
968
899
  end
969
900
 
970
901
  # Custom attribute writer method with validation
971
- # @param [Object] demo Value to be assigned
972
- def demo=(demo)
973
- if demo.nil?
974
- fail ArgumentError, 'demo cannot be nil'
902
+ # @param [Object] created_at Value to be assigned
903
+ def created_at=(created_at)
904
+ if created_at.nil?
905
+ fail ArgumentError, 'created_at cannot be nil'
975
906
  end
976
907
 
977
- @demo = demo
908
+ @created_at = created_at
978
909
  end
979
910
 
980
- # Custom attribute writer method checking allowed values (enum).
981
- # @param [Object] last_changed_by_type Object to be assigned
982
- def last_changed_by_type=(last_changed_by_type)
983
- validator = EnumAttributeValidator.new('String', ["user", "api", "external_user"])
984
- # build_from_hash accepts enum values this client doesn't know about yet
985
- unless defined?(@_skip_enum_validation) || validator.valid?(last_changed_by_type)
986
- fail ArgumentError, "invalid value for \"last_changed_by_type\", must be one of #{validator.allowable_values}."
911
+ # Custom attribute writer method with validation
912
+ # @param [Object] updated_at Value to be assigned
913
+ def updated_at=(updated_at)
914
+ if updated_at.nil?
915
+ fail ArgumentError, 'updated_at cannot be nil'
987
916
  end
988
- @last_changed_by_type = last_changed_by_type
917
+
918
+ @updated_at = updated_at
989
919
  end
990
920
 
991
921
  # Checks equality by comparing each attribute.
@@ -993,56 +923,43 @@ module DocSpring
993
923
  def ==(o)
994
924
  return true if self.equal?(o)
995
925
  self.class == o.class &&
996
- add_data_request_submission_id_footers == o.add_data_request_submission_id_footers &&
997
- allow_additional_properties == o.allow_additional_properties &&
926
+ id == o.id &&
927
+ name == o.name &&
998
928
  description == o.description &&
999
- document_filename == o.document_filename &&
1000
- document_md5 == o.document_md5 &&
1001
- document_parse_error == o.document_parse_error &&
1002
- document_processed == o.document_processed &&
1003
- document_state == o.document_state &&
1004
- document_url == o.document_url &&
929
+ template_type == o.template_type &&
930
+ ready == o.ready &&
931
+ document == o.document &&
932
+ parent_folder_id == o.parent_folder_id &&
933
+ path == o.path &&
934
+ version == o.version &&
935
+ latest_version == o.latest_version &&
936
+ version_published_at == o.version_published_at &&
937
+ locked == o.locked &&
938
+ add_signature_request_submission_id_footers == o.add_signature_request_submission_id_footers &&
939
+ ai_field_naming_language == o.ai_field_naming_language &&
940
+ allow_additional_properties == o.allow_additional_properties &&
941
+ allow_skipping_optional_fields == o.allow_skipping_optional_fields &&
942
+ default_form_mode == o.default_form_mode &&
1005
943
  editable_submissions == o.editable_submissions &&
1006
944
  embed_domains == o.embed_domains &&
1007
945
  embed_edit_allow_settings == o.embed_edit_allow_settings &&
1008
946
  embed_edit_allow_versioning == o.embed_edit_allow_versioning &&
1009
947
  embed_edit_allow_document_replacement == o.embed_edit_allow_document_replacement &&
1010
- encrypt_pdfs_password == o.encrypt_pdfs_password &&
1011
948
  encrypt_pdfs == o.encrypt_pdfs &&
1012
- expiration_interval == o.expiration_interval &&
1013
- expire_after == o.expire_after &&
949
+ has_encrypt_pdfs_password == o.has_encrypt_pdfs_password &&
1014
950
  expire_submissions == o.expire_submissions &&
1015
- external_predefined_fields_template_id == o.external_predefined_fields_template_id &&
1016
- external_predefined_fields_template_name == o.external_predefined_fields_template_name &&
1017
- first_template == o.first_template &&
1018
- id == o.id &&
1019
- locked == o.locked &&
951
+ expire_after == o.expire_after &&
952
+ expiration_interval == o.expiration_interval &&
1020
953
  merge_audit_trail_pdf == o.merge_audit_trail_pdf &&
1021
- name == o.name &&
1022
- page_count == o.page_count &&
1023
- page_dimensions == o.page_dimensions &&
1024
- parent_folder_id == o.parent_folder_id &&
1025
954
  parse_dates_using_template_date_format == o.parse_dates_using_template_date_format &&
1026
- path == o.path &&
1027
- permanent_document_url == o.permanent_document_url &&
1028
955
  public_submissions == o.public_submissions &&
1029
956
  public_web_form == o.public_web_form &&
1030
957
  redirect_url == o.redirect_url &&
1031
- slack_webhook_url == o.slack_webhook_url &&
1032
- template_type == o.template_type &&
1033
- updated_at == o.updated_at &&
1034
- version_published_at == o.version_published_at &&
1035
- version == o.version &&
1036
- webhook_url == o.webhook_url &&
1037
- embed_edit_token == o.embed_edit_token &&
1038
- demo == o.demo &&
1039
- latest_version == o.latest_version &&
958
+ has_slack_webhook_url == o.has_slack_webhook_url &&
1040
959
  last_changed_at == o.last_changed_at &&
1041
- last_changed_by_type == o.last_changed_by_type &&
1042
- last_changed_by_id == o.last_changed_by_id &&
1043
- last_changed_by_external_name == o.last_changed_by_external_name &&
1044
- last_changed_by_external_email == o.last_changed_by_external_email &&
1045
- last_changed_by_external_id == o.last_changed_by_external_id
960
+ last_changed_by == o.last_changed_by &&
961
+ created_at == o.created_at &&
962
+ updated_at == o.updated_at
1046
963
  end
1047
964
 
1048
965
  # @see the `==` method
@@ -1054,7 +971,7 @@ module DocSpring
1054
971
  # Calculates hash code according to all attributes.
1055
972
  # @return [Integer] Hash code
1056
973
  def hash
1057
- [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].hash
974
+ [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].hash
1058
975
  end
1059
976
 
1060
977
  # Builds the object from hash
@@ -1063,18 +980,20 @@ module DocSpring
1063
980
  def self.build_from_hash(attributes)
1064
981
  return nil unless attributes.is_a?(Hash)
1065
982
  attributes = attributes.transform_keys(&:to_sym)
983
+ # include attributes inherited from allOf parents (the nearest declaration wins)
984
+ map = acceptable_attribute_map
1066
985
  transformed_hash = {}
1067
- openapi_types.each_pair do |key, type|
1068
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
986
+ acceptable_openapi_types.each_pair do |key, type|
987
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
1069
988
  transformed_hash["#{key}"] = nil
1070
989
  elsif type =~ /\AArray<(.*)>/i
1071
990
  # check to ensure the input is an array given that the attribute
1072
991
  # is documented as an array but the input is not
1073
- if attributes[attribute_map[key]].is_a?(Array)
1074
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
992
+ if attributes[map[key]].is_a?(Array)
993
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
1075
994
  end
1076
- elsif !attributes[attribute_map[key]].nil?
1077
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
995
+ elsif !attributes[map[key]].nil?
996
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
1078
997
  end
1079
998
  end
1080
999
  # Responses can include enum values added after this client was released, so the enum setters
@@ -1086,69 +1005,15 @@ module DocSpring
1086
1005
  end
1087
1006
  end
1088
1007
 
1089
- # Deserializes the data based on type
1090
- # @param string type Data type
1091
- # @param string value Value to be deserialized
1092
- # @return [Object] Deserialized data
1093
- def self._deserialize(type, value)
1094
- case type.to_sym
1095
- when :Time
1096
- Time.parse(value)
1097
- when :Date
1098
- Date.parse(value)
1099
- when :String
1100
- value.to_s
1101
- when :Integer
1102
- value.to_i
1103
- when :Float
1104
- value.to_f
1105
- when :Boolean
1106
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1107
- true
1108
- else
1109
- false
1110
- end
1111
- when :Object
1112
- # generic object (usually a Hash), return directly
1113
- value
1114
- when /\AArray<(?<inner_type>.+)>\z/
1115
- inner_type = Regexp.last_match[:inner_type]
1116
- value.map { |v| _deserialize(inner_type, v) }
1117
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1118
- k_type = Regexp.last_match[:k_type]
1119
- v_type = Regexp.last_match[:v_type]
1120
- {}.tap do |hash|
1121
- value.each do |k, v|
1122
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1123
- end
1124
- end
1125
- else # model
1126
- # models (e.g. Pet) or oneOf
1127
- klass = DocSpring.const_get(type)
1128
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
1129
- end
1130
- end
1131
-
1132
- # Returns the string representation of the object
1133
- # @return [String] String presentation of the object
1134
- def to_s
1135
- to_hash.to_s
1136
- end
1137
-
1138
- # to_body is an alias to to_hash (backward compatibility)
1139
- # @return [Hash] Returns the object in the form of hash
1140
- def to_body
1141
- to_hash
1142
- end
1143
-
1144
1008
  # Returns the object in the form of hash
1145
1009
  # @return [Hash] Returns the object in the form of hash
1146
1010
  def to_hash
1147
1011
  hash = {}
1148
- self.class.attribute_map.each_pair do |attr, param|
1012
+ # include attributes inherited from allOf parents (the nearest declaration wins)
1013
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
1149
1014
  value = self.send(attr)
1150
1015
  if value.nil?
1151
- is_nullable = self.class.openapi_nullable.include?(attr)
1016
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
1152
1017
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1153
1018
  end
1154
1019
 
@@ -1157,24 +1022,6 @@ module DocSpring
1157
1022
  hash
1158
1023
  end
1159
1024
 
1160
- # Outputs non-array value in the form of hash
1161
- # For object, use to_hash. Otherwise, just return the value
1162
- # @param [Object] value Any valid value
1163
- # @return [Hash] Returns the value in the form of hash
1164
- def _to_hash(value)
1165
- if value.is_a?(Array)
1166
- value.compact.map { |v| _to_hash(v) }
1167
- elsif value.is_a?(Hash)
1168
- {}.tap do |hash|
1169
- value.each { |k, v| hash[k] = _to_hash(v) }
1170
- end
1171
- elsif value.respond_to? :to_hash
1172
- value.to_hash
1173
- else
1174
- value
1175
- end
1176
- end
1177
-
1178
1025
  end
1179
1026
 
1180
1027
  end