cloudmersive-ocr-api-client 1.4.7 → 2.0.2

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +7 -7
  4. data/cloudmersive-ocr-api-client.gemspec +3 -3
  5. data/docs/FormFieldDefinition.md +1 -0
  6. data/docs/ImageOcrApi.md +39 -33
  7. data/docs/PdfOcrApi.md +11 -9
  8. data/docs/PreprocessingApi.md +6 -6
  9. data/docs/ReceiptsApi.md +1 -1
  10. data/lib/cloudmersive-ocr-api-client.rb +1 -1
  11. data/lib/cloudmersive-ocr-api-client/api/image_ocr_api.rb +49 -49
  12. data/lib/cloudmersive-ocr-api-client/api/pdf_ocr_api.rb +17 -19
  13. data/lib/cloudmersive-ocr-api-client/api/preprocessing_api.rb +26 -32
  14. data/lib/cloudmersive-ocr-api-client/api/receipts_api.rb +6 -7
  15. data/lib/cloudmersive-ocr-api-client/api_client.rb +11 -9
  16. data/lib/cloudmersive-ocr-api-client/api_error.rb +1 -1
  17. data/lib/cloudmersive-ocr-api-client/configuration.rb +2 -2
  18. data/lib/cloudmersive-ocr-api-client/models/business_card_recognition_result.rb +7 -10
  19. data/lib/cloudmersive-ocr-api-client/models/field_result.rb +7 -10
  20. data/lib/cloudmersive-ocr-api-client/models/form_definition_template.rb +7 -10
  21. data/lib/cloudmersive-ocr-api-client/models/form_field_definition.rb +18 -11
  22. data/lib/cloudmersive-ocr-api-client/models/form_recognition_result.rb +7 -10
  23. data/lib/cloudmersive-ocr-api-client/models/form_table_column_definition.rb +7 -10
  24. data/lib/cloudmersive-ocr-api-client/models/form_table_definition.rb +7 -10
  25. data/lib/cloudmersive-ocr-api-client/models/get_page_angle_result.rb +7 -10
  26. data/lib/cloudmersive-ocr-api-client/models/image_to_lines_with_location_result.rb +7 -10
  27. data/lib/cloudmersive-ocr-api-client/models/image_to_text_response.rb +7 -10
  28. data/lib/cloudmersive-ocr-api-client/models/image_to_words_with_location_result.rb +7 -10
  29. data/lib/cloudmersive-ocr-api-client/models/ocr_line_element.rb +7 -10
  30. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result.rb +7 -11
  31. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_lines_with_location.rb +7 -10
  32. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_words_with_location.rb +7 -10
  33. data/lib/cloudmersive-ocr-api-client/models/ocr_photo_text_element.rb +7 -10
  34. data/lib/cloudmersive-ocr-api-client/models/ocr_word_element.rb +7 -10
  35. data/lib/cloudmersive-ocr-api-client/models/pdf_to_lines_with_location_result.rb +7 -10
  36. data/lib/cloudmersive-ocr-api-client/models/pdf_to_text_response.rb +7 -10
  37. data/lib/cloudmersive-ocr-api-client/models/pdf_to_words_with_location_result.rb +7 -10
  38. data/lib/cloudmersive-ocr-api-client/models/photo_to_words_with_location_result.rb +9 -13
  39. data/lib/cloudmersive-ocr-api-client/models/point.rb +7 -10
  40. data/lib/cloudmersive-ocr-api-client/models/receipt_line_item.rb +7 -10
  41. data/lib/cloudmersive-ocr-api-client/models/receipt_recognition_result.rb +7 -10
  42. data/lib/cloudmersive-ocr-api-client/models/table_cell_result.rb +7 -10
  43. data/lib/cloudmersive-ocr-api-client/models/table_result.rb +7 -10
  44. data/lib/cloudmersive-ocr-api-client/models/table_row_result.rb +7 -10
  45. data/lib/cloudmersive-ocr-api-client/version.rb +2 -2
  46. data/spec/api/image_ocr_api_spec.rb +14 -11
  47. data/spec/api/pdf_ocr_api_spec.rb +5 -5
  48. data/spec/api/preprocessing_api_spec.rb +7 -7
  49. data/spec/api/receipts_api_spec.rb +2 -2
  50. data/spec/api_client_spec.rb +52 -35
  51. data/spec/configuration_spec.rb +9 -9
  52. data/spec/models/business_card_recognition_result_spec.rb +9 -10
  53. data/spec/models/field_result_spec.rb +3 -4
  54. data/spec/models/form_definition_template_spec.rb +3 -4
  55. data/spec/models/form_field_definition_spec.rb +24 -19
  56. data/spec/models/form_recognition_result_spec.rb +6 -7
  57. data/spec/models/form_table_column_definition_spec.rb +7 -8
  58. data/spec/models/form_table_definition_spec.rb +5 -6
  59. data/spec/models/get_page_angle_result_spec.rb +3 -4
  60. data/spec/models/image_to_lines_with_location_result_spec.rb +3 -4
  61. data/spec/models/image_to_text_response_spec.rb +3 -4
  62. data/spec/models/image_to_words_with_location_result_spec.rb +3 -4
  63. data/spec/models/ocr_line_element_spec.rb +3 -4
  64. data/spec/models/ocr_page_result_spec.rb +4 -5
  65. data/spec/models/ocr_page_result_with_lines_with_location_spec.rb +4 -5
  66. data/spec/models/ocr_page_result_with_words_with_location_spec.rb +4 -5
  67. data/spec/models/ocr_photo_text_element_spec.rb +8 -9
  68. data/spec/models/ocr_word_element_spec.rb +12 -13
  69. data/spec/models/pdf_to_lines_with_location_result_spec.rb +3 -4
  70. data/spec/models/pdf_to_text_response_spec.rb +3 -4
  71. data/spec/models/pdf_to_words_with_location_result_spec.rb +3 -4
  72. data/spec/models/photo_to_words_with_location_result_spec.rb +4 -5
  73. data/spec/models/point_spec.rb +3 -4
  74. data/spec/models/receipt_line_item_spec.rb +3 -4
  75. data/spec/models/receipt_recognition_result_spec.rb +10 -11
  76. data/spec/models/table_cell_result_spec.rb +3 -4
  77. data/spec/models/table_result_spec.rb +3 -4
  78. data/spec/models/table_row_result_spec.rb +2 -3
  79. data/spec/spec_helper.rb +1 -1
  80. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -30,7 +30,6 @@ module CloudmersiveOcrApiClient
