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,60 +14,79 @@ 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
57
-
58
- attr_accessor :preview_download_url
70
+ # The generated files: `pdf` once the submission has been processed, `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
71
+ attr_accessor :files
59
72
 
73
+ # When the preview PDF was generated. Null if there is no preview.
60
74
  attr_accessor :preview_generated_at
61
75
 
62
- attr_accessor :audit_trail_download_url
76
+ # An expired submission's data, metadata, password and PDF have been deleted.
77
+ attr_accessor :expired
63
78
 
64
- attr_accessor :actions
79
+ # When the submission expires. Null if it's kept until you delete it.
80
+ attr_accessor :expires_at
65
81
 
66
- attr_accessor :source
82
+ # When the PDF was generated. Null until then.
83
+ attr_accessor :processed_at
67
84
 
68
- attr_accessor :referrer
85
+ # When the submission was created.
86
+ attr_accessor :created_at
69
87
 
70
- attr_accessor :data
88
+ # When the submission was last updated.
89
+ attr_accessor :updated_at
71
90
 
72
91
  class EnumAttributeValidator
73
92
  attr_reader :datatype
@@ -94,33 +113,30 @@ module DocSpring
94
113
  # Attribute mapping from ruby-style variable name to JSON key.
95
114
  def self.attribute_map
96
115
  {
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
116
  :'id' => :'id',
104
- :'json_schema_errors' => :'json_schema_errors',
105
- :'metadata' => :'metadata',
106
- :'password' => :'password',
107
- :'processed_at' => :'processed_at',
108
- :'state' => :'state',
109
117
  :'template_id' => :'template_id',
110
118
  :'template_type' => :'template_type',
111
119
  :'template_version' => :'template_version',
120
+ :'batch_id' => :'batch_id',
121
+ :'source' => :'source',
122
+ :'state' => :'state',
112
123
  :'test' => :'test',
124
+ :'editable' => :'editable',
125
+ :'data' => :'data',
126
+ :'data_errors' => :'data_errors',
127
+ :'error_message' => :'error_message',
128
+ :'metadata' => :'metadata',
129
+ :'has_password' => :'has_password',
130
+ :'signature_requests' => :'signature_requests',
131
+ :'actions' => :'actions',
113
132
  :'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',
133
+ :'files' => :'files',
118
134
  :'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'
135
+ :'expired' => :'expired',
136
+ :'expires_at' => :'expires_at',
137
+ :'processed_at' => :'processed_at',
138
+ :'created_at' => :'created_at',
139
+ :'updated_at' => :'updated_at'
124
140
  }
125
141
  end
126
142
 
@@ -137,61 +153,58 @@ module DocSpring
137
153
  # Attribute type mapping.
138
154
  def self.openapi_types
139
155
  {
140
- :'batch_id' => :'String',
141
- :'data_requests' => :'Array<SubmissionDataRequest>',
142
- :'editable' => :'Boolean',
143
- :'error_message' => :'String',
144
- :'expired' => :'Boolean',
145
- :'expires_at' => :'String',
146
156
  :'id' => :'String',
147
- :'json_schema_errors' => :'Array<String>',
148
- :'metadata' => :'Object',
149
- :'password' => :'String',
150
- :'processed_at' => :'String',
151
- :'state' => :'String',
152
157
  :'template_id' => :'String',
153
- :'template_type' => :'String',
158
+ :'template_type' => :'TemplateType',
154
159
  :'template_version' => :'String',
160
+ :'batch_id' => :'String',
161
+ :'source' => :'SubmissionSource',
162
+ :'state' => :'SubmissionState',
155
163
  :'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',
164
+ :'editable' => :'Boolean',
165
+ :'data' => :'Hash<String, Object>',
166
+ :'data_errors' => :'Array<ErrorDetail>',
167
+ :'error_message' => :'String',
168
+ :'metadata' => :'Hash<String, Object>',
169
+ :'has_password' => :'Boolean',
170
+ :'signature_requests' => :'Array<SignatureRequest>',
163
171
  :'actions' => :'Array<SubmissionAction>',
164
- :'source' => :'String',
165
- :'referrer' => :'String',
166
- :'data' => :'Object'
172
+ :'truncated_text' => :'Hash<String, Array<String>>',
173
+ :'files' => :'SubmissionFiles',
174
+ :'preview_generated_at' => :'Time',
175
+ :'expired' => :'Boolean',
176
+ :'expires_at' => :'Time',
177
+ :'processed_at' => :'Time',
178
+ :'created_at' => :'Time',
179
+ :'updated_at' => :'Time'
167
180
  }
