docspring 3.4.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 (494) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +361 -147
  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 +134 -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 +2 -2
  140. data/lib/docspring/api/client.rb +994 -941
  141. data/lib/docspring/api_client.rb +13 -5
  142. data/lib/docspring/api_error.rb +2 -2
  143. data/lib/docspring/api_model_base.rb +88 -0
  144. data/lib/docspring/configuration.rb +11 -6
  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} +227 -205
  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_pdf_template.rb → combined_pdf_source.rb} +106 -102
  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} +31 -86
  159. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +59 -122
  160. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +28 -95
  161. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +59 -101
  162. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +49 -121
  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} +52 -106
  165. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +96 -147
  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 +131 -94
  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 +27 -137
  175. data/lib/docspring/models/expiration_interval.rb +42 -0
  176. data/lib/docspring/models/{create_pdf_template.rb → field_comparison_condition.rb} +106 -102
  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/{create_webhook_data.rb → field_equals_condition.rb} +106 -102
  180. data/lib/docspring/models/field_equals_operator.rb +41 -0
  181. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +100 -102
  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 +133 -92
  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} +30 -86
  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} +63 -98
  204. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +28 -86
  205. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +28 -86
  206. data/lib/docspring/models/shape_type.rb +45 -0
  207. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +239 -170
  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} +136 -121
  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} +155 -172
  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 +373 -338
  219. data/lib/docspring/models/submission_action.rb +63 -135
  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 +156 -111
  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 +484 -765
  231. data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +118 -104
  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} +121 -113
  238. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  239. data/lib/docspring/models/template_field_dependency_condition.rb +256 -0
  240. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  241. data/lib/docspring/models/{success_multiple_errors_response.rb → template_field_dependency_input.rb} +120 -114
  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} +36 -95
  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/{update_webhook_data.rb → template_source_pdf.rb} +91 -102
  253. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +435 -588
  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} +71 -195
  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} +92 -139
  268. data/lib/docspring/models/url_source_pdf.rb +212 -0
  269. data/lib/docspring/models/webhook.rb +96 -106
  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 +3 -3
  276. data/lib/docspring.rb +124 -51
  277. data/spec/api/client_spec.rb +303 -276
  278. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  279. data/spec/models/{create_folder_data_spec.rb → authentication_check_spec.rb} +9 -9
  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/{add_fields_data_spec.rb → combined_pdf_files_spec.rb} +9 -9
  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/combined_pdf_source_spec.rb +60 -0
  288. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  289. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +19 -23
  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} +8 -8
  292. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +11 -17
  293. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +8 -8
  294. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +10 -10
  295. data/spec/models/{submission422_response_spec.rb → create_signature_request_event_request_spec.rb} +12 -16
  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} +12 -12
  298. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +23 -17
  299. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +39 -117
  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 +28 -4
  304. data/spec/models/error_code_spec.rb +30 -0
  305. data/spec/models/error_detail_spec.rb +60 -0
  306. data/spec/models/error_info_spec.rb +78 -0
  307. data/spec/models/error_response_spec.rb +3 -13
  308. data/spec/models/expiration_interval_spec.rb +30 -0
  309. data/spec/models/{list_submissions_response_spec.rb → field_comparison_condition_spec.rb} +11 -11
  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 +15 -3
  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_data_spec.rb → move_folder_request_spec.rb} +8 -8
  333. data/spec/models/{create_html_template_spec.rb → move_template_request_spec.rb} +9 -9
  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} +10 -10
  337. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +8 -8
  338. data/spec/models/{restore_version_data_spec.rb → restore_template_version_request_spec.rb} +8 -8
  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} +15 -17
  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} +27 -29
  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} +30 -30
  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 +3 -21
  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 +26 -12
  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 +25 -55
  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} +28 -52
  366. data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +28 -60
  367. data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +20 -20
  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/{batch_generate_pdfs201_response_spec.rb → template_field_dependency_input_spec.rb} +13 -17
  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} +8 -12
  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/{submission_data_request_token_spec.rb → template_source_pdf_spec.rb} +12 -12
  385. data/spec/models/template_spec.rb +39 -153
  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} +17 -21
  396. data/spec/models/{create_submission_response_spec.rb → update_template_document_request_spec.rb} +11 -15
  397. data/spec/models/update_template_request_spec.rb +222 -0
  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} +12 -16
  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 +3 -7
  406. data/spec/spec_helper.rb +2 -2
  407. metadata +485 -198
  408. data/docs/AddFieldsData.md +0 -18
  409. data/docs/BatchGeneratePdfs201Response.md +0 -26
  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 -22
  415. data/docs/CreateCustomFileData.md +0 -18
  416. data/docs/CreateCustomFileResponse.md +0 -22
  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 -22
  423. data/docs/CreateSubmissionDataRequestResponse.md +0 -22
  424. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -22
  425. data/docs/CreateSubmissionResponse.md +0 -22
  426. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  427. data/docs/JsonSchema.md +0 -40
  428. data/docs/ListSubmissionsResponse.md +0 -22
  429. data/docs/MoveFolderData.md +0 -18
  430. data/docs/MoveTemplateData.md +0 -20
  431. data/docs/MultipleErrorsResponse.md +0 -20
  432. data/docs/PublishVersionData.md +0 -20
  433. data/docs/RestoreVersionData.md +0 -18
  434. data/docs/Submission422Response.md +0 -24
  435. data/docs/SubmissionBatchData.md +0 -26
  436. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  437. data/docs/SubmissionDataRequest.md +0 -60
  438. data/docs/SubmissionDataRequestEvent.md +0 -30
  439. data/docs/SubmissionDataRequestShow.md +0 -62
  440. data/docs/SubmissionDataRequestToken.md +0 -24
  441. data/docs/SubmissionPreview.md +0 -64
  442. data/docs/SuccessErrorResponse.md +0 -20
  443. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  444. data/docs/TemplateAddFieldsResponse.md +0 -22
  445. data/docs/TemplateDeleteResponse.md +0 -24
  446. data/docs/TemplateModelCodeResponse.md +0 -22
  447. data/docs/TemplatePreview.md +0 -116
  448. data/docs/TemplatePublishVersionResponse.md +0 -22
  449. data/docs/UpdateHtmlTemplate.md +0 -18
  450. data/docs/UpdatePdfTemplate.md +0 -18
  451. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  452. data/docs/UploadPresignResponse.md +0 -24
  453. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -342
  454. data/lib/docspring/models/combined_submission_action.rb +0 -384
  455. data/lib/docspring/models/create_combined_submission_response.rb +0 -305
  456. data/lib/docspring/models/create_custom_file_response.rb +0 -305
  457. data/lib/docspring/models/create_html_template.rb +0 -243
  458. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -305
  459. data/lib/docspring/models/create_submission_data_request_response.rb +0 -305
  460. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -305
  461. data/lib/docspring/models/create_submission_response.rb +0 -305
  462. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  463. data/lib/docspring/models/json_schema.rb +0 -329
  464. data/lib/docspring/models/list_submissions_response.rb +0 -283
  465. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  466. data/lib/docspring/models/submission422_response.rb +0 -299
  467. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  468. data/lib/docspring/models/submission_data_request.rb +0 -570
  469. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  470. data/lib/docspring/models/submission_preview.rb +0 -637
  471. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  472. data/lib/docspring/models/template_delete_response.rb +0 -300
  473. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  474. data/lib/docspring/models/update_html_template.rb +0 -243
  475. data/spec/models/combined_submission_action_spec.rb +0 -84
  476. data/spec/models/create_combined_submission_response_spec.rb +0 -52
  477. data/spec/models/create_custom_file_response_spec.rb +0 -52
  478. data/spec/models/create_pdf_template_spec.rb +0 -36
  479. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  480. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -52
  481. data/spec/models/create_submission_data_request_response_spec.rb +0 -52
  482. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -52
  483. data/spec/models/create_webhook_data_spec.rb +0 -36
  484. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  485. data/spec/models/multiple_errors_response_spec.rb +0 -46
  486. data/spec/models/success_error_response_spec.rb +0 -46
  487. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  488. data/spec/models/template_add_fields_response_spec.rb +0 -52
  489. data/spec/models/template_delete_response_spec.rb +0 -58
  490. data/spec/models/template_publish_version_response_spec.rb +0 -52
  491. data/spec/models/update_html_template_spec.rb +0 -36
  492. data/spec/models/update_pdf_template_spec.rb +0 -36
  493. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  494. data/spec/models/update_webhook_data_spec.rb +0 -36