30
30
  # Optional; populated when using photo/recognize/form/advanced with the Setting Name of the best-matching highest-relevance form
31
31
  attr_accessor :best_match_form_setting_name
32
32
 
33
-
34
33
  # Attribute mapping from ruby-style variable name to JSON key.
35
34
  def self.attribute_map
36
35
  {
@@ -59,7 +58,7 @@ module CloudmersiveOcrApiClient
59
58
  return unless attributes.is_a?(Hash)
60
59
 
61
60
  # convert string to symbol for hash key
62
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
61
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
62
 
64
63
  if attributes.has_key?(:'Successful')
65
64
  self.successful = attributes[:'Successful']
@@ -86,20 +85,19 @@ module CloudmersiveOcrApiClient
86
85
  if attributes.has_key?(:'BestMatchFormSettingName')
87
86
  self.best_match_form_setting_name = attributes[:'BestMatchFormSettingName']
88
87
  end
89
-
90
88
  end
91
89
 
92
90
  # Show invalid properties with the reasons. Usually used together with valid?
93
91
  # @return Array for valid properties with the reasons
94
92
  def list_invalid_properties
95
93
  invalid_properties = Array.new
96
- return invalid_properties
94
+ invalid_properties
97
95
  end
98
96
 
99
97
  # Check to see if the all the properties in the model are valid
100
98
  # @return true if the model is valid
101
99
  def valid?
102
- return true
100
+ true
103
101
  end
104
102
 
105
103
  # Checks equality by comparing each attribute.
@@ -133,10 +131,10 @@ module CloudmersiveOcrApiClient
133
131
  return nil unless attributes.is_a?(Hash)
134
132
  self.class.swagger_types.each_pair do |key, type|
135
133
  if type =~ /\AArray<(.*)>/i
136
- # check to ensure the input is an array given that the the attribute
134
+ # check to ensure the input is an array given that the attribute
137
135
  # is documented as an array but the input is not
138
136
  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) } )
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
138
  end
141
139
  elsif !attributes[self.class.attribute_map[key]].nil?
142
140
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -218,7 +216,7 @@ module CloudmersiveOcrApiClient
218
216
  # @return [Hash] Returns the value in the form of hash
219
217
  def _to_hash(value)
220
218
  if value.is_a?(Array)
221
- value.compact.map{ |v| _to_hash(v) }
219
+ value.compact.map { |v| _to_hash(v) }
222
220
  elsif value.is_a?(Hash)
223
221
  {}.tap do |hash|
224
222
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -231,5 +229,4 @@ module CloudmersiveOcrApiClient
231
229
  end