168
181
  end
169
182
 
170
183
  # List of attributes with nullable: true
171
184
  def self.openapi_nullable
172
185
  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
186
  :'template_id',
182
187
  :'template_version',
188
+ :'batch_id',
189
+ :'data',
190
+ :'error_message',
183
191
  :'truncated_text',
184
- :'pdf_hash',
185
- :'download_url',
186
- :'permanent_download_url',
187
- :'preview_download_url',
188
192
  :'preview_generated_at',
189
- :'audit_trail_download_url',
190
- :'referrer',
191
- :'data'
193
+ :'expires_at',
194
+ :'processed_at',
192
195
  ])
193
196
  end
194
197
 
198
+ # Returns attribute type mapping
199
+ def self.acceptable_openapi_types
200
+ openapi_types
201
+ end
202
+
203
+ # Returns the nullable attributes
204
+ def self.acceptable_openapi_nullable
205
+ openapi_nullable
206
+ end
207
+
195
208
  # Initializes the object
196
209
  # @param [Hash] attributes Model attributes in the form of hash
197
210
  def initialize(attributes = {})
@@ -208,134 +221,124 @@ module DocSpring
208
221
  h[k.to_sym] = v
209
222
  }
210
223
 
211
- if attributes.key?(:'batch_id')
212
- self.batch_id = attributes[:'batch_id']
224
+ if attributes.key?(:'id')
225
+ self.id = attributes[:'id']
213
226
  else
214
- self.batch_id = nil
227
+ self.id = nil
215
228
  end
216
229
 
217
- if attributes.key?(:'data_requests')
218
- if (value = attributes[:'data_requests']).is_a?(Array)
219
- self.data_requests = value
220
- end
230
+ if attributes.key?(:'template_id')
231
+ self.template_id = attributes[:'template_id']
221
232
  else
222
- self.data_requests = nil
233
+ self.template_id = nil
223
234
  end
224
235
 
225
- if attributes.key?(:'editable')
226
- self.editable = attributes[:'editable']
236
+ if attributes.key?(:'template_type')
237
+ self.template_type = attributes[:'template_type']
227
238
  else
228
- self.editable = nil
239
+ self.template_type = nil
229
240
  end
230
241
 
231
- if attributes.key?(:'error_message')
232
- self.error_message = attributes[:'error_message']
242
+ if attributes.key?(:'template_version')
243
+ self.template_version = attributes[:'template_version']
233
244
  else
234
- self.error_message = nil
245
+ self.template_version = nil
235
246
  end
236
247
 
237
- if attributes.key?(:'expired')
238
- self.expired = attributes[:'expired']
248
+ if attributes.key?(:'batch_id')
249
+ self.batch_id = attributes[:'batch_id']
239
250
  else
240
- self.expired = nil
251
+ self.batch_id = nil
241
252
  end
242
253
 
243
- if attributes.key?(:'expires_at')
244
- self.expires_at = attributes[:'expires_at']
254
+ if attributes.key?(:'source')
255
+ self.source = attributes[:'source']
245
256
  else
246
- self.expires_at = nil
257
+ self.source = nil
247
258
  end
248
259
 
249
- if attributes.key?(:'id')
250
- self.id = attributes[:'id']
260
+ if attributes.key?(:'state')
261
+ self.state = attributes[:'state']
251
262
  else
252
- self.id = nil
263
+ self.state = nil
253
264
  end
254
265
 
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
266
+ if attributes.key?(:'test')
267
+ self.test = attributes[:'test']
259
268
  else
260
- self.json_schema_errors = nil
269
+ self.test = nil
261
270
  end
262
271
 
