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,33 +1,32 @@
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
-
17
- class InlineResponse201CombinedSubmission
18
- attr_accessor :id
16
+ class CombinedSubmission
17
+ attr_accessor :metadata
19
18
 
20
19
  attr_accessor :expired
21
20
 
22
21
  attr_accessor :expires_at
23
22
 
24
- attr_accessor :state
25
-
26
- attr_accessor :metadata
23
+ attr_accessor :download_url
27
24
 
28
25
  attr_accessor :submission_ids
29
26
 
30
- attr_accessor :download_url
27
+ attr_accessor :id
28
+
29
+ attr_accessor :state
31
30
 
32
31
  class EnumAttributeValidator
33
32
  attr_reader :datatype
@@ -54,26 +53,26 @@ module FormAPI
54
53
  # Attribute mapping from ruby-style variable name to JSON key.
55
54
  def self.attribute_map
56
55
  {
57
- :'id' => :'id',
56
+ :'metadata' => :'metadata',
58
57
  :'expired' => :'expired',
59
58
  :'expires_at' => :'expires_at',
60
- :'state' => :'state',
61
- :'metadata' => :'metadata',
59
+ :'download_url' => :'download_url',
62
60
  :'submission_ids' => :'submission_ids',
63
- :'download_url' => :'download_url'
61
+ :'id' => :'id',
62
+ :'state' => :'state'
64
63
  }
65
64
  end
66
65
 
67
66
  # Attribute type mapping.
68
- def self.swagger_types
67
+ def self.openapi_types
69
68
  {
70
- :'id' => :'String',
69
+ :'metadata' => :'Object',
71
70
  :'expired' => :'BOOLEAN',
72
71
  :'expires_at' => :'String',
73
- :'state' => :'String',
74
- :'metadata' => :'Object',
72
+ :'download_url' => :'String',
75
73
  :'submission_ids' => :'Array<String>',
76
- :'download_url' => :'String'
74
+ :'id' => :'String',
75
+ :'state' => :'String'
77
76
  }
78
77
  end
79
78
 
@@ -83,10 +82,10 @@ module FormAPI
83
82
  return unless attributes.is_a?(Hash)
84
83
 
85
84
  # convert string to symbol for hash key
86
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
85
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
87
86
 
88
- if attributes.has_key?(:'id')
89
- self.id = attributes[:'id']
87
+ if attributes.has_key?(:'metadata')
88
+ self.metadata = attributes[:'metadata']
90
89
  end
91
90
 
92
91
  if attributes.has_key?(:'expired')
@@ -97,12 +96,8 @@ module FormAPI
97
96
  self.expires_at = attributes[:'expires_at']
98
97
  end
99
98
 
100
- if attributes.has_key?(:'state')
101
- self.state = attributes[:'state']
102
- end
103
-
104
- if attributes.has_key?(:'metadata')
105
- self.metadata = attributes[:'metadata']
99
+ if attributes.has_key?(:'download_url')
100
+ self.download_url = attributes[:'download_url']
106
101
  end
107
102
 
108
103
  if attributes.has_key?(:'submission_ids')
@@ -111,53 +106,36 @@ module FormAPI
111
106
  end
112
107
  end
113
108
 
114
- if attributes.has_key?(:'download_url')
115
- self.download_url = attributes[:'download_url']
109
+ if attributes.has_key?(:'id')
110
+ self.id = attributes[:'id']
116
111
  end
117
112
 
113
+ if attributes.has_key?(:'state')
114
+ self.state = attributes[:'state']
115
+ end
118
116
  end
119
117
 
120
118
  # Show invalid properties with the reasons. Usually used together with valid?
121
- # @return Array for valid properies with the reasons
119
+ # @return Array for valid properties with the reasons
122
120
  def list_invalid_properties
123
121
  invalid_properties = Array.new
124
- if @id.nil?
125
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
126
- end
127
-
128
- if @expired.nil?
129
- invalid_properties.push("invalid value for 'expired', expired cannot be nil.")
130
- end
131
-
132
- if @state.nil?
133
- invalid_properties.push("invalid value for 'state', state cannot be nil.")
134
- end
135
-
136
- if @submission_ids.nil?
137
- invalid_properties.push("invalid value for 'submission_ids', submission_ids cannot be nil.")
138
- end
139
-
140
- return invalid_properties
122
+ invalid_properties
141
123
  end