232
230
 
233
231
  end
234
-
235
232
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -33,7 +33,6 @@ module CloudmersiveOcrApiClient
33
33
  # Optional - set to false to block values that contain numeric digits, set to true to allow numeric digits
34
34
  attr_accessor :allow_numeric_digits
35
35
 
36
-
37
36
  # Attribute mapping from ruby-style variable name to JSON key.
38
37
  def self.attribute_map
39
38
  {
@@ -64,7 +63,7 @@ module CloudmersiveOcrApiClient
64
63
  return unless attributes.is_a?(Hash)
65
64
 
66
65
  # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
67
 
69
68
  if attributes.has_key?(:'ColumnID')
70
69
  self.column_id = attributes[:'ColumnID']
@@ -89,20 +88,19 @@ module CloudmersiveOcrApiClient
89
88
  if attributes.has_key?(:'AllowNumericDigits')
90
89
  self.allow_numeric_digits = attributes[:'AllowNumericDigits']
91
90
  end
92
-
93
91
  end
94
92
 
95
93
  # Show invalid properties with the reasons. Usually used together with valid?
96
94
  # @return Array for valid properties with the reasons
97
95
  def list_invalid_properties
98
96
  invalid_properties = Array.new
99
- return invalid_properties
97
+ invalid_properties
100
98
  end
101
99
 
102
100
  # Check to see if the all the properties in the model are valid
103
101
  # @return true if the model is valid
104
102
  def valid?
105
- return true
103
+ true
106
104
  end
107
105
 
108
106
  # Checks equality by comparing each attribute.
@@ -137,10 +135,10 @@ module CloudmersiveOcrApiClient
137
135
  return nil unless attributes.is_a?(Hash)
138
136
  self.class.swagger_types.each_pair do |key, type|
139
137
  if type =~ /\AArray<(.*)>/i
140
- # check to ensure the input is an array given that the the attribute
138
+ # check to ensure the input is an array given that the attribute
141
139
  # is documented as an array but the input is not
142
140
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
142
  end
145
143
  elsif !attributes[self.class.attribute_map[key]].nil?
146
144
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -222,7 +220,7 @@ module CloudmersiveOcrApiClient
222
220
  # @return [Hash] Returns the value in the form of hash
223
221
  def _to_hash(value)
224
222
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
223
+ value.compact.map { |v| _to_hash(v) }
226
224
  elsif value.is_a?(Hash)
227
225
  {}.tap do |hash|
228
226
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -235,5 +233,4 @@ module CloudmersiveOcrApiClient
235
233
  end
236
234
 
237
235
  end
238
-
239
236
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -27,7 +27,6 @@ module CloudmersiveOcrApiClient
27
27
  # Optional - scale factor for target row height - relative to height of column header
28
28
  attr_accessor :target_row_height_relative
29
29
 
30
-
31
30
  # Attribute mapping from ruby-style variable name to JSON key.
32
31
  def self.attribute_map
33
32
  {
@@ -54,7 +53,7 @@ module CloudmersiveOcrApiClient
54
53
  return unless attributes.is_a?(Hash)
55
54
 
56
55
  # convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
57
 
59
58
  if attributes.has_key?(:'TableID')
60
59
  self.table_id = attributes[:'TableID']
@@ -73,20 +72,19 @@ module CloudmersiveOcrApiClient
73
72
  if attributes.has_key?(:'TargetRowHeight_Relative')
74
73
  self.target_row_height_relative = attributes[:'TargetRowHeight_Relative']
75
74
  end
76
-
77
75
  end
78
76
 
79
77
  # Show invalid properties with the reasons. Usually used together with valid?
80
78
  # @return Array for valid properties with the reasons
81
79
  def list_invalid_properties
82
80
  invalid_properties = Array.new
83
- return invalid_properties
81
+ invalid_properties
84
82
  end
85
83
 
86
84
  # Check to see if the all the properties in the model are valid
87
85
  # @return true if the model is valid
88
86
  def valid?
89
- return true
87
+ true
90
88
  end
91
89
 
92
90
  # Checks equality by comparing each attribute.
@@ -119,10 +117,10 @@ module CloudmersiveOcrApiClient
119
117
  return nil unless attributes.is_a?(Hash)
120
118
  self.class.swagger_types.each_pair do |key, type|
121
119
  if type =~ /\AArray<(.*)>/i
122
- # check to ensure the input is an array given that the the attribute
120
+ # check to ensure the input is an array given that the attribute
123
121
  # is documented as an array but the input is not
124
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
125
- 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) })
126
124
  end