263
- if attributes.key?(:'metadata')
264
- self.metadata = attributes[:'metadata']
272
+ if attributes.key?(:'editable')
273
+ self.editable = attributes[:'editable']
265
274
  else
266
- self.metadata = nil
275
+ self.editable = nil
267
276
  end
268
277
 
269
- if attributes.key?(:'password')
270
- self.password = attributes[:'password']
278
+ if attributes.key?(:'data')
279
+ if (value = attributes[:'data']).is_a?(Hash) || value.nil?
280
+ self.data = value
281
+ end
271
282
  else
272
- self.password = nil
283
+ self.data = nil
273
284
  end
274
285
 
275
- if attributes.key?(:'processed_at')
276
- self.processed_at = attributes[:'processed_at']
286
+ if attributes.key?(:'data_errors')
287
+ if (value = attributes[:'data_errors']).is_a?(Array)
288
+ self.data_errors = value
289
+ end
277
290
  else
278
- self.processed_at = nil
291
+ self.data_errors = nil
279
292
  end
280
293
 
281
- if attributes.key?(:'state')
282
- self.state = attributes[:'state']
294
+ if attributes.key?(:'error_message')
295
+ self.error_message = attributes[:'error_message']
283
296
  else
284
- self.state = nil
297
+ self.error_message = nil
285
298
  end
286
299
 
287
- if attributes.key?(:'template_id')
288
- self.template_id = attributes[:'template_id']
300
+ if attributes.key?(:'metadata')
301
+ if (value = attributes[:'metadata']).is_a?(Hash)
302
+ self.metadata = value
303
+ end
289
304
  else
290
- self.template_id = nil
305
+ self.metadata = nil
291
306
  end
292
307
 
293
- if attributes.key?(:'template_type')
294
- self.template_type = attributes[:'template_type']
308
+ if attributes.key?(:'has_password')
309
+ self.has_password = attributes[:'has_password']
295
310
  else
296
- self.template_type = nil
311
+ self.has_password = nil
297
312
  end
298
313
 
299
- if attributes.key?(:'template_version')
300
- self.template_version = attributes[:'template_version']
314
+ if attributes.key?(:'signature_requests')
315
+ if (value = attributes[:'signature_requests']).is_a?(Array)
316
+ self.signature_requests = value
317
+ end
301
318
  else
302
- self.template_version = nil
319
+ self.signature_requests = nil
303
320
  end
304
321
 
305
- if attributes.key?(:'test')
306
- self.test = attributes[:'test']
322
+ if attributes.key?(:'actions')
323
+ if (value = attributes[:'actions']).is_a?(Array)
324
+ self.actions = value
325
+ end
307
326
  else
308
- self.test = nil
327
+ self.actions = nil
309
328
  end
310
329
 
311
330
  if attributes.key?(:'truncated_text')
312
- self.truncated_text = attributes[:'truncated_text']
331
+ if (value = attributes[:'truncated_text']).is_a?(Hash) || value.nil?
332
+ self.truncated_text = value
333
+ end
313
334
  else
314
335
  self.truncated_text = nil
315
336
  end
316
337
 
317
- if attributes.key?(:'pdf_hash')
318
- self.pdf_hash = attributes[:'pdf_hash']
338
+ if attributes.key?(:'files')
339
+ self.files = attributes[:'files']
319
340
  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']
331
- else
332
- self.permanent_download_url = nil
333
- end
334
-
335
- if attributes.key?(:'preview_download_url')
336
- self.preview_download_url = attributes[:'preview_download_url']
337
- else
338
- self.preview_download_url = nil
341
+ self.files = nil
339
342
  end
340
343
 
341
344
  if attributes.key?(:'preview_generated_at')
@@ -344,30 +347,34 @@ module DocSpring
344
347
  self.preview_generated_at = nil
345
348
  end
346
349
 
347
- if attributes.key?(:'audit_trail_download_url')
348
- self.audit_trail_download_url = attributes[:'audit_trail_download_url']
350
+ if attributes.key?(:'expired')
351
+ self.expired = attributes[:'expired']
349
352
  else
350
- self.audit_trail_download_url = nil
353
+ self.expired = nil
351
354
  end
