docspring 3.5.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (588) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +445 -150
  3. data/.openapi-generator/VERSION +1 -1
  4. data/.rubocop.yml +1 -1
  5. data/.travis.yml +1 -1
  6. data/AGENTS.md +79 -19
  7. data/CHANGELOG.md +147 -0
  8. data/Gemfile.lock +7 -7
  9. data/README.md +69 -53
  10. data/docs/AddTemplateFieldsRequest.md +18 -0
  11. data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
  12. data/docs/AuthenticationCheck.md +18 -0
  13. data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
  14. data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
  15. data/docs/Client.md +1570 -786
  16. data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
  17. data/docs/CombinedPdf.md +44 -0
  18. data/docs/CombinedPdfFiles.md +18 -0
  19. data/docs/CombinedPdfList.md +20 -0
  20. data/docs/CombinedPdfSource.md +26 -0
  21. data/docs/CombinedPdfSourceInput.md +88 -0
  22. data/docs/CombinedPdfSourcePdf.md +20 -0
  23. data/docs/CombinedPdfSourceType.md +15 -0
  24. data/docs/CombinedPdfState.md +15 -0
  25. data/docs/CopyTemplateRequest.md +22 -0
  26. data/docs/CreateCombinedPdfRequest.md +26 -0
  27. data/docs/CreateCustomFileFromUploadRequest.md +18 -0
  28. data/docs/CreateFolderRequest.md +20 -0
  29. data/docs/CreateSignatureRequestEventRequest.md +24 -0
  30. data/docs/CreateSignatureRequestTokenRequest.md +18 -0
  31. data/docs/CreateSubmissionBatchRequest.md +28 -0
  32. data/docs/CreateSubmissionRequest.md +38 -0
  33. data/docs/CreateTemplateRequest.md +102 -0
  34. data/docs/CreateWebhookRequest.md +38 -0
  35. data/docs/CustomFile.md +11 -3
  36. data/docs/CustomFileList.md +20 -0
  37. data/docs/CustomFileSourcePdf.md +20 -0
  38. data/docs/ErrorCode.md +15 -0
  39. data/docs/ErrorDetail.md +26 -0
  40. data/docs/ErrorInfo.md +32 -0
  41. data/docs/ErrorResponse.md +1 -3
  42. data/docs/ExpirationInterval.md +15 -0
  43. data/docs/Field.md +198 -0
  44. data/docs/FieldComparisonCondition.md +22 -0
  45. data/docs/FieldComparisonOperator.md +15 -0
  46. data/docs/FieldDependency.md +22 -0
  47. data/docs/FieldDependencyInput.md +22 -0
  48. data/docs/FieldDisplayType.md +15 -0
  49. data/docs/FieldEqualsCondition.md +22 -0
  50. data/docs/FieldEqualsOperator.md +15 -0
  51. data/docs/FieldGroup.md +32 -0
  52. data/docs/FieldGroupInput.md +30 -0
  53. data/docs/FieldGroupType.md +15 -0
  54. data/docs/FieldInCondition.md +22 -0
  55. data/docs/FieldInput.md +196 -0
  56. data/docs/FieldOverride.md +142 -0
  57. data/docs/FieldPresenceCondition.md +20 -0
  58. data/docs/FieldPresenceOperator.md +15 -0
  59. data/docs/FieldRangeCondition.md +24 -0
  60. data/docs/FieldReimportState.md +15 -0
  61. data/docs/FieldSetupLogic.md +15 -0
  62. data/docs/FieldSetupNaming.md +15 -0
  63. data/docs/FieldSetupSource.md +15 -0
  64. data/docs/FieldType.md +15 -0
  65. data/docs/Folder.md +9 -5
  66. data/docs/FolderList.md +20 -0
  67. data/docs/GenerateFilesFormat.md +15 -0
  68. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  69. data/docs/GeneratedFile.md +32 -0
  70. data/docs/GeneratedFileState.md +15 -0
  71. data/docs/HtmlEngineOptions.md +36 -0
  72. data/docs/HtmlEngineOptionsInput.md +36 -0
  73. data/docs/ImageGravity.md +15 -0
  74. data/docs/ImageScaleType.md +15 -0
  75. data/docs/ModelCodeLanguage.md +15 -0
  76. data/docs/MoveFolderRequest.md +18 -0
  77. data/docs/MoveTemplateRequest.md +18 -0
  78. data/docs/NumberConditionType.md +15 -0
  79. data/docs/OutputFormat.md +15 -0
  80. data/docs/PageFormat.md +15 -0
  81. data/docs/PageImage.md +34 -0
  82. data/docs/PageImages.md +24 -0
  83. data/docs/PredefinedField.md +30 -0
  84. data/docs/PredefinedFieldInput.md +30 -0
  85. data/docs/PublishTemplateVersionRequest.md +20 -0
  86. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  87. data/docs/RenameFolderRequest.md +18 -0
  88. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  89. data/docs/RestoreTemplateVersionRequest.md +18 -0
  90. data/docs/ShapeType.md +15 -0
  91. data/docs/SignatureRequest.md +66 -0
  92. data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
  93. data/docs/SignatureRequestAuthType.md +15 -0
  94. data/docs/SignatureRequestEvent.md +32 -0
  95. data/docs/SignatureRequestEventType.md +15 -0
  96. data/docs/SignatureRequestInput.md +46 -0
  97. data/docs/SignatureRequestMessageType.md +15 -0
  98. data/docs/SignatureRequestState.md +15 -0
  99. data/docs/SignatureRequestToken.md +30 -0
  100. data/docs/SignatureRequestTokenType.md +15 -0
  101. data/docs/StringConditionType.md +15 -0
  102. data/docs/Submission.md +43 -47
  103. data/docs/SubmissionAction.md +6 -8
  104. data/docs/SubmissionActionState.md +15 -0
  105. data/docs/SubmissionActionType.md +15 -0
  106. data/docs/SubmissionBatch.md +16 -10
  107. data/docs/SubmissionBatchState.md +15 -0
  108. data/docs/SubmissionFiles.md +24 -0
  109. data/docs/SubmissionInput.md +40 -0
  110. data/docs/SubmissionList.md +20 -0
  111. data/docs/SubmissionSource.md +15 -0
  112. data/docs/SubmissionSourcePdf.md +20 -0
  113. data/docs/SubmissionState.md +15 -0
  114. data/docs/SubmissionValidation.md +24 -0
  115. data/docs/Template.md +79 -107
  116. data/docs/TemplateActor.md +26 -0
  117. data/docs/TemplateActorType.md +15 -0
  118. data/docs/TemplateDefaults.md +56 -0
  119. data/docs/TemplateDefaultsInput.md +56 -0
  120. data/docs/TemplateDiff.md +30 -0
  121. data/docs/TemplateDiffSummary.md +28 -0
  122. data/docs/TemplateDocument.md +40 -0
  123. data/docs/TemplateDocumentState.md +15 -0
  124. data/docs/TemplateFieldChange.md +24 -0
  125. data/docs/TemplateFieldChanges.md +24 -0
  126. data/docs/TemplateFieldDependency.md +26 -0
  127. data/docs/TemplateFieldDependencyAction.md +15 -0
  128. data/docs/TemplateFieldDependencyCondition.md +24 -0
  129. data/docs/TemplateFieldDependencyConditionInput.md +93 -0
  130. data/docs/TemplateFieldDependencyInput.md +26 -0
  131. data/docs/TemplateFieldDependencyMatch.md +15 -0
  132. data/docs/TemplateFieldDependencyOperator.md +15 -0
  133. data/docs/TemplateFieldLogicStatus.md +15 -0
  134. data/docs/TemplateFieldMove.md +22 -0
  135. data/docs/TemplateFields.md +22 -0
  136. data/docs/TemplateFormMode.md +15 -0
  137. data/docs/TemplateModelCode.md +22 -0
  138. data/docs/TemplatePageAiError.md +15 -0
  139. data/docs/TemplatePageAiNamingStatus.md +15 -0
  140. data/docs/TemplatePageFieldsStatus.md +15 -0
  141. data/docs/TemplatePageImageStatus.md +15 -0
  142. data/docs/TemplatePageImages.md +24 -0
  143. data/docs/TemplatePageProcessingStatus.md +26 -0
  144. data/docs/TemplateSourcePdf.md +24 -0
  145. data/docs/TemplateSummary.md +90 -0
  146. data/docs/TemplateSummaryList.md +20 -0
  147. data/docs/TemplateType.md +15 -0
  148. data/docs/TemplateVersion.md +24 -0
  149. data/docs/TemplateVersionType.md +15 -0
  150. data/docs/TextAlignment.md +15 -0
  151. data/docs/TextOverflow.md +15 -0
  152. data/docs/TextVerticalAlignment.md +15 -0
  153. data/docs/Typeface.md +15 -0
  154. data/docs/UpdateSignatureRequestRequest.md +34 -0
  155. data/docs/UpdateTemplateDocumentRequest.md +26 -0
  156. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  157. data/docs/UpdateTemplateRequest.md +86 -0
  158. data/docs/UpdateWebhookRequest.md +38 -0
  159. data/docs/UploadMethod.md +15 -0
  160. data/docs/UploadPresign.md +24 -0
  161. data/docs/UrlSourcePdf.md +20 -0
  162. data/docs/ValidateSubmissionRequest.md +38 -0
  163. data/docs/Webhook.md +20 -20
  164. data/docs/WebhookEventType.md +15 -0
  165. data/docs/WebhookList.md +20 -0
  166. data/docs/WebhookMode.md +15 -0
  167. data/docspring.gemspec +3 -3
  168. data/lib/docspring/api/client.rb +1606 -905
  169. data/lib/docspring/api_client.rb +14 -6
  170. data/lib/docspring/api_error.rb +3 -3
  171. data/lib/docspring/api_model_base.rb +88 -0
  172. data/lib/docspring/configuration.rb +12 -7
  173. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  174. data/lib/docspring/models/ai_field_naming_language.rb +42 -0
  175. data/lib/docspring/models/authentication_check.rb +185 -0
  176. data/lib/docspring/models/barcode_symbology.rb +47 -0
  177. data/lib/docspring/models/check_character.rb +44 -0
  178. data/lib/docspring/models/combined_field_type.rb +41 -0
  179. data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
  180. data/lib/docspring/models/combined_pdf_files.rb +167 -0
  181. data/lib/docspring/models/combined_pdf_list.rb +200 -0
  182. data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
  183. data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
  184. data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
  185. data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
  186. data/lib/docspring/models/combined_pdf_state.rb +44 -0
  187. data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
  188. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
  189. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
  190. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
  191. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
  192. data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
  193. data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
  194. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
  195. data/lib/docspring/models/create_template_request.rb +646 -0
  196. data/lib/docspring/models/create_webhook_request.rb +368 -0
  197. data/lib/docspring/models/custom_file.rb +132 -95
  198. data/lib/docspring/models/custom_file_list.rb +200 -0
  199. data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
  200. data/lib/docspring/models/error_code.rb +60 -0
  201. data/lib/docspring/models/error_detail.rb +242 -0
  202. data/lib/docspring/models/error_info.rb +316 -0
  203. data/lib/docspring/models/error_response.rb +28 -138
  204. data/lib/docspring/models/expiration_interval.rb +42 -0
  205. data/lib/docspring/models/field.rb +2217 -0
  206. data/lib/docspring/models/field_comparison_condition.rb +247 -0
  207. data/lib/docspring/models/field_comparison_operator.rb +43 -0
  208. data/lib/docspring/models/field_dependency.rb +246 -0
  209. data/lib/docspring/models/field_dependency_input.rb +246 -0
  210. data/lib/docspring/models/field_display_type.rb +45 -0
  211. data/lib/docspring/models/field_equals_condition.rb +247 -0
  212. data/lib/docspring/models/field_equals_operator.rb +41 -0
  213. data/lib/docspring/models/field_group.rb +368 -0
  214. data/lib/docspring/models/field_group_input.rb +247 -0
  215. data/lib/docspring/models/field_group_type.rb +41 -0
  216. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
  217. data/lib/docspring/models/field_input.rb +1109 -0
  218. data/lib/docspring/models/field_override.rb +829 -0
  219. data/lib/docspring/models/field_presence_condition.rb +234 -0
  220. data/lib/docspring/models/field_presence_operator.rb +41 -0
  221. data/lib/docspring/models/field_range_condition.rb +234 -0
  222. data/lib/docspring/models/field_reimport_state.rb +43 -0
  223. data/lib/docspring/models/field_setup_logic.rb +41 -0
  224. data/lib/docspring/models/field_setup_naming.rb +41 -0
  225. data/lib/docspring/models/field_setup_source.rb +42 -0
  226. data/lib/docspring/models/field_type.rb +54 -0
  227. data/lib/docspring/models/folder.rb +134 -93
  228. data/lib/docspring/models/folder_list.rb +200 -0
  229. data/lib/docspring/models/generate_files_format.rb +40 -0
  230. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  231. data/lib/docspring/models/generated_file.rb +326 -0
  232. data/lib/docspring/models/generated_file_state.rb +42 -0
  233. data/lib/docspring/models/html_engine_options.rb +416 -0
  234. data/lib/docspring/models/html_engine_options_input.rb +280 -0
  235. data/lib/docspring/models/image_gravity.rb +48 -0
  236. data/lib/docspring/models/image_scale_type.rb +42 -0
  237. data/lib/docspring/models/model_code_language.rb +48 -0
  238. data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
  239. data/lib/docspring/models/move_template_request.rb +171 -0
  240. data/lib/docspring/models/number_condition_type.rb +45 -0
  241. data/lib/docspring/models/output_format.rb +41 -0
  242. data/lib/docspring/models/page_format.rb +52 -0
  243. data/lib/docspring/models/page_image.rb +359 -0
  244. data/lib/docspring/models/page_images.rb +248 -0
  245. data/lib/docspring/models/predefined_field.rb +287 -0
  246. data/lib/docspring/models/predefined_field_input.rb +287 -0
  247. data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
  248. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  249. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
  250. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  251. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
  252. data/lib/docspring/models/shape_type.rb +45 -0
  253. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
  254. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
  255. data/lib/docspring/models/signature_request_auth_type.rb +46 -0
  256. data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
  257. data/lib/docspring/models/signature_request_event_type.rb +45 -0
  258. data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
  259. data/lib/docspring/models/signature_request_message_type.rb +48 -0
  260. data/lib/docspring/models/signature_request_state.rb +42 -0
  261. data/lib/docspring/models/signature_request_token.rb +369 -0
  262. data/lib/docspring/models/signature_request_token_type.rb +41 -0
  263. data/lib/docspring/models/string_condition_type.rb +44 -0
  264. data/lib/docspring/models/submission.rb +399 -335
  265. data/lib/docspring/models/submission_action.rb +64 -136
  266. data/lib/docspring/models/submission_action_state.rb +43 -0
  267. data/lib/docspring/models/submission_action_type.rb +46 -0
  268. data/lib/docspring/models/submission_batch.rb +157 -112
  269. data/lib/docspring/models/submission_batch_state.rb +42 -0
  270. data/lib/docspring/models/submission_files.rb +197 -0
  271. data/lib/docspring/models/submission_input.rb +296 -0
  272. data/lib/docspring/models/submission_list.rb +200 -0
  273. data/lib/docspring/models/submission_source.rb +43 -0
  274. data/lib/docspring/models/submission_source_pdf.rb +212 -0
  275. data/lib/docspring/models/submission_state.rb +52 -0
  276. data/lib/docspring/models/submission_validation.rb +234 -0
  277. data/lib/docspring/models/template.rb +528 -736
  278. data/lib/docspring/models/template_actor.rb +259 -0
  279. data/lib/docspring/models/template_actor_type.rb +42 -0
  280. data/lib/docspring/models/template_defaults.rb +395 -0
  281. data/lib/docspring/models/template_defaults_input.rb +395 -0
  282. data/lib/docspring/models/template_diff.rb +321 -0
  283. data/lib/docspring/models/template_diff_summary.rb +320 -0
  284. data/lib/docspring/models/template_document.rb +396 -0
  285. data/lib/docspring/models/template_document_state.rb +46 -0
  286. data/lib/docspring/models/template_field_change.rb +266 -0
  287. data/lib/docspring/models/template_field_changes.rb +274 -0
  288. data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
  289. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  290. data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
  291. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  292. data/lib/docspring/models/template_field_dependency_input.rb +285 -0
  293. data/lib/docspring/models/template_field_dependency_match.rb +41 -0
  294. data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
  295. data/lib/docspring/models/template_field_logic_status.rb +44 -0
  296. data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
  297. data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
  298. data/lib/docspring/models/template_form_mode.rb +42 -0
  299. data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
  300. data/lib/docspring/models/template_page_ai_error.rb +43 -0
  301. data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
  302. data/lib/docspring/models/template_page_fields_status.rb +44 -0
  303. data/lib/docspring/models/template_page_image_status.rb +41 -0
  304. data/lib/docspring/models/template_page_images.rb +254 -0
  305. data/lib/docspring/models/template_page_processing_status.rb +275 -0
  306. data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
  307. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
  308. data/lib/docspring/models/template_summary_list.rb +200 -0
  309. data/lib/docspring/models/template_type.rb +41 -0
  310. data/lib/docspring/models/template_version.rb +238 -0
  311. data/lib/docspring/models/template_version_type.rb +42 -0
  312. data/lib/docspring/models/text_alignment.rb +43 -0
  313. data/lib/docspring/models/text_overflow.rb +41 -0
  314. data/lib/docspring/models/text_vertical_alignment.rb +42 -0
  315. data/lib/docspring/models/typeface.rb +56 -0
  316. data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
  317. data/lib/docspring/models/update_template_document_request.rb +208 -0
  318. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  319. data/lib/docspring/models/update_template_request.rb +551 -0
  320. data/lib/docspring/models/update_webhook_request.rb +344 -0
  321. data/lib/docspring/models/upload_method.rb +40 -0
  322. data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
  323. data/lib/docspring/models/url_source_pdf.rb +212 -0
  324. data/lib/docspring/models/validate_submission_request.rb +288 -0
  325. data/lib/docspring/models/webhook.rb +97 -107
  326. data/lib/docspring/models/webhook_event_type.rb +64 -0
  327. data/lib/docspring/models/webhook_list.rb +200 -0
  328. data/lib/docspring/models/webhook_mode.rb +41 -0
  329. data/lib/docspring/request_schemas.json +4967 -0
  330. data/lib/docspring/request_validator.rb +396 -0
  331. data/lib/docspring/version.rb +4 -4
  332. data/lib/docspring.rb +153 -53
  333. data/spec/api/client_spec.rb +411 -265
  334. data/spec/models/add_template_fields_request_spec.rb +36 -0
  335. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  336. data/spec/models/authentication_check_spec.rb +36 -0
  337. data/spec/models/barcode_symbology_spec.rb +30 -0
  338. data/spec/models/check_character_spec.rb +30 -0
  339. data/spec/models/combined_field_type_spec.rb +30 -0
  340. data/spec/models/combined_pdf_files_spec.rb +36 -0
  341. data/spec/models/combined_pdf_list_spec.rb +42 -0
  342. data/spec/models/combined_pdf_source_input_spec.rb +44 -0
  343. data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
  344. data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
  345. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  346. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
  347. data/spec/models/combined_pdf_state_spec.rb +30 -0
  348. data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
  349. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
  350. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
  351. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
  352. data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
  353. data/spec/models/create_signature_request_token_request_spec.rb +36 -0
  354. data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
  355. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
  356. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
  357. data/spec/models/create_webhook_request_spec.rb +96 -0
  358. data/spec/models/custom_file_list_spec.rb +42 -0
  359. data/spec/models/custom_file_source_pdf_spec.rb +42 -0
  360. data/spec/models/custom_file_spec.rb +29 -5
  361. data/spec/models/error_code_spec.rb +30 -0
  362. data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
  363. data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
  364. data/spec/models/error_response_spec.rb +4 -14
  365. data/spec/models/expiration_interval_spec.rb +30 -0
  366. data/spec/models/field_comparison_condition_spec.rb +48 -0
  367. data/spec/models/field_comparison_operator_spec.rb +30 -0
  368. data/spec/models/field_dependency_input_spec.rb +48 -0
  369. data/spec/models/field_dependency_spec.rb +48 -0
  370. data/spec/models/field_display_type_spec.rb +30 -0
  371. data/spec/models/field_equals_condition_spec.rb +48 -0
  372. data/spec/models/field_equals_operator_spec.rb +30 -0
  373. data/spec/models/field_group_input_spec.rb +72 -0
  374. data/spec/models/field_group_spec.rb +78 -0
  375. data/spec/models/field_group_type_spec.rb +30 -0
  376. data/spec/models/field_in_condition_spec.rb +48 -0
  377. data/spec/models/field_input_spec.rb +570 -0
  378. data/spec/models/field_override_spec.rb +408 -0
  379. data/spec/models/field_presence_condition_spec.rb +42 -0
  380. data/spec/models/field_presence_operator_spec.rb +30 -0
  381. data/spec/models/field_range_condition_spec.rb +54 -0
  382. data/spec/models/field_reimport_state_spec.rb +30 -0
  383. data/spec/models/field_setup_logic_spec.rb +30 -0
  384. data/spec/models/field_setup_naming_spec.rb +30 -0
  385. data/spec/models/field_setup_source_spec.rb +30 -0
  386. data/spec/models/field_spec.rb +576 -0
  387. data/spec/models/field_type_spec.rb +30 -0
  388. data/spec/models/folder_list_spec.rb +42 -0
  389. data/spec/models/folder_spec.rb +16 -4
  390. data/spec/models/generate_files_format_spec.rb +30 -0
  391. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  392. data/spec/models/generated_file_spec.rb +78 -0
  393. data/spec/models/generated_file_state_spec.rb +30 -0
  394. data/spec/models/html_engine_options_input_spec.rb +90 -0
  395. data/spec/models/html_engine_options_spec.rb +90 -0
  396. data/spec/models/image_gravity_spec.rb +30 -0
  397. data/spec/models/image_scale_type_spec.rb +30 -0
  398. data/spec/models/model_code_language_spec.rb +30 -0
  399. data/spec/models/move_folder_request_spec.rb +36 -0
  400. data/spec/models/move_template_request_spec.rb +36 -0
  401. data/spec/models/number_condition_type_spec.rb +30 -0
  402. data/spec/models/output_format_spec.rb +30 -0
  403. data/spec/models/page_format_spec.rb +30 -0
  404. data/spec/models/page_image_spec.rb +84 -0
  405. data/spec/models/page_images_spec.rb +54 -0
  406. data/spec/models/predefined_field_input_spec.rb +72 -0
  407. data/spec/models/predefined_field_spec.rb +72 -0
  408. data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
  409. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  410. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
  411. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  412. data/spec/models/restore_template_version_request_spec.rb +36 -0
  413. data/spec/models/shape_type_spec.rb +30 -0
  414. data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
  415. data/spec/models/signature_request_auth_type_spec.rb +30 -0
  416. data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
  417. data/spec/models/signature_request_event_type_spec.rb +30 -0
  418. data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
  419. data/spec/models/signature_request_message_type_spec.rb +30 -0
  420. data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
  421. data/spec/models/signature_request_state_spec.rb +30 -0
  422. data/spec/models/signature_request_token_spec.rb +72 -0
  423. data/spec/models/signature_request_token_type_spec.rb +30 -0
  424. data/spec/models/string_condition_type_spec.rb +30 -0
  425. data/spec/models/submission_action_spec.rb +4 -22
  426. data/spec/models/submission_action_state_spec.rb +30 -0
  427. data/spec/models/submission_action_type_spec.rb +30 -0
  428. data/spec/models/submission_batch_spec.rb +27 -13
  429. data/spec/models/submission_batch_state_spec.rb +30 -0
  430. data/spec/models/submission_files_spec.rb +54 -0
  431. data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
  432. data/spec/models/submission_list_spec.rb +42 -0
  433. data/spec/models/submission_source_pdf_spec.rb +42 -0
  434. data/spec/models/submission_source_spec.rb +30 -0
  435. data/spec/models/submission_spec.rb +27 -51
  436. data/spec/models/submission_state_spec.rb +30 -0
  437. data/spec/models/submission_validation_spec.rb +54 -0
  438. data/spec/models/template_actor_spec.rb +60 -0
  439. data/spec/models/template_actor_type_spec.rb +30 -0
  440. data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
  441. data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
  442. data/spec/models/template_diff_spec.rb +72 -0
  443. data/spec/models/template_diff_summary_spec.rb +66 -0
  444. data/spec/models/template_document_spec.rb +102 -0
  445. data/spec/models/template_document_state_spec.rb +30 -0
  446. data/spec/models/template_field_change_spec.rb +54 -0
  447. data/spec/models/template_field_changes_spec.rb +54 -0
  448. data/spec/models/template_field_dependency_action_spec.rb +30 -0
  449. data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
  450. data/spec/models/template_field_dependency_condition_spec.rb +54 -0
  451. data/spec/models/template_field_dependency_input_spec.rb +60 -0
  452. data/spec/models/template_field_dependency_match_spec.rb +30 -0
  453. data/spec/models/template_field_dependency_operator_spec.rb +30 -0
  454. data/spec/models/template_field_dependency_spec.rb +60 -0
  455. data/spec/models/template_field_logic_status_spec.rb +30 -0
  456. data/spec/models/template_field_move_spec.rb +48 -0
  457. data/spec/models/template_fields_spec.rb +48 -0
  458. data/spec/models/template_form_mode_spec.rb +30 -0
  459. data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
  460. data/spec/models/template_page_ai_error_spec.rb +30 -0
  461. data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
  462. data/spec/models/template_page_fields_status_spec.rb +30 -0
  463. data/spec/models/template_page_image_status_spec.rb +30 -0
  464. data/spec/models/template_page_images_spec.rb +54 -0
  465. data/spec/models/template_page_processing_status_spec.rb +60 -0
  466. data/spec/models/template_source_pdf_spec.rb +54 -0
  467. data/spec/models/template_spec.rb +44 -140
  468. data/spec/models/template_summary_list_spec.rb +42 -0
  469. data/spec/models/template_summary_spec.rb +252 -0
  470. data/spec/models/template_type_spec.rb +30 -0
  471. data/spec/models/template_version_spec.rb +54 -0
  472. data/spec/models/template_version_type_spec.rb +30 -0
  473. data/spec/models/text_alignment_spec.rb +30 -0
  474. data/spec/models/text_overflow_spec.rb +30 -0
  475. data/spec/models/text_vertical_alignment_spec.rb +30 -0
  476. data/spec/models/typeface_spec.rb +30 -0
  477. data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
  478. data/spec/models/update_template_document_request_spec.rb +60 -0
  479. data/spec/models/update_template_fields_request_spec.rb +36 -0
  480. data/spec/models/update_template_request_spec.rb +240 -0
  481. data/spec/models/update_webhook_request_spec.rb +96 -0
  482. data/spec/models/upload_method_spec.rb +30 -0
  483. data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
  484. data/spec/models/url_source_pdf_spec.rb +42 -0
  485. data/spec/models/validate_submission_request_spec.rb +96 -0
  486. data/spec/models/webhook_event_type_spec.rb +30 -0
  487. data/spec/models/webhook_list_spec.rb +42 -0
  488. data/spec/models/webhook_mode_spec.rb +30 -0
  489. data/spec/models/webhook_spec.rb +4 -8
  490. data/spec/spec_helper.rb +3 -3
  491. metadata +597 -202
  492. data/docs/AddFieldsData.md +0 -18
  493. data/docs/BatchGeneratePdfs201Response.md +0 -28
  494. data/docs/CombinePdfsData.md +0 -28
  495. data/docs/CombinedSubmission.md +0 -44
  496. data/docs/CombinedSubmissionAction.md +0 -30
  497. data/docs/CopyTemplateOptions.md +0 -22
  498. data/docs/CreateCombinedSubmissionResponse.md +0 -26
  499. data/docs/CreateCustomFileData.md +0 -18
  500. data/docs/CreateCustomFileResponse.md +0 -24
  501. data/docs/CreateHtmlTemplate.md +0 -18
  502. data/docs/CreatePdfSubmissionData.md +0 -34
  503. data/docs/CreatePdfTemplate.md +0 -18
  504. data/docs/CreateSubmissionDataRequestData.md +0 -44
  505. data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
  506. data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
  507. data/docs/CreateSubmissionDataRequestResponse.md +0 -24
  508. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
  509. data/docs/CreateSubmissionResponse.md +0 -26
  510. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  511. data/docs/ForbiddenErrorResponse.md +0 -22
  512. data/docs/JsonSchema.md +0 -40
  513. data/docs/ListSubmissionsResponse.md +0 -22
  514. data/docs/MoveFolderData.md +0 -18
  515. data/docs/MoveTemplateData.md +0 -20
  516. data/docs/MultipleErrorsResponse.md +0 -20
  517. data/docs/PublishVersionData.md +0 -20
  518. data/docs/RestoreVersionData.md +0 -18
  519. data/docs/Submission422Response.md +0 -24
  520. data/docs/SubmissionBatchData.md +0 -26
  521. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  522. data/docs/SubmissionDataRequest.md +0 -60
  523. data/docs/SubmissionDataRequestEvent.md +0 -30
  524. data/docs/SubmissionDataRequestShow.md +0 -62
  525. data/docs/SubmissionDataRequestToken.md +0 -24
  526. data/docs/SubmissionPreview.md +0 -64
  527. data/docs/SuccessErrorResponse.md +0 -20
  528. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  529. data/docs/TemplateAddFieldsResponse.md +0 -22
  530. data/docs/TemplateDeleteResponse.md +0 -24
  531. data/docs/TemplateModelCodeResponse.md +0 -22
  532. data/docs/TemplatePreview.md +0 -116
  533. data/docs/TemplatePublishVersionResponse.md +0 -22
  534. data/docs/UpdateHtmlTemplate.md +0 -18
  535. data/docs/UpdatePdfTemplate.md +0 -18
  536. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  537. data/docs/UploadPresignResponse.md +0 -24
  538. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
  539. data/lib/docspring/models/combined_submission_action.rb +0 -384
  540. data/lib/docspring/models/create_combined_submission_response.rb +0 -324
  541. data/lib/docspring/models/create_custom_file_response.rb +0 -314
  542. data/lib/docspring/models/create_html_template.rb +0 -243
  543. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
  544. data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
  545. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
  546. data/lib/docspring/models/create_submission_response.rb +0 -324
  547. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  548. data/lib/docspring/models/forbidden_error_response.rb +0 -323
  549. data/lib/docspring/models/json_schema.rb +0 -329
  550. data/lib/docspring/models/list_submissions_response.rb +0 -283
  551. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  552. data/lib/docspring/models/submission422_response.rb +0 -299
  553. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  554. data/lib/docspring/models/submission_data_request.rb +0 -570
  555. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  556. data/lib/docspring/models/submission_preview.rb +0 -637
  557. data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
  558. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  559. data/lib/docspring/models/template_delete_response.rb +0 -300
  560. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  561. data/lib/docspring/models/update_html_template.rb +0 -243
  562. data/spec/models/add_fields_data_spec.rb +0 -36
  563. data/spec/models/combined_submission_action_spec.rb +0 -84
  564. data/spec/models/create_combined_submission_response_spec.rb +0 -64
  565. data/spec/models/create_custom_file_response_spec.rb +0 -58
  566. data/spec/models/create_folder_data_spec.rb +0 -36
  567. data/spec/models/create_html_template_spec.rb +0 -36
  568. data/spec/models/create_pdf_template_spec.rb +0 -36
  569. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  570. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
  571. data/spec/models/create_submission_data_request_response_spec.rb +0 -58
  572. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
  573. data/spec/models/create_webhook_data_spec.rb +0 -36
  574. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  575. data/spec/models/forbidden_error_response_spec.rb +0 -56
  576. data/spec/models/move_folder_data_spec.rb +0 -36
  577. data/spec/models/multiple_errors_response_spec.rb +0 -46
  578. data/spec/models/restore_version_data_spec.rb +0 -36
  579. data/spec/models/submission422_response_spec.rb +0 -58
  580. data/spec/models/success_error_response_spec.rb +0 -46
  581. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  582. data/spec/models/template_add_fields_response_spec.rb +0 -52
  583. data/spec/models/template_delete_response_spec.rb +0 -58
  584. data/spec/models/template_publish_version_response_spec.rb +0 -52
  585. data/spec/models/update_html_template_spec.rb +0 -36
  586. data/spec/models/update_pdf_template_spec.rb +0 -36
  587. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  588. data/spec/models/update_webhook_data_spec.rb +0 -36
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
5
 