127
125
  elsif !attributes[self.class.attribute_map[key]].nil?
128
126
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -204,7 +202,7 @@ module CloudmersiveOcrApiClient
204
202
  # @return [Hash] Returns the value in the form of hash
205
203
  def _to_hash(value)
206
204
  if value.is_a?(Array)
207
- value.compact.map{ |v| _to_hash(v) }
205
+ value.compact.map { |v| _to_hash(v) }
208
206
  elsif value.is_a?(Hash)
209
207
  {}.tap do |hash|
210
208
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -217,5 +215,4 @@ module CloudmersiveOcrApiClient
217
215
  end
218
216
 
219
217
  end
220
-
221
218
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # Angle of the page in radians; 0 represents perfectly horizontal
22
22
  attr_accessor :angle
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveOcrApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'Successful')
50
49
  self.successful = attributes[:'Successful']
@@ -53,20 +52,19 @@ module CloudmersiveOcrApiClient
53
52
  if attributes.has_key?(:'Angle')
54
53
  self.angle = attributes[:'Angle']
55
54
  end
56
-
57
55
  end
58
56
 
59
57
  # Show invalid properties with the reasons. Usually used together with valid?
60
58
  # @return Array for valid properties with the reasons
61
59
  def list_invalid_properties
62
60
  invalid_properties = Array.new
63
- return invalid_properties
61
+ invalid_properties
64
62
  end
65
63
 
66
64
  # Check to see if the all the properties in the model are valid
67
65
  # @return true if the model is valid
68
66
  def valid?
69
- return true
67
+ true
70
68
  end
71
69
 
72
70
  # Checks equality by comparing each attribute.
@@ -97,10 +95,10 @@ module CloudmersiveOcrApiClient
97
95
  return nil unless attributes.is_a?(Hash)
98
96
  self.class.swagger_types.each_pair do |key, type|
99
97
  if type =~ /\AArray<(.*)>/i
100
- # check to ensure the input is an array given that the the attribute
98
+ # check to ensure the input is an array given that the attribute
101
99
  # is documented as an array but the input is not
102
100
  if attributes[self.class.attribute_map[key]].is_a?(Array)
103
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
102
  end
105
103
  elsif !attributes[self.class.attribute_map[key]].nil?
106
104
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -182,7 +180,7 @@ module CloudmersiveOcrApiClient
182
180
  # @return [Hash] Returns the value in the form of hash
183
181
  def _to_hash(value)
184
182
  if value.is_a?(Array)
185
- value.compact.map{ |v| _to_hash(v) }
183
+ value.compact.map { |v| _to_hash(v) }
186
184
  elsif value.is_a?(Hash)
187
185
  {}.tap do |hash|
188
186
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -195,5 +193,4 @@ module CloudmersiveOcrApiClient
195
193
  end
196
194
 
197
195
  end
198
-
199
196
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # Words in the image
22
22
  attr_accessor :lines
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveOcrApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'Successful')
50
49
  self.successful = attributes[:'Successful']
@@ -55,20 +54,19 @@ module CloudmersiveOcrApiClient
55
54
  self.lines = value
56
55
  end
57
56
  end
58
-
59
57
  end
60
58
 
61
59
  # Show invalid properties with the reasons. Usually used together with valid?
62
60
  # @return Array for valid properties with the reasons
63
61
  def list_invalid_properties
64
62
  invalid_properties = Array.new
65
- return invalid_properties
63
+ invalid_properties
66
64
  end
67
65
 
68
66
  # Check to see if the all the properties in the model are valid
69
67
  # @return true if the model is valid
70
68
  def valid?
71
- return true
69
+ true
72
70
  end
73
71
 
74
72
  # Checks equality by comparing each attribute.
@@ -99,10 +97,10 @@ module CloudmersiveOcrApiClient
99
97
  return nil unless attributes.is_a?(Hash)
100
98
  self.class.swagger_types.each_pair do |key, type|
101
99
  if type =~ /\AArray<(.*)>/i
102
- # check to ensure the input is an array given that the the attribute
100
+ # check to ensure the input is an array given that the attribute
103
101
  # is documented as an array but the input is not
104
102
  if attributes[self.class.attribute_map[key]].is_a?(Array)
105
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
104
  end
107
105
  elsif !attributes[self.class.attribute_map[key]].nil?
108
106
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -184,7 +182,7 @@ module CloudmersiveOcrApiClient
184
182
  # @return [Hash] Returns the value in the form of hash
185
183
  def _to_hash(value)
186
184
  if value.is_a?(Array)
