form_api 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/{.swagger-codegen-ignore → .openapi-generator-ignore} +3 -3
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.rubocop.yml +154 -0
  6. data/Gemfile.lock +15 -16
  7. data/README.md +30 -28
  8. data/Rakefile +2 -0
  9. data/docs/{InlineResponse422.md → AuthenticationError.md} +3 -3
  10. data/docs/{InlineResponse401.md → AuthenticationSuccessResponse.md} +2 -2
  11. data/docs/CombinedSubmission.md +14 -0
  12. data/docs/CombinedSubmissionData.md +11 -0
  13. data/docs/CreateCombinedSubmissionResponse.md +10 -0
  14. data/docs/CreateSubmissionBatchResponse.md +12 -0
  15. data/docs/CreateSubmissionData.md +12 -0
  16. data/docs/CreateSubmissionDataBatchRequest.md +13 -0
  17. data/docs/CreateSubmissionResponse.md +10 -0
  18. data/docs/CreateSubmissionResponse1.md +10 -0
  19. data/docs/{InlineResponse200.md → Error.md} +3 -2
  20. data/docs/{InlineResponse400.md → InvalidRequest.md} +3 -3
  21. data/docs/PDFApi.md +148 -64
  22. data/docs/Submission.md +16 -0
  23. data/docs/SubmissionBatch.md +16 -0
  24. data/docs/SubmissionBatchData.md +11 -0
  25. data/docs/Template.md +21 -0
  26. data/form_api.gemspec +6 -11
  27. data/git_push.sh +3 -3
  28. data/lib/form_api.rb +22 -15
  29. data/lib/form_api/api/client.rb +91 -38
  30. data/lib/form_api/api/pdf_api.rb +222 -109
  31. data/lib/form_api/api_client.rb +13 -13
  32. data/lib/form_api/api_error.rb +3 -3
  33. data/lib/form_api/configuration.rb +26 -5
  34. data/lib/form_api/models/{inline_response_201_1.rb → authentication_error.rb} +25 -29
  35. data/lib/form_api/models/{inline_response_200.rb → authentication_success_response.rb} +15 -24
  36. data/lib/form_api/models/{inline_response_201_combined_submission.rb → combined_submission.rb} +42 -66
  37. data/lib/form_api/models/{create_combined_submission_body.rb → combined_submission_data.rb} +13 -18
  38. data/lib/form_api/models/{inline_response_201.rb → create_combined_submission_response.rb} +37 -35
  39. data/lib/form_api/models/create_submission_batch_response.rb +257 -0
  40. data/lib/form_api/models/{create_submission_batch_body.rb → create_submission_data.rb} +32 -19
  41. data/lib/form_api/models/{create_submission_body.rb → create_submission_data_batch_request.rb} +45 -18
  42. data/lib/form_api/models/create_submission_response.rb +237 -0
  43. data/lib/form_api/models/create_submission_response1.rb +237 -0
  44. data/lib/form_api/models/{inline_response_400.rb → error.rb} +17 -21
  45. data/lib/form_api/models/{inline_response_422.rb → invalid_request.rb} +17 -21
  46. data/lib/form_api/models/{templatestemplate_idsubmissionsbatch_submission.rb → submission.rb} +40 -26
  47. data/lib/form_api/models/submission_batch.rb +291 -0
  48. data/lib/form_api/models/{inline_response_401.rb → submission_batch_data.rb} +48 -24
  49. data/lib/form_api/models/{inline_response_200_1.rb → template.rb} +88 -152
  50. data/lib/form_api/version.rb +4 -4
  51. data/spec/api/client_spec.rb +197 -23
  52. data/spec/api/pdf_api_spec.rb +168 -63
  53. data/spec/api_client_spec.rb +37 -37
  54. data/spec/configuration_spec.rb +11 -11
  55. data/spec/models/authentication_error_spec.rb +51 -0
  56. data/spec/models/authentication_success_response_spec.rb +45 -0
  57. data/spec/models/combined_submission_data_spec.rb +59 -0
  58. data/spec/models/combined_submission_spec.rb +81 -0
  59. data/spec/models/create_combined_submission_response_spec.rb +57 -0
  60. data/spec/models/create_submission_batch_response_spec.rb +69 -0
  61. data/spec/models/create_submission_data_batch_request_spec.rb +71 -0
  62. data/spec/models/create_submission_data_spec.rb +65 -0
  63. data/spec/models/create_submission_response1_spec.rb +57 -0
  64. data/spec/models/create_submission_response_spec.rb +57 -0
  65. data/spec/models/error_spec.rb +51 -0
  66. data/spec/models/invalid_request_spec.rb +51 -0
  67. data/spec/models/submission_batch_data_spec.rb +59 -0
  68. data/spec/models/submission_batch_spec.rb +93 -0
  69. data/spec/models/submission_spec.rb +93 -0
  70. data/spec/models/template_spec.rb +123 -0
  71. data/spec/spec_helper.rb +3 -14
  72. metadata +70 -95
  73. data/.swagger-codegen/VERSION +0 -1
  74. data/docs/CreateCombinedSubmissionBody.md +0 -11
  75. data/docs/CreateSubmissionBatchBody.md +0 -10
  76. data/docs/CreateSubmissionBody.md +0 -10
  77. data/docs/InlineResponse2001.md +0 -21
  78. data/docs/InlineResponse201.md +0 -9
  79. data/docs/InlineResponse2011.md +0 -9
  80. data/docs/InlineResponse201CombinedSubmission.md +0 -14
  81. data/docs/TemplatestemplateIdsubmissionsbatchSubmission.md +0 -14
  82. data/spec/models/create_combined_submission_body_spec.rb +0 -60
  83. data/spec/models/create_submission_batch_body_spec.rb +0 -54
  84. data/spec/models/create_submission_body_spec.rb +0 -54
  85. data/spec/models/inline_response_200_1_spec.rb +0 -124
  86. data/spec/models/inline_response_200_spec.rb +0 -46
  87. data/spec/models/inline_response_201_1_spec.rb +0 -52
  88. data/spec/models/inline_response_201_combined_submission_spec.rb +0 -82
  89. data/spec/models/inline_response_201_spec.rb +0 -52
  90. data/spec/models/inline_response_400_spec.rb +0 -52
  91. data/spec/models/inline_response_401_spec.rb +0 -42
  92. data/spec/models/inline_response_422_spec.rb +0 -52
  93. data/spec/models/templatestemplate_idsubmissionsbatch_submission_spec.rb +0 -82
  94. data/spec/vcr_cassettes/FormAPI_Client/should_generate_a_PDF_and_wait_for_the_submission_to_be_processed.yml +0 -127