6
- The version of the OpenAPI document: v1
6
+ The version of the OpenAPI document: v2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.16.0-DOCSPRING
9
+ Generator version: 7.26.0-DOCSPRING
10
10
 
11
11
  =end
12
12
 
@@ -14,60 +14,82 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DocSpring
17
- class Submission
18
- attr_accessor :batch_id
17
+ # Data submitted to a template, and the PDF generated from it.
18
+ class Submission < ApiModelBase
19
+ # The submission's ID.
20
+ attr_accessor :id
19
21
 
20
- attr_accessor :data_requests
22
+ # Null once the template has been permanently deleted.
23
+ attr_accessor :template_id
21
24
 
22
- attr_accessor :editable
25
+ # The template's type: `pdf` or `html`.
26
+ attr_accessor :template_type
23
27
 
24
- attr_accessor :error_message
28
+ # The published version of the template the submission used. Null for the draft.
29
+ attr_accessor :template_version
25
30
 
26
- attr_accessor :expired
31
+ # The ID of the batch the submission was created in.
32
+ attr_accessor :batch_id
27
33
 
28
- attr_accessor :expires_at
34
+ # `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again.
35
+ attr_accessor :source
29
36
 
30
- attr_accessor :id
37
+ # `pending` until the PDF has been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no PDF: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the PDF failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
38
+ attr_accessor :state
31
39
 