352
355
 
353
- if attributes.key?(:'actions')
354
- if (value = attributes[:'actions']).is_a?(Array)
355
- self.actions = value
356
- end
356
+ if attributes.key?(:'expires_at')
357
+ self.expires_at = attributes[:'expires_at']
357
358
  else
358
- self.actions = nil
359
+ self.expires_at = nil
359
360
  end
360
361
 
361
- if attributes.key?(:'source')
362
- self.source = attributes[:'source']
362
+ if attributes.key?(:'processed_at')
363
+ self.processed_at = attributes[:'processed_at']
364
+ else
365
+ self.processed_at = nil
363
366
  end
364
367
 
365
- if attributes.key?(:'referrer')
366
- self.referrer = attributes[:'referrer']
368
+ if attributes.key?(:'created_at')
369
+ self.created_at = attributes[:'created_at']
370
+ else
371
+ self.created_at = nil
367
372
  end
368
373
 
369
- if attributes.key?(:'data')
370
- self.data = attributes[:'data']
374
+ if attributes.key?(:'updated_at')
375
+ self.updated_at = attributes[:'updated_at']
376
+ else
377
+ self.updated_at = nil
371
378
  end
372
379
  end
373
380
 
@@ -376,34 +383,66 @@ module DocSpring
376
383
  def list_invalid_properties
377
384
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
378
385
  invalid_properties = Array.new
379
- if @data_requests.nil?
380
- invalid_properties.push('invalid value for "data_requests", data_requests cannot be nil.')
386
+ if @id.nil?
387
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
381
388
  end
382
389
 
383
- if @expired.nil?
384
- invalid_properties.push('invalid value for "expired", expired cannot be nil.')
390
+ if @template_type.nil?
391
+ invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
385
392
  end
386
393
 
387
- if @metadata.nil?
388
- invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
394
+ if @source.nil?
395
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
389
396
  end
390
397
 
391
398
  if @state.nil?
392
399
  invalid_properties.push('invalid value for "state", state cannot be nil.')
393
400
  end
394
401
 
395
- if @template_type.nil?
396
- invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
397
- end
398
-
399
402
  if @test.nil?
400
403
  invalid_properties.push('invalid value for "test", test cannot be nil.')
401
404
  end
402
405
 
406
+ if @editable.nil?
407
+ invalid_properties.push('invalid value for "editable", editable cannot be nil.')
408
+ end
409
+
410
+ if @data_errors.nil?
411
+ invalid_properties.push('invalid value for "data_errors", data_errors cannot be nil.')
412
+ end
413
+
414
+ if @metadata.nil?
415
+ invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
416
+ end
417
+
418
+ if @has_password.nil?
419
+ invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
420
+ end
421
+
422
+ if @signature_requests.nil?
423
+ invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
424
+ end
425
+
403
426
  if @actions.nil?
404
427
  invalid_properties.push('invalid value for "actions", actions cannot be nil.')
405
428
  end
406
429
 
430
+ if @files.nil?
431
+ invalid_properties.push('invalid value for "files", files cannot be nil.')
432
+ end
433
+
434
+ if @expired.nil?
435
+ invalid_properties.push('invalid value for "expired", expired cannot be nil.')
436
+ end
437
+
438
+ if @created_at.nil?
439
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
440
+ end
441
+
442
+ if @updated_at.nil?
443
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
444
+ end
445
+
407
446
  invalid_properties
408
447
  end
409
448
 
@@ -411,72 +450,62 @@ module DocSpring
411
450
  # @return true if the model is valid
412
451
  def valid?
413
452
  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)
453
+ return false if @id.nil?
420
454
  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)
455
+ return false if @source.nil?
456
+ return false if @state.nil?
423
457
  return false if @test.nil?
458
+ return false if @editable.nil?
459
+ return false if @data_errors.nil?
460
+ return false if @metadata.nil?
461
+ return false if @has_password.nil?
462
+ return false if @signature_requests.nil?
424
463
  return false if @actions.nil?