@@ -1,34 +1,44 @@
1
1
  =begin
2
2
  #API V1
3
3
 
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module FormAPI
16
+ class SubmissionBatchData
17
+ attr_accessor :metadata
16
18
 
17
- class InlineResponse401
18
- attr_accessor :error
19
+ attr_accessor :test
19
20
 
21
+ attr_accessor :template_id
22
+
23
+ attr_accessor :submissions
20
24
 
21
25
  # Attribute mapping from ruby-style variable name to JSON key.
22
26
  def self.attribute_map
23
27
  {
24
- :'error' => :'error'
28
+ :'metadata' => :'metadata',
29
+ :'test' => :'test',
30
+ :'template_id' => :'template_id',
31
+ :'submissions' => :'submissions'
25
32
  }
26
33
  end
27
34
 
28
35
  # Attribute type mapping.
29
- def self.swagger_types
36
+ def self.openapi_types
30
37
  {
31
- :'error' => :'String'
38
+ :'metadata' => :'Object',
39
+ :'test' => :'BOOLEAN',
40
+ :'template_id' => :'String',
41
+ :'submissions' => :'Array<CreateSubmissionDataBatchRequest>'
32
42
  }
33
43
  end
34
44
 
@@ -38,30 +48,43 @@ module FormAPI
38
48
  return unless attributes.is_a?(Hash)