32
- attr_accessor :json_schema_errors
40
+ # Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
41
+ attr_accessor :test
33
42
 
34
- attr_accessor :metadata
43
+ # `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
44
+ attr_accessor :editable
35
45
 
36
- attr_accessor :password
46
+ # The submission's data, with the values entered in completed signature requests. Lists leave it out (null) unless you pass `include_data=true`. Empty once the submission has expired.
47
+ attr_accessor :data
37
48
 
38
- attr_accessor :processed_at
49
+ # Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired.
50
+ attr_accessor :data_errors
39
51
 
40
- attr_accessor :state
52
+ # Why the PDF couldn't be generated, when `state` is `error`.
53
+ attr_accessor :error_message
41
54
 
42
- attr_accessor :template_id
55
+ # Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
56
+ attr_accessor :metadata
43
57
 
44
- attr_accessor :template_type
58
+ # Whether the PDF needs a password to open (`password`).
59
+ attr_accessor :has_password
45
60
 
46
- attr_accessor :template_version
61
+ # The people asked to sign the submission (and fill in their fields), in order.
62
+ attr_accessor :signature_requests
47
63
 
48
- attr_accessor :test
64
+ # The uploads of the submission's PDF to your storage (account integrations).
65
+ attr_accessor :actions
49
66
 
67
+ # The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
50
68
  attr_accessor :truncated_text