142
124
 
143
125
  # Check to see if the all the properties in the model are valid
144
126
  # @return true if the model is valid
145
127
  def valid?
146
- return false if @id.nil?
147
- return false if @expired.nil?
148
- return false if @state.nil?
149
- state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "error"])
128
+ state_validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'error'])
150
129
  return false unless state_validator.valid?(@state)
151
- return false if @submission_ids.nil?
152
- return true
130
+ true
153
131
  end
154
132
 
155
133
  # Custom attribute writer method checking allowed values (enum).
156
134
  # @param [Object] state Object to be assigned
157
135
  def state=(state)
158
- validator = EnumAttributeValidator.new('String', ["pending", "processed", "error"])
136
+ validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'error'])
159
137
  unless validator.valid?(state)
160
- fail ArgumentError, "invalid value for 'state', must be one of #{validator.allowable_values}."
138
+ fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
161
139
  end
162
140
  @state = state
163
141
  end
@@ -167,13 +145,13 @@ module FormAPI
167
145
  def ==(o)
168
146
  return true if self.equal?(o)
169
147
  self.class == o.class &&
170
- id == o.id &&
148
+ metadata == o.metadata &&
171
149
  expired == o.expired &&
172
150
  expires_at == o.expires_at &&
173
- state == o.state &&
174
- metadata == o.metadata &&
151
+ download_url == o.download_url &&
175
152
  submission_ids == o.submission_ids &&
176
- download_url == o.download_url
153
+ id == o.id &&
154
+ state == o.state
177
155
  end
178
156
 
179
157
  # @see the `==` method
@@ -185,7 +163,7 @@ module FormAPI
185
163
  # Calculates hash code according to all attributes.
186
164
  # @return [Fixnum] Hash code
187
165
  def hash
188
- [id, expired, expires_at, state, metadata, submission_ids, download_url].hash
166
+ [metadata, expired, expires_at, download_url, submission_ids, id, state].hash
189
167
  end
190
168
 
191
169
  # Builds the object from hash
@@ -193,12 +171,12 @@ module FormAPI
193
171
  # @return [Object] Returns the model itself
194
172
  def build_from_hash(attributes)
195
173
  return nil unless attributes.is_a?(Hash)
196
- self.class.swagger_types.each_pair do |key, type|
174
+ self.class.openapi_types.each_pair do |key, type|
197
175
  if type =~ /\AArray<(.*)>/i
198
176
  # check to ensure the input is an array given that the the attribute
199
177
  # is documented as an array but the input is not
200
178
  if attributes[self.class.attribute_map[key]].is_a?(Array)
201
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
179
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
202
180
  end
203
181
  elsif !attributes[self.class.attribute_map[key]].nil?
204
182
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -280,7 +258,7 @@ module FormAPI
280
258
  # @return [Hash] Returns the value in the form of hash
281
259
  def _to_hash(value)
282
260
  if value.is_a?(Array)
283
- value.compact.map{ |v| _to_hash(v) }
261
+ value.compact.map { |v| _to_hash(v) }
284
262
  elsif value.is_a?(Hash)
285
263
  {}.tap do |hash|
286
264
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -291,7 +269,5 @@ module FormAPI
291
269
  value
292
270
  end
293
271
  end
294
-
295
272
  end
296
-
297
273
  end
@@ -1,20 +1,19 @@
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
-
17
- class CreateCombinedSubmissionBody
16
+ class CombinedSubmissionData
18
17
  attr_accessor :test
19
18
 
20
19
  attr_accessor :submission_ids
@@ -23,7 +22,6 @@ module FormAPI
23
22
 
24
23
  attr_accessor :expires_in
25
24
 
26
-
27
25
  # Attribute mapping from ruby-style variable name to JSON key.
28
26
  def self.attribute_map