39
49
 
40
50
  # convert string to symbol for hash key
41
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'metadata')
54
+ self.metadata = attributes[:'metadata']
55
+ end
56
+
57
+ if attributes.has_key?(:'test')
58
+ self.test = attributes[:'test']
59
+ end
42
60
 
43
- if attributes.has_key?(:'error')
44
- self.error = attributes[:'error']
61
+ if attributes.has_key?(:'template_id')
62
+ self.template_id = attributes[:'template_id']
45
63
  end
46
64
 
65
+ if attributes.has_key?(:'submissions')
66
+ if (value = attributes[:'submissions']).is_a?(Array)
67
+ self.submissions = value
68
+ end
69
+ end
47
70
  end
48
71
 
49
72
  # Show invalid properties with the reasons. Usually used together with valid?
50
- # @return Array for valid properies with the reasons
73
+ # @return Array for valid properties with the reasons
51
74
  def list_invalid_properties
52
75
  invalid_properties = Array.new
53
- if @error.nil?
54
- invalid_properties.push("invalid value for 'error', error cannot be nil.")
76
+ if @submissions.nil?
77
+ invalid_properties.push('invalid value for "submissions", submissions cannot be nil.')
55
78
  end
56
79
 
57
- return invalid_properties
80
+ invalid_properties
58
81
  end
59
82
 
60
83
  # Check to see if the all the properties in the model are valid
61
84
  # @return true if the model is valid
62
85
  def valid?
63
- return false if @error.nil?
64
- return true
86
+ return false if @submissions.nil?
87
+ true
65
88
  end
66
89
 
67
90
  # Checks equality by comparing each attribute.
@@ -69,7 +92,10 @@ module FormAPI
69
92
  def ==(o)
70
93
  return true if self.equal?(o)
71
94
  self.class == o.class &&
72
- error == o.error
95
+ metadata == o.metadata &&
96
+ test == o.test &&
97
+ template_id == o.template_id &&
98
+ submissions == o.submissions
73
99
  end
74
100
 
75
101
  # @see the `==` method
@@ -81,7 +107,7 @@ module FormAPI
81
107
  # Calculates hash code according to all attributes.
82
108
  # @return [Fixnum] Hash code
83
109
  def hash
84
- [error].hash
110
+ [metadata, test, template_id, submissions].hash
85
111
  end
86
112
 
87
113
  # Builds the object from hash
@@ -89,12 +115,12 @@ module FormAPI
89
115
  # @return [Object] Returns the model itself
90
116
  def build_from_hash(attributes)
91
117
  return nil unless attributes.is_a?(Hash)
92
- self.class.swagger_types.each_pair do |key, type|
118
+ self.class.openapi_types.each_pair do |key, type|
93
119
  if type =~ /\AArray<(.*)>/i
94
120
  # check to ensure the input is an array given that the the attribute
95
121
  # is documented as an array but the input is not
96
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
97
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
98
124
  end
99
125
  elsif !attributes[self.class.attribute_map[key]].nil?
100
126
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -176,7 +202,7 @@ module FormAPI
176
202
  # @return [Hash] Returns the value in the form of hash
177
203
  def _to_hash(value)
178
204
  if value.is_a?(Array)
179
- value.compact.map{ |v| _to_hash(v) }
205
+ value.compact.map { |v| _to_hash(v) }
180
206
  elsif value.is_a?(Hash)
181
207
  {}.tap do |hash|
182
208
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -187,7 +213,5 @@ module FormAPI
187
213
  value
188
214
  end
189
215
  end
190
-
191
216
  end
192
-
193
217
  end
@@ -1,47 +1,46 @@
1
1
  =begin
2
2
  #API V1
3
3
 
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module FormAPI
16
+ class Template
17
+ attr_accessor :expiration_interval
16
18
 