51
69
 
52
- attr_accessor :pdf_hash
53
-
54
- attr_accessor :download_url
55
-
56
- attr_accessor :permanent_download_url
70
+ # What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
71
+ attr_accessor :output_formats
57
72
 
58
- attr_accessor :preview_download_url
73
+ # The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
74
+ attr_accessor :files
59
75
 
76
+ # When the preview PDF was generated. Null if there is no preview.
60
77
  attr_accessor :preview_generated_at
61
78
 
62
- attr_accessor :audit_trail_download_url
79
+ # An expired submission's data, metadata, password and PDF have been deleted.
80
+ attr_accessor :expired
63
81
 
64
- attr_accessor :actions
82
+ # When the submission expires. Null if it's kept until you delete it.
83
+ attr_accessor :expires_at
65
84
 
66
- attr_accessor :source
85
+ # When the PDF was generated. Null until then.
86
+ attr_accessor :processed_at
67
87
 
68
- attr_accessor :referrer
88
+ # When the submission was created.
89
+ attr_accessor :created_at
69
90
 
70
- attr_accessor :data
91
+ # When the submission was last updated.
92
+ attr_accessor :updated_at
71
93
 
72
94
  class EnumAttributeValidator
73
95
  attr_reader :datatype
@@ -94,33 +116,31 @@ module DocSpring
94
116
  # Attribute mapping from ruby-style variable name to JSON key.