425
- source_validator = EnumAttributeValidator.new('String', ["api", "web", "reprocess", "webhook"])
426
- return false unless source_validator.valid?(@source)
464
+ return false if @files.nil?
465
+ return false if @expired.nil?
466
+ return false if @created_at.nil?
467
+ return false if @updated_at.nil?
427
468
  true
428
469
  end
429
470
 
430
471
  # 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'
472
+ # @param [Object] id Value to be assigned
473
+ def id=(id)
474
+ if id.nil?
475
+ fail ArgumentError, 'id cannot be nil'
435
476
  end
436
477
 
437
- @data_requests = data_requests
478
+ @id = id
438
479
  end
439
480
 
440
481
  # 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'
482
+ # @param [Object] template_type Value to be assigned
483
+ def template_type=(template_type)
484
+ if template_type.nil?
485
+ fail ArgumentError, 'template_type cannot be nil'
445
486
  end
446
487
 
447
- @expired = expired
488
+ @template_type = template_type
448
489
  end
449
490
 
450
491
  # 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'
492
+ # @param [Object] source Value to be assigned
493
+ def source=(source)
494
+ if source.nil?
495
+ fail ArgumentError, 'source cannot be nil'
455
496
  end
456
497
 
457
- @metadata = metadata
498
+ @source = source
458
499
  end
459
500
 
460
- # Custom attribute writer method checking allowed values (enum).
461
- # @param [Object] state Object to be assigned
501
+ # Custom attribute writer method with validation
502
+ # @param [Object] state Value to be assigned
462
503
  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}."
504
+ if state.nil?
505
+ fail ArgumentError, 'state cannot be nil'
467
506
  end
468
- @state = state
469
- end
470
507
 
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
508
+ @state = state
480
509
  end
481
510
 
482
511
  # Custom attribute writer method with validation
@@ -489,6 +518,56 @@ module DocSpring
489
518
  @test = test
490
519
  end
491
520
 
521
+ # Custom attribute writer method with validation
522
+ # @param [Object] editable Value to be assigned
523
+ def editable=(editable)
524
+ if editable.nil?
525
+ fail ArgumentError, 'editable cannot be nil'
526
+ end
527
+
528
+ @editable = editable
529
+ end
530
+
531
+ # Custom attribute writer method with validation
532
+ # @param [Object] data_errors Value to be assigned
533
+ def data_errors=(data_errors)
534
+ if data_errors.nil?
535
+ fail ArgumentError, 'data_errors cannot be nil'
536
+ end
537
+
538
+ @data_errors = data_errors
539
+ end
540
+
541
+ # Custom attribute writer method with validation
542
+ # @param [Object] metadata Value to be assigned
543
+ def metadata=(metadata)
544
+ if metadata.nil?
545
+ fail ArgumentError, 'metadata cannot be nil'
546
+ end
547
+
548
+ @metadata = metadata
549
+ end
550
+
551
+ # Custom attribute writer method with validation
552
+ # @param [Object] has_password Value to be assigned
553
+ def has_password=(has_password)
554
+ if has_password.nil?
555
+ fail ArgumentError, 'has_password cannot be nil'
556
+ end
557
+
558
+ @has_password = has_password
559
+ end
560
+
561
+ # Custom attribute writer method with validation
562
+ # @param [Object] signature_requests Value to be assigned
563
+ def signature_requests=(signature_requests)
564
+ if signature_requests.nil?
565
+ fail ArgumentError, 'signature_requests cannot be nil'
566
+ end
567
+
568
+ @signature_requests = signature_requests
569
+ end
570
+
492
571
  # Custom attribute writer method with validation
493
572
  # @param [Object] actions Value to be assigned
494
573
  def actions=(actions)
@@ -499,15 +578,44 @@ module DocSpring
499
578
  @actions = actions
500
579
  end
501
580
 
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}."
581
+ # Custom attribute writer method with validation
582
+ # @param [Object] files Value to be assigned
583
+ def files=(files)
584
+ if files.nil?
585
+ fail ArgumentError, 'files cannot be nil'
509
586
  end