17
- class InlineResponse2001
18
- attr_accessor :id
19
-
20
- attr_accessor :name
19
+ attr_accessor :webhook_url
21
20
 
22
- attr_accessor :template_type
21
+ attr_accessor :expire_after
23
22
 
24
- attr_accessor :public_web_form
23
+ attr_accessor :allow_additional_properties
25
24
 
26
25
  attr_accessor :public_submissions
27
26
 
28
- attr_accessor :expire_submissions
27
+ attr_accessor :slack_webhook_url
29
28
 
30
- attr_accessor :expire_after
29
+ attr_accessor :blockchain_timestamp_verification
31
30
 
32
- attr_accessor :expiration_interval
31
+ attr_accessor :public_web_form
33
32
 
34
- attr_accessor :allow_additional_properties
33
+ attr_accessor :expire_submissions
35
34
 
36
- attr_accessor :page_dimensions
35
+ attr_accessor :name
37
36
 
38
- attr_accessor :webhook_url
37
+ attr_accessor :template_type
39
38
 
40
- attr_accessor :slack_webhook_url
39
+ attr_accessor :id
41
40
 
42
- attr_accessor :redirect_url
41
+ attr_accessor :page_dimensions
43
42
 
44
- attr_accessor :blockchain_timestamp_verification
43
+ attr_accessor :redirect_url
45
44
 
46
45
  class EnumAttributeValidator
47
46
  attr_reader :datatype
@@ -68,40 +67,40 @@ module FormAPI
68
67
  # Attribute mapping from ruby-style variable name to JSON key.
69
68
  def self.attribute_map
70
69
  {
71
- :'id' => :'id',
72
- :'name' => :'name',
73
- :'template_type' => :'template_type',
74
- :'public_web_form' => :'public_web_form',
75
- :'public_submissions' => :'public_submissions',
76
- :'expire_submissions' => :'expire_submissions',
77
- :'expire_after' => :'expire_after',
78
70
  :'expiration_interval' => :'expiration_interval',
79
- :'allow_additional_properties' => :'allow_additional_properties',
80
- :'page_dimensions' => :'page_dimensions',
81
71
  :'webhook_url' => :'webhook_url',
72
+ :'expire_after' => :'expire_after',
73
+ :'allow_additional_properties' => :'allow_additional_properties',
74
+ :'public_submissions' => :'public_submissions',
82
75
  :'slack_webhook_url' => :'slack_webhook_url',
83
- :'redirect_url' => :'redirect_url',
84
- :'blockchain_timestamp_verification' => :'blockchain_timestamp_verification'
76
+ :'blockchain_timestamp_verification' => :'blockchain_timestamp_verification',
77
+ :'public_web_form' => :'public_web_form',
78
+ :'expire_submissions' => :'expire_submissions',
79
+ :'name' => :'name',
80
+ :'template_type' => :'template_type',
81
+ :'id' => :'id',
82
+ :'page_dimensions' => :'page_dimensions',
83
+ :'redirect_url' => :'redirect_url'
85
84
  }
86
85
  end
87
86
 
88
87
  # Attribute type mapping.
89
- def self.swagger_types
88
+ def self.openapi_types
90
89
  {
91
- :'id' => :'String',
92
- :'name' => :'String',
93
- :'template_type' => :'String',
94
- :'public_web_form' => :'BOOLEAN',
95
- :'public_submissions' => :'BOOLEAN',
96
- :'expire_submissions' => :'BOOLEAN',
97
- :'expire_after' => :'Float',
98
90
  :'expiration_interval' => :'String',
99
- :'allow_additional_properties' => :'BOOLEAN',
100
- :'page_dimensions' => :'Array<Array<Float>>',
101
91
  :'webhook_url' => :'String',
92
+ :'expire_after' => :'Float',
93
+ :'allow_additional_properties' => :'BOOLEAN',
94
+ :'public_submissions' => :'BOOLEAN',
102
95
  :'slack_webhook_url' => :'String',
103
- :'redirect_url' => :'String',
104
- :'blockchain_timestamp_verification' => :'BOOLEAN'
96
+ :'blockchain_timestamp_verification' => :'BOOLEAN',
97
+ :'public_web_form' => :'BOOLEAN',
98
+ :'expire_submissions' => :'BOOLEAN',
99
+ :'name' => :'String',
100
+ :'template_type' => :'String',
101
+ :'id' => :'String',
102
+ :'page_dimensions' => :'Array<Array<Float>>',
103
+ :'redirect_url' => :'String'
105
104
  }