95
117
  def self.attribute_map
96
118
  {
97
- :'batch_id' => :'batch_id',
98
- :'data_requests' => :'data_requests',
99
- :'editable' => :'editable',
100
- :'error_message' => :'error_message',
101
- :'expired' => :'expired',
102
- :'expires_at' => :'expires_at',
103
119
  :'id' => :'id',
104
- :'json_schema_errors' => :'json_schema_errors',
105
- :'metadata' => :'metadata',
106
- :'password' => :'password',
107
- :'processed_at' => :'processed_at',
108
- :'state' => :'state',
109
120
  :'template_id' => :'template_id',
110
121
  :'template_type' => :'template_type',
111
122
  :'template_version' => :'template_version',
123
+ :'batch_id' => :'batch_id',
124
+ :'source' => :'source',
125
+ :'state' => :'state',
112
126
  :'test' => :'test',
127
+ :'editable' => :'editable',
128
+ :'data' => :'data',
129
+ :'data_errors' => :'data_errors',
130
+ :'error_message' => :'error_message',
131
+ :'metadata' => :'metadata',
132
+ :'has_password' => :'has_password',
133
+ :'signature_requests' => :'signature_requests',
134
+ :'actions' => :'actions',
113
135
  :'truncated_text' => :'truncated_text',
114
- :'pdf_hash' => :'pdf_hash',
115
- :'download_url' => :'download_url',
116
- :'permanent_download_url' => :'permanent_download_url',
117
- :'preview_download_url' => :'preview_download_url',
136
+ :'output_formats' => :'output_formats',
137
+ :'files' => :'files',
118
138
  :'preview_generated_at' => :'preview_generated_at',
119
- :'audit_trail_download_url' => :'audit_trail_download_url',
120
- :'actions' => :'actions',
121
- :'source' => :'source',
122
- :'referrer' => :'referrer',
123
- :'data' => :'data'
139
+ :'expired' => :'expired',
140
+ :'expires_at' => :'expires_at',
141
+ :'processed_at' => :'processed_at',
142
+ :'created_at' => :'created_at',
143
+ :'updated_at' => :'updated_at'
124
144
  }
125
145
  end
126
146
 
@@ -137,61 +157,59 @@ module DocSpring
137
157
  # Attribute type mapping.
138
158
  def self.openapi_types
139
159
  {
140
- :'batch_id' => :'String',
141
- :'data_requests' => :'Array<SubmissionDataRequest>',
142
- :'editable' => :'Boolean',
143
- :'error_message' => :'String',
144
- :'expired' => :'Boolean',
145
- :'expires_at' => :'String',
146
160
  :'id' => :'String',
147
- :'json_schema_errors' => :'Array<String>',
148
- :'metadata' => :'Object',
149
- :'password' => :'String',
150
- :'processed_at' => :'String',
151
- :'state' => :'String',
152
161
  :'template_id' => :'String',
153
- :'template_type' => :'String',
162
+ :'template_type' => :'TemplateType',
154
163
  :'template_version' => :'String',
164
+ :'batch_id' => :'String',
165
+ :'source' => :'SubmissionSource',
166
+ :'state' => :'SubmissionState',
155
167
  :'test' => :'Boolean',
156
- :'truncated_text' => :'Object',
157
- :'pdf_hash' => :'String',
158
- :'download_url' => :'String',
159
- :'permanent_download_url' => :'String',
160
- :'preview_download_url' => :'String',
161
- :'preview_generated_at' => :'String',
162
- :'audit_trail_download_url' => :'String',
168
+ :'editable' => :'Boolean',
169
+ :'data' => :'Hash<String, Object>',
170
+ :'data_errors' => :'Array<ErrorDetail>',
171
+ :'error_message' => :'String',
172
+ :'metadata' => :'Hash<String, Object>',
173
+ :'has_password' => :'Boolean',
174
+ :'signature_requests' => :'Array<SignatureRequest>',
163
175
  :'actions' => :'Array<SubmissionAction>',
164
- :'source' => :'String',
165
- :'referrer' => :'String',
166
- :'data' => :'Object'
176
+ :'truncated_text' => :'Hash<String, Array<String>>',
177
+ :'output_formats' => :'Array<OutputFormat>',
178
+ :'files' => :'SubmissionFiles',
179
+ :'preview_generated_at' => :'Time',
180
+ :'expired' => :'Boolean',
181
+ :'expires_at' => :'Time',
182
+ :'processed_at' => :'Time',
183
+ :'created_at' => :'Time',
184
+ :'updated_at' => :'Time'
167
185
  }
168
186
  end
169
187
 
170
188
  # List of attributes with nullable: true
171
189
  def self.openapi_nullable
172
190
  Set.new([
173
- :'batch_id',
174
- :'editable',
175
- :'error_message',
176
- :'expires_at',
177
- :'id',
178
- :'json_schema_errors',
179
- :'password',
180
- :'processed_at',
181
191
  :'template_id',
182
192
  :'template_version',
193
+ :'batch_id',
194
+ :'data',
195
+ :'error_message',
183
196
  :'truncated_text',
184
- :'pdf_hash',
185
- :'download_url',
186
- :'permanent_download_url',
187
- :'preview_download_url',
188
197
  :'preview_generated_at',
189
- :'audit_trail_download_url',
190
- :'referrer',
191
- :'data'
198
+ :'expires_at',
199
+ :'processed_at',
192
200
  ])
193
201
  end
194
202
 
203
+ # Returns attribute type mapping
204
+ def self.acceptable_openapi_types
205
+ openapi_types
206
+ end
207
+
208
+ # Returns the nullable attributes
209
+ def self.acceptable_openapi_nullable
210
+ openapi_nullable
211
+ end
212
+
195
213
  # Initializes the object