@@ -3,10 +3,10 @@
3
3
 
4
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,37 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DocSpring
17
- class ErrorResponse
18
- attr_accessor :status
19
-
17
+ # The body of every error response.
18
+ class ErrorResponse < ApiModelBase
20
19
  attr_accessor :error
21
20
 
22
- class EnumAttributeValidator
23
- attr_reader :datatype
24
- attr_reader :allowable_values
25
-
26
- def initialize(datatype, allowable_values)
27
- @allowable_values = allowable_values.map do |value|
28
- case datatype.to_s
29
- when /Integer/i
30
- value.to_i
31
- when /Float/i
32
- value.to_f
33
- else
34
- value
35
- end
36
- end
37
- end
38
-
39
- def valid?(value)
40
- !value || allowable_values.include?(value)
41
- end
42
- end
43
-
44
21
  # Attribute mapping from ruby-style variable name to JSON key.
45
22
  def self.attribute_map
46
23
  {
47
- :'status' => :'status',
48
24
  :'error' => :'error'
49
25
  }
50
26
  end
@@ -62,8 +38,7 @@ module DocSpring
62
38
  # Attribute type mapping.
63
39
  def self.openapi_types
64
40
  {
65
- :'status' => :'String',
66
- :'error' => :'String'
41
+ :'error' => :'ErrorInfo'
67
42
  }