29
27
  {
@@ -35,7 +33,7 @@ module FormAPI
35
33
  end
36
34
 
37
35
  # Attribute type mapping.
38
- def self.swagger_types
36
+ def self.openapi_types
39
37
  {
40
38
  :'test' => :'BOOLEAN',
41
39
  :'submission_ids' => :'Array<String>',
@@ -50,7 +48,7 @@ module FormAPI
50
48
  return unless attributes.is_a?(Hash)
51
49
 
52
50
  # convert string to symbol for hash key
53
- 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 }
54
52
 
55
53
  if attributes.has_key?(:'test')
56
54
  self.test = attributes[:'test']
@@ -69,25 +67,24 @@ module FormAPI
69
67
  if attributes.has_key?(:'expires_in')
70
68
  self.expires_in = attributes[:'expires_in']
71
69
  end
72
-
73
70
  end
74
71
 
75
72
  # Show invalid properties with the reasons. Usually used together with valid?
76
- # @return Array for valid properies with the reasons
73
+ # @return Array for valid properties with the reasons
77
74
  def list_invalid_properties
78
75
  invalid_properties = Array.new
79
76
  if @submission_ids.nil?
80
- invalid_properties.push("invalid value for 'submission_ids', submission_ids cannot be nil.")
77
+ invalid_properties.push('invalid value for "submission_ids", submission_ids cannot be nil.')
81
78
  end
82
79
 
83
- return invalid_properties
80
+ invalid_properties
84
81
  end
85
82
 
86
83
  # Check to see if the all the properties in the model are valid
87
84
  # @return true if the model is valid
88
85
  def valid?
89
86
  return false if @submission_ids.nil?
90
- return true
87
+ true
91
88
  end
92
89
 
93
90
  # Checks equality by comparing each attribute.
@@ -118,12 +115,12 @@ module FormAPI
118
115
  # @return [Object] Returns the model itself
119
116
  def build_from_hash(attributes)
120
117
  return nil unless attributes.is_a?(Hash)
121
- self.class.swagger_types.each_pair do |key, type|
118
+ self.class.openapi_types.each_pair do |key, type|
122
119
  if type =~ /\AArray<(.*)>/i
123
120
  # check to ensure the input is an array given that the the attribute
124
121
  # is documented as an array but the input is not
125
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
126
- 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) })
127
124
  end
128
125
  elsif !attributes[self.class.attribute_map[key]].nil?
129
126
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -205,7 +202,7 @@ module FormAPI
205
202
  # @return [Hash] Returns the value in the form of hash
206
203
  def _to_hash(value)
207
204
  if value.is_a?(Array)
208
- value.compact.map{ |v| _to_hash(v) }
205
+ value.compact.map { |v| _to_hash(v) }
209
206
  elsif value.is_a?(Hash)
210
207
  {}.tap do |hash|
211
208
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -216,7 +213,5 @@ module FormAPI
216
213
  value
217
214
  end
218
215
  end
219
-
220
216
  end
221
-
222
217
  end
@@ -1,23 +1,24 @@
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 CreateCombinedSubmissionResponse
17
+ attr_accessor :combined_submission
16
18
 
17
- class InlineResponse201
18
- attr_accessor :status
19
+ attr_accessor :errors
19
20
 
20
- attr_accessor :combined_submission
21
+ attr_accessor :status
21
22
 
22
23
  class EnumAttributeValidator
23
24
  attr_reader :datatype
@@ -44,16 +45,18 @@ module FormAPI
44
45
  # Attribute mapping from ruby-style variable name to JSON key.
45
46
  def self.attribute_map
46
47
  {
47
- :'status' => :'status',
48
- :'combined_submission' => :'combined_submission'
48
+ :'combined_submission' => :'combined_submission',
49
+ :'errors' => :'errors',
50
+ :'status' => :'status'
49
51
  }
50
52
  end
51
53
 
52
54
  # Attribute type mapping.
53
- def self.swagger_types
55
+ def self.openapi_types
54
56
  {
55
- :'status' => :'String',
56
- :'combined_submission' => :'InlineResponse201CombinedSubmission'
57
+ :'combined_submission' => :'CombinedSubmission',
58
+ :'errors' => :'Array<String>',
59
+ :'status' => :'String'
57
60
  }
58
61
  end
59
62
 