196
214
  # @param [Hash] attributes Model attributes in the form of hash
197
215
  def initialize(attributes = {})
@@ -208,134 +226,132 @@ module DocSpring
208
226
  h[k.to_sym] = v
209
227
  }
210
228
 
211
- if attributes.key?(:'batch_id')
212
- self.batch_id = attributes[:'batch_id']
229
+ if attributes.key?(:'id')
230
+ self.id = attributes[:'id']
213
231
  else
214
- self.batch_id = nil
232
+ self.id = nil
215
233
  end
216
234
 
217
- if attributes.key?(:'data_requests')
218
- if (value = attributes[:'data_requests']).is_a?(Array)
219
- self.data_requests = value
220
- end
235
+ if attributes.key?(:'template_id')
236
+ self.template_id = attributes[:'template_id']
221
237
  else
222
- self.data_requests = nil
238
+ self.template_id = nil
223
239
  end
224
240
 
225
- if attributes.key?(:'editable')
226
- self.editable = attributes[:'editable']
241
+ if attributes.key?(:'template_type')
242
+ self.template_type = attributes[:'template_type']
227
243
  else
228
- self.editable = nil
244
+ self.template_type = nil
229
245
  end
230
246
 
231
- if attributes.key?(:'error_message')
232
- self.error_message = attributes[:'error_message']
247
+ if attributes.key?(:'template_version')
248
+ self.template_version = attributes[:'template_version']
233
249
  else
234
- self.error_message = nil
250
+ self.template_version = nil
235
251
  end
236
252
 
237
- if attributes.key?(:'expired')
238
- self.expired = attributes[:'expired']
253
+ if attributes.key?(:'batch_id')
254
+ self.batch_id = attributes[:'batch_id']
239
255
  else
240
- self.expired = nil
256
+ self.batch_id = nil
241
257
  end
242
258
 
243
- if attributes.key?(:'expires_at')
244
- self.expires_at = attributes[:'expires_at']
259
+ if attributes.key?(:'source')
260
+ self.source = attributes[:'source']
245
261
  else
246
- self.expires_at = nil
262
+ self.source = nil
247
263
  end
248
264
 
249
- if attributes.key?(:'id')
250
- self.id = attributes[:'id']
265
+ if attributes.key?(:'state')
266
+ self.state = attributes[:'state']
251
267
  else
252
- self.id = nil
268
+ self.state = nil
253
269
  end
254
270
 
255
- if attributes.key?(:'json_schema_errors')
256
- if (value = attributes[:'json_schema_errors']).is_a?(Array)
257
- self.json_schema_errors = value
258
- end
271
+ if attributes.key?(:'test')
272
+ self.test = attributes[:'test']
259
273
  else
260
- self.json_schema_errors = nil
274
+ self.test = nil
261
275
  end
262
276
 
263
- if attributes.key?(:'metadata')
264
- self.metadata = attributes[:'metadata']
277
+ if attributes.key?(:'editable')
278
+ self.editable = attributes[:'editable']
265
279
  else
266
- self.metadata = nil
280
+ self.editable = nil
267
281
  end
268
282
 
269
- if attributes.key?(:'password')
270
- self.password = attributes[:'password']
283
+ if attributes.key?(:'data')
284
+ if (value = attributes[:'data']).is_a?(Hash) || value.nil?
285
+ self.data = value
286
+ end
271
287
  else
272
- self.password = nil
288
+ self.data = nil
273
289
  end
274
290
 
275
- if attributes.key?(:'processed_at')
276
- self.processed_at = attributes[:'processed_at']
291
+ if attributes.key?(:'data_errors')
292
+ if (value = attributes[:'data_errors']).is_a?(Array)
293
+ self.data_errors = value
294
+ end
277
295
  else
278
- self.processed_at = nil
296
+ self.data_errors = nil
279
297
  end
280
298
 
281
- if attributes.key?(:'state')
282
- self.state = attributes[:'state']
299
+ if attributes.key?(:'error_message')
300
+ self.error_message = attributes[:'error_message']
283
301
  else
284
- self.state = nil
302
+ self.error_message = nil
285
303
  end
286
304
 
287
- if attributes.key?(:'template_id')
288
- self.template_id = attributes[:'template_id']
305
+ if attributes.key?(:'metadata')
306
+ if (value = attributes[:'metadata']).is_a?(Hash)
307
+ self.metadata = value
308
+ end
289
309
  else
290
- self.template_id = nil
310
+ self.metadata = nil
291
311
  end
292
312
 
293
- if attributes.key?(:'template_type')
294
- self.template_type = attributes[:'template_type']
313
+ if attributes.key?(:'has_password')
314
+ self.has_password = attributes[:'has_password']
295
315
  else
296
- self.template_type = nil
316
+ self.has_password = nil
297
317
  end
298
318
 
299
- if attributes.key?(:'template_version')
300
- self.template_version = attributes[:'template_version']
319
+ if attributes.key?(:'signature_requests')
320
+ if (value = attributes[:'signature_requests']).is_a?(Array)
321
+ self.signature_requests = value
322
+ end
301
323
  else
302
- self.template_version = nil
324
+ self.signature_requests = nil
303
325
  end
304
326
 
305
- if attributes.key?(:'test')
306
- self.test = attributes[:'test']
327
+ if attributes.key?(:'actions')
328
+ if (value = attributes[:'actions']).is_a?(Array)
329
+ self.actions = value
330
+ end
307
331
  else
308
- self.test = nil
332
+ self.actions = nil
309
333
  end
310
334
 
311
335
  if attributes.key?(:'truncated_text')
312
- self.truncated_text = attributes[:'truncated_text']
336
+ if (value = attributes[:'truncated_text']).is_a?(Hash) || value.nil?
337
+ self.truncated_text = value
338
+ end
313
339
  else
314
340
  self.truncated_text = nil
315
341
  end
316
342
 
317
- if attributes.key?(:'pdf_hash')
318
- self.pdf_hash = attributes[:'pdf_hash']
319
- else
320
- self.pdf_hash = nil
321
- end
322
-
323
- if attributes.key?(:'download_url')
324
- self.download_url = attributes[:'download_url']
325
- else
326
- self.download_url = nil
327
- end
328
-
329
- if attributes.key?(:'permanent_download_url')
330
- self.permanent_download_url = attributes[:'permanent_download_url']
343
+ if attributes.key?(:'output_formats')
344
+ if (value = attributes[:'output_formats']).is_a?(Array)
345
+ self.output_formats = value
346
+ end
331
347
  else
332
- self.permanent_download_url = nil
348
+ self.output_formats = nil
333
349
  end
334
350
 
335
- if attributes.key?(:'preview_download_url')
336
- self.preview_download_url = attributes[:'preview_download_url']
351
+ if attributes.key?(:'files')
352
+ self.files = attributes[:'files']
337
353
  else
338
- self.preview_download_url = nil
354
+ self.files = nil
339
355
  end
340
356
 
341
357
  if attributes.key?(:'preview_generated_at')
@@ -344,30 +360,34 @@ module DocSpring
344
360
  self.preview_generated_at = nil
345
361
  end
346
362
 
347
- if attributes.key?(:'audit_trail_download_url')
348
- self.audit_trail_download_url = attributes[:'audit_trail_download_url']
363
+ if attributes.key?(:'expired')
364
+ self.expired = attributes[:'expired']
349
365
  else
350
- self.audit_trail_download_url = nil
366
+ self.expired = nil
351
367
  end
352
368
 
353
- if attributes.key?(:'actions')
354
- if (value = attributes[:'actions']).is_a?(Array)
355
- self.actions = value
356
- end
369
+ if attributes.key?(:'expires_at')
370
+ self.expires_at = attributes[:'expires_at']
357
371
  else
358
- self.actions = nil
372
+ self.expires_at = nil
359
373
  end
360
374
 
361
- if attributes.key?(:'source')
362
- self.source = attributes[:'source']
375
+ if attributes.key?(:'processed_at')
376
+ self.processed_at = attributes[:'processed_at']
377
+ else
378
+ self.processed_at = nil
363
379
  end
364
380
 
365
- if attributes.key?(:'referrer')
366
- self.referrer = attributes[:'referrer']
381
+ if attributes.key?(:'created_at')
382
+ self.created_at = attributes[:'created_at']
383
+ else
384
+ self.created_at = nil
367
385
  end
368
386
 
369
- if attributes.key?(:'data')
370
- self.data = attributes[:'data']
387
+ if attributes.key?(:'updated_at')
388
+ self.updated_at = attributes[:'updated_at']
389
+ else
390
+ self.updated_at = nil
371
391
  end
