docspring 4.1.0 → 4.3.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.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +15 -0
- data/.travis.yml +1 -1
- data/AGENTS.md +5 -4
- data/CHANGELOG.md +67 -0
- data/Gemfile.lock +11 -10
- data/README.md +11 -6
- data/docs/Client.md +273 -105
- data/docs/CombinedPdf.md +1 -1
- data/docs/CreateCombinedPdfRequest.md +1 -1
- data/docs/CreateSubmissionRequest.md +5 -5
- data/docs/CreateTemplatePreviewRequest.md +18 -0
- data/docs/CreateTemplateRequest.md +14 -10
- data/docs/ErrorDetail.md +1 -1
- data/docs/ErrorInfo.md +4 -4
- data/docs/FieldGroup.md +2 -2
- data/docs/FieldGroupInput.md +1 -1
- data/docs/GenerateSubmissionFilesRequest.md +1 -1
- data/docs/GeneratedFile.md +2 -2
- data/docs/Submission.md +18 -18
- data/docs/SubmissionBatch.md +3 -3
- data/docs/SubmissionFiles.md +4 -0
- data/docs/SubmissionInput.md +5 -5
- data/docs/SubmissionList.md +1 -1
- data/docs/SubmissionSummary.md +54 -0
- data/docs/Template.md +21 -17
- data/docs/TemplateActor.md +1 -1
- data/docs/TemplateDiff.md +2 -2
- data/docs/TemplateDocument.md +12 -12
- data/docs/TemplateDocumentSummary.md +24 -0
- data/docs/TemplatePreview.md +32 -0
- data/docs/TemplatePreviewState.md +15 -0
- data/docs/TemplateSummary.md +5 -49
- data/docs/UpdateTemplateDocumentRequest.md +5 -5
- data/docs/UpdateTemplateRequest.md +10 -6
- data/docs/ValidateSubmissionRequest.md +5 -5
- data/docspring.gemspec +2 -2
- data/lib/docspring/api/client.rb +222 -49
- data/lib/docspring/api_client.rb +5 -3
- data/lib/docspring/api_error.rb +1 -1
- data/lib/docspring/api_model_base.rb +1 -1
- data/lib/docspring/configuration.rb +1 -1
- data/lib/docspring/date_time_values.rb +33 -0
- data/lib/docspring/models/add_template_fields_request.rb +1 -1
- data/lib/docspring/models/ai_field_naming_language.rb +1 -1
- data/lib/docspring/models/authentication_check.rb +1 -1
- data/lib/docspring/models/barcode_symbology.rb +1 -1
- data/lib/docspring/models/check_character.rb +1 -1
- data/lib/docspring/models/combined_field_type.rb +1 -1
- data/lib/docspring/models/combined_pdf.rb +2 -2
- data/lib/docspring/models/combined_pdf_files.rb +1 -1
- data/lib/docspring/models/combined_pdf_list.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_input.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_type.rb +1 -1
- data/lib/docspring/models/combined_pdf_state.rb +1 -1
- data/lib/docspring/models/copy_template_request.rb +1 -1
- data/lib/docspring/models/create_combined_pdf_request.rb +2 -2
- data/lib/docspring/models/create_custom_file_from_upload_request.rb +1 -1
- data/lib/docspring/models/create_folder_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_event_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_token_request.rb +1 -1
- data/lib/docspring/models/create_submission_batch_request.rb +1 -1
- data/lib/docspring/models/create_submission_request.rb +6 -6
- data/lib/docspring/models/create_template_preview_request.rb +187 -0
- data/lib/docspring/models/create_template_request.rb +32 -12
- data/lib/docspring/models/create_webhook_request.rb +1 -1
- data/lib/docspring/models/custom_file.rb +1 -1
- data/lib/docspring/models/custom_file_list.rb +1 -1
- data/lib/docspring/models/custom_file_source_pdf.rb +1 -1
- data/lib/docspring/models/error_code.rb +4 -2
- data/lib/docspring/models/error_detail.rb +2 -2
- data/lib/docspring/models/error_info.rb +5 -5
- data/lib/docspring/models/error_response.rb +1 -1
- data/lib/docspring/models/expiration_interval.rb +1 -1
- data/lib/docspring/models/field.rb +2 -2
- data/lib/docspring/models/field_comparison_condition.rb +1 -1
- data/lib/docspring/models/field_comparison_operator.rb +1 -1
- data/lib/docspring/models/field_dependency.rb +1 -1
- data/lib/docspring/models/field_dependency_input.rb +1 -1
- data/lib/docspring/models/field_display_type.rb +1 -1
- data/lib/docspring/models/field_equals_condition.rb +1 -1
- data/lib/docspring/models/field_equals_operator.rb +1 -1
- data/lib/docspring/models/field_group.rb +3 -3
- data/lib/docspring/models/field_group_input.rb +2 -2
- data/lib/docspring/models/field_group_type.rb +1 -1
- data/lib/docspring/models/field_in_condition.rb +1 -1
- data/lib/docspring/models/field_input.rb +2 -2
- data/lib/docspring/models/field_override.rb +1 -1
- data/lib/docspring/models/field_presence_condition.rb +1 -1
- data/lib/docspring/models/field_presence_operator.rb +1 -1
- data/lib/docspring/models/field_range_condition.rb +1 -1
- data/lib/docspring/models/field_reimport_state.rb +1 -1
- data/lib/docspring/models/field_setup_logic.rb +1 -1
- data/lib/docspring/models/field_setup_naming.rb +1 -1
- data/lib/docspring/models/field_setup_source.rb +1 -1
- data/lib/docspring/models/field_type.rb +1 -1
- data/lib/docspring/models/folder.rb +1 -1
- data/lib/docspring/models/folder_list.rb +1 -1
- data/lib/docspring/models/generate_files_format.rb +5 -2
- data/lib/docspring/models/generate_submission_files_request.rb +2 -2
- data/lib/docspring/models/generated_file.rb +4 -4
- data/lib/docspring/models/generated_file_state.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/image_gravity.rb +1 -1
- data/lib/docspring/models/image_scale_type.rb +1 -1
- data/lib/docspring/models/model_code_language.rb +3 -2
- data/lib/docspring/models/move_folder_request.rb +1 -1
- data/lib/docspring/models/move_template_request.rb +1 -1
- data/lib/docspring/models/number_condition_type.rb +1 -1
- data/lib/docspring/models/output_format.rb +4 -2
- data/lib/docspring/models/page_format.rb +1 -1
- data/lib/docspring/models/page_image.rb +1 -1
- data/lib/docspring/models/page_images.rb +1 -1
- data/lib/docspring/models/predefined_field.rb +1 -1
- data/lib/docspring/models/predefined_field_input.rb +1 -1
- data/lib/docspring/models/publish_template_version_request.rb +1 -1
- data/lib/docspring/models/remove_template_fields_request.rb +1 -1
- data/lib/docspring/models/rename_folder_request.rb +1 -1
- data/lib/docspring/models/reorder_template_fields_request.rb +1 -1
- data/lib/docspring/models/restore_template_version_request.rb +1 -1
- data/lib/docspring/models/shape_type.rb +1 -1
- data/lib/docspring/models/signature_request.rb +1 -1
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +1 -1
- data/lib/docspring/models/signature_request_auth_type.rb +1 -1
- data/lib/docspring/models/signature_request_event.rb +1 -1
- data/lib/docspring/models/signature_request_event_type.rb +1 -1
- data/lib/docspring/models/signature_request_input.rb +1 -1
- data/lib/docspring/models/signature_request_message_type.rb +1 -1
- data/lib/docspring/models/signature_request_state.rb +1 -1
- data/lib/docspring/models/signature_request_token.rb +1 -1
- data/lib/docspring/models/signature_request_token_type.rb +1 -1
- data/lib/docspring/models/string_condition_type.rb +1 -1
- data/lib/docspring/models/submission.rb +145 -145
- data/lib/docspring/models/submission_action.rb +1 -1
- data/lib/docspring/models/submission_action_state.rb +1 -1
- data/lib/docspring/models/submission_action_type.rb +1 -1
- data/lib/docspring/models/submission_batch.rb +5 -5
- data/lib/docspring/models/submission_batch_state.rb +1 -1
- data/lib/docspring/models/submission_files.rb +22 -2
- data/lib/docspring/models/submission_input.rb +6 -6
- data/lib/docspring/models/submission_list.rb +2 -2
- data/lib/docspring/models/submission_source.rb +1 -1
- data/lib/docspring/models/submission_source_pdf.rb +1 -1
- data/lib/docspring/models/submission_state.rb +1 -1
- data/lib/docspring/models/submission_summary.rb +601 -0
- data/lib/docspring/models/submission_validation.rb +1 -1
- data/lib/docspring/models/template.rb +131 -91
- data/lib/docspring/models/template_actor.rb +2 -2
- data/lib/docspring/models/template_actor_type.rb +1 -1
- data/lib/docspring/models/template_defaults.rb +1 -1
- data/lib/docspring/models/template_defaults_input.rb +1 -1
- data/lib/docspring/models/template_diff.rb +3 -3
- data/lib/docspring/models/template_diff_summary.rb +1 -1
- data/lib/docspring/models/template_document.rb +51 -51
- data/lib/docspring/models/template_document_state.rb +4 -2
- data/lib/docspring/models/template_document_summary.rb +260 -0
- data/lib/docspring/models/template_field_change.rb +1 -1
- data/lib/docspring/models/template_field_changes.rb +1 -1
- data/lib/docspring/models/template_field_dependency.rb +1 -1
- data/lib/docspring/models/template_field_dependency_action.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_match.rb +1 -1
- data/lib/docspring/models/template_field_dependency_operator.rb +1 -1
- data/lib/docspring/models/template_field_logic_status.rb +1 -1
- data/lib/docspring/models/template_field_move.rb +1 -1
- data/lib/docspring/models/template_fields.rb +1 -1
- data/lib/docspring/models/template_form_mode.rb +1 -1
- data/lib/docspring/models/template_model_code.rb +1 -1
- data/lib/docspring/models/template_page_ai_error.rb +1 -1
- data/lib/docspring/models/template_page_ai_naming_status.rb +1 -1
- data/lib/docspring/models/template_page_fields_status.rb +1 -1
- data/lib/docspring/models/template_page_image_status.rb +1 -1
- data/lib/docspring/models/template_page_images.rb +1 -1
- data/lib/docspring/models/template_page_processing_status.rb +1 -1
- data/lib/docspring/models/template_preview.rb +356 -0
- data/lib/docspring/models/template_preview_state.rb +42 -0
- data/lib/docspring/models/template_source_pdf.rb +1 -1
- data/lib/docspring/models/template_summary.rb +34 -574
- data/lib/docspring/models/template_summary_list.rb +1 -1
- data/lib/docspring/models/template_type.rb +3 -2
- data/lib/docspring/models/template_version.rb +1 -1
- data/lib/docspring/models/template_version_type.rb +1 -1
- data/lib/docspring/models/text_alignment.rb +1 -1
- data/lib/docspring/models/text_overflow.rb +1 -1
- data/lib/docspring/models/text_vertical_alignment.rb +1 -1
- data/lib/docspring/models/typeface.rb +1 -1
- data/lib/docspring/models/update_signature_request_request.rb +1 -1
- data/lib/docspring/models/update_template_document_request.rb +7 -7
- data/lib/docspring/models/update_template_fields_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +31 -11
- data/lib/docspring/models/update_webhook_request.rb +1 -1
- data/lib/docspring/models/upload_method.rb +1 -1
- data/lib/docspring/models/upload_presign.rb +1 -1
- data/lib/docspring/models/url_source_pdf.rb +1 -1
- data/lib/docspring/models/validate_submission_request.rb +6 -6
- data/lib/docspring/models/webhook.rb +1 -1
- data/lib/docspring/models/webhook_event_type.rb +1 -1
- data/lib/docspring/models/webhook_list.rb +1 -1
- data/lib/docspring/models/webhook_mode.rb +1 -1
- data/lib/docspring/request_schemas.json +144 -10
- data/lib/docspring/version.rb +2 -2
- data/lib/docspring/webhook_signature.rb +45 -0
- data/lib/docspring.rb +7 -1
- data/spec/api/client_spec.rb +61 -25
- data/spec/models/add_template_fields_request_spec.rb +1 -1
- data/spec/models/ai_field_naming_language_spec.rb +1 -1
- data/spec/models/authentication_check_spec.rb +1 -1
- data/spec/models/barcode_symbology_spec.rb +1 -1
- data/spec/models/check_character_spec.rb +1 -1
- data/spec/models/combined_field_type_spec.rb +1 -1
- data/spec/models/combined_pdf_files_spec.rb +1 -1
- data/spec/models/combined_pdf_list_spec.rb +1 -1
- data/spec/models/combined_pdf_source_input_spec.rb +1 -1
- data/spec/models/combined_pdf_source_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_source_spec.rb +1 -1
- data/spec/models/combined_pdf_source_type_spec.rb +1 -1
- data/spec/models/combined_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_state_spec.rb +1 -1
- data/spec/models/copy_template_request_spec.rb +1 -1
- data/spec/models/create_combined_pdf_request_spec.rb +1 -1
- data/spec/models/create_custom_file_from_upload_request_spec.rb +1 -1
- data/spec/models/create_folder_request_spec.rb +1 -1
- data/spec/models/create_signature_request_event_request_spec.rb +1 -1
- data/spec/models/create_signature_request_token_request_spec.rb +1 -1
- data/spec/models/create_submission_batch_request_spec.rb +1 -1
- data/spec/models/create_submission_request_spec.rb +1 -1
- data/spec/models/create_template_preview_request_spec.rb +36 -0
- data/spec/models/create_template_request_spec.rb +13 -1
- data/spec/models/create_webhook_request_spec.rb +1 -1
- data/spec/models/custom_file_list_spec.rb +1 -1
- data/spec/models/custom_file_source_pdf_spec.rb +1 -1
- data/spec/models/custom_file_spec.rb +1 -1
- data/spec/models/error_code_spec.rb +1 -1
- data/spec/models/error_detail_spec.rb +1 -1
- data/spec/models/error_info_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/expiration_interval_spec.rb +1 -1
- data/spec/models/field_comparison_condition_spec.rb +1 -1
- data/spec/models/field_comparison_operator_spec.rb +1 -1
- data/spec/models/field_dependency_input_spec.rb +1 -1
- data/spec/models/field_dependency_spec.rb +1 -1
- data/spec/models/field_display_type_spec.rb +1 -1
- data/spec/models/field_equals_condition_spec.rb +1 -1
- data/spec/models/field_equals_operator_spec.rb +1 -1
- data/spec/models/field_group_input_spec.rb +1 -1
- data/spec/models/field_group_spec.rb +1 -1
- data/spec/models/field_group_type_spec.rb +1 -1
- data/spec/models/field_in_condition_spec.rb +1 -1
- data/spec/models/field_input_spec.rb +1 -1
- data/spec/models/field_override_spec.rb +1 -1
- data/spec/models/field_presence_condition_spec.rb +1 -1
- data/spec/models/field_presence_operator_spec.rb +1 -1
- data/spec/models/field_range_condition_spec.rb +1 -1
- data/spec/models/field_reimport_state_spec.rb +1 -1
- data/spec/models/field_setup_logic_spec.rb +1 -1
- data/spec/models/field_setup_naming_spec.rb +1 -1
- data/spec/models/field_setup_source_spec.rb +1 -1
- data/spec/models/field_spec.rb +1 -1
- data/spec/models/field_type_spec.rb +1 -1
- data/spec/models/folder_list_spec.rb +1 -1
- data/spec/models/folder_spec.rb +1 -1
- data/spec/models/generate_files_format_spec.rb +1 -1
- data/spec/models/generate_submission_files_request_spec.rb +1 -1
- data/spec/models/generated_file_spec.rb +1 -1
- data/spec/models/generated_file_state_spec.rb +1 -1
- data/spec/models/html_engine_options_input_spec.rb +1 -1
- data/spec/models/html_engine_options_spec.rb +1 -1
- data/spec/models/image_gravity_spec.rb +1 -1
- data/spec/models/image_scale_type_spec.rb +1 -1
- data/spec/models/model_code_language_spec.rb +1 -1
- data/spec/models/move_folder_request_spec.rb +1 -1
- data/spec/models/move_template_request_spec.rb +1 -1
- data/spec/models/number_condition_type_spec.rb +1 -1
- data/spec/models/output_format_spec.rb +1 -1
- data/spec/models/page_format_spec.rb +1 -1
- data/spec/models/page_image_spec.rb +1 -1
- data/spec/models/page_images_spec.rb +1 -1
- data/spec/models/predefined_field_input_spec.rb +1 -1
- data/spec/models/predefined_field_spec.rb +1 -1
- data/spec/models/publish_template_version_request_spec.rb +1 -1
- data/spec/models/remove_template_fields_request_spec.rb +1 -1
- data/spec/models/rename_folder_request_spec.rb +1 -1
- data/spec/models/reorder_template_fields_request_spec.rb +1 -1
- data/spec/models/restore_template_version_request_spec.rb +1 -1
- data/spec/models/shape_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_type_spec.rb +1 -1
- data/spec/models/signature_request_event_spec.rb +1 -1
- data/spec/models/signature_request_event_type_spec.rb +1 -1
- data/spec/models/signature_request_input_spec.rb +1 -1
- data/spec/models/signature_request_message_type_spec.rb +1 -1
- data/spec/models/signature_request_spec.rb +1 -1
- data/spec/models/signature_request_state_spec.rb +1 -1
- data/spec/models/signature_request_token_spec.rb +1 -1
- data/spec/models/signature_request_token_type_spec.rb +1 -1
- data/spec/models/string_condition_type_spec.rb +1 -1
- data/spec/models/submission_action_spec.rb +1 -1
- data/spec/models/submission_action_state_spec.rb +1 -1
- data/spec/models/submission_action_type_spec.rb +1 -1
- data/spec/models/submission_batch_spec.rb +1 -1
- data/spec/models/submission_batch_state_spec.rb +1 -1
- data/spec/models/submission_files_spec.rb +13 -1
- data/spec/models/submission_input_spec.rb +1 -1
- data/spec/models/submission_list_spec.rb +1 -1
- data/spec/models/submission_source_pdf_spec.rb +1 -1
- data/spec/models/submission_source_spec.rb +1 -1
- data/spec/models/submission_spec.rb +13 -13
- data/spec/models/submission_state_spec.rb +1 -1
- data/spec/models/submission_summary_spec.rb +144 -0
- data/spec/models/submission_validation_spec.rb +1 -1
- data/spec/models/template_actor_spec.rb +1 -1
- data/spec/models/template_actor_type_spec.rb +1 -1
- data/spec/models/template_defaults_input_spec.rb +1 -1
- data/spec/models/template_defaults_spec.rb +1 -1
- data/spec/models/template_diff_spec.rb +1 -1
- data/spec/models/template_diff_summary_spec.rb +1 -1
- data/spec/models/template_document_spec.rb +6 -6
- data/spec/models/template_document_state_spec.rb +1 -1
- data/spec/models/template_document_summary_spec.rb +54 -0
- data/spec/models/template_field_change_spec.rb +1 -1
- data/spec/models/template_field_changes_spec.rb +1 -1
- data/spec/models/template_field_dependency_action_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_spec.rb +1 -1
- data/spec/models/template_field_dependency_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_match_spec.rb +1 -1
- data/spec/models/template_field_dependency_operator_spec.rb +1 -1
- data/spec/models/template_field_dependency_spec.rb +1 -1
- data/spec/models/template_field_logic_status_spec.rb +1 -1
- data/spec/models/template_field_move_spec.rb +1 -1
- data/spec/models/template_fields_spec.rb +1 -1
- data/spec/models/template_form_mode_spec.rb +1 -1
- data/spec/models/template_model_code_spec.rb +1 -1
- data/spec/models/template_page_ai_error_spec.rb +1 -1
- data/spec/models/template_page_ai_naming_status_spec.rb +1 -1
- data/spec/models/template_page_fields_status_spec.rb +1 -1
- data/spec/models/template_page_image_status_spec.rb +1 -1
- data/spec/models/template_page_images_spec.rb +1 -1
- data/spec/models/template_page_processing_status_spec.rb +1 -1
- data/spec/models/template_preview_spec.rb +78 -0
- data/spec/models/template_preview_state_spec.rb +30 -0
- data/spec/models/template_source_pdf_spec.rb +1 -1
- data/spec/models/template_spec.rb +35 -23
- data/spec/models/template_summary_list_spec.rb +1 -1
- data/spec/models/template_summary_spec.rb +6 -138
- data/spec/models/template_type_spec.rb +1 -1
- data/spec/models/template_version_spec.rb +1 -1
- data/spec/models/template_version_type_spec.rb +1 -1
- data/spec/models/text_alignment_spec.rb +1 -1
- data/spec/models/text_overflow_spec.rb +1 -1
- data/spec/models/text_vertical_alignment_spec.rb +1 -1
- data/spec/models/typeface_spec.rb +1 -1
- data/spec/models/update_signature_request_request_spec.rb +1 -1
- data/spec/models/update_template_document_request_spec.rb +1 -1
- data/spec/models/update_template_fields_request_spec.rb +1 -1
- data/spec/models/update_template_request_spec.rb +13 -1
- data/spec/models/update_webhook_request_spec.rb +1 -1
- data/spec/models/upload_method_spec.rb +1 -1
- data/spec/models/upload_presign_spec.rb +1 -1
- data/spec/models/url_source_pdf_spec.rb +1 -1
- data/spec/models/validate_submission_request_spec.rb +1 -1
- data/spec/models/webhook_event_type_spec.rb +1 -1
- data/spec/models/webhook_list_spec.rb +1 -1
- data/spec/models/webhook_mode_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +25 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
# Data submitted to a template, and the
|
|
17
|
+
# Data submitted to a template, and the files generated from it (a PDF, a Word document, an OpenDocument file, or more than one of them).
|
|
18
18
|
class Submission < ApiModelBase
|
|
19
19
|
# The submission's ID.
|
|
20
20
|
attr_accessor :id
|
|
@@ -22,7 +22,7 @@ module DocSpring
|
|
|
22
22
|
# Null once the template has been permanently deleted.
|
|
23
23
|
attr_accessor :template_id
|
|
24
24
|
|
|
25
|
-
# The template's type: `pdf` or `
|
|
25
|
+
# The template's type: `pdf`, `html` or `docx`.
|
|
26
26
|
attr_accessor :template_type
|
|
27
27
|
|
|
28
28
|
# The published version of the template the submission used. Null for the draft.
|
|
@@ -34,7 +34,7 @@ module DocSpring
|
|
|
34
34
|
# `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again.
|
|
35
35
|
attr_accessor :source
|
|
36
36
|
|
|
37
|
-
# `pending` until the
|
|
37
|
+
# `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are 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 files: `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 files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `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
38
|
attr_accessor :state
|
|
39
39
|
|
|
40
40
|
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
@@ -43,7 +43,7 @@ module DocSpring
|
|
|
43
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
44
|
attr_accessor :editable
|
|
45
45
|
|
|
46
|
-
# The submission's data, with the values entered in completed signature requests.
|
|
46
|
+
# The submission's data, with the values entered in completed signature requests. Empty once the submission has expired. Null in a batch's submissions unless you pass `include_data=true`, and in the events of a webhook that leaves out submission data.
|
|
47
47
|
attr_accessor :data
|
|
48
48
|
|
|
49
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.
|
|
@@ -52,30 +52,12 @@ module DocSpring
|
|
|
52
52
|
# Why the PDF couldn't be generated, when `state` is `error`.
|
|
53
53
|
attr_accessor :error_message
|
|
54
54
|
|
|
55
|
-
# Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
|
|
55
|
+
# Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
|
|
56
56
|
attr_accessor :metadata
|
|
57
57
|
|
|
58
|
-
#
|
|
59
|
-
attr_accessor :has_password
|
|
60
|
-
|
|
61
|
-
# The people asked to sign the submission (and fill in their fields), in order.
|
|
62
|
-
attr_accessor :signature_requests
|
|
63
|
-
|
|
64
|
-
# The uploads of the submission's PDF to your storage (account integrations).
|
|
65
|
-
attr_accessor :actions
|
|
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.
|
|
68
|
-
attr_accessor :truncated_text
|
|
69
|
-
|
|
70
|
-
# What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
|
|
71
|
-
attr_accessor :output_formats
|
|
72
|
-
|
|
73
|
-
# The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
|
|
58
|
+
# The generated files: `pdf`, `docx` and `odt` (by `output_formats`) once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
|
|
74
59
|
attr_accessor :files
|
|
75
60
|
|
|
76
|
-
# When the preview PDF was generated. Null if there is no preview.
|
|
77
|
-
attr_accessor :preview_generated_at
|
|
78
|
-
|
|
79
61
|
# An expired submission's data, metadata, password and PDF have been deleted.
|
|
80
62
|
attr_accessor :expired
|
|
81
63
|
|
|
@@ -91,6 +73,24 @@ module DocSpring
|
|
|
91
73
|
# When the submission was last updated.
|
|
92
74
|
attr_accessor :updated_at
|
|
93
75
|
|
|
76
|
+
# Whether the PDF needs a password to open (`password`).
|
|
77
|
+
attr_accessor :has_password
|
|
78
|
+
|
|
79
|
+
# The people asked to sign the submission (and fill in their fields), in order.
|
|
80
|
+
attr_accessor :signature_requests
|
|
81
|
+
|
|
82
|
+
# The uploads of the submission's PDF to your storage (account integrations).
|
|
83
|
+
attr_accessor :actions
|
|
84
|
+
|
|
85
|
+
# 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.
|
|
86
|
+
attr_accessor :truncated_text
|
|
87
|
+
|
|
88
|
+
# What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission.
|
|
89
|
+
attr_accessor :output_formats
|
|
90
|
+
|
|
91
|
+
# When the preview PDF was generated. Null if there is no preview.
|
|
92
|
+
attr_accessor :preview_generated_at
|
|
93
|
+
|
|
94
94
|
class EnumAttributeValidator
|
|
95
95
|
attr_reader :datatype
|
|
96
96
|
attr_reader :allowable_values
|
|
@@ -129,18 +129,18 @@ module DocSpring
|
|
|
129
129
|
:'data_errors' => :'data_errors',
|
|
130
130
|
:'error_message' => :'error_message',
|
|
131
131
|
:'metadata' => :'metadata',
|
|
132
|
-
:'has_password' => :'has_password',
|
|
133
|
-
:'signature_requests' => :'signature_requests',
|
|
134
|
-
:'actions' => :'actions',
|
|
135
|
-
:'truncated_text' => :'truncated_text',
|
|
136
|
-
:'output_formats' => :'output_formats',
|
|
137
132
|
:'files' => :'files',
|
|
138
|
-
:'preview_generated_at' => :'preview_generated_at',
|
|
139
133
|
:'expired' => :'expired',
|
|
140
134
|
:'expires_at' => :'expires_at',
|
|
141
135
|
:'processed_at' => :'processed_at',
|
|
142
136
|
:'created_at' => :'created_at',
|
|
143
|
-
:'updated_at' => :'updated_at'
|
|
137
|
+
:'updated_at' => :'updated_at',
|
|
138
|
+
:'has_password' => :'has_password',
|
|
139
|
+
:'signature_requests' => :'signature_requests',
|
|
140
|
+
:'actions' => :'actions',
|
|
141
|
+
:'truncated_text' => :'truncated_text',
|
|
142
|
+
:'output_formats' => :'output_formats',
|
|
143
|
+
:'preview_generated_at' => :'preview_generated_at'
|
|
144
144
|
}
|
|
145
145
|
end
|
|
146
146
|
|
|
@@ -170,18 +170,18 @@ module DocSpring
|
|
|
170
170
|
:'data_errors' => :'Array<ErrorDetail>',
|
|
171
171
|
:'error_message' => :'String',
|
|
172
172
|
:'metadata' => :'Hash<String, Object>',
|
|
173
|
-
:'has_password' => :'Boolean',
|
|
174
|
-
:'signature_requests' => :'Array<SignatureRequest>',
|
|
175
|
-
:'actions' => :'Array<SubmissionAction>',
|
|
176
|
-
:'truncated_text' => :'Hash<String, Array<String>>',
|
|
177
|
-
:'output_formats' => :'Array<OutputFormat>',
|
|
178
173
|
:'files' => :'SubmissionFiles',
|
|
179
|
-
:'preview_generated_at' => :'Time',
|
|
180
174
|
:'expired' => :'Boolean',
|
|
181
175
|
:'expires_at' => :'Time',
|
|
182
176
|
:'processed_at' => :'Time',
|
|
183
177
|
:'created_at' => :'Time',
|
|
184
|
-
:'updated_at' => :'Time'
|
|
178
|
+
:'updated_at' => :'Time',
|
|
179
|
+
:'has_password' => :'Boolean',
|
|
180
|
+
:'signature_requests' => :'Array<SignatureRequest>',
|
|
181
|
+
:'actions' => :'Array<SubmissionAction>',
|
|
182
|
+
:'truncated_text' => :'Hash<String, Array<String>>',
|
|
183
|
+
:'output_formats' => :'Array<OutputFormat>',
|
|
184
|
+
:'preview_generated_at' => :'Time'
|
|
185
185
|
}
|
|
186
186
|
end
|
|
187
187
|
|
|
@@ -193,10 +193,10 @@ module DocSpring
|
|
|
193
193
|
:'batch_id',
|
|
194
194
|
:'data',
|
|
195
195
|
:'error_message',
|
|
196
|
-
:'truncated_text',
|
|
197
|
-
:'preview_generated_at',
|
|
198
196
|
:'expires_at',
|
|
199
197
|
:'processed_at',
|
|
198
|
+
:'truncated_text',
|
|
199
|
+
:'preview_generated_at'
|
|
200
200
|
])
|
|
201
201
|
end
|
|
202
202
|
|
|
@@ -310,6 +310,42 @@ module DocSpring
|
|
|
310
310
|
self.metadata = nil
|
|
311
311
|
end
|
|
312
312
|
|
|
313
|
+
if attributes.key?(:'files')
|
|
314
|
+
self.files = attributes[:'files']
|
|
315
|
+
else
|
|
316
|
+
self.files = nil
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
if attributes.key?(:'expired')
|
|
320
|
+
self.expired = attributes[:'expired']
|
|
321
|
+
else
|
|
322
|
+
self.expired = nil
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
if attributes.key?(:'expires_at')
|
|
326
|
+
self.expires_at = attributes[:'expires_at']
|
|
327
|
+
else
|
|
328
|
+
self.expires_at = nil
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
if attributes.key?(:'processed_at')
|
|
332
|
+
self.processed_at = attributes[:'processed_at']
|
|
333
|
+
else
|
|
334
|
+
self.processed_at = nil
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if attributes.key?(:'created_at')
|
|
338
|
+
self.created_at = attributes[:'created_at']
|
|
339
|
+
else
|
|
340
|
+
self.created_at = nil
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
if attributes.key?(:'updated_at')
|
|
344
|
+
self.updated_at = attributes[:'updated_at']
|
|
345
|
+
else
|
|
346
|
+
self.updated_at = nil
|
|
347
|
+
end
|
|
348
|
+
|
|
313
349
|
if attributes.key?(:'has_password')
|
|
314
350
|
self.has_password = attributes[:'has_password']
|
|
315
351
|
else
|
|
@@ -348,47 +384,11 @@ module DocSpring
|
|
|
348
384
|
self.output_formats = nil
|
|
349
385
|
end
|
|
350
386
|
|
|
351
|
-
if attributes.key?(:'files')
|
|
352
|
-
self.files = attributes[:'files']
|
|
353
|
-
else
|
|
354
|
-
self.files = nil
|
|
355
|
-
end
|
|
356
|
-
|
|
357
387
|
if attributes.key?(:'preview_generated_at')
|
|
358
388
|
self.preview_generated_at = attributes[:'preview_generated_at']
|
|
359
389
|
else
|
|
360
390
|
self.preview_generated_at = nil
|
|
361
391
|
end
|
|
362
|
-
|
|
363
|
-
if attributes.key?(:'expired')
|
|
364
|
-
self.expired = attributes[:'expired']
|
|
365
|
-
else
|
|
366
|
-
self.expired = nil
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
if attributes.key?(:'expires_at')
|
|
370
|
-
self.expires_at = attributes[:'expires_at']
|
|
371
|
-
else
|
|
372
|
-
self.expires_at = nil
|
|
373
|
-
end
|
|
374
|
-
|
|
375
|
-
if attributes.key?(:'processed_at')
|
|
376
|
-
self.processed_at = attributes[:'processed_at']
|
|
377
|
-
else
|
|
378
|
-
self.processed_at = nil
|
|
379
|
-
end
|
|
380
|
-
|
|
381
|
-
if attributes.key?(:'created_at')
|
|
382
|
-
self.created_at = attributes[:'created_at']
|
|
383
|
-
else
|
|
384
|
-
self.created_at = nil
|
|
385
|
-
end
|
|
386
|
-
|
|
387
|
-
if attributes.key?(:'updated_at')
|
|
388
|
-
self.updated_at = attributes[:'updated_at']
|
|
389
|
-
else
|
|
390
|
-
self.updated_at = nil
|
|
391
|
-
end
|
|
392
392
|
end
|
|
393
393
|
|
|
394
394
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -428,22 +428,6 @@ module DocSpring
|
|
|
428
428
|
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
429
429
|
end
|
|
430
430
|
|
|
431
|
-
if @has_password.nil?
|
|
432
|
-
invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
|
|
433
|
-
end
|
|
434
|
-
|
|
435
|
-
if @signature_requests.nil?
|
|
436
|
-
invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
|
|
437
|
-
end
|
|
438
|
-
|
|
439
|
-
if @actions.nil?
|
|
440
|
-
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
441
|
-
end
|
|
442
|
-
|
|
443
|
-
if @output_formats.nil?
|
|
444
|
-
invalid_properties.push('invalid value for "output_formats", output_formats cannot be nil.')
|
|
445
|
-
end
|
|
446
|
-
|
|
447
431
|
if @files.nil?
|
|
448
432
|
invalid_properties.push('invalid value for "files", files cannot be nil.')
|
|
449
433
|
end
|
|
@@ -460,6 +444,22 @@ module DocSpring
|
|
|
460
444
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
461
445
|
end
|
|
462
446
|
|
|
447
|
+
if @has_password.nil?
|
|
448
|
+
invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
if @signature_requests.nil?
|
|
452
|
+
invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
if @actions.nil?
|
|
456
|
+
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if @output_formats.nil?
|
|
460
|
+
invalid_properties.push('invalid value for "output_formats", output_formats cannot be nil.')
|
|
461
|
+
end
|
|
462
|
+
|
|
463
463
|
invalid_properties
|
|
464
464
|
end
|
|
465
465
|
|
|
@@ -475,14 +475,14 @@ module DocSpring
|
|
|
475
475
|
return false if @editable.nil?
|
|
476
476
|
return false if @data_errors.nil?
|
|
477
477
|
return false if @metadata.nil?
|
|
478
|
-
return false if @has_password.nil?
|
|
479
|
-
return false if @signature_requests.nil?
|
|
480
|
-
return false if @actions.nil?
|
|
481
|
-
return false if @output_formats.nil?
|
|
482
478
|
return false if @files.nil?
|
|
483
479
|
return false if @expired.nil?
|
|
484
480
|
return false if @created_at.nil?
|
|
485
481
|
return false if @updated_at.nil?
|
|
482
|
+
return false if @has_password.nil?
|
|
483
|
+
return false if @signature_requests.nil?
|
|
484
|
+
return false if @actions.nil?
|
|
485
|
+
return false if @output_formats.nil?
|
|
486
486
|
true
|
|
487
487
|
end
|
|
488
488
|
|
|
@@ -566,46 +566,6 @@ module DocSpring
|
|
|
566
566
|
@metadata = metadata
|
|
567
567
|
end
|
|
568
568
|
|
|
569
|
-
# Custom attribute writer method with validation
|
|
570
|
-
# @param [Object] has_password Value to be assigned
|
|
571
|
-
def has_password=(has_password)
|
|
572
|
-
if has_password.nil?
|
|
573
|
-
fail ArgumentError, 'has_password cannot be nil'
|
|
574
|
-
end
|
|
575
|
-
|
|
576
|
-
@has_password = has_password
|
|
577
|
-
end
|
|
578
|
-
|
|
579
|
-
# Custom attribute writer method with validation
|
|
580
|
-
# @param [Object] signature_requests Value to be assigned
|
|
581
|
-
def signature_requests=(signature_requests)
|
|
582
|
-
if signature_requests.nil?
|
|
583
|
-
fail ArgumentError, 'signature_requests cannot be nil'
|
|
584
|
-
end
|
|
585
|
-
|
|
586
|
-
@signature_requests = signature_requests
|
|
587
|
-
end
|
|
588
|
-
|
|
589
|
-
# Custom attribute writer method with validation
|
|
590
|
-
# @param [Object] actions Value to be assigned
|
|
591
|
-
def actions=(actions)
|
|
592
|
-
if actions.nil?
|
|
593
|
-
fail ArgumentError, 'actions cannot be nil'
|
|
594
|
-
end
|
|
595
|
-
|
|
596
|
-
@actions = actions
|
|
597
|
-
end
|
|
598
|
-
|
|
599
|
-
# Custom attribute writer method with validation
|
|
600
|
-
# @param [Object] output_formats Value to be assigned
|
|
601
|
-
def output_formats=(output_formats)
|
|
602
|
-
if output_formats.nil?
|
|
603
|
-
fail ArgumentError, 'output_formats cannot be nil'
|
|
604
|
-
end
|
|
605
|
-
|
|
606
|
-
@output_formats = output_formats
|
|
607
|
-
end
|
|
608
|
-
|
|
609
569
|
# Custom attribute writer method with validation
|
|
610
570
|
# @param [Object] files Value to be assigned
|
|
611
571
|
def files=(files)
|
|
@@ -646,6 +606,46 @@ module DocSpring
|
|
|
646
606
|
@updated_at = updated_at
|
|
647
607
|
end
|
|
648
608
|
|
|
609
|
+
# Custom attribute writer method with validation
|
|
610
|
+
# @param [Object] has_password Value to be assigned
|
|
611
|
+
def has_password=(has_password)
|
|
612
|
+
if has_password.nil?
|
|
613
|
+
fail ArgumentError, 'has_password cannot be nil'
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
@has_password = has_password
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
# Custom attribute writer method with validation
|
|
620
|
+
# @param [Object] signature_requests Value to be assigned
|
|
621
|
+
def signature_requests=(signature_requests)
|
|
622
|
+
if signature_requests.nil?
|
|
623
|
+
fail ArgumentError, 'signature_requests cannot be nil'
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
@signature_requests = signature_requests
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# Custom attribute writer method with validation
|
|
630
|
+
# @param [Object] actions Value to be assigned
|
|
631
|
+
def actions=(actions)
|
|
632
|
+
if actions.nil?
|
|
633
|
+
fail ArgumentError, 'actions cannot be nil'
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
@actions = actions
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
# Custom attribute writer method with validation
|
|
640
|
+
# @param [Object] output_formats Value to be assigned
|
|
641
|
+
def output_formats=(output_formats)
|
|
642
|
+
if output_formats.nil?
|
|
643
|
+
fail ArgumentError, 'output_formats cannot be nil'
|
|
644
|
+
end
|
|
645
|
+
|
|
646
|
+
@output_formats = output_formats
|
|
647
|
+
end
|
|
648
|
+
|
|
649
649
|
# Checks equality by comparing each attribute.
|
|
650
650
|
# @param [Object] Object to be compared
|
|
651
651
|
def ==(o)
|
|
@@ -664,18 +664,18 @@ module DocSpring
|
|
|
664
664
|
data_errors == o.data_errors &&
|
|
665
665
|
error_message == o.error_message &&
|
|
666
666
|
metadata == o.metadata &&
|
|
667
|
-
has_password == o.has_password &&
|
|
668
|
-
signature_requests == o.signature_requests &&
|
|
669
|
-
actions == o.actions &&
|
|
670
|
-
truncated_text == o.truncated_text &&
|
|
671
|
-
output_formats == o.output_formats &&
|
|
672
667
|
files == o.files &&
|
|
673
|
-
preview_generated_at == o.preview_generated_at &&
|
|
674
668
|
expired == o.expired &&
|
|
675
669
|
expires_at == o.expires_at &&
|
|
676
670
|
processed_at == o.processed_at &&
|
|
677
671
|
created_at == o.created_at &&
|
|
678
|
-
updated_at == o.updated_at
|
|
672
|
+
updated_at == o.updated_at &&
|
|
673
|
+
has_password == o.has_password &&
|
|
674
|
+
signature_requests == o.signature_requests &&
|
|
675
|
+
actions == o.actions &&
|
|
676
|
+
truncated_text == o.truncated_text &&
|
|
677
|
+
output_formats == o.output_formats &&
|
|
678
|
+
preview_generated_at == o.preview_generated_at
|
|
679
679
|
end
|
|
680
680
|
|
|
681
681
|
# @see the `==` method
|
|
@@ -687,7 +687,7 @@ module DocSpring
|
|
|
687
687
|
# Calculates hash code according to all attributes.
|
|
688
688
|
# @return [Integer] Hash code
|
|
689
689
|
def hash
|
|
690
|
-
[id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata,
|
|
690
|
+
[id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, files, expired, expires_at, processed_at, created_at, updated_at, has_password, signature_requests, actions, truncated_text, output_formats, preview_generated_at].hash
|
|
691
691
|
end
|
|
692
692
|
|
|
693
693
|
# Builds the object from hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -14,12 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
# Submissions created together in one request. Their
|
|
17
|
+
# Submissions created together in one request. Their files are only generated when every submission in the batch is valid.
|
|
18
18
|
class SubmissionBatch < ApiModelBase
|
|
19
19
|
# The batch's ID.
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
22
|
-
# `pending` while the
|
|
22
|
+
# `pending` while the files are being generated, then `processed`. `error` as soon as a submission fails, while the others can still be pending: the batch has finished once `processed_at` is set.
|
|
23
23
|
attr_accessor :state
|
|
24
24
|
|
|
25
25
|
# Your own data about the batch, such as an ID from your app.
|
|
@@ -28,10 +28,10 @@ module DocSpring
|
|
|
28
28
|
# The number of submissions in the request.
|
|
29
29
|
attr_accessor :total_count
|
|
30
30
|
|
|
31
|
-
# The submissions whose
|
|
31
|
+
# The submissions whose files haven't been generated yet.
|
|
32
32
|
attr_accessor :pending_count
|
|
33
33
|
|
|
34
|
-
# The submissions that were invalid or whose
|
|
34
|
+
# The submissions that were invalid or whose files couldn't be generated.
|
|
35
35
|
attr_accessor :error_count
|
|
36
36
|
|
|
37
37
|
# The percentage of the batch's submissions that have finished, from 0 to 100.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -25,6 +25,12 @@ module DocSpring
|
|
|
25
25
|
# The preview PDF from POST /submissions/{submission_id}/generate_preview, such as for a submission still waiting for its signature requests.
|
|
26
26
|
attr_accessor :preview
|
|
27
27
|
|
|
28
|
+
# The Word document of a Word template's submission, when the submission makes one (`output_formats`).
|
|
29
|
+
attr_accessor :docx
|
|
30
|
+
|
|
31
|
+
# The OpenDocument file (.odt, the format LibreOffice uses) of a Word template's submission, converted from its Word document, when the submission makes one (`output_formats`).
|
|
32
|
+
attr_accessor :odt
|
|
33
|
+
|
|
28
34
|
attr_accessor :png
|
|
29
35
|
|
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -33,6 +39,8 @@ module DocSpring
|
|
|
33
39
|
:'pdf' => :'pdf',
|
|
34
40
|
:'audit_trail' => :'audit_trail',
|
|
35
41
|
:'preview' => :'preview',
|
|
42
|
+
:'docx' => :'docx',
|
|
43
|
+
:'odt' => :'odt',
|
|
36
44
|
:'png' => :'png'
|
|
37
45
|
}
|
|
38
46
|
end
|
|
@@ -53,6 +61,8 @@ module DocSpring
|
|
|
53
61
|
:'pdf' => :'GeneratedFile',
|
|
54
62
|
:'audit_trail' => :'GeneratedFile',
|
|
55
63
|
:'preview' => :'GeneratedFile',
|
|
64
|
+
:'docx' => :'GeneratedFile',
|
|
65
|
+
:'odt' => :'GeneratedFile',
|
|
56
66
|
:'png' => :'PageImages'
|
|
57
67
|
}
|
|
58
68
|
end
|
|
@@ -101,6 +111,14 @@ module DocSpring
|
|
|
101
111
|
self.preview = attributes[:'preview']
|
|
102
112
|
end
|
|
103
113
|
|
|
114
|
+
if attributes.key?(:'docx')
|
|
115
|
+
self.docx = attributes[:'docx']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'odt')
|
|
119
|
+
self.odt = attributes[:'odt']
|
|
120
|
+
end
|
|
121
|
+
|
|
104
122
|
if attributes.key?(:'png')
|
|
105
123
|
self.png = attributes[:'png']
|
|
106
124
|
end
|
|
@@ -129,6 +147,8 @@ module DocSpring
|
|
|
129
147
|
pdf == o.pdf &&
|
|
130
148
|
audit_trail == o.audit_trail &&
|
|
131
149
|
preview == o.preview &&
|
|
150
|
+
docx == o.docx &&
|
|
151
|
+
odt == o.odt &&
|
|
132
152
|
png == o.png
|
|
133
153
|
end
|
|
134
154
|
|
|
@@ -141,7 +161,7 @@ module DocSpring
|
|
|
141
161
|
# Calculates hash code according to all attributes.
|
|
142
162
|
# @return [Integer] Hash code
|
|
143
163
|
def hash
|
|
144
|
-
[pdf, audit_trail, preview, png].hash
|
|
164
|
+
[pdf, audit_trail, preview, docx, odt, png].hash
|
|
145
165
|
end
|
|
146
166
|
|
|
147
167
|
# Builds the object from hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -22,16 +22,16 @@ module DocSpring
|
|
|
22
22
|
# `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`.
|
|
23
23
|
attr_accessor :editable
|
|
24
24
|
|
|
25
|
-
# The values of the template's fields, by field name. Required for
|
|
25
|
+
# The values of the template's fields, by field name. Required for PDF and Word templates.
|
|
26
26
|
attr_accessor :data
|
|
27
27
|
|
|
28
|
-
# Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
|
|
28
|
+
# Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
|
|
29
29
|
attr_accessor :metadata
|
|
30
30
|
|
|
31
|
-
# A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set.
|
|
31
|
+
# A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them.
|
|
32
32
|
attr_accessor :password
|
|
33
33
|
|
|
34
|
-
# What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
|
|
34
|
+
# What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission.
|
|
35
35
|
attr_accessor :output_formats
|
|
36
36
|
|
|
37
37
|
# Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours.
|
|
@@ -43,7 +43,7 @@ module DocSpring
|
|
|
43
43
|
# For an HTML template, HTML to use instead of the template's.
|
|
44
44
|
attr_accessor :html
|
|
45
45
|
|
|
46
|
-
# For an HTML template, CSS
|
|
46
|
+
# For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity.
|
|
47
47
|
attr_accessor :css
|
|
48
48
|
|
|
49
49
|
# The submission's template. Default the batch's `template_id`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -43,7 +43,7 @@ module DocSpring
|
|
|
43
43
|
# Attribute type mapping.
|
|
44
44
|
def self.openapi_types
|
|
45
45
|
{
|
|
46
|
-
:'data' => :'Array<
|
|
46
|
+
:'data' => :'Array<SubmissionSummary>',
|
|
47
47
|
:'next_cursor' => :'String'
|
|
48
48
|
}
|
|
49
49
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|