68
43
  end
69
44
 
@@ -73,6 +48,16 @@ module DocSpring
73
48
  ])
74
49
  end
75
50
 
51
+ # Returns attribute type mapping
52
+ def self.acceptable_openapi_types
53
+ openapi_types
54
+ end
55
+
56
+ # Returns the nullable attributes
57
+ def self.acceptable_openapi_nullable
58
+ openapi_nullable
59
+ end
60
+
76
61
  # Initializes the object
77
62
  # @param [Hash] attributes Model attributes in the form of hash
78
63
  def initialize(attributes = {})
@@ -89,12 +74,6 @@ module DocSpring
89
74
  h[k.to_sym] = v
90
75
  }
91
76
 
92
- if attributes.key?(:'status')
93
- self.status = attributes[:'status']
94
- else
95
- self.status = nil
96
- end
97
-
98
77
  if attributes.key?(:'error')
99
78
  self.error = attributes[:'error']
100
79
  else
@@ -107,10 +86,6 @@ module DocSpring
107
86
  def list_invalid_properties
108
87
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
88
  invalid_properties = Array.new
110
- if @status.nil?
111
- invalid_properties.push('invalid value for "status", status cannot be nil.')
112
- end
113
-
114
89
  if @error.nil?
115
90
  invalid_properties.push('invalid value for "error", error cannot be nil.')
116
91
  end
@@ -122,24 +97,10 @@ module DocSpring
122
97
  # @return true if the model is valid
123
98
  def valid?
124
99
  warn '[DEPRECATED] the `valid?` method is obsolete'
125
- return false if @status.nil?
126
- status_validator = EnumAttributeValidator.new('String', ["error"])
127
- return false unless status_validator.valid?(@status)
128
100
  return false if @error.nil?