372
392
  end
373
393
 
@@ -376,34 +396,70 @@ module DocSpring
376
396
  def list_invalid_properties
377
397
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
378
398
  invalid_properties = Array.new
379
- if @data_requests.nil?
380
- invalid_properties.push('invalid value for "data_requests", data_requests cannot be nil.')
399
+ if @id.nil?
400
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
381
401
  end
382
402
 
383
- if @expired.nil?
384
- invalid_properties.push('invalid value for "expired", expired cannot be nil.')
403
+ if @template_type.nil?
404
+ invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
385
405
  end
386
406
 
387
- if @metadata.nil?
388
- invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
407
+ if @source.nil?
408
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
389
409
  end
390
410
 
391
411
  if @state.nil?
392
412
  invalid_properties.push('invalid value for "state", state cannot be nil.')
393
413
  end
394
414
 
395
- if @template_type.nil?
396
- invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
397
- end
398
-
399
415
  if @test.nil?
400
416
  invalid_properties.push('invalid value for "test", test cannot be nil.')
401
417
  end
402
418
 
419
+ if @editable.nil?
420
+ invalid_properties.push('invalid value for "editable", editable cannot be nil.')
421
+ end
422
+
423
+ if @data_errors.nil?
424
+ invalid_properties.push('invalid value for "data_errors", data_errors cannot be nil.')
425
+ end
426
+
427
+ if @metadata.nil?
428
+ invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
429
+ end
430
+
431
+ if @has_password.nil?
432
+ invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
433
+ end
434
+
435
+ if @signature_requests.nil?
436
+ invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
437
+ end
438
+
403
439
  if @actions.nil?
404
440
  invalid_properties.push('invalid value for "actions", actions cannot be nil.')
405
441
  end
406
442
 
443
+ if @output_formats.nil?
444
+ invalid_properties.push('invalid value for "output_formats", output_formats cannot be nil.')
445
+ end
446
+
447
+ if @files.nil?
448
+ invalid_properties.push('invalid value for "files", files cannot be nil.')
449
+ end
450
+
451
+ if @expired.nil?
452
+ invalid_properties.push('invalid value for "expired", expired cannot be nil.')
453
+ end
454
+
455
+ if @created_at.nil?
456
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
457
+ end
458
+
459
+ if @updated_at.nil?
460
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
461
+ end
462
+
407
463
  invalid_properties
408
464
  end
409
465
 
@@ -411,72 +467,63 @@ module DocSpring
411
467
  # @return true if the model is valid
412
468
  def valid?
413
469
  warn '[DEPRECATED] the `valid?` method is obsolete'
414
- return false if @data_requests.nil?
415
- return false if @expired.nil?
416
- return false if @metadata.nil?
417
- return false if @state.nil?
418
- state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
419
- return false unless state_validator.valid?(@state)
470
+ return false if @id.nil?
420
471
  return false if @template_type.nil?
421
- template_type_validator = EnumAttributeValidator.new('String', ["pdf", "html"])
422
- return false unless template_type_validator.valid?(@template_type)
472
+ return false if @source.nil?
473
+ return false if @state.nil?
423
474
  return false if @test.nil?
475
+ return false if @editable.nil?
476
+ return false if @data_errors.nil?
477
+ return false if @metadata.nil?
478
+ return false if @has_password.nil?
479
+ return false if @signature_requests.nil?
424
480
  return false if @actions.nil?
425
- source_validator = EnumAttributeValidator.new('String', ["api", "web", "reprocess", "webhook"])
426
- return false unless source_validator.valid?(@source)
481
+ return false if @output_formats.nil?
482
+ return false if @files.nil?
483
+ return false if @expired.nil?
484
+ return false if @created_at.nil?
485
+ return false if @updated_at.nil?
427
486
  true
428
487
  end
429
488
 
430
489
  # Custom attribute writer method with validation
431
- # @param [Object] data_requests Value to be assigned
432
- def data_requests=(data_requests)
433
- if data_requests.nil?
434
- fail ArgumentError, 'data_requests cannot be nil'
490
+ # @param [Object] id Value to be assigned
491
+ def id=(id)
492
+ if id.nil?
493
+ fail ArgumentError, 'id cannot be nil'
435
494
  end
436
495
 
437
- @data_requests = data_requests
496
+ @id = id
438
497
  end
439
498
 
440
499
  # Custom attribute writer method with validation
441
- # @param [Object] expired Value to be assigned
442
- def expired=(expired)
443
- if expired.nil?
444
- fail ArgumentError, 'expired cannot be nil'
500
+ # @param [Object] template_type Value to be assigned
501
+ def template_type=(template_type)
502
+ if template_type.nil?
503
+ fail ArgumentError, 'template_type cannot be nil'
445
504
  end
446
505
 
447
- @expired = expired
506
+ @template_type = template_type
448
507
  end
449
508
 
450
509
  # Custom attribute writer method with validation
451
- # @param [Object] metadata Value to be assigned
452
- def metadata=(metadata)
453
- if metadata.nil?
454
- fail ArgumentError, 'metadata cannot be nil'
510
+ # @param [Object] source Value to be assigned
511
+ def source=(source)
512
+ if source.nil?
513
+ fail ArgumentError, 'source cannot be nil'
455
514
  end
456
515
 
457
- @metadata = metadata
516
+ @source = source
458
517
  end
459
518
 
460
- # Custom attribute writer method checking allowed values (enum).
461
- # @param [Object] state Object to be assigned
519
+ # Custom attribute writer method with validation
520
+ # @param [Object] state Value to be assigned
462
521
  def state=(state)
463
- validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
464
- # build_from_hash accepts enum values this client doesn't know about yet
465
- unless defined?(@_skip_enum_validation) || validator.valid?(state)
466
- fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
522
+ if state.nil?
523
+ fail ArgumentError, 'state cannot be nil'
467
524
  end
468
- @state = state
469
- end
470
525
 
471
- # Custom attribute writer method checking allowed values (enum).
472
- # @param [Object] template_type Object to be assigned
473
- def template_type=(template_type)
474
- validator = EnumAttributeValidator.new('String', ["pdf", "html"])
475
- # build_from_hash accepts enum values this client doesn't know about yet
476
- unless defined?(@_skip_enum_validation) || validator.valid?(template_type)
477
- fail ArgumentError, "invalid value for \"template_type\", must be one of #{validator.allowable_values}."
478
- end
479
- @template_type = template_type
526
+ @state = state
480
527
  end
481
528
 
482
529
  # Custom attribute writer method with validation
@@ -489,6 +536,56 @@ module DocSpring
489
536
  @test = test
490
537
  end
491
538
 
539
+ # Custom attribute writer method with validation
540
+ # @param [Object] editable Value to be assigned
541
+ def editable=(editable)
542
+ if editable.nil?
543
+ fail ArgumentError, 'editable cannot be nil'
544
+ end
545
+
546
+ @editable = editable
547
+ end
548
+
549
+ # Custom attribute writer method with validation
550
+ # @param [Object] data_errors Value to be assigned
551
+ def data_errors=(data_errors)
552
+ if data_errors.nil?
553
+ fail ArgumentError, 'data_errors cannot be nil'
554
+ end
555
+
556
+ @data_errors = data_errors
557
+ end
558
+
559
+ # Custom attribute writer method with validation
560
+ # @param [Object] metadata Value to be assigned
561
+ def metadata=(metadata)
562
+ if metadata.nil?
563
+ fail ArgumentError, 'metadata cannot be nil'
564
+ end
565
+
566
+ @metadata = metadata
567
+ end
568
+
569
+ # Custom attribute writer method with validation
570
+ # @param [Object] has_password Value to be assigned
571
+ def has_password=(has_password)
572
+ if has_password.nil?
573
+ fail ArgumentError, 'has_password cannot be nil'
574
+ end
575
+
576
+ @has_password = has_password
577
+ end
578
+
579
+ # Custom attribute writer method with validation
580
+ # @param [Object] signature_requests Value to be assigned
581
+ def signature_requests=(signature_requests)
582
+ if signature_requests.nil?
583
+ fail ArgumentError, 'signature_requests cannot be nil'
584
+ end
585
+
586
+ @signature_requests = signature_requests
587
+ end
588
+
492
589
  # Custom attribute writer method with validation
493
590
  # @param [Object] actions Value to be assigned
494
591
  def actions=(actions)
@@ -499,15 +596,54 @@ module DocSpring
499
596
  @actions = actions
500
597
  end
501
598
 