510
- @source = source
587
+
588
+ @files = files
589
+ end
590
+
591
+ # Custom attribute writer method with validation
592
+ # @param [Object] expired Value to be assigned
593
+ def expired=(expired)
594
+ if expired.nil?
595
+ fail ArgumentError, 'expired cannot be nil'
596
+ end
597
+
598
+ @expired = expired
599
+ end
600
+
601
+ # Custom attribute writer method with validation
602
+ # @param [Object] created_at Value to be assigned
603
+ def created_at=(created_at)
604
+ if created_at.nil?
605
+ fail ArgumentError, 'created_at cannot be nil'
606
+ end
607
+
608
+ @created_at = created_at
609
+ end
610
+
611
+ # Custom attribute writer method with validation
612
+ # @param [Object] updated_at Value to be assigned
613
+ def updated_at=(updated_at)
614
+ if updated_at.nil?
615
+ fail ArgumentError, 'updated_at cannot be nil'
616
+ end
617
+
618
+ @updated_at = updated_at
511
619
  end
512
620
 
513
621
  # Checks equality by comparing each attribute.
@@ -515,33 +623,30 @@ module DocSpring
515
623
  def ==(o)
516
624
  return true if self.equal?(o)
517
625
  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
626
  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
627
  template_id == o.template_id &&
531
628
  template_type == o.template_type &&
532
629
  template_version == o.template_version &&
630
+ batch_id == o.batch_id &&
631
+ source == o.source &&
632
+ state == o.state &&
533
633
  test == o.test &&
634
+ editable == o.editable &&
635
+ data == o.data &&
636
+ data_errors == o.data_errors &&
637
+ error_message == o.error_message &&
638
+ metadata == o.metadata &&
639
+ has_password == o.has_password &&
640
+ signature_requests == o.signature_requests &&
641
+ actions == o.actions &&
534
642
  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 &&
643
+ files == o.files &&
539
644
  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
645
+ expired == o.expired &&
646
+ expires_at == o.expires_at &&
647
+ processed_at == o.processed_at &&
648
+ created_at == o.created_at &&
649
+ updated_at == o.updated_at
545
650
  end
546
651
 
547
652
  # @see the `==` method
@@ -553,7 +658,7 @@ module DocSpring
553
658
  # Calculates hash code according to all attributes.
554
659
  # @return [Integer] Hash code
555
660
  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
661
+ [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, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at].hash
557
662
  end
558
663
 
559
664
  # Builds the object from hash
@@ -562,18 +667,20 @@ module DocSpring
562
667
  def self.build_from_hash(attributes)
563
668
  return nil unless attributes.is_a?(Hash)
564
669
  attributes = attributes.transform_keys(&:to_sym)
670
+ # include attributes inherited from allOf parents (the nearest declaration wins)
671
+ map = acceptable_attribute_map
565
672
  transformed_hash = {}
566
- openapi_types.each_pair do |key, type|
567
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
673
+ acceptable_openapi_types.each_pair do |key, type|
674
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
568
675
  transformed_hash["#{key}"] = nil
569
676
  elsif type =~ /\AArray<(.*)>/i
570
677
  # check to ensure the input is an array given that the attribute
571
678
  # 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) }
679
+ if attributes[map[key]].is_a?(Array)
680
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
574
681
  end
575
- elsif !attributes[attribute_map[key]].nil?
576
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
682
+ elsif !attributes[map[key]].nil?
683
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
577
684
  end
578
685
  end
579
686
  # Responses can include enum values added after this client was released, so the enum setters
@@ -585,69 +692,15 @@ module DocSpring
585
692
  end
586
693
  end
587
694
 
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
695
  # Returns the object in the form of hash
644
696
  # @return [Hash] Returns the object in the form of hash
645
697
  def to_hash
646
698
  hash = {}
647
- self.class.attribute_map.each_pair do |attr, param|
699
+ # include attributes inherited from allOf parents (the nearest declaration wins)
700
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
648
701
  value = self.send(attr)
649
702
  if value.nil?
650
- is_nullable = self.class.openapi_nullable.include?(attr)
703
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
651
704
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
652
705
  end
653
706
 
@@ -656,24 +709,6 @@ module DocSpring
656
709
  hash
657
710
  end
658
711
 
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
712
  end
678
713
 
679
714
  end