@@ -63,44 +66,44 @@ module FormAPI
63
66
  return unless attributes.is_a?(Hash)
64
67
 
65
68
  # convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
67
-
68
- if attributes.has_key?(:'status')
69
- self.status = attributes[:'status']
70
- end
69
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
71
70
 
72
71
  if attributes.has_key?(:'combined_submission')
73
72
  self.combined_submission = attributes[:'combined_submission']
74
73
  end
75
74
 
75
+ if attributes.has_key?(:'errors')
76
+ if (value = attributes[:'errors']).is_a?(Array)
77
+ self.errors = value
78
+ end
79
+ end
80
+
81
+ if attributes.has_key?(:'status')
82
+ self.status = attributes[:'status']
83
+ end
76
84
  end
77
85
 
78
86
  # Show invalid properties with the reasons. Usually used together with valid?
79
- # @return Array for valid properies with the reasons
87
+ # @return Array for valid properties with the reasons
80
88
  def list_invalid_properties
81
89
  invalid_properties = Array.new
82
- if @status.nil?
83
- invalid_properties.push("invalid value for 'status', status cannot be nil.")
84
- end
85
-
86
- return invalid_properties
90
+ invalid_properties
87
91
  end
88
92
 
89
93
  # Check to see if the all the properties in the model are valid
90
94
  # @return true if the model is valid
91
95
  def valid?
92
- return false if @status.nil?
93
- status_validator = EnumAttributeValidator.new('String', ["success", "error"])
96
+ status_validator = EnumAttributeValidator.new('String', ['success', 'error'])
94
97
  return false unless status_validator.valid?(@status)
95
- return true
98
+ true
96
99
  end
97
100
 
98
101
  # Custom attribute writer method checking allowed values (enum).
99
102
  # @param [Object] status Object to be assigned
100
103
  def status=(status)
101
- validator = EnumAttributeValidator.new('String', ["success", "error"])
104
+ validator = EnumAttributeValidator.new('String', ['success', 'error'])
102
105
  unless validator.valid?(status)
103
- fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
106
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
104
107
  end
105
108
  @status = status
106
109
  end
@@ -110,8 +113,9 @@ module FormAPI
110
113
  def ==(o)
111
114
  return true if self.equal?(o)
112
115
  self.class == o.class &&
113
- status == o.status &&
114
- combined_submission == o.combined_submission
116
+ combined_submission == o.combined_submission &&
117
+ errors == o.errors &&
118
+ status == o.status
115
119
  end
116
120
 
117
121
  # @see the `==` method
@@ -123,7 +127,7 @@ module FormAPI
123
127
  # Calculates hash code according to all attributes.
124
128
  # @return [Fixnum] Hash code
125
129
  def hash
126
- [status, combined_submission].hash
130
+ [combined_submission, errors, status].hash
127
131
  end
128
132
 
129
133
  # Builds the object from hash
@@ -131,12 +135,12 @@ module FormAPI
131
135
  # @return [Object] Returns the model itself
132
136
  def build_from_hash(attributes)
133
137
  return nil unless attributes.is_a?(Hash)
134
- self.class.swagger_types.each_pair do |key, type|
138
+ self.class.openapi_types.each_pair do |key, type|
135
139
  if type =~ /\AArray<(.*)>/i
136
140
  # check to ensure the input is an array given that the the attribute
137
141
  # is documented as an array but the input is not
138
142
  if attributes[self.class.attribute_map[key]].is_a?(Array)
139
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
144
  end
141
145
  elsif !attributes[self.class.attribute_map[key]].nil?
142
146
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -218,7 +222,7 @@ module FormAPI
218
222
  # @return [Hash] Returns the value in the form of hash
219
223
  def _to_hash(value)
220
224
  if value.is_a?(Array)
221
- value.compact.map{ |v| _to_hash(v) }
225
+ value.compact.map { |v| _to_hash(v) }
222
226
  elsif value.is_a?(Hash)
223
227
  {}.tap do |hash|
224
228
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -229,7 +233,5 @@ module FormAPI
229
233
  value
230
234
  end
231
235
  end
232
-
233
236
  end
234
-
235
237
  end