187
- value.compact.map{ |v| _to_hash(v) }
185
+ value.compact.map { |v| _to_hash(v) }
188
186
  elsif value.is_a?(Hash)
189
187
  {}.tap do |hash|
190
188
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -197,5 +195,4 @@ module CloudmersiveOcrApiClient
197
195
  end
198
196
 
199
197
  end
200
-
201
198
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # Converted text string from the image input.
22
22
  attr_accessor :text_result
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveOcrApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'MeanConfidenceLevel')
50
49
  self.mean_confidence_level = attributes[:'MeanConfidenceLevel']
@@ -53,20 +52,19 @@ module CloudmersiveOcrApiClient
53
52
  if attributes.has_key?(:'TextResult')
54
53
  self.text_result = attributes[:'TextResult']
55
54
  end
56
-
57
55
  end
58
56
 
59
57
  # Show invalid properties with the reasons. Usually used together with valid?
60
58
  # @return Array for valid properties with the reasons
61
59
  def list_invalid_properties
62
60
  invalid_properties = Array.new
63
- return invalid_properties
61
+ invalid_properties
64
62
  end
65
63
 
66
64
  # Check to see if the all the properties in the model are valid
67
65
  # @return true if the model is valid
68
66
  def valid?
69
- return true
67
+ true
70
68
  end
71
69
 
72
70
  # Checks equality by comparing each attribute.
@@ -97,10 +95,10 @@ module CloudmersiveOcrApiClient
97
95
  return nil unless attributes.is_a?(Hash)
98
96
  self.class.swagger_types.each_pair do |key, type|
99
97
  if type =~ /\AArray<(.*)>/i
100
- # check to ensure the input is an array given that the the attribute
98
+ # check to ensure the input is an array given that the attribute
101
99
  # is documented as an array but the input is not
102
100
  if attributes[self.class.attribute_map[key]].is_a?(Array)
103
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
102
  end
105
103
  elsif !attributes[self.class.attribute_map[key]].nil?
106
104
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -182,7 +180,7 @@ module CloudmersiveOcrApiClient
182
180
  # @return [Hash] Returns the value in the form of hash
183
181
  def _to_hash(value)
184
182
  if value.is_a?(Array)
185
- value.compact.map{ |v| _to_hash(v) }
183
+ value.compact.map { |v| _to_hash(v) }
186
184
  elsif value.is_a?(Hash)
187
185
  {}.tap do |hash|
188
186
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -195,5 +193,4 @@ module CloudmersiveOcrApiClient
195
193
  end
196
194
 
197
195
  end
198
-
199
196
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # Word elements in the image
22
22
  attr_accessor :words
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveOcrApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'Successful')
50
49
  self.successful = attributes[:'Successful']
@@ -55,20 +54,19 @@ module CloudmersiveOcrApiClient
55
54
  self.words = value
56
55
  end
57
56
  end
58
-
59
57
  end
60
58
 
61
59
  # Show invalid properties with the reasons. Usually used together with valid?
62
60
  # @return Array for valid properties with the reasons
63
61
  def list_invalid_properties
64
62
  invalid_properties = Array.new
65
- return invalid_properties
63
+ invalid_properties
66
64
  end
67
65
 
68
66
  # Check to see if the all the properties in the model are valid
69
67
  # @return true if the model is valid
70
68
  def valid?
71
- return true
69
+ true
72
70
  end
73
71
 
74
72
  # Checks equality by comparing each attribute.
@@ -99,10 +97,10 @@ module CloudmersiveOcrApiClient
99
97
  return nil unless attributes.is_a?(Hash)
100
98
  self.class.swagger_types.each_pair do |key, type|
101
99
  if type =~ /\AArray<(.*)>/i
102
- # check to ensure the input is an array given that the the attribute
100
+ # check to ensure the input is an array given that the attribute
103
101
  # is documented as an array but the input is not
104
102
  if attributes[self.class.attribute_map[key]].is_a?(Array)
105
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
104
  end
107
105
  elsif !attributes[self.class.attribute_map[key]].nil?
108
106
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -184,7 +182,7 @@ module CloudmersiveOcrApiClient
184
182
  # @return [Hash] Returns the value in the form of hash
185
183
  def _to_hash(value)
186
184
  if value.is_a?(Array)
187
- value.compact.map{ |v| _to_hash(v) }
185
+ value.compact.map { |v| _to_hash(v) }
188
186
  elsif value.is_a?(Hash)
189
187
  {}.tap do |hash|
190
188
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -197,5 +195,4 @@ module CloudmersiveOcrApiClient
197
195
  end
198
196
 
199
197
  end
200
-
201
198
  end