docspring 1.4.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +26 -0
- data/.openapi-generator/FILES +220 -0
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +6 -12
- data/.travis.yml +11 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +5 -1
- data/Gemfile.lock +85 -48
- data/README.md +43 -18
- data/docs/AddFieldsData.md +13 -3
- data/docs/AddFieldsTemplateResponse.md +17 -5
- data/docs/AuthenticationError.md +15 -4
- data/docs/AuthenticationSuccessResponse.md +13 -3
- data/docs/CombinePdfsData.md +23 -8
- data/docs/CombinedSubmission.md +37 -13
- data/docs/CombinedSubmissionAction.md +23 -8
- data/docs/CombinedSubmissionData.md +21 -7
- data/docs/CopyTemplateData.md +15 -4
- data/docs/CreateCombinedSubmissionResponse.md +17 -5
- data/docs/CreateCustomFileData.md +13 -3
- data/docs/CreateCustomFileResponse.md +17 -5
- data/docs/CreateFolderAttributes.md +20 -0
- data/docs/CreateFolderData.md +13 -3
- data/docs/CreateHtmlTemplateData.md +13 -3
- data/docs/CreateSubmissionBatchResponse.md +21 -7
- data/docs/CreateSubmissionBatchSubmissionsResponse.md +17 -5
- data/docs/CreateSubmissionData.md +36 -0
- data/docs/CreateSubmissionDataRequestData.md +37 -15
- data/docs/CreateSubmissionDataRequestEventRequest.md +24 -0
- data/docs/CreateSubmissionDataRequestEventResponse.md +22 -0
- data/docs/CreateSubmissionDataRequestTokenResponse.md +17 -5
- data/docs/CreateSubmissionResponse.md +17 -5
- data/docs/CreateTemplateFromUploadData.md +13 -3
- data/docs/DataRequestToken.md +24 -0
- data/docs/DeleteTemplateResponse.md +20 -0
- data/docs/ErrorResponse.md +20 -0
- data/docs/Folder.md +19 -6
- data/docs/FullTemplate.md +94 -0
- data/docs/HtmlTemplateData.md +51 -19
- data/docs/HtmlTemplateDataWebhookOptions.md +18 -0
- data/docs/InvalidRequest.md +15 -4
- data/docs/InvalidRequestSingleError.md +20 -0
- data/docs/ListSubmissionsResponse.md +17 -5
- data/docs/MoveFolderData.md +13 -3
- data/docs/MoveTemplateData.md +13 -3
- data/docs/PDFApi.md +1598 -523
- data/docs/PendingTemplate.md +45 -19
- data/docs/PreviewPdfResponse.md +20 -0
- data/docs/PublishTemplateVersion404Response.md +20 -0
- data/docs/PublishTemplateVersion422Response.md +20 -0
- data/docs/PublishTemplateVersionResponse.md +20 -0
- data/docs/PublishTemplateVersionResponseResult.md +24 -0
- data/docs/PublishVersionData.md +20 -0
- data/docs/RenameFolderData.md +13 -3
- data/docs/RestoreTemplateVersionResponse.md +18 -0
- data/docs/RestoreVersionData.md +18 -0
- data/docs/Submission.md +49 -21
- data/docs/SubmissionAction.md +23 -8
- data/docs/SubmissionBatch.md +29 -11
- data/docs/SubmissionBatchData.md +21 -6
- data/docs/SubmissionData.md +23 -10
- data/docs/SubmissionDataBatchRequest.md +25 -8
- data/docs/SubmissionDataRequest.md +53 -22
- data/docs/SubmissionDataRequestEvent.md +30 -0
- data/docs/Template.md +51 -22
- data/docs/TemplateData.md +49 -18
- data/docs/TemplateDefaults.md +22 -0
- data/docs/TemplateDocument.md +22 -0
- data/docs/TemplateDocumentMetadata.md +22 -0
- data/docs/TemplateSchema.md +34 -0
- data/docs/UpdateDataRequestResponse.md +17 -5
- data/docs/UpdateSubmissionDataRequestData.md +37 -15
- data/docs/UpdateTemplateData.md +13 -3
- data/docs/UpdateTemplateResponse.md +15 -4
- data/docs/UploadPresign.md +24 -0
- data/docs/UploadTemplateData.md +53 -20
- data/docspring.gemspec +14 -11
- data/git_push.sh +11 -9
- data/lib/docspring/api/pdf_api.rb +1344 -539
- data/lib/docspring/api_client.rb +106 -98
- data/lib/docspring/api_error.rb +22 -2
- data/lib/docspring/configuration.rb +127 -16
- data/lib/docspring/models/add_fields_data.rb +59 -26
- data/lib/docspring/models/add_fields_template_response.rb +81 -43
- data/lib/docspring/models/authentication_error.rb +62 -29
- data/lib/docspring/models/authentication_success_response.rb +66 -28
- data/lib/docspring/models/combine_pdfs_data.rb +65 -32
- data/lib/docspring/models/combined_submission.rb +165 -75
- data/lib/docspring/models/combined_submission_action.rb +83 -39
- data/lib/docspring/models/combined_submission_data.rb +63 -30
- data/lib/docspring/models/copy_template_data.rb +59 -26
- data/lib/docspring/models/create_combined_submission_response.rb +86 -41
- data/lib/docspring/models/create_custom_file_data.rb +58 -25
- data/lib/docspring/models/create_custom_file_response.rb +86 -41
- data/lib/docspring/models/create_folder_attributes.rb +230 -0
- data/lib/docspring/models/create_folder_data.rb +59 -26
- data/lib/docspring/models/create_html_template_data.rb +58 -25
- data/lib/docspring/models/create_submission_batch_response.rb +104 -52
- data/lib/docspring/models/create_submission_batch_submissions_response.rb +79 -41
- data/lib/docspring/models/create_submission_data.rb +304 -0
- data/lib/docspring/models/create_submission_data_request_data.rb +139 -90
- data/lib/docspring/models/create_submission_data_request_event_request.rb +297 -0
- data/lib/docspring/models/create_submission_data_request_event_response.rb +282 -0
- data/lib/docspring/models/create_submission_data_request_token_response.rb +85 -40
- data/lib/docspring/models/create_submission_response.rb +86 -41
- data/lib/docspring/models/create_template_from_upload_data.rb +58 -25
- data/lib/docspring/models/{custom_file.rb → data_request_token.rb} +110 -33
- data/lib/docspring/models/delete_template_response.rb +266 -0
- data/lib/docspring/models/{error.rb → error_response.rb} +65 -30
- data/lib/docspring/models/folder.rb +78 -46
- data/lib/docspring/models/{template1.rb → full_template.rb} +476 -240
- data/lib/docspring/models/html_template_data.rb +180 -110
- data/lib/docspring/models/{folders_folder.rb → html_template_data_webhook_options.rb} +63 -41
- data/lib/docspring/models/invalid_request.rb +64 -29
- data/lib/docspring/models/invalid_request_single_error.rb +271 -0
- data/lib/docspring/models/list_submissions_response.rb +87 -39
- data/lib/docspring/models/move_folder_data.rb +56 -25
- data/lib/docspring/models/move_template_data.rb +58 -25
- data/lib/docspring/models/pending_template.rb +221 -118
- data/lib/docspring/models/preview_pdf_response.rb +264 -0
- data/lib/docspring/models/publish_template_version404_response.rb +271 -0
- data/lib/docspring/models/publish_template_version422_response.rb +273 -0
- data/lib/docspring/models/publish_template_version_response.rb +271 -0
- data/lib/docspring/models/publish_template_version_response_result.rb +263 -0
- data/lib/docspring/models/publish_version_data.rb +230 -0
- data/lib/docspring/models/rename_folder_data.rb +58 -25
- data/lib/docspring/models/restore_template_version_response.rb +255 -0
- data/lib/docspring/models/{create_submission_data_request_token_response_token.rb → restore_version_data.rb} +69 -58
- data/lib/docspring/models/submission.rb +98 -49
- data/lib/docspring/models/submission_action.rb +83 -39
- data/lib/docspring/models/submission_batch.rb +158 -75
- data/lib/docspring/models/submission_batch_data.rb +74 -30
- data/lib/docspring/models/submission_data.rb +65 -50
- data/lib/docspring/models/submission_data_batch_request.rb +100 -49
- data/lib/docspring/models/submission_data_request.rb +123 -54
- data/lib/docspring/models/submission_data_request_event.rb +309 -0
- data/lib/docspring/models/template.rb +267 -132
- data/lib/docspring/models/template_data.rb +173 -105
- data/lib/docspring/models/{template1_defaults.rb → template_defaults.rb} +77 -29
- data/lib/docspring/models/{upload_template_data_document.rb → template_document.rb} +91 -39
- data/lib/docspring/models/{upload_template_data_document_metadata.rb → template_document_metadata.rb} +94 -42
- data/lib/docspring/models/template_schema.rb +288 -0
- data/lib/docspring/models/update_data_request_response.rb +86 -41
- data/lib/docspring/models/update_submission_data_request_data.rb +82 -43
- data/lib/docspring/models/update_template_data.rb +58 -25
- data/lib/docspring/models/update_template_response.rb +79 -41
- data/lib/docspring/models/upload_presign.rb +296 -0
- data/lib/docspring/models/upload_template_data.rb +186 -116
- data/lib/docspring/version.rb +3 -3
- data/lib/docspring.rb +29 -12
- data/spec/api/client_integration_spec.rb +26 -19
- data/spec/api/pdf_api_integration_spec.rb +21 -19
- data/spec/api/pdf_api_spec_original.skipped.rb +427 -118
- data/spec/models/add_fields_data_spec.rb +8 -13
- data/spec/models/add_fields_template_response_spec.rb +16 -21
- data/spec/models/authentication_error_spec.rb +10 -15
- data/spec/models/authentication_success_response_spec.rb +9 -14
- data/spec/models/combine_pdfs_data_spec.rb +13 -18
- data/spec/models/combined_submission_action_spec.rb +16 -21
- data/spec/models/combined_submission_data_spec.rb +12 -17
- data/spec/models/combined_submission_spec.rb +42 -35
- data/spec/models/copy_template_data_spec.rb +9 -14
- data/spec/models/create_combined_submission_response_spec.rb +16 -21
- data/spec/models/create_custom_file_data_spec.rb +8 -13
- data/spec/models/create_custom_file_response_spec.rb +16 -21
- data/spec/models/create_folder_attributes_spec.rb +42 -0
- data/spec/models/create_folder_data_spec.rb +8 -13
- data/spec/models/create_html_template_data_spec.rb +8 -13
- data/spec/models/create_submission_batch_response_spec.rb +21 -26
- data/spec/models/create_submission_batch_submissions_response_spec.rb +16 -21
- data/spec/models/create_submission_data_request_data_spec.rb +33 -38
- data/spec/models/create_submission_data_request_event_request_spec.rb +62 -0
- data/spec/models/create_submission_data_request_event_response_spec.rb +52 -0
- data/spec/models/create_submission_data_request_token_response_spec.rb +15 -20
- data/spec/models/create_submission_data_spec.rb +90 -0
- data/spec/models/create_submission_response_spec.rb +16 -21
- data/spec/models/create_template_from_upload_data_spec.rb +8 -13
- data/spec/models/data_request_token_spec.rb +54 -0
- data/spec/models/delete_template_response_spec.rb +46 -0
- data/spec/models/error_response_spec.rb +46 -0
- data/spec/models/folder_spec.rb +15 -20
- data/spec/models/full_template_spec.rb +268 -0
- data/spec/models/html_template_data_spec.rb +62 -49
- data/spec/models/html_template_data_webhook_options_spec.rb +36 -0
- data/spec/models/invalid_request_single_error_spec.rb +46 -0
- data/spec/models/invalid_request_spec.rb +10 -15
- data/spec/models/list_submissions_response_spec.rb +13 -18
- data/spec/models/move_folder_data_spec.rb +8 -13
- data/spec/models/move_template_data_spec.rb +8 -13
- data/spec/models/pending_template_spec.rb +45 -50
- data/spec/models/preview_pdf_response_spec.rb +46 -0
- data/spec/models/publish_template_version404_response_spec.rb +46 -0
- data/spec/models/publish_template_version422_response_spec.rb +46 -0
- data/spec/models/publish_template_version_response_result_spec.rb +54 -0
- data/spec/models/publish_template_version_response_spec.rb +46 -0
- data/spec/models/publish_version_data_spec.rb +42 -0
- data/spec/models/rename_folder_data_spec.rb +8 -13
- data/spec/models/restore_template_version_response_spec.rb +40 -0
- data/spec/models/restore_version_data_spec.rb +36 -0
- data/spec/models/submission_action_spec.rb +16 -21
- data/spec/models/submission_batch_data_spec.rb +17 -16
- data/spec/models/submission_batch_spec.rb +29 -34
- data/spec/models/submission_data_batch_request_spec.rb +24 -23
- data/spec/models/submission_data_request_event_spec.rb +72 -0
- data/spec/models/submission_data_request_spec.rb +36 -35
- data/spec/models/submission_data_spec.rb +13 -30
- data/spec/models/submission_spec.rb +27 -32
- data/spec/models/template_data_spec.rb +59 -46
- data/spec/models/template_defaults_spec.rb +48 -0
- data/spec/models/template_document_metadata_spec.rb +52 -0
- data/spec/models/template_document_spec.rb +52 -0
- data/spec/models/template_schema_spec.rb +84 -0
- data/spec/models/template_spec.rb +50 -55
- data/spec/models/update_data_request_response_spec.rb +16 -21
- data/spec/models/update_submission_data_request_data_spec.rb +22 -27
- data/spec/models/update_template_data_spec.rb +8 -13
- data/spec/models/update_template_response_spec.rb +14 -19
- data/spec/models/upload_presign_spec.rb +58 -0
- data/spec/models/upload_template_data_spec.rb +64 -51
- data/spec/spec_helper.rb +5 -5
- metadata +108 -132
- data/docs/CreateSubmissionDataRequestTokenResponseToken.md +0 -11
- data/docs/CustomFile.md +0 -9
- data/docs/Error.md +0 -9
- data/docs/FoldersFolder.md +0 -9
- data/docs/Template1.md +0 -46
- data/docs/Template1Defaults.md +0 -10
- data/docs/TemplatestemplateIdaddFieldsFields.md +0 -92
- data/docs/UploadTemplateDataDocument.md +0 -10
- data/docs/UploadTemplateDataDocumentMetadata.md +0 -10
- data/lib/docspring/models/templatestemplate_idadd_fields_fields.rb +0 -1306
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -53
- data/spec/models/create_submission_data_request_token_response_token_spec.rb +0 -59
- data/spec/models/custom_file_spec.rb +0 -47
- data/spec/models/error_spec.rb +0 -51
- data/spec/models/folders_folder_spec.rb +0 -47
- data/spec/models/template1_defaults_spec.rb +0 -53
- data/spec/models/template1_spec.rb +0 -273
- data/spec/models/templatestemplate_idadd_fields_fields_spec.rb +0 -589
- data/spec/models/upload_template_data_document_metadata_spec.rb +0 -57
- data/spec/models/upload_template_data_document_spec.rb +0 -57
@@ -3,95 +3,96 @@
|
|
3
3
|
|
4
4
|
#DocSpring is a service that helps you fill out and sign PDF templates.
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.11.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module DocSpring
|
16
|
-
class
|
17
|
-
attr_accessor :
|
17
|
+
class FullTemplate
|
18
|
+
attr_accessor :name
|
18
19
|
|
19
|
-
attr_accessor :
|
20
|
+
attr_accessor :description
|
20
21
|
|
21
|
-
attr_accessor :
|
22
|
+
attr_accessor :public_web_form
|
22
23
|
|
23
|
-
attr_accessor :
|
24
|
+
attr_accessor :public_submissions
|
25
|
+
|
26
|
+
attr_accessor :expire_submissions
|
24
27
|
|
25
28
|
attr_accessor :expire_after
|
26
29
|
|
27
|
-
attr_accessor :
|
30
|
+
attr_accessor :expiration_interval
|
28
31
|
|
29
|
-
attr_accessor :
|
32
|
+
attr_accessor :allow_additional_properties
|
30
33
|
|
31
|
-
attr_accessor :
|
34
|
+
attr_accessor :editable_submissions
|
32
35
|
|
33
|
-
attr_accessor :
|
36
|
+
attr_accessor :locked
|
34
37
|
|
35
|
-
attr_accessor :
|
38
|
+
attr_accessor :webhook_url
|
36
39
|
|
37
|
-
attr_accessor :
|
40
|
+
attr_accessor :slack_webhook_url
|
38
41
|
|
39
|
-
attr_accessor :
|
42
|
+
attr_accessor :redirect_url
|
40
43
|
|
41
|
-
attr_accessor :
|
44
|
+
attr_accessor :first_template
|
42
45
|
|
43
46
|
attr_accessor :html
|
44
47
|
|
45
|
-
attr_accessor :
|
46
|
-
|
47
|
-
attr_accessor :id
|
48
|
-
|
49
|
-
attr_accessor :page_dimensions
|
48
|
+
attr_accessor :header_html
|
50
49
|
|
51
|
-
attr_accessor :
|
50
|
+
attr_accessor :footer_html
|
52
51
|
|
53
|
-
attr_accessor :
|
52
|
+
attr_accessor :scss
|
54
53
|
|
55
54
|
attr_accessor :encrypt_pdfs
|
56
55
|
|
57
|
-
attr_accessor :webhook_url
|
58
|
-
|
59
|
-
attr_accessor :embed_domains
|
60
|
-
|
61
|
-
attr_accessor :parent_folder_id
|
62
|
-
|
63
|
-
attr_accessor :allow_additional_properties
|
64
|
-
|
65
56
|
attr_accessor :encrypt_pdfs_password
|
66
57
|
|
67
|
-
attr_accessor :
|
58
|
+
attr_accessor :defaults
|
59
|
+
|
60
|
+
attr_accessor :fields
|
68
61
|
|
69
62
|
attr_accessor :shared_field_data
|
70
63
|
|
64
|
+
attr_accessor :field_order
|
65
|
+
|
71
66
|
attr_accessor :document_md5
|
72
67
|
|
73
|
-
attr_accessor :
|
68
|
+
attr_accessor :document_filename
|
74
69
|
|
75
|
-
attr_accessor :
|
70
|
+
attr_accessor :document_parse_error
|
76
71
|
|
77
|
-
attr_accessor :
|
72
|
+
attr_accessor :document_state
|
78
73
|
|
79
|
-
attr_accessor :
|
74
|
+
attr_accessor :embed_domains
|
80
75
|
|
81
|
-
attr_accessor :
|
76
|
+
attr_accessor :page_count
|
82
77
|
|
83
|
-
attr_accessor :
|
78
|
+
attr_accessor :document_processed
|
84
79
|
|
85
|
-
attr_accessor :
|
80
|
+
attr_accessor :demo
|
86
81
|
|
87
|
-
attr_accessor :
|
82
|
+
attr_accessor :id
|
88
83
|
|
89
|
-
attr_accessor :
|
84
|
+
attr_accessor :template_type
|
90
85
|
|
91
|
-
attr_accessor :
|
86
|
+
attr_accessor :page_dimensions
|
92
87
|
|
93
88
|
attr_accessor :document_url
|
94
89
|
|
90
|
+
attr_accessor :permanent_document_url
|
91
|
+
|
92
|
+
attr_accessor :path
|
93
|
+
|
94
|
+
attr_accessor :parent_folder_id
|
95
|
+
|
95
96
|
class EnumAttributeValidator
|
96
97
|
attr_reader :datatype
|
97
98
|
attr_reader :allowable_values
|
@@ -117,285 +118,510 @@ module DocSpring
|
|
117
118
|
# Attribute mapping from ruby-style variable name to JSON key.
|
118
119
|
def self.attribute_map
|
119
120
|
{
|
120
|
-
:'
|
121
|
-
:'expiration_interval' => :'expiration_interval',
|
122
|
-
:'scss' => :'scss',
|
123
|
-
:'document_state' => :'document_state',
|
124
|
-
:'expire_after' => :'expire_after',
|
121
|
+
:'name' => :'name',
|
125
122
|
:'description' => :'description',
|
126
|
-
:'slack_webhook_url' => :'slack_webhook_url',
|
127
|
-
:'demo' => :'demo',
|
128
|
-
:'path' => :'path',
|
129
|
-
:'header_html' => :'header_html',
|
130
123
|
:'public_web_form' => :'public_web_form',
|
131
|
-
:'
|
132
|
-
:'
|
133
|
-
:'
|
134
|
-
:'
|
135
|
-
:'
|
136
|
-
:'
|
124
|
+
:'public_submissions' => :'public_submissions',
|
125
|
+
:'expire_submissions' => :'expire_submissions',
|
126
|
+
:'expire_after' => :'expire_after',
|
127
|
+
:'expiration_interval' => :'expiration_interval',
|
128
|
+
:'allow_additional_properties' => :'allow_additional_properties',
|
129
|
+
:'editable_submissions' => :'editable_submissions',
|
137
130
|
:'locked' => :'locked',
|
138
|
-
:'page_count' => :'page_count',
|
139
|
-
:'encrypt_pdfs' => :'encrypt_pdfs',
|
140
131
|
:'webhook_url' => :'webhook_url',
|
141
|
-
:'
|
142
|
-
:'
|
143
|
-
:'allow_additional_properties' => :'allow_additional_properties',
|
144
|
-
:'encrypt_pdfs_password' => :'encrypt_pdfs_password',
|
145
|
-
:'public_submissions' => :'public_submissions',
|
146
|
-
:'shared_field_data' => :'shared_field_data',
|
147
|
-
:'document_md5' => :'document_md5',
|
132
|
+
:'slack_webhook_url' => :'slack_webhook_url',
|
133
|
+
:'redirect_url' => :'redirect_url',
|
148
134
|
:'first_template' => :'first_template',
|
149
|
-
:'
|
150
|
-
:'
|
151
|
-
:'expire_submissions' => :'expire_submissions',
|
152
|
-
:'name' => :'name',
|
135
|
+
:'html' => :'html',
|
136
|
+
:'header_html' => :'header_html',
|
153
137
|
:'footer_html' => :'footer_html',
|
154
|
-
:'
|
138
|
+
:'scss' => :'scss',
|
139
|
+
:'encrypt_pdfs' => :'encrypt_pdfs',
|
140
|
+
:'encrypt_pdfs_password' => :'encrypt_pdfs_password',
|
141
|
+
:'defaults' => :'defaults',
|
155
142
|
:'fields' => :'fields',
|
143
|
+
:'shared_field_data' => :'shared_field_data',
|
144
|
+
:'field_order' => :'field_order',
|
145
|
+
:'document_md5' => :'document_md5',
|
156
146
|
:'document_filename' => :'document_filename',
|
157
|
-
:'
|
158
|
-
:'
|
147
|
+
:'document_parse_error' => :'document_parse_error',
|
148
|
+
:'document_state' => :'document_state',
|
149
|
+
:'embed_domains' => :'embed_domains',
|
150
|
+
:'page_count' => :'page_count',
|
151
|
+
:'document_processed' => :'document_processed',
|
152
|
+
:'demo' => :'demo',
|
153
|
+
:'id' => :'id',
|
154
|
+
:'template_type' => :'template_type',
|
155
|
+
:'page_dimensions' => :'page_dimensions',
|
156
|
+
:'document_url' => :'document_url',
|
157
|
+
:'permanent_document_url' => :'permanent_document_url',
|
158
|
+
:'path' => :'path',
|
159
|
+
:'parent_folder_id' => :'parent_folder_id'
|
159
160
|
}
|
160
161
|
end
|
161
162
|
|
163
|
+
# Returns all the JSON keys this model knows about
|
164
|
+
def self.acceptable_attributes
|
165
|
+
attribute_map.values
|
166
|
+
end
|
167
|
+
|
162
168
|
# Attribute type mapping.
|
163
169
|
def self.openapi_types
|
164
170
|
{
|
165
|
-
:'
|
166
|
-
:'expiration_interval' => :'String',
|
167
|
-
:'scss' => :'String',
|
168
|
-
:'document_state' => :'String',
|
169
|
-
:'expire_after' => :'Float',
|
171
|
+
:'name' => :'String',
|
170
172
|
:'description' => :'String',
|
173
|
+
:'public_web_form' => :'Boolean',
|
174
|
+
:'public_submissions' => :'Boolean',
|
175
|
+
:'expire_submissions' => :'Boolean',
|
176
|
+
:'expire_after' => :'Float',
|
177
|
+
:'expiration_interval' => :'String',
|
178
|
+
:'allow_additional_properties' => :'Boolean',
|
179
|
+
:'editable_submissions' => :'Boolean',
|
180
|
+
:'locked' => :'Boolean',
|
181
|
+
:'webhook_url' => :'String',
|
171
182
|
:'slack_webhook_url' => :'String',
|
172
|
-
:'
|
173
|
-
:'
|
174
|
-
:'header_html' => :'String',
|
175
|
-
:'public_web_form' => :'BOOLEAN',
|
176
|
-
:'field_order' => :'Array<Array<Float>>',
|
177
|
-
:'permanent_document_url' => :'String',
|
183
|
+
:'redirect_url' => :'String',
|
184
|
+
:'first_template' => :'Boolean',
|
178
185
|
:'html' => :'String',
|
179
|
-
:'
|
180
|
-
:'
|
181
|
-
:'
|
182
|
-
:'
|
183
|
-
:'page_count' => :'Float',
|
184
|
-
:'encrypt_pdfs' => :'BOOLEAN',
|
185
|
-
:'webhook_url' => :'String',
|
186
|
-
:'embed_domains' => :'Array<String>',
|
187
|
-
:'parent_folder_id' => :'String',
|
188
|
-
:'allow_additional_properties' => :'BOOLEAN',
|
186
|
+
:'header_html' => :'String',
|
187
|
+
:'footer_html' => :'String',
|
188
|
+
:'scss' => :'String',
|
189
|
+
:'encrypt_pdfs' => :'Boolean',
|
189
190
|
:'encrypt_pdfs_password' => :'String',
|
190
|
-
:'
|
191
|
+
:'defaults' => :'TemplateDefaults',
|
192
|
+
:'fields' => :'Object',
|
191
193
|
:'shared_field_data' => :'Object',
|
194
|
+
:'field_order' => :'Array<Array<Float>>',
|
192
195
|
:'document_md5' => :'String',
|
193
|
-
:'first_template' => :'BOOLEAN',
|
194
|
-
:'defaults' => :'Template1Defaults',
|
195
|
-
:'editable_submissions' => :'BOOLEAN',
|
196
|
-
:'expire_submissions' => :'BOOLEAN',
|
197
|
-
:'name' => :'String',
|
198
|
-
:'footer_html' => :'String',
|
199
|
-
:'document_parse_error' => :'BOOLEAN',
|
200
|
-
:'fields' => :'Object',
|
201
196
|
:'document_filename' => :'String',
|
202
|
-
:'
|
203
|
-
:'
|
197
|
+
:'document_parse_error' => :'Boolean',
|
198
|
+
:'document_state' => :'String',
|
199
|
+
:'embed_domains' => :'Array<String>',
|
200
|
+
:'page_count' => :'Float',
|
201
|
+
:'document_processed' => :'Boolean',
|
202
|
+
:'demo' => :'Boolean',
|
203
|
+
:'id' => :'String',
|
204
|
+
:'template_type' => :'String',
|
205
|
+
:'page_dimensions' => :'Array<Array<Float>>',
|
206
|
+
:'document_url' => :'String',
|
207
|
+
:'permanent_document_url' => :'String',
|
208
|
+
:'path' => :'String',
|
209
|
+
:'parent_folder_id' => :'String'
|
204
210
|
}
|
205
211
|
end
|
206
212
|
|
213
|
+
# List of attributes with nullable: true
|
214
|
+
def self.openapi_nullable
|
215
|
+
Set.new([
|
216
|
+
:'name',
|
217
|
+
:'description',
|
218
|
+
:'webhook_url',
|
219
|
+
:'slack_webhook_url',
|
220
|
+
:'redirect_url',
|
221
|
+
:'html',
|
222
|
+
:'header_html',
|
223
|
+
:'footer_html',
|
224
|
+
:'scss',
|
225
|
+
:'encrypt_pdfs_password',
|
226
|
+
:'document_md5',
|
227
|
+
:'document_filename',
|
228
|
+
:'embed_domains',
|
229
|
+
:'page_dimensions',
|
230
|
+
:'document_url',
|
231
|
+
:'permanent_document_url',
|
232
|
+
:'parent_folder_id'
|
233
|
+
])
|
234
|
+
end
|
235
|
+
|
207
236
|
# Initializes the object
|
208
237
|
# @param [Hash] attributes Model attributes in the form of hash
|
209
238
|
def initialize(attributes = {})
|
210
|
-
|
239
|
+
if (!attributes.is_a?(Hash))
|
240
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::FullTemplate` initialize method"
|
241
|
+
end
|
242
|
+
|
243
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
244
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
245
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
246
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::FullTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
247
|
+
end
|
248
|
+
h[k.to_sym] = v
|
249
|
+
}
|
211
250
|
|
212
|
-
|
213
|
-
|
251
|
+
if attributes.key?(:'name')
|
252
|
+
self.name = attributes[:'name']
|
253
|
+
else
|
254
|
+
self.name = nil
|
255
|
+
end
|
214
256
|
|
215
|
-
if attributes.
|
216
|
-
self.
|
257
|
+
if attributes.key?(:'description')
|
258
|
+
self.description = attributes[:'description']
|
259
|
+
else
|
260
|
+
self.description = nil
|
217
261
|
end
|
218
262
|
|
219
|
-
if attributes.
|
220
|
-
self.
|
263
|
+
if attributes.key?(:'public_web_form')
|
264
|
+
self.public_web_form = attributes[:'public_web_form']
|
265
|
+
else
|
266
|
+
self.public_web_form = nil
|
221
267
|
end
|
222
268
|
|
223
|
-
if attributes.
|
224
|
-
self.
|
269
|
+
if attributes.key?(:'public_submissions')
|
270
|
+
self.public_submissions = attributes[:'public_submissions']
|
271
|
+
else
|
272
|
+
self.public_submissions = nil
|
225
273
|
end
|
226
274
|
|
227
|
-
if attributes.
|
228
|
-
self.
|
275
|
+
if attributes.key?(:'expire_submissions')
|
276
|
+
self.expire_submissions = attributes[:'expire_submissions']
|
277
|
+
else
|
278
|
+
self.expire_submissions = nil
|
229
279
|
end
|
230
280
|
|
231
|
-
if attributes.
|
281
|
+
if attributes.key?(:'expire_after')
|
232
282
|
self.expire_after = attributes[:'expire_after']
|
283
|
+
else
|
284
|
+
self.expire_after = nil
|
233
285
|
end
|
234
286
|
|
235
|
-
if attributes.
|
236
|
-
self.
|
287
|
+
if attributes.key?(:'expiration_interval')
|
288
|
+
self.expiration_interval = attributes[:'expiration_interval']
|
289
|
+
else
|
290
|
+
self.expiration_interval = nil
|
291
|
+
end
|
292
|
+
|
293
|
+
if attributes.key?(:'allow_additional_properties')
|
294
|
+
self.allow_additional_properties = attributes[:'allow_additional_properties']
|
295
|
+
else
|
296
|
+
self.allow_additional_properties = nil
|
297
|
+
end
|
298
|
+
|
299
|
+
if attributes.key?(:'editable_submissions')
|
300
|
+
self.editable_submissions = attributes[:'editable_submissions']
|
301
|
+
else
|
302
|
+
self.editable_submissions = nil
|
303
|
+
end
|
304
|
+
|
305
|
+
if attributes.key?(:'locked')
|
306
|
+
self.locked = attributes[:'locked']
|
307
|
+
else
|
308
|
+
self.locked = nil
|
237
309
|
end
|
238
310
|
|
239
|
-
if attributes.
|
311
|
+
if attributes.key?(:'webhook_url')
|
312
|
+
self.webhook_url = attributes[:'webhook_url']
|
313
|
+
else
|
314
|
+
self.webhook_url = nil
|
315
|
+
end
|
316
|
+
|
317
|
+
if attributes.key?(:'slack_webhook_url')
|
240
318
|
self.slack_webhook_url = attributes[:'slack_webhook_url']
|
319
|
+
else
|
320
|
+
self.slack_webhook_url = nil
|
241
321
|
end
|
242
322
|
|
243
|
-
if attributes.
|
244
|
-
self.
|
323
|
+
if attributes.key?(:'redirect_url')
|
324
|
+
self.redirect_url = attributes[:'redirect_url']
|
325
|
+
else
|
326
|
+
self.redirect_url = nil
|
245
327
|
end
|
246
328
|
|
247
|
-
if attributes.
|
248
|
-
self.
|
329
|
+
if attributes.key?(:'first_template')
|
330
|
+
self.first_template = attributes[:'first_template']
|
331
|
+
else
|
332
|
+
self.first_template = nil
|
249
333
|
end
|
250
334
|
|
251
|
-
if attributes.
|
335
|
+
if attributes.key?(:'html')
|
336
|
+
self.html = attributes[:'html']
|
337
|
+
else
|
338
|
+
self.html = nil
|
339
|
+
end
|
340
|
+
|
341
|
+
if attributes.key?(:'header_html')
|
252
342
|
self.header_html = attributes[:'header_html']
|
343
|
+
else
|
344
|
+
self.header_html = nil
|
253
345
|
end
|
254
346
|
|
255
|
-
if attributes.
|
256
|
-
self.
|
347
|
+
if attributes.key?(:'footer_html')
|
348
|
+
self.footer_html = attributes[:'footer_html']
|
349
|
+
else
|
350
|
+
self.footer_html = nil
|
257
351
|
end
|
258
352
|
|
259
|
-
if attributes.
|
353
|
+
if attributes.key?(:'scss')
|
354
|
+
self.scss = attributes[:'scss']
|
355
|
+
else
|
356
|
+
self.scss = nil
|
357
|
+
end
|
358
|
+
|
359
|
+
if attributes.key?(:'encrypt_pdfs')
|
360
|
+
self.encrypt_pdfs = attributes[:'encrypt_pdfs']
|
361
|
+
else
|
362
|
+
self.encrypt_pdfs = nil
|
363
|
+
end
|
364
|
+
|
365
|
+
if attributes.key?(:'encrypt_pdfs_password')
|
366
|
+
self.encrypt_pdfs_password = attributes[:'encrypt_pdfs_password']
|
367
|
+
else
|
368
|
+
self.encrypt_pdfs_password = nil
|
369
|
+
end
|
370
|
+
|
371
|
+
if attributes.key?(:'defaults')
|
372
|
+
self.defaults = attributes[:'defaults']
|
373
|
+
else
|
374
|
+
self.defaults = nil
|
375
|
+
end
|
376
|
+
|
377
|
+
if attributes.key?(:'fields')
|
378
|
+
self.fields = attributes[:'fields']
|
379
|
+
else
|
380
|
+
self.fields = nil
|
381
|
+
end
|
382
|
+
|
383
|
+
if attributes.key?(:'shared_field_data')
|
384
|
+
self.shared_field_data = attributes[:'shared_field_data']
|
385
|
+
else
|
386
|
+
self.shared_field_data = nil
|
387
|
+
end
|
388
|
+
|
389
|
+
if attributes.key?(:'field_order')
|
260
390
|
if (value = attributes[:'field_order']).is_a?(Array)
|
261
391
|
self.field_order = value
|
262
392
|
end
|
393
|
+
else
|
394
|
+
self.field_order = nil
|
263
395
|
end
|
264
396
|
|
265
|
-
if attributes.
|
266
|
-
self.
|
397
|
+
if attributes.key?(:'document_md5')
|
398
|
+
self.document_md5 = attributes[:'document_md5']
|
399
|
+
else
|
400
|
+
self.document_md5 = nil
|
267
401
|
end
|
268
402
|
|
269
|
-
if attributes.
|
270
|
-
self.
|
403
|
+
if attributes.key?(:'document_filename')
|
404
|
+
self.document_filename = attributes[:'document_filename']
|
405
|
+
else
|
406
|
+
self.document_filename = nil
|
271
407
|
end
|
272
408
|
|
273
|
-
if attributes.
|
274
|
-
self.
|
409
|
+
if attributes.key?(:'document_parse_error')
|
410
|
+
self.document_parse_error = attributes[:'document_parse_error']
|
411
|
+
else
|
412
|
+
self.document_parse_error = nil
|
413
|
+
end
|
414
|
+
|
415
|
+
if attributes.key?(:'document_state')
|
416
|
+
self.document_state = attributes[:'document_state']
|
417
|
+
else
|
418
|
+
self.document_state = nil
|
419
|
+
end
|
420
|
+
|
421
|
+
if attributes.key?(:'embed_domains')
|
422
|
+
if (value = attributes[:'embed_domains']).is_a?(Array)
|
423
|
+
self.embed_domains = value
|
424
|
+
end
|
425
|
+
else
|
426
|
+
self.embed_domains = nil
|
427
|
+
end
|
428
|
+
|
429
|
+
if attributes.key?(:'page_count')
|
430
|
+
self.page_count = attributes[:'page_count']
|
431
|
+
else
|
432
|
+
self.page_count = nil
|
433
|
+
end
|
434
|
+
|
435
|
+
if attributes.key?(:'document_processed')
|
436
|
+
self.document_processed = attributes[:'document_processed']
|
437
|
+
else
|
438
|
+
self.document_processed = nil
|
275
439
|
end
|
276
440
|
|
277
|
-
if attributes.
|
441
|
+
if attributes.key?(:'demo')
|
442
|
+
self.demo = attributes[:'demo']
|
443
|
+
else
|
444
|
+
self.demo = nil
|
445
|
+
end
|
446
|
+
|
447
|
+
if attributes.key?(:'id')
|
278
448
|
self.id = attributes[:'id']
|
449
|
+
else
|
450
|
+
self.id = nil
|
279
451
|
end
|
280
452
|
|
281
|
-
if attributes.
|
453
|
+
if attributes.key?(:'template_type')
|
454
|
+
self.template_type = attributes[:'template_type']
|
455
|
+
else
|
456
|
+
self.template_type = nil
|
457
|
+
end
|
458
|
+
|
459
|
+
if attributes.key?(:'page_dimensions')
|
282
460
|
if (value = attributes[:'page_dimensions']).is_a?(Array)
|
283
461
|
self.page_dimensions = value
|
284
462
|
end
|
463
|
+
else
|
464
|
+
self.page_dimensions = nil
|
285
465
|
end
|
286
466
|
|
287
|
-
if attributes.
|
288
|
-
self.
|
467
|
+
if attributes.key?(:'document_url')
|
468
|
+
self.document_url = attributes[:'document_url']
|
469
|
+
else
|
470
|
+
self.document_url = nil
|
289
471
|
end
|
290
472
|
|
291
|
-
if attributes.
|
292
|
-
self.
|
473
|
+
if attributes.key?(:'permanent_document_url')
|
474
|
+
self.permanent_document_url = attributes[:'permanent_document_url']
|
475
|
+
else
|
476
|
+
self.permanent_document_url = nil
|
293
477
|
end
|
294
478
|
|
295
|
-
if attributes.
|
296
|
-
self.
|
479
|
+
if attributes.key?(:'path')
|
480
|
+
self.path = attributes[:'path']
|
481
|
+
else
|
482
|
+
self.path = nil
|
297
483
|
end
|
298
484
|
|
299
|
-
if attributes.
|
300
|
-
self.
|
485
|
+
if attributes.key?(:'parent_folder_id')
|
486
|
+
self.parent_folder_id = attributes[:'parent_folder_id']
|
487
|
+
else
|
488
|
+
self.parent_folder_id = nil
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
493
|
+
# @return Array for valid properties with the reasons
|
494
|
+
def list_invalid_properties
|
495
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
496
|
+
invalid_properties = Array.new
|
497
|
+
if @public_web_form.nil?
|
498
|
+
invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.')
|
301
499
|
end
|
302
500
|
|
303
|
-
if
|
304
|
-
|
305
|
-
self.embed_domains = value
|
306
|
-
end
|
501
|
+
if @public_submissions.nil?
|
502
|
+
invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.')
|
307
503
|
end
|
308
504
|
|
309
|
-
if
|
310
|
-
|
505
|
+
if @expire_submissions.nil?
|
506
|
+
invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.')
|
311
507
|
end
|
312
508
|
|
313
|
-
if
|
314
|
-
|
509
|
+
if @expire_after.nil?
|
510
|
+
invalid_properties.push('invalid value for "expire_after", expire_after cannot be nil.')
|
315
511
|
end
|
316
512
|
|
317
|
-
if
|
318
|
-
|
513
|
+
if @expiration_interval.nil?
|
514
|
+
invalid_properties.push('invalid value for "expiration_interval", expiration_interval cannot be nil.')
|
319
515
|
end
|
320
516
|
|
321
|
-
if
|
322
|
-
|
517
|
+
if @allow_additional_properties.nil?
|
518
|
+
invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
|
323
519
|
end
|
324
520
|
|
325
|
-
if
|
326
|
-
|
521
|
+
if @editable_submissions.nil?
|
522
|
+
invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.')
|
327
523
|
end
|
328
524
|
|
329
|
-
if
|
330
|
-
|
525
|
+
if @locked.nil?
|
526
|
+
invalid_properties.push('invalid value for "locked", locked cannot be nil.')
|
331
527
|
end
|
332
528
|
|
333
|
-
if
|
334
|
-
|
529
|
+
if @first_template.nil?
|
530
|
+
invalid_properties.push('invalid value for "first_template", first_template cannot be nil.')
|
335
531
|
end
|
336
532
|
|
337
|
-
if
|
338
|
-
|
533
|
+
if @encrypt_pdfs.nil?
|
534
|
+
invalid_properties.push('invalid value for "encrypt_pdfs", encrypt_pdfs cannot be nil.')
|
339
535
|
end
|
340
536
|
|
341
|
-
if
|
342
|
-
|
537
|
+
if @defaults.nil?
|
538
|
+
invalid_properties.push('invalid value for "defaults", defaults cannot be nil.')
|
343
539
|
end
|
344
540
|
|
345
|
-
if
|
346
|
-
|
541
|
+
if @fields.nil?
|
542
|
+
invalid_properties.push('invalid value for "fields", fields cannot be nil.')
|
347
543
|
end
|
348
544
|
|
349
|
-
if
|
350
|
-
|
545
|
+
if @shared_field_data.nil?
|
546
|
+
invalid_properties.push('invalid value for "shared_field_data", shared_field_data cannot be nil.')
|
351
547
|
end
|
352
548
|
|
353
|
-
if
|
354
|
-
|
549
|
+
if @field_order.nil?
|
550
|
+
invalid_properties.push('invalid value for "field_order", field_order cannot be nil.')
|
355
551
|
end
|
356
552
|
|
357
|
-
if
|
358
|
-
|
553
|
+
if @document_parse_error.nil?
|
554
|
+
invalid_properties.push('invalid value for "document_parse_error", document_parse_error cannot be nil.')
|
359
555
|
end
|
360
556
|
|
361
|
-
if
|
362
|
-
|
557
|
+
if @document_state.nil?
|
558
|
+
invalid_properties.push('invalid value for "document_state", document_state cannot be nil.')
|
363
559
|
end
|
364
560
|
|
365
|
-
if
|
366
|
-
|
561
|
+
if @page_count.nil?
|
562
|
+
invalid_properties.push('invalid value for "page_count", page_count cannot be nil.')
|
367
563
|
end
|
368
564
|
|
369
|
-
if
|
370
|
-
|
565
|
+
if @document_processed.nil?
|
566
|
+
invalid_properties.push('invalid value for "document_processed", document_processed cannot be nil.')
|
371
567
|
end
|
372
568
|
|
373
|
-
if
|
374
|
-
|
569
|
+
if @demo.nil?
|
570
|
+
invalid_properties.push('invalid value for "demo", demo cannot be nil.')
|
571
|
+
end
|
572
|
+
|
573
|
+
if @id.nil?
|
574
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
575
|
+
end
|
576
|
+
|
577
|
+
if @template_type.nil?
|
578
|
+
invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
|
579
|
+
end
|
580
|
+
|
581
|
+
if @path.nil?
|
582
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
375
583
|
end
|
376
|
-
end
|
377
584
|
|
378
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
379
|
-
# @return Array for valid properties with the reasons
|
380
|
-
def list_invalid_properties
|
381
|
-
invalid_properties = Array.new
|
382
585
|
invalid_properties
|
383
586
|
end
|
384
587
|
|
385
588
|
# Check to see if the all the properties in the model are valid
|
386
589
|
# @return true if the model is valid
|
387
590
|
def valid?
|
388
|
-
|
591
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
592
|
+
return false if @public_web_form.nil?
|
593
|
+
return false if @public_submissions.nil?
|
594
|
+
return false if @expire_submissions.nil?
|
595
|
+
return false if @expire_after.nil?
|
596
|
+
return false if @expiration_interval.nil?
|
597
|
+
expiration_interval_validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
|
389
598
|
return false unless expiration_interval_validator.valid?(@expiration_interval)
|
599
|
+
return false if @allow_additional_properties.nil?
|
600
|
+
return false if @editable_submissions.nil?
|
601
|
+
return false if @locked.nil?
|
602
|
+
return false if @first_template.nil?
|
603
|
+
return false if @encrypt_pdfs.nil?
|
604
|
+
return false if @defaults.nil?
|
605
|
+
return false if @fields.nil?
|
606
|
+
return false if @shared_field_data.nil?
|
607
|
+
return false if @field_order.nil?
|
608
|
+
return false if @document_parse_error.nil?
|
609
|
+
return false if @document_state.nil?
|
610
|
+
return false if @page_count.nil?
|
611
|
+
return false if @document_processed.nil?
|
612
|
+
return false if @demo.nil?
|
613
|
+
return false if @id.nil?
|
614
|
+
return false if @template_type.nil?
|
615
|
+
return false if @path.nil?
|
390
616
|
true
|
391
617
|
end
|
392
618
|
|
393
619
|
# Custom attribute writer method checking allowed values (enum).
|
394
620
|
# @param [Object] expiration_interval Object to be assigned
|
395
621
|
def expiration_interval=(expiration_interval)
|
396
|
-
validator = EnumAttributeValidator.new('String', [
|
622
|
+
validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
|
397
623
|
unless validator.valid?(expiration_interval)
|
398
|
-
fail ArgumentError,
|
624
|
+
fail ArgumentError, "invalid value for \"expiration_interval\", must be one of #{validator.allowable_values}."
|
399
625
|
end
|
400
626
|
@expiration_interval = expiration_interval
|
401
627
|
end
|
@@ -405,45 +631,45 @@ module DocSpring
|
|
405
631
|
def ==(o)
|
406
632
|
return true if self.equal?(o)
|
407
633
|
self.class == o.class &&
|
408
|
-
|
409
|
-
expiration_interval == o.expiration_interval &&
|
410
|
-
scss == o.scss &&
|
411
|
-
document_state == o.document_state &&
|
412
|
-
expire_after == o.expire_after &&
|
634
|
+
name == o.name &&
|
413
635
|
description == o.description &&
|
414
|
-
slack_webhook_url == o.slack_webhook_url &&
|
415
|
-
demo == o.demo &&
|
416
|
-
path == o.path &&
|
417
|
-
header_html == o.header_html &&
|
418
636
|
public_web_form == o.public_web_form &&
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
637
|
+
public_submissions == o.public_submissions &&
|
638
|
+
expire_submissions == o.expire_submissions &&
|
639
|
+
expire_after == o.expire_after &&
|
640
|
+
expiration_interval == o.expiration_interval &&
|
641
|
+
allow_additional_properties == o.allow_additional_properties &&
|
642
|
+
editable_submissions == o.editable_submissions &&
|
425
643
|
locked == o.locked &&
|
426
|
-
page_count == o.page_count &&
|
427
|
-
encrypt_pdfs == o.encrypt_pdfs &&
|
428
644
|
webhook_url == o.webhook_url &&
|
429
|
-
|
430
|
-
|
431
|
-
allow_additional_properties == o.allow_additional_properties &&
|
432
|
-
encrypt_pdfs_password == o.encrypt_pdfs_password &&
|
433
|
-
public_submissions == o.public_submissions &&
|
434
|
-
shared_field_data == o.shared_field_data &&
|
435
|
-
document_md5 == o.document_md5 &&
|
645
|
+
slack_webhook_url == o.slack_webhook_url &&
|
646
|
+
redirect_url == o.redirect_url &&
|
436
647
|
first_template == o.first_template &&
|
437
|
-
|
438
|
-
|
439
|
-
expire_submissions == o.expire_submissions &&
|
440
|
-
name == o.name &&
|
648
|
+
html == o.html &&
|
649
|
+
header_html == o.header_html &&
|
441
650
|
footer_html == o.footer_html &&
|
442
|
-
|
651
|
+
scss == o.scss &&
|
652
|
+
encrypt_pdfs == o.encrypt_pdfs &&
|
653
|
+
encrypt_pdfs_password == o.encrypt_pdfs_password &&
|
654
|
+
defaults == o.defaults &&
|
443
655
|
fields == o.fields &&
|
656
|
+
shared_field_data == o.shared_field_data &&
|
657
|
+
field_order == o.field_order &&
|
658
|
+
document_md5 == o.document_md5 &&
|
444
659
|
document_filename == o.document_filename &&
|
445
|
-
|
446
|
-
|
660
|
+
document_parse_error == o.document_parse_error &&
|
661
|
+
document_state == o.document_state &&
|
662
|
+
embed_domains == o.embed_domains &&
|
663
|
+
page_count == o.page_count &&
|
664
|
+
document_processed == o.document_processed &&
|
665
|
+
demo == o.demo &&
|
666
|
+
id == o.id &&
|
667
|
+
template_type == o.template_type &&
|
668
|
+
page_dimensions == o.page_dimensions &&
|
669
|
+
document_url == o.document_url &&
|
670
|
+
permanent_document_url == o.permanent_document_url &&
|
671
|
+
path == o.path &&
|
672
|
+
parent_folder_id == o.parent_folder_id
|
447
673
|
end
|
448
674
|
|
449
675
|
# @see the `==` method
|
@@ -453,39 +679,42 @@ module DocSpring
|
|
453
679
|
end
|
454
680
|
|
455
681
|
# Calculates hash code according to all attributes.
|
456
|
-
# @return [
|
682
|
+
# @return [Integer] Hash code
|
457
683
|
def hash
|
458
|
-
[
|
684
|
+
[name, description, public_web_form, public_submissions, expire_submissions, expire_after, expiration_interval, allow_additional_properties, editable_submissions, locked, webhook_url, slack_webhook_url, redirect_url, first_template, html, header_html, footer_html, scss, encrypt_pdfs, encrypt_pdfs_password, defaults, fields, shared_field_data, field_order, document_md5, document_filename, document_parse_error, document_state, embed_domains, page_count, document_processed, demo, id, template_type, page_dimensions, document_url, permanent_document_url, path, parent_folder_id].hash
|
459
685
|
end
|
460
686
|
|
461
687
|
# Builds the object from hash
|
462
688
|
# @param [Hash] attributes Model attributes in the form of hash
|
463
689
|
# @return [Object] Returns the model itself
|
464
|
-
def build_from_hash(attributes)
|
690
|
+
def self.build_from_hash(attributes)
|
465
691
|
return nil unless attributes.is_a?(Hash)
|
466
|
-
|
467
|
-
|
468
|
-
|
692
|
+
attributes = attributes.transform_keys(&:to_sym)
|
693
|
+
transformed_hash = {}
|
694
|
+
openapi_types.each_pair do |key, type|
|
695
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
696
|
+
transformed_hash["#{key}"] = nil
|
697
|
+
elsif type =~ /\AArray<(.*)>/i
|
698
|
+
# check to ensure the input is an array given that the attribute
|
469
699
|
# is documented as an array but the input is not
|
470
|
-
if attributes[
|
471
|
-
|
700
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
701
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
472
702
|
end
|
473
|
-
elsif !attributes[
|
474
|
-
|
475
|
-
end
|
703
|
+
elsif !attributes[attribute_map[key]].nil?
|
704
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
705
|
+
end
|
476
706
|
end
|
477
|
-
|
478
|
-
self
|
707
|
+
new(transformed_hash)
|
479
708
|
end
|
480
709
|
|
481
710
|
# Deserializes the data based on type
|
482
711
|
# @param string type Data type
|
483
712
|
# @param string value Value to be deserialized
|
484
713
|
# @return [Object] Deserialized data
|
485
|
-
def _deserialize(type, value)
|
714
|
+
def self._deserialize(type, value)
|
486
715
|
case type.to_sym
|
487
|
-
when :
|
488
|
-
|
716
|
+
when :Time
|
717
|
+
Time.parse(value)
|
489
718
|
when :Date
|
490
719
|
Date.parse(value)
|
491
720
|
when :String
|
@@ -494,7 +723,7 @@ module DocSpring
|
|
494
723
|
value.to_i
|
495
724
|
when :Float
|
496
725
|
value.to_f
|
497
|
-
when :
|
726
|
+
when :Boolean
|
498
727
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
499
728
|
true
|
500
729
|
else
|
@@ -515,8 +744,9 @@ module DocSpring
|
|
515
744
|
end
|
516
745
|
end
|
517
746
|
else # model
|
518
|
-
|
519
|
-
|
747
|
+
# models (e.g. Pet) or oneOf
|
748
|
+
klass = DocSpring.const_get(type)
|
749
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
520
750
|
end
|
521
751
|
end
|
522
752
|
|
@@ -538,7 +768,11 @@ module DocSpring
|
|
538
768
|
hash = {}
|
539
769
|
self.class.attribute_map.each_pair do |attr, param|
|
540
770
|
value = self.send(attr)
|
541
|
-
|
771
|
+
if value.nil?
|
772
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
773
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
774
|
+
end
|
775
|
+
|
542
776
|
hash[param] = _to_hash(value)
|
543
777
|
end
|
544
778
|
hash
|
@@ -561,5 +795,7 @@ module DocSpring
|
|
561
795
|
value
|
562
796
|
end
|
563
797
|
end
|
798
|
+
|
564
799
|
end
|
800
|
+
|
565
801
|
end
|