106
105
  end
107
106
 
@@ -111,149 +110,88 @@ module FormAPI
111
110
  return unless attributes.is_a?(Hash)
112
111
 
113
112
  # convert string to symbol for hash key
114
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
115
-
116
- if attributes.has_key?(:'id')
117
- self.id = attributes[:'id']
118
- end
119
-
120
- if attributes.has_key?(:'name')
121
- self.name = attributes[:'name']
122
- end
123
-
124
- if attributes.has_key?(:'template_type')
125
- self.template_type = attributes[:'template_type']
126
- end
113
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
127
114
 
128
- if attributes.has_key?(:'public_web_form')
129
- self.public_web_form = attributes[:'public_web_form']
130
- end
131
-
132
- if attributes.has_key?(:'public_submissions')
133
- self.public_submissions = attributes[:'public_submissions']
115
+ if attributes.has_key?(:'expiration_interval')
116
+ self.expiration_interval = attributes[:'expiration_interval']
134
117
  end
135
118
 
136
- if attributes.has_key?(:'expire_submissions')
137
- self.expire_submissions = attributes[:'expire_submissions']
119
+ if attributes.has_key?(:'webhook_url')
120
+ self.webhook_url = attributes[:'webhook_url']
138
121
  end
139
122
 
140
123
  if attributes.has_key?(:'expire_after')
141
124
  self.expire_after = attributes[:'expire_after']
142
125
  end
143
126
 
144
- if attributes.has_key?(:'expiration_interval')
145
- self.expiration_interval = attributes[:'expiration_interval']
146
- end
147
-
148
127
  if attributes.has_key?(:'allow_additional_properties')
149
128
  self.allow_additional_properties = attributes[:'allow_additional_properties']
150
129
  end
151
130
 
152
- if attributes.has_key?(:'page_dimensions')
153
- if (value = attributes[:'page_dimensions']).is_a?(Array)
154
- self.page_dimensions = value
155
- end
156
- end
157
-
158
- if attributes.has_key?(:'webhook_url')
159
- self.webhook_url = attributes[:'webhook_url']
131
+ if attributes.has_key?(:'public_submissions')
132
+ self.public_submissions = attributes[:'public_submissions']
160
133
  end
161
134
 
162
135
  if attributes.has_key?(:'slack_webhook_url')
163
136
  self.slack_webhook_url = attributes[:'slack_webhook_url']
164
137
  end
165
138
 
166
- if attributes.has_key?(:'redirect_url')
167
- self.redirect_url = attributes[:'redirect_url']
168
- end
169
-
170
139
  if attributes.has_key?(:'blockchain_timestamp_verification')
171
140
  self.blockchain_timestamp_verification = attributes[:'blockchain_timestamp_verification']
172
141
  end
173
142
 
174
- end
175
-
176
- # Show invalid properties with the reasons. Usually used together with valid?
177
- # @return Array for valid properies with the reasons
178
- def list_invalid_properties
179
- invalid_properties = Array.new
180
- if @id.nil?
181
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
182
- end
183
-
184
- if @name.nil?
185
- invalid_properties.push("invalid value for 'name', name cannot be nil.")
186
- end
187
-
188
- if @template_type.nil?
189
- invalid_properties.push("invalid value for 'template_type', template_type cannot be nil.")
190
- end
191
-
192
- if @public_web_form.nil?
193
- invalid_properties.push("invalid value for 'public_web_form', public_web_form cannot be nil.")
194
- end
195
-
196
- if @public_submissions.nil?
197
- invalid_properties.push("invalid value for 'public_submissions', public_submissions cannot be nil.")
198
- end
199
-
200
- if @expire_submissions.nil?
201
- invalid_properties.push("invalid value for 'expire_submissions', expire_submissions cannot be nil.")
143
+ if attributes.has_key?(:'public_web_form')
144
+ self.public_web_form = attributes[:'public_web_form']
202
145
  end