129
101
  true
130
102
  end
131
103
 
132
- # Custom attribute writer method checking allowed values (enum).
133
- # @param [Object] status Object to be assigned
134
- def status=(status)
135
- validator = EnumAttributeValidator.new('String', ["error"])
136
- # build_from_hash accepts enum values this client doesn't know about yet
137
- unless defined?(@_skip_enum_validation) || validator.valid?(status)
138
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
139
- end
140
- @status = status
141
- end
142
-
143
104
  # Custom attribute writer method with validation
144
105
  # @param [Object] error Value to be assigned
145
106
  def error=(error)
@@ -155,7 +116,6 @@ module DocSpring
155
116
  def ==(o)
156
117
  return true if self.equal?(o)
157
118
  self.class == o.class &&
158
- status == o.status &&
159
119
  error == o.error
160
120
  end
161
121
 
@@ -168,7 +128,7 @@ module DocSpring
168
128
  # Calculates hash code according to all attributes.
169
129
  # @return [Integer] Hash code
170
130
  def hash
171
- [status, error].hash
131
+ [error].hash
172
132
  end
173
133
 
174
134
  # Builds the object from hash
@@ -177,18 +137,20 @@ module DocSpring
177
137
  def self.build_from_hash(attributes)
178
138
  return nil unless attributes.is_a?(Hash)
179
139
  attributes = attributes.transform_keys(&:to_sym)
140
+ # include attributes inherited from allOf parents (the nearest declaration wins)
141
+ map = acceptable_attribute_map
180
142
  transformed_hash = {}
181
- openapi_types.each_pair do |key, type|
182
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ acceptable_openapi_types.each_pair do |key, type|
144
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
183
145
  transformed_hash["#{key}"] = nil
184
146
  elsif type =~ /\AArray<(.*)>/i
185
147
  # check to ensure the input is an array given that the attribute
186
148
  # is documented as an array but the input is not
