docspring 1.4.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,51 +3,52 @@
|
|
|
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
17
|
class PendingTemplate
|
|
17
|
-
attr_accessor :
|
|
18
|
-
|
|
19
|
-
attr_accessor :webhook_url
|
|
18
|
+
attr_accessor :id
|
|
20
19
|
|
|
21
|
-
attr_accessor :
|
|
20
|
+
attr_accessor :name
|
|
22
21
|
|
|
23
|
-
attr_accessor :
|
|
22
|
+
attr_accessor :description
|
|
24
23
|
|
|
25
|
-
attr_accessor :
|
|
24
|
+
attr_accessor :template_type
|
|
26
25
|
|
|
27
|
-
attr_accessor :
|
|
26
|
+
attr_accessor :public_web_form
|
|
28
27
|
|
|
29
28
|
attr_accessor :public_submissions
|
|
30
29
|
|
|
31
|
-
attr_accessor :
|
|
32
|
-
|
|
33
|
-
attr_accessor :path
|
|
30
|
+
attr_accessor :expire_submissions
|
|
34
31
|
|
|
35
|
-
attr_accessor :
|
|
32
|
+
attr_accessor :expire_after
|
|
36
33
|
|
|
37
|
-
attr_accessor :
|
|
34
|
+
attr_accessor :locked
|
|
38
35
|
|
|
39
|
-
attr_accessor :
|
|
36
|
+
attr_accessor :expiration_interval
|
|
40
37
|
|
|
41
|
-
attr_accessor :
|
|
38
|
+
attr_accessor :allow_additional_properties
|
|
42
39
|
|
|
43
|
-
attr_accessor :
|
|
40
|
+
attr_accessor :editable_submissions
|
|
44
41
|
|
|
45
|
-
attr_accessor :
|
|
42
|
+
attr_accessor :webhook_url
|
|
46
43
|
|
|
47
|
-
attr_accessor :
|
|
44
|
+
attr_accessor :slack_webhook_url
|
|
48
45
|
|
|
49
46
|
attr_accessor :redirect_url
|
|
50
47
|
|
|
48
|
+
attr_accessor :path
|
|
49
|
+
|
|
50
|
+
attr_accessor :parent_folder_id
|
|
51
|
+
|
|
51
52
|
class EnumAttributeValidator
|
|
52
53
|
attr_reader :datatype
|
|
53
54
|
attr_reader :allowable_values
|
|
@@ -73,147 +74,239 @@ module DocSpring
|
|
|
73
74
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
75
|
def self.attribute_map
|
|
75
76
|
{
|
|
76
|
-
:'
|
|
77
|
-
:'
|
|
78
|
-
:'parent_folder_id' => :'parent_folder_id',
|
|
79
|
-
:'expire_after' => :'expire_after',
|
|
80
|
-
:'allow_additional_properties' => :'allow_additional_properties',
|
|
77
|
+
:'id' => :'id',
|
|
78
|
+
:'name' => :'name',
|
|
81
79
|
:'description' => :'description',
|
|
82
|
-
:'
|
|
83
|
-
:'slack_webhook_url' => :'slack_webhook_url',
|
|
84
|
-
:'path' => :'path',
|
|
80
|
+
:'template_type' => :'template_type',
|
|
85
81
|
:'public_web_form' => :'public_web_form',
|
|
86
|
-
:'
|
|
82
|
+
:'public_submissions' => :'public_submissions',
|
|
87
83
|
:'expire_submissions' => :'expire_submissions',
|
|
88
|
-
:'
|
|
89
|
-
:'template_type' => :'template_type',
|
|
90
|
-
:'id' => :'id',
|
|
84
|
+
:'expire_after' => :'expire_after',
|
|
91
85
|
:'locked' => :'locked',
|
|
92
|
-
:'
|
|
86
|
+
:'expiration_interval' => :'expiration_interval',
|
|
87
|
+
:'allow_additional_properties' => :'allow_additional_properties',
|
|
88
|
+
:'editable_submissions' => :'editable_submissions',
|
|
89
|
+
:'webhook_url' => :'webhook_url',
|
|
90
|
+
:'slack_webhook_url' => :'slack_webhook_url',
|
|
91
|
+
:'redirect_url' => :'redirect_url',
|
|
92
|
+
:'path' => :'path',
|
|
93
|
+
:'parent_folder_id' => :'parent_folder_id'
|
|
93
94
|
}
|
|
94
95
|
end
|
|
95
96
|
|
|
97
|
+
# Returns all the JSON keys this model knows about
|
|
98
|
+
def self.acceptable_attributes
|
|
99
|
+
attribute_map.values
|
|
100
|
+
end
|
|
101
|
+
|
|
96
102
|
# Attribute type mapping.
|
|
97
103
|
def self.openapi_types
|
|
98
104
|
{
|
|
105
|
+
:'id' => :'String',
|
|
106
|
+
:'name' => :'String',
|
|
107
|
+
:'description' => :'String',
|
|
108
|
+
:'template_type' => :'String',
|
|
109
|
+
:'public_web_form' => :'Boolean',
|
|
110
|
+
:'public_submissions' => :'Boolean',
|
|
111
|
+
:'expire_submissions' => :'Boolean',
|
|
112
|
+
:'expire_after' => :'Float',
|
|
113
|
+
:'locked' => :'Boolean',
|
|
99
114
|
:'expiration_interval' => :'String',
|
|
115
|
+
:'allow_additional_properties' => :'Boolean',
|
|
116
|
+
:'editable_submissions' => :'Boolean',
|
|
100
117
|
:'webhook_url' => :'String',
|
|
101
|
-
:'parent_folder_id' => :'String',
|
|
102
|
-
:'expire_after' => :'Float',
|
|
103
|
-
:'allow_additional_properties' => :'BOOLEAN',
|
|
104
|
-
:'description' => :'String',
|
|
105
|
-
:'public_submissions' => :'BOOLEAN',
|
|
106
118
|
:'slack_webhook_url' => :'String',
|
|
119
|
+
:'redirect_url' => :'String',
|
|
107
120
|
:'path' => :'String',
|
|
108
|
-
:'
|
|
109
|
-
:'editable_submissions' => :'BOOLEAN',
|
|
110
|
-
:'expire_submissions' => :'BOOLEAN',
|
|
111
|
-
:'name' => :'String',
|
|
112
|
-
:'template_type' => :'String',
|
|
113
|
-
:'id' => :'String',
|
|
114
|
-
:'locked' => :'BOOLEAN',
|
|
115
|
-
:'redirect_url' => :'String'
|
|
121
|
+
:'parent_folder_id' => :'String'
|
|
116
122
|
}
|
|
117
123
|
end
|
|
118
124
|
|
|
125
|
+
# List of attributes with nullable: true
|
|
126
|
+
def self.openapi_nullable
|
|
127
|
+
Set.new([
|
|
128
|
+
:'name',
|
|
129
|
+
:'description',
|
|
130
|
+
:'webhook_url',
|
|
131
|
+
:'slack_webhook_url',
|
|
132
|
+
:'redirect_url',
|
|
133
|
+
:'parent_folder_id'
|
|
134
|
+
])
|
|
135
|
+
end
|
|
136
|
+
|
|
119
137
|
# Initializes the object
|
|
120
138
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
139
|
def initialize(attributes = {})
|
|
122
|
-
|
|
140
|
+
if (!attributes.is_a?(Hash))
|
|
141
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::PendingTemplate` initialize method"
|
|
142
|
+
end
|
|
123
143
|
|
|
124
|
-
# convert string to symbol for hash key
|
|
125
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
144
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
145
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
146
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
147
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::PendingTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
148
|
+
end
|
|
149
|
+
h[k.to_sym] = v
|
|
150
|
+
}
|
|
126
151
|
|
|
127
|
-
if attributes.
|
|
128
|
-
self.
|
|
152
|
+
if attributes.key?(:'id')
|
|
153
|
+
self.id = attributes[:'id']
|
|
154
|
+
else
|
|
155
|
+
self.id = nil
|
|
129
156
|
end
|
|
130
157
|
|
|
131
|
-
if attributes.
|
|
132
|
-
self.
|
|
158
|
+
if attributes.key?(:'name')
|
|
159
|
+
self.name = attributes[:'name']
|
|
160
|
+
else
|
|
161
|
+
self.name = nil
|
|
133
162
|
end
|
|
134
163
|
|
|
135
|
-
if attributes.
|
|
136
|
-
self.
|
|
164
|
+
if attributes.key?(:'description')
|
|
165
|
+
self.description = attributes[:'description']
|
|
166
|
+
else
|
|
167
|
+
self.description = nil
|
|
137
168
|
end
|
|
138
169
|
|
|
139
|
-
if attributes.
|
|
140
|
-
self.
|
|
170
|
+
if attributes.key?(:'template_type')
|
|
171
|
+
self.template_type = attributes[:'template_type']
|
|
172
|
+
else
|
|
173
|
+
self.template_type = nil
|
|
141
174
|
end
|
|
142
175
|
|
|
143
|
-
if attributes.
|
|
144
|
-
self.
|
|
176
|
+
if attributes.key?(:'public_web_form')
|
|
177
|
+
self.public_web_form = attributes[:'public_web_form']
|
|
178
|
+
else
|
|
179
|
+
self.public_web_form = nil
|
|
145
180
|
end
|
|
146
181
|
|
|
147
|
-
if attributes.
|
|
148
|
-
self.
|
|
182
|
+
if attributes.key?(:'public_submissions')
|
|
183
|
+
self.public_submissions = attributes[:'public_submissions']
|
|
184
|
+
else
|
|
185
|
+
self.public_submissions = nil
|
|
149
186
|
end
|
|
150
187
|
|
|
151
|
-
if attributes.
|
|
152
|
-
self.
|
|
188
|
+
if attributes.key?(:'expire_submissions')
|
|
189
|
+
self.expire_submissions = attributes[:'expire_submissions']
|
|
190
|
+
else
|
|
191
|
+
self.expire_submissions = nil
|
|
153
192
|
end
|
|
154
193
|
|
|
155
|
-
if attributes.
|
|
156
|
-
self.
|
|
194
|
+
if attributes.key?(:'expire_after')
|
|
195
|
+
self.expire_after = attributes[:'expire_after']
|
|
157
196
|
end
|
|
158
197
|
|
|
159
|
-
if attributes.
|
|
160
|
-
self.
|
|
198
|
+
if attributes.key?(:'locked')
|
|
199
|
+
self.locked = attributes[:'locked']
|
|
200
|
+
else
|
|
201
|
+
self.locked = nil
|
|
161
202
|
end
|
|
162
203
|
|
|
163
|
-
if attributes.
|
|
164
|
-
self.
|
|
204
|
+
if attributes.key?(:'expiration_interval')
|
|
205
|
+
self.expiration_interval = attributes[:'expiration_interval']
|
|
165
206
|
end
|
|
166
207
|
|
|
167
|
-
if attributes.
|
|
168
|
-
self.
|
|
208
|
+
if attributes.key?(:'allow_additional_properties')
|
|
209
|
+
self.allow_additional_properties = attributes[:'allow_additional_properties']
|
|
210
|
+
else
|
|
211
|
+
self.allow_additional_properties = nil
|
|
169
212
|
end
|
|
170
213
|
|
|
171
|
-
if attributes.
|
|
172
|
-
self.
|
|
214
|
+
if attributes.key?(:'editable_submissions')
|
|
215
|
+
self.editable_submissions = attributes[:'editable_submissions']
|
|
216
|
+
else
|
|
217
|
+
self.editable_submissions = nil
|
|
173
218
|
end
|
|
174
219
|
|
|
175
|
-
if attributes.
|
|
176
|
-
self.
|
|
220
|
+
if attributes.key?(:'webhook_url')
|
|
221
|
+
self.webhook_url = attributes[:'webhook_url']
|
|
222
|
+
else
|
|
223
|
+
self.webhook_url = nil
|
|
177
224
|
end
|
|
178
225
|
|
|
179
|
-
if attributes.
|
|
180
|
-
self.
|
|
226
|
+
if attributes.key?(:'slack_webhook_url')
|
|
227
|
+
self.slack_webhook_url = attributes[:'slack_webhook_url']
|
|
228
|
+
else
|
|
229
|
+
self.slack_webhook_url = nil
|
|
181
230
|
end
|
|
182
231
|
|
|
183
|
-
if attributes.
|
|
184
|
-
self.
|
|
232
|
+
if attributes.key?(:'redirect_url')
|
|
233
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
234
|
+
else
|
|
235
|
+
self.redirect_url = nil
|
|
185
236
|
end
|
|
186
237
|
|
|
187
|
-
if attributes.
|
|
188
|
-
self.
|
|
238
|
+
if attributes.key?(:'path')
|
|
239
|
+
self.path = attributes[:'path']
|
|
189
240
|
end
|
|
190
241
|
|
|
191
|
-
if attributes.
|
|
192
|
-
self.
|
|
242
|
+
if attributes.key?(:'parent_folder_id')
|
|
243
|
+
self.parent_folder_id = attributes[:'parent_folder_id']
|
|
193
244
|
end
|
|
194
245
|
end
|
|
195
246
|
|
|
196
247
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
197
248
|
# @return Array for valid properties with the reasons
|
|
198
249
|
def list_invalid_properties
|
|
250
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
199
251
|
invalid_properties = Array.new
|
|
252
|
+
if @id.nil?
|
|
253
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if @template_type.nil?
|
|
257
|
+
invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if @public_web_form.nil?
|
|
261
|
+
invalid_properties.push('invalid value for "public_web_form", public_web_form cannot be nil.')
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if @public_submissions.nil?
|
|
265
|
+
invalid_properties.push('invalid value for "public_submissions", public_submissions cannot be nil.')
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if @expire_submissions.nil?
|
|
269
|
+
invalid_properties.push('invalid value for "expire_submissions", expire_submissions cannot be nil.')
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if @locked.nil?
|
|
273
|
+
invalid_properties.push('invalid value for "locked", locked cannot be nil.')
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if @allow_additional_properties.nil?
|
|
277
|
+
invalid_properties.push('invalid value for "allow_additional_properties", allow_additional_properties cannot be nil.')
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if @editable_submissions.nil?
|
|
281
|
+
invalid_properties.push('invalid value for "editable_submissions", editable_submissions cannot be nil.')
|
|
282
|
+
end
|
|
283
|
+
|
|
200
284
|
invalid_properties
|
|
201
285
|
end
|
|
202
286
|
|
|
203
287
|
# Check to see if the all the properties in the model are valid
|
|
204
288
|
# @return true if the model is valid
|
|
205
289
|
def valid?
|
|
206
|
-
|
|
290
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
291
|
+
return false if @id.nil?
|
|
292
|
+
return false if @template_type.nil?
|
|
293
|
+
return false if @public_web_form.nil?
|
|
294
|
+
return false if @public_submissions.nil?
|
|
295
|
+
return false if @expire_submissions.nil?
|
|
296
|
+
return false if @locked.nil?
|
|
297
|
+
expiration_interval_validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
|
|
207
298
|
return false unless expiration_interval_validator.valid?(@expiration_interval)
|
|
299
|
+
return false if @allow_additional_properties.nil?
|
|
300
|
+
return false if @editable_submissions.nil?
|
|
208
301
|
true
|
|
209
302
|
end
|
|
210
303
|
|
|
211
304
|
# Custom attribute writer method checking allowed values (enum).
|
|
212
305
|
# @param [Object] expiration_interval Object to be assigned
|
|
213
306
|
def expiration_interval=(expiration_interval)
|
|
214
|
-
validator = EnumAttributeValidator.new('String', [
|
|
307
|
+
validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
|
|
215
308
|
unless validator.valid?(expiration_interval)
|
|
216
|
-
fail ArgumentError,
|
|
309
|
+
fail ArgumentError, "invalid value for \"expiration_interval\", must be one of #{validator.allowable_values}."
|
|
217
310
|
end
|
|
218
311
|
@expiration_interval = expiration_interval
|
|
219
312
|
end
|
|
@@ -223,23 +316,23 @@ module DocSpring
|
|
|
223
316
|
def ==(o)
|
|
224
317
|
return true if self.equal?(o)
|
|
225
318
|
self.class == o.class &&
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
parent_folder_id == o.parent_folder_id &&
|
|
229
|
-
expire_after == o.expire_after &&
|
|
230
|
-
allow_additional_properties == o.allow_additional_properties &&
|
|
319
|
+
id == o.id &&
|
|
320
|
+
name == o.name &&
|
|
231
321
|
description == o.description &&
|
|
232
|
-
|
|
233
|
-
slack_webhook_url == o.slack_webhook_url &&
|
|
234
|
-
path == o.path &&
|
|
322
|
+
template_type == o.template_type &&
|
|
235
323
|
public_web_form == o.public_web_form &&
|
|
236
|
-
|
|
324
|
+
public_submissions == o.public_submissions &&
|
|
237
325
|
expire_submissions == o.expire_submissions &&
|
|
238
|
-
|
|
239
|
-
template_type == o.template_type &&
|
|
240
|
-
id == o.id &&
|
|
326
|
+
expire_after == o.expire_after &&
|
|
241
327
|
locked == o.locked &&
|
|
242
|
-
|
|
328
|
+
expiration_interval == o.expiration_interval &&
|
|
329
|
+
allow_additional_properties == o.allow_additional_properties &&
|
|
330
|
+
editable_submissions == o.editable_submissions &&
|
|
331
|
+
webhook_url == o.webhook_url &&
|
|
332
|
+
slack_webhook_url == o.slack_webhook_url &&
|
|
333
|
+
redirect_url == o.redirect_url &&
|
|
334
|
+
path == o.path &&
|
|
335
|
+
parent_folder_id == o.parent_folder_id
|
|
243
336
|
end
|
|
244
337
|
|
|
245
338
|
# @see the `==` method
|
|
@@ -249,39 +342,42 @@ module DocSpring
|
|
|
249
342
|
end
|
|
250
343
|
|
|
251
344
|
# Calculates hash code according to all attributes.
|
|
252
|
-
# @return [
|
|
345
|
+
# @return [Integer] Hash code
|
|
253
346
|
def hash
|
|
254
|
-
[
|
|
347
|
+
[id, name, description, template_type, public_web_form, public_submissions, expire_submissions, expire_after, locked, expiration_interval, allow_additional_properties, editable_submissions, webhook_url, slack_webhook_url, redirect_url, path, parent_folder_id].hash
|
|
255
348
|
end
|
|
256
349
|
|
|
257
350
|
# Builds the object from hash
|
|
258
351
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
259
352
|
# @return [Object] Returns the model itself
|
|
260
|
-
def build_from_hash(attributes)
|
|
353
|
+
def self.build_from_hash(attributes)
|
|
261
354
|
return nil unless attributes.is_a?(Hash)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
355
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
356
|
+
transformed_hash = {}
|
|
357
|
+
openapi_types.each_pair do |key, type|
|
|
358
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
359
|
+
transformed_hash["#{key}"] = nil
|
|
360
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
361
|
+
# check to ensure the input is an array given that the attribute
|
|
265
362
|
# is documented as an array but the input is not
|
|
266
|
-
if attributes[
|
|
267
|
-
|
|
363
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
364
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
268
365
|
end
|
|
269
|
-
elsif !attributes[
|
|
270
|
-
|
|
271
|
-
end
|
|
366
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
367
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
368
|
+
end
|
|
272
369
|
end
|
|
273
|
-
|
|
274
|
-
self
|
|
370
|
+
new(transformed_hash)
|
|
275
371
|
end
|
|
276
372
|
|
|
277
373
|
# Deserializes the data based on type
|
|
278
374
|
# @param string type Data type
|
|
279
375
|
# @param string value Value to be deserialized
|
|
280
376
|
# @return [Object] Deserialized data
|
|
281
|
-
def _deserialize(type, value)
|
|
377
|
+
def self._deserialize(type, value)
|
|
282
378
|
case type.to_sym
|
|
283
|
-
when :
|
|
284
|
-
|
|
379
|
+
when :Time
|
|
380
|
+
Time.parse(value)
|
|
285
381
|
when :Date
|
|
286
382
|
Date.parse(value)
|
|
287
383
|
when :String
|
|
@@ -290,7 +386,7 @@ module DocSpring
|
|
|
290
386
|
value.to_i
|
|
291
387
|
when :Float
|
|
292
388
|
value.to_f
|
|
293
|
-
when :
|
|
389
|
+
when :Boolean
|
|
294
390
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
295
391
|
true
|
|
296
392
|
else
|
|
@@ -311,8 +407,9 @@ module DocSpring
|
|
|
311
407
|
end
|
|
312
408
|
end
|
|
313
409
|
else # model
|
|
314
|
-
|
|
315
|
-
|
|
410
|
+
# models (e.g. Pet) or oneOf
|
|
411
|
+
klass = DocSpring.const_get(type)
|
|
412
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
316
413
|
end
|
|
317
414
|
end
|
|
318
415
|
|
|
@@ -334,7 +431,11 @@ module DocSpring
|
|
|
334
431
|
hash = {}
|
|
335
432
|
self.class.attribute_map.each_pair do |attr, param|
|
|
336
433
|
value = self.send(attr)
|
|
337
|
-
|
|
434
|
+
if value.nil?
|
|
435
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
436
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
437
|
+
end
|
|
438
|
+
|
|
338
439
|
hash[param] = _to_hash(value)
|
|
339
440
|
end
|
|
340
441
|
hash
|
|
@@ -357,5 +458,7 @@ module DocSpring
|
|
|
357
458
|
value
|
|
358
459
|
end
|
|
359
460
|
end
|
|
461
|
+
|
|
360
462
|
end
|
|
463
|
+
|
|
361
464
|
end
|