203
146
 
204
- if @allow_additional_properties.nil?
205
- invalid_properties.push("invalid value for 'allow_additional_properties', allow_additional_properties cannot be nil.")
147
+ if attributes.has_key?(:'expire_submissions')
148
+ self.expire_submissions = attributes[:'expire_submissions']
206
149
  end
207
150
 
208
- if @page_dimensions.nil?
209
- invalid_properties.push("invalid value for 'page_dimensions', page_dimensions cannot be nil.")
151
+ if attributes.has_key?(:'name')
152
+ self.name = attributes[:'name']
210
153
  end
211
154
 
212
- if @webhook_url.nil?
213
- invalid_properties.push("invalid value for 'webhook_url', webhook_url cannot be nil.")
155
+ if attributes.has_key?(:'template_type')
156
+ self.template_type = attributes[:'template_type']
214
157
  end
215
158
 
216
- if @slack_webhook_url.nil?
217
- invalid_properties.push("invalid value for 'slack_webhook_url', slack_webhook_url cannot be nil.")
159
+ if attributes.has_key?(:'id')
160
+ self.id = attributes[:'id']
218
161
  end
219
162
 
220
- if @redirect_url.nil?
221
- invalid_properties.push("invalid value for 'redirect_url', redirect_url cannot be nil.")
163
+ if attributes.has_key?(:'page_dimensions')
164
+ if (value = attributes[:'page_dimensions']).is_a?(Array)
165
+ self.page_dimensions = value
166
+ end
222
167
  end
223
168
 
224
- if @blockchain_timestamp_verification.nil?
225
- invalid_properties.push("invalid value for 'blockchain_timestamp_verification', blockchain_timestamp_verification cannot be nil.")
169
+ if attributes.has_key?(:'redirect_url')
170
+ self.redirect_url = attributes[:'redirect_url']
226
171
  end
172
+ end
227
173
 
228
- return invalid_properties
174
+ # Show invalid properties with the reasons. Usually used together with valid?
175
+ # @return Array for valid properties with the reasons
176
+ def list_invalid_properties
177
+ invalid_properties = Array.new
178
+ invalid_properties
229
179
  end
230
180
 
231
181
  # Check to see if the all the properties in the model are valid
232
182
  # @return true if the model is valid
233
183
  def valid?
234
- return false if @id.nil?
235
- return false if @name.nil?
236
- return false if @template_type.nil?
237
- return false if @public_web_form.nil?
238
- return false if @public_submissions.nil?
239
- return false if @expire_submissions.nil?
240
- expiration_interval_validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
184
+ expiration_interval_validator = EnumAttributeValidator.new('String', ['minutes', 'hours', 'days'])
241
185
  return false unless expiration_interval_validator.valid?(@expiration_interval)
242
- return false if @allow_additional_properties.nil?
243
- return false if @page_dimensions.nil?
244
- return false if @webhook_url.nil?
245
- return false if @slack_webhook_url.nil?
246
- return false if @redirect_url.nil?
247
- return false if @blockchain_timestamp_verification.nil?
248
- return true
186
+ true
249
187
  end
250
188
 
251
189
  # Custom attribute writer method checking allowed values (enum).
252
190
  # @param [Object] expiration_interval Object to be assigned
253
191
  def expiration_interval=(expiration_interval)
254
- validator = EnumAttributeValidator.new('String', ["minutes", "hours", "days"])
192
+ validator = EnumAttributeValidator.new('String', ['minutes', 'hours', 'days'])
255
193
  unless validator.valid?(expiration_interval)