187
- if attributes[attribute_map[key]].is_a?(Array)
188
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ if attributes[map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
189
151
  end
190
- elsif !attributes[attribute_map[key]].nil?
191
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ elsif !attributes[map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
192
154
  end
193
155
  end
194
156
  # Responses can include enum values added after this client was released, so the enum setters
@@ -200,69 +162,15 @@ module DocSpring
200
162
  end
201
163
  end
202
164
 
203
- # Deserializes the data based on type
204
- # @param string type Data type
205
- # @param string value Value to be deserialized
206
- # @return [Object] Deserialized data
207
- def self._deserialize(type, value)
208
- case type.to_sym
209
- when :Time
210
- Time.parse(value)
211
- when :Date
212
- Date.parse(value)
213
- when :String
214
- value.to_s
215
- when :Integer
216
- value.to_i
217
- when :Float
218
- value.to_f
219
- when :Boolean
220
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
- true
222
- else
223
- false
224
- end
225
- when :Object
226
- # generic object (usually a Hash), return directly
227
- value
228
- when /\AArray<(?<inner_type>.+)>\z/
229
- inner_type = Regexp.last_match[:inner_type]
230
- value.map { |v| _deserialize(inner_type, v) }
231
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
- k_type = Regexp.last_match[:k_type]
233
- v_type = Regexp.last_match[:v_type]
234
- {}.tap do |hash|
235
- value.each do |k, v|
236
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
- end
238
- end
239
- else # model
240
- # models (e.g. Pet) or oneOf
241
- klass = DocSpring.const_get(type)
242
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
- end
244
- end
245
-
246
- # Returns the string representation of the object
247
- # @return [String] String presentation of the object
248
- def to_s
249
- to_hash.to_s
250
- end
251
-
252
- # to_body is an alias to to_hash (backward compatibility)
253
- # @return [Hash] Returns the object in the form of hash
254
- def to_body
255
- to_hash
256
- end
257
-
258
165
  # Returns the object in the form of hash
259
166
  # @return [Hash] Returns the object in the form of hash
260
167
  def to_hash
261
168
  hash = {}
262
- self.class.attribute_map.each_pair do |attr, param|
169
+ # include attributes inherited from allOf parents (the nearest declaration wins)
170
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
263
171
  value = self.send(attr)
264
172
  if value.nil?
265
- is_nullable = self.class.openapi_nullable.include?(attr)
173
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
266
174
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
175
  end
268
176
 
@@ -271,24 +179,6 @@ module DocSpring
271
179
  hash
272
180
  end
273
181
 
274
- # Outputs non-array value in the form of hash
275
- # For object, use to_hash. Otherwise, just return the value
276
- # @param [Object] value Any valid value
277
- # @return [Hash] Returns the value in the form of hash
278
- def _to_hash(value)
279
- if value.is_a?(Array)
280
- value.compact.map { |v| _to_hash(v) }
281
- elsif value.is_a?(Hash)
282
- {}.tap do |hash|
283
- value.each { |k, v| hash[k] = _to_hash(v) }
284
- end
285
- elsif value.respond_to? :to_hash
286
- value.to_hash
287
- else
288
- value
289
- end
290
- end
291
-
292
182
  end
293
183
 
294
184
  end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class ExpirationInterval
18
+ MINUTES = "minutes".freeze
19
+ HOURS = "hours".freeze
20
+ DAYS = "days".freeze
21
+
22
+ def self.all_vars
23
+ @all_vars ||= [MINUTES, HOURS, DAYS].freeze
24
+ end
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def self.build_from_hash(value)
30
+ new.build_from_hash(value)
31
+ end
32
+
33
+ # Builds the enum from string
34
+ # @param [String] The enum value in the form of the string
35
+ # @return [String] The enum value
36
+ def build_from_hash(value)
37
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
38
+ # is: the constants are the values this client knows
39
+ value
40
+ end
41
+ end
42
+ end
@@ -3,10 +3,10 @@
3
3
 
4
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,13 +14,45 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DocSpring
17
- class CreatePdfTemplate
18
- attr_accessor :template
17
+ # A condition comparing a number field's value with a number.
18
+ class FieldComparisonCondition < ApiModelBase
19
+ # The name of the field whose value is compared.
20
+ attr_accessor :field
21
+
22
+ # How the field's value is compared with `value`. `in`: one of a list. `range`: from `value` to `range_max`.
23
+ attr_accessor :operator
24
+
25
+ # The number the field's value is compared with, or a number as a string (as the template editor saves it). The field must be a number field.
26
+ attr_accessor :value
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
19
49
 
20
50
  # Attribute mapping from ruby-style variable name to JSON key.
21
51
  def self.attribute_map
22
52
  {
23
- :'template' => :'template'
53
+ :'field' => :'field',
54
+ :'operator' => :'operator',
55
+ :'value' => :'value'
24
56
  }
25
57
  end
26
58
 
@@ -37,36 +69,61 @@ module DocSpring
37
69
  # Attribute type mapping.
38
70
  def self.openapi_types
39
71
  {
40
- :'template' => :'Object'
72
+ :'field' => :'String',
73
+ :'operator' => :'FieldComparisonOperator',
74
+ :'value' => :'Object'
41
75
  }
42
76
  end
43
77
 
44
78
  # List of attributes with nullable: true
45
79
  def self.openapi_nullable
46
80
  Set.new([
81
+ :'value'
47
82
  ])
48
83
  end
49
84
 
85
+ # Returns attribute type mapping
86
+ def self.acceptable_openapi_types
87
+ openapi_types
88
+ end
89
+
90
+ # Returns the nullable attributes
91
+ def self.acceptable_openapi_nullable
92
+ openapi_nullable
93
+ end
94
+
50
95
  # Initializes the object
51
96
  # @param [Hash] attributes Model attributes in the form of hash
52
97
  def initialize(attributes = {})
53
98
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::CreatePdfTemplate` initialize method"
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::FieldComparisonCondition` initialize method"
55
100
  end
56
101
 
57
102
  # check to see if the attribute exists and convert string to symbol for hash key
58
103
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
104
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
105
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::CreatePdfTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::FieldComparisonCondition`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
107
  end
63
108
  h[k.to_sym] = v
64
109
  }
65
110
 
66
- if attributes.key?(:'template')
67
- self.template = attributes[:'template']
111
+ if attributes.key?(:'field')
112
+ self.field = attributes[:'field']
68
113
  else
69
- self.template = nil
114
+ self.field = nil
115
+ end
116
+
117
+ if attributes.key?(:'operator')
118
+ self.operator = attributes[:'operator']
119
+ else
120
+ self.operator = nil
121
+ end
122
+
123
+ if attributes.key?(:'value')
124
+ self.value = attributes[:'value']
125
+ else
126
+ self.value = nil
70
127
  end
71
128
  end
72
129
 
@@ -75,8 +132,12 @@ module DocSpring
75
132
  def list_invalid_properties
76
133
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
134
  invalid_properties = Array.new
78
- if @template.nil?
79
- invalid_properties.push('invalid value for "template", template cannot be nil.')
135
+ if @field.nil?
136
+ invalid_properties.push('invalid value for "field", field cannot be nil.')
137
+ end
138
+
139
+ if @operator.nil?
140
+ invalid_properties.push('invalid value for "operator", operator cannot be nil.')
80
141
  end
81
142
 
82
143
  invalid_properties
@@ -86,18 +147,29 @@ module DocSpring
86
147
  # @return true if the model is valid
87
148
  def valid?
88
149
  warn '[DEPRECATED] the `valid?` method is obsolete'
89
- return false if @template.nil?
150
+ return false if @field.nil?
151
+ return false if @operator.nil?
90
152
  true
91
153
  end
92
154
 
93
155
  # Custom attribute writer method with validation
94
- # @param [Object] template Value to be assigned
95
- def template=(template)
96
- if template.nil?
97
- fail ArgumentError, 'template cannot be nil'
156
+ # @param [Object] field Value to be assigned
157
+ def field=(field)
158
+ if field.nil?
159
+ fail ArgumentError, 'field cannot be nil'
98
160
  end
99
161
 
100
- @template = template
162
+ @field = field
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] operator Value to be assigned
167
+ def operator=(operator)
168
+ if operator.nil?
169
+ fail ArgumentError, 'operator cannot be nil'
170
+ end
171
+
172
+ @operator = operator
101
173
  end
102
174
 
103
175
  # Checks equality by comparing each attribute.
@@ -105,7 +177,9 @@ module DocSpring
105
177
  def ==(o)
106
178
  return true if self.equal?(o)
107
179
  self.class == o.class &&
108
- template == o.template
180
+ field == o.field &&
181
+ operator == o.operator &&
182
+ value == o.value
109
183
  end
110
184
 
111
185
  # @see the `==` method
@@ -117,7 +191,7 @@ module DocSpring
117
191
  # Calculates hash code according to all attributes.
118
192
  # @return [Integer] Hash code
119
193
  def hash
120
- [template].hash
194
+ [field, operator, value].hash
121
195
  end
122
196
 
123
197
  # Builds the object from hash
@@ -126,18 +200,20 @@ module DocSpring
126
200
  def self.build_from_hash(attributes)
127
201
  return nil unless attributes.is_a?(Hash)
128
202
  attributes = attributes.transform_keys(&:to_sym)
203
+ # include attributes inherited from allOf parents (the nearest declaration wins)
204
+ map = acceptable_attribute_map
129
205
  transformed_hash = {}
130
- openapi_types.each_pair do |key, type|
131
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
206
+ acceptable_openapi_types.each_pair do |key, type|
207
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
132
208
  transformed_hash["#{key}"] = nil
133
209
  elsif type =~ /\AArray<(.*)>/i
134
210
  # check to ensure the input is an array given that the attribute
135
211
  # is documented as an array but the input is not
136
- if attributes[attribute_map[key]].is_a?(Array)
137
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
212
+ if attributes[map[key]].is_a?(Array)
213
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
138
214
  end
139
- elsif !attributes[attribute_map[key]].nil?
140
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
215
+ elsif !attributes[map[key]].nil?
216
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
141
217
  end
142
218
  end
143
219
  # Responses can include enum values added after this client was released, so the enum setters
@@ -149,69 +225,15 @@ module DocSpring
149
225
  end
150
226
  end
151
227
 
152
- # Deserializes the data based on type
153
- # @param string type Data type
154
- # @param string value Value to be deserialized
155
- # @return [Object] Deserialized data
156
- def self._deserialize(type, value)
157
- case type.to_sym
158
- when :Time
159
- Time.parse(value)
160
- when :Date
161
- Date.parse(value)
162
- when :String
163
- value.to_s
164
- when :Integer
165
- value.to_i
166
- when :Float
167
- value.to_f
168
- when :Boolean
169
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
- true
171
- else
172
- false
173
- end
174
- when :Object
175
- # generic object (usually a Hash), return directly
176
- value
177
- when /\AArray<(?<inner_type>.+)>\z/
178
- inner_type = Regexp.last_match[:inner_type]
179
- value.map { |v| _deserialize(inner_type, v) }
180
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
- k_type = Regexp.last_match[:k_type]
182
- v_type = Regexp.last_match[:v_type]
183
- {}.tap do |hash|
184
- value.each do |k, v|
185
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
- end
187
- end
188
- else # model
189
- # models (e.g. Pet) or oneOf
190
- klass = DocSpring.const_get(type)
191
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
- end
193
- end
194
-
195
- # Returns the string representation of the object
196
- # @return [String] String presentation of the object
197
- def to_s
198
- to_hash.to_s
199
- end
200
-
201
- # to_body is an alias to to_hash (backward compatibility)
202
- # @return [Hash] Returns the object in the form of hash
203
- def to_body
204
- to_hash
205
- end
206
-
207
228
  # Returns the object in the form of hash
208
229
  # @return [Hash] Returns the object in the form of hash
209
230
  def to_hash
210
231
  hash = {}
211
- self.class.attribute_map.each_pair do |attr, param|
232
+ # include attributes inherited from allOf parents (the nearest declaration wins)
233
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
212
234
  value = self.send(attr)
213
235
  if value.nil?
214
- is_nullable = self.class.openapi_nullable.include?(attr)
236
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
215
237
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
238
  end
217
239
 
@@ -220,24 +242,6 @@ module DocSpring
220
242
  hash
221
243
  end
222
244
 
223
- # Outputs non-array value in the form of hash
224
- # For object, use to_hash. Otherwise, just return the value
225
- # @param [Object] value Any valid value
226
- # @return [Hash] Returns the value in the form of hash
227
- def _to_hash(value)
228
- if value.is_a?(Array)
229
- value.compact.map { |v| _to_hash(v) }
230
- elsif value.is_a?(Hash)
231
- {}.tap do |hash|
232
- value.each { |k, v| hash[k] = _to_hash(v) }
233
- end
234
- elsif value.respond_to? :to_hash
235
- value.to_hash
236
- else
237
- value
238
- end
239
- end
240
-
241
245
  end
242
246
 
243
247
  end
@@ -0,0 +1,43 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class FieldComparisonOperator
18
+ GT = "gt".freeze
19
+ GTE = "gte".freeze
20
+ LT = "lt".freeze
21
+ LTE = "lte".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [GT, GTE, LT, LTE].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
39
+ # is: the constants are the values this client knows
40
+ value
41
+ end
42
+ end
43
+ end