502
- # Custom attribute writer method checking allowed values (enum).
503
- # @param [Object] source Object to be assigned
504
- def source=(source)
505
- validator = EnumAttributeValidator.new('String', ["api", "web", "reprocess", "webhook"])
506
- # build_from_hash accepts enum values this client doesn't know about yet
507
- unless defined?(@_skip_enum_validation) || validator.valid?(source)
508
- fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
599
+ # Custom attribute writer method with validation
600
+ # @param [Object] output_formats Value to be assigned
601
+ def output_formats=(output_formats)
602
+ if output_formats.nil?
603
+ fail ArgumentError, 'output_formats cannot be nil'
509
604
  end
510
- @source = source
605
+
606
+ @output_formats = output_formats
607
+ end
608
+
609
+ # Custom attribute writer method with validation
610
+ # @param [Object] files Value to be assigned
611
+ def files=(files)
612
+ if files.nil?
613
+ fail ArgumentError, 'files cannot be nil'
614
+ end
615
+
616
+ @files = files
617
+ end
618
+
619
+ # Custom attribute writer method with validation
620
+ # @param [Object] expired Value to be assigned
621
+ def expired=(expired)
622
+ if expired.nil?
623
+ fail ArgumentError, 'expired cannot be nil'
624
+ end
625
+
626
+ @expired = expired
627
+ end
628
+
629
+ # Custom attribute writer method with validation
630
+ # @param [Object] created_at Value to be assigned
631
+ def created_at=(created_at)
632
+ if created_at.nil?
633
+ fail ArgumentError, 'created_at cannot be nil'
634
+ end
635
+
636
+ @created_at = created_at
637
+ end
638
+
639
+ # Custom attribute writer method with validation
640
+ # @param [Object] updated_at Value to be assigned
641
+ def updated_at=(updated_at)
642
+ if updated_at.nil?
643
+ fail ArgumentError, 'updated_at cannot be nil'
644
+ end
645
+
646
+ @updated_at = updated_at
511
647
  end
512
648
 
513
649
  # Checks equality by comparing each attribute.
@@ -515,33 +651,31 @@ module DocSpring
515
651
  def ==(o)
516
652
  return true if self.equal?(o)
517
653
  self.class == o.class &&
518
- batch_id == o.batch_id &&
519
- data_requests == o.data_requests &&
520
- editable == o.editable &&
521
- error_message == o.error_message &&
522
- expired == o.expired &&
523
- expires_at == o.expires_at &&
524
654
  id == o.id &&
525
- json_schema_errors == o.json_schema_errors &&
526
- metadata == o.metadata &&
527
- password == o.password &&
528
- processed_at == o.processed_at &&
529
- state == o.state &&
530
655
  template_id == o.template_id &&
531
656
  template_type == o.template_type &&
532
657
  template_version == o.template_version &&
658
+ batch_id == o.batch_id &&
659
+ source == o.source &&
660
+ state == o.state &&
533
661
  test == o.test &&
662
+ editable == o.editable &&
663
+ data == o.data &&
664
+ data_errors == o.data_errors &&
665
+ error_message == o.error_message &&
666
+ metadata == o.metadata &&
667
+ has_password == o.has_password &&
668
+ signature_requests == o.signature_requests &&
669
+ actions == o.actions &&
534
670
  truncated_text == o.truncated_text &&
535
- pdf_hash == o.pdf_hash &&
536
- download_url == o.download_url &&
537
- permanent_download_url == o.permanent_download_url &&
538
- preview_download_url == o.preview_download_url &&
671
+ output_formats == o.output_formats &&
672
+ files == o.files &&
539
673
  preview_generated_at == o.preview_generated_at &&
540
- audit_trail_download_url == o.audit_trail_download_url &&
541
- actions == o.actions &&
542
- source == o.source &&
543
- referrer == o.referrer &&
544
- data == o.data
674
+ expired == o.expired &&
675
+ expires_at == o.expires_at &&
676
+ processed_at == o.processed_at &&
677
+ created_at == o.created_at &&
678
+ updated_at == o.updated_at
545
679
  end
546
680
 
547
681
  # @see the `==` method
@@ -553,7 +687,7 @@ module DocSpring
553
687
  # Calculates hash code according to all attributes.
554
688
  # @return [Integer] Hash code
555
689
  def hash
556
- [batch_id, data_requests, editable, error_message, expired, expires_at, id, json_schema_errors, metadata, password, processed_at, state, template_id, template_type, template_version, test, truncated_text, pdf_hash, download_url, permanent_download_url, preview_download_url, preview_generated_at, audit_trail_download_url, actions, source, referrer, data].hash
690
+ [id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at].hash
557
691
  end
558
692
 
559
693
  # Builds the object from hash
@@ -562,18 +696,20 @@ module DocSpring
562
696
  def self.build_from_hash(attributes)
563
697
  return nil unless attributes.is_a?(Hash)
564
698
  attributes = attributes.transform_keys(&:to_sym)
699
+ # include attributes inherited from allOf parents (the nearest declaration wins)
700
+ map = acceptable_attribute_map
565
701
  transformed_hash = {}
566
- openapi_types.each_pair do |key, type|
567
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
702
+ acceptable_openapi_types.each_pair do |key, type|
703
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
568
704
  transformed_hash["#{key}"] = nil
569
705
  elsif type =~ /\AArray<(.*)>/i
570
706
  # check to ensure the input is an array given that the attribute
571
707
  # is documented as an array but the input is not
572
- if attributes[attribute_map[key]].is_a?(Array)
573
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
708
+ if attributes[map[key]].is_a?(Array)
709
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
574
710
  end
575
- elsif !attributes[attribute_map[key]].nil?
576
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
711
+ elsif !attributes[map[key]].nil?
712
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
577
713
  end
578
714
  end
579
715
  # Responses can include enum values added after this client was released, so the enum setters
@@ -585,69 +721,15 @@ module DocSpring
585
721
  end
586
722
  end
587
723
 
588
- # Deserializes the data based on type
589
- # @param string type Data type
590
- # @param string value Value to be deserialized
591
- # @return [Object] Deserialized data
592
- def self._deserialize(type, value)
593
- case type.to_sym
594
- when :Time
595
- Time.parse(value)
596
- when :Date
597
- Date.parse(value)
598
- when :String
599
- value.to_s
600
- when :Integer
601
- value.to_i
602
- when :Float
603
- value.to_f
604
- when :Boolean
605
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
606
- true
607
- else
608
- false
609
- end
610
- when :Object
611
- # generic object (usually a Hash), return directly
612
- value
613
- when /\AArray<(?<inner_type>.+)>\z/
614
- inner_type = Regexp.last_match[:inner_type]
615
- value.map { |v| _deserialize(inner_type, v) }
616
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
617
- k_type = Regexp.last_match[:k_type]
618
- v_type = Regexp.last_match[:v_type]
619
- {}.tap do |hash|
620
- value.each do |k, v|
621
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
622
- end
623
- end
624
- else # model
625
- # models (e.g. Pet) or oneOf
626
- klass = DocSpring.const_get(type)
627
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
628
- end
629
- end
630
-
631
- # Returns the string representation of the object
632
- # @return [String] String presentation of the object
633
- def to_s
634
- to_hash.to_s
635
- end
636
-
637
- # to_body is an alias to to_hash (backward compatibility)
638
- # @return [Hash] Returns the object in the form of hash
639
- def to_body
640
- to_hash
641
- end
642
-
643
724
  # Returns the object in the form of hash
644
725
  # @return [Hash] Returns the object in the form of hash
645
726
  def to_hash
646
727
  hash = {}
647
- self.class.attribute_map.each_pair do |attr, param|
728
+ # include attributes inherited from allOf parents (the nearest declaration wins)
729
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
648
730
  value = self.send(attr)
649
731
  if value.nil?
650
- is_nullable = self.class.openapi_nullable.include?(attr)
732
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
651
733
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
652
734
  end
653
735
 
@@ -656,24 +738,6 @@ module DocSpring
656
738
  hash
657
739
  end
658
740
 
659
- # Outputs non-array value in the form of hash
660
- # For object, use to_hash. Otherwise, just return the value
661
- # @param [Object] value Any valid value
662
- # @return [Hash] Returns the value in the form of hash
663
- def _to_hash(value)
664
- if value.is_a?(Array)
665
- value.compact.map { |v| _to_hash(v) }
666
- elsif value.is_a?(Hash)
667
- {}.tap do |hash|
668
- value.each { |k, v| hash[k] = _to_hash(v) }
669
- end
670
- elsif value.respond_to? :to_hash
671
- value.to_hash
672
- else
673
- value
674
- end
675
- end
676
-
677
741
  end
678
742
 
679
743
  end