256
- fail ArgumentError, "invalid value for 'expiration_interval', must be one of #{validator.allowable_values}."
194
+ fail ArgumentError, 'invalid value for "expiration_interval", must be one of #{validator.allowable_values}.'
257
195
  end
258
196
  @expiration_interval = expiration_interval
259
197
  end
@@ -263,20 +201,20 @@ module FormAPI
263
201
  def ==(o)
264
202
  return true if self.equal?(o)
265
203
  self.class == o.class &&
266
- id == o.id &&
267
- name == o.name &&
268
- template_type == o.template_type &&
269
- public_web_form == o.public_web_form &&
270
- public_submissions == o.public_submissions &&
271
- expire_submissions == o.expire_submissions &&
272
- expire_after == o.expire_after &&
273
204
  expiration_interval == o.expiration_interval &&
274
- allow_additional_properties == o.allow_additional_properties &&
275
- page_dimensions == o.page_dimensions &&
276
205
  webhook_url == o.webhook_url &&
206
+ expire_after == o.expire_after &&
207
+ allow_additional_properties == o.allow_additional_properties &&
208
+ public_submissions == o.public_submissions &&
277
209
  slack_webhook_url == o.slack_webhook_url &&
278
- redirect_url == o.redirect_url &&
279
- blockchain_timestamp_verification == o.blockchain_timestamp_verification
210
+ blockchain_timestamp_verification == o.blockchain_timestamp_verification &&
211
+ public_web_form == o.public_web_form &&
212
+ expire_submissions == o.expire_submissions &&
213
+ name == o.name &&
214
+ template_type == o.template_type &&
215
+ id == o.id &&
216
+ page_dimensions == o.page_dimensions &&
217
+ redirect_url == o.redirect_url
280
218
  end
281
219
 
282
220
  # @see the `==` method
@@ -288,7 +226,7 @@ module FormAPI
288
226
  # Calculates hash code according to all attributes.
289
227
  # @return [Fixnum] Hash code
290
228
  def hash
291
- [id, name, template_type, public_web_form, public_submissions, expire_submissions, expire_after, expiration_interval, allow_additional_properties, page_dimensions, webhook_url, slack_webhook_url, redirect_url, blockchain_timestamp_verification].hash
229
+ [expiration_interval, webhook_url, expire_after, allow_additional_properties, public_submissions, slack_webhook_url, blockchain_timestamp_verification, public_web_form, expire_submissions, name, template_type, id, page_dimensions, redirect_url].hash
292
230
  end
293
231
 
294
232
  # Builds the object from hash
@@ -296,12 +234,12 @@ module FormAPI
296
234
  # @return [Object] Returns the model itself
297
235
  def build_from_hash(attributes)
298
236
  return nil unless attributes.is_a?(Hash)
299
- self.class.swagger_types.each_pair do |key, type|
237
+ self.class.openapi_types.each_pair do |key, type|
300
238
  if type =~ /\AArray<(.*)>/i
301
239
  # check to ensure the input is an array given that the the attribute
302
240
  # is documented as an array but the input is not
303
241
  if attributes[self.class.attribute_map[key]].is_a?(Array)
304
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
242
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
305
243
  end
306
244
  elsif !attributes[self.class.attribute_map[key]].nil?
307
245
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -383,7 +321,7 @@ module FormAPI
383
321
  # @return [Hash] Returns the value in the form of hash
384
322
  def _to_hash(value)
385
323
  if value.is_a?(Array)
386
- value.compact.map{ |v| _to_hash(v) }
324
+ value.compact.map { |v| _to_hash(v) }
387
325
  elsif value.is_a?(Hash)
388
326
  {}.tap do |hash|
389
327
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -394,7 +332,5 @@ module FormAPI
394
332
  value
395
333
  end
396
334
  end
397
-
398
335
  end
399
-
400
336
  end