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
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # OCR results for each page
22
22
  attr_accessor :ocr_pages
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.ocr_pages = 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
  # Page OCR results
22
22
  attr_accessor :ocr_pages
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.ocr_pages = 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
  # OCR page results
22
22
  attr_accessor :ocr_pages
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.ocr_pages = 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
 
@@ -24,7 +24,6 @@ module CloudmersiveOcrApiClient
24
24
  # Typically null. To analyze OCR performance, enable diagnostic mode by adding the HTTP header \"DiagnosticMode\" with the value \"true\". When this is true, a diagnostic image showing the details of the OCR result will be set in PNG format into DiagnosticImage.
25
25
  attr_accessor :diagnostic_image
26
26
 
27
-
28
27
  # Attribute mapping from ruby-style variable name to JSON key.
29
28
  def self.attribute_map
30
29
  {
@@ -49,7 +48,7 @@ module CloudmersiveOcrApiClient
49
48
  return unless attributes.is_a?(Hash)
50
49
 
51
50
  # convert string to symbol for hash key
52
- 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 }
53
52
 
54
53
  if attributes.has_key?(:'Successful')
55
54
  self.successful = attributes[:'Successful']
@@ -64,7 +63,6 @@ module CloudmersiveOcrApiClient
64
63
  if attributes.has_key?(:'DiagnosticImage')
65
64
  self.diagnostic_image = attributes[:'DiagnosticImage']
66
65
  end
67
-
68
66
  end
69
67
 
70
68
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,25 +70,24 @@ module CloudmersiveOcrApiClient
72
70
  def list_invalid_properties
73
71
  invalid_properties = Array.new
74
72
  if !@diagnostic_image.nil? && @diagnostic_image !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
75
- invalid_properties.push("invalid value for 'diagnostic_image', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
73
+ invalid_properties.push('invalid value for "diagnostic_image", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
76
74
  end
77
75
 
78
- return invalid_properties
76
+ invalid_properties
79
77
  end
80
78
 
81
79
  # Check to see if the all the properties in the model are valid
82
80
  # @return true if the model is valid
83
81
  def valid?
84
82
  return false if !@diagnostic_image.nil? && @diagnostic_image !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
85
- return true
83
+ true
86
84
  end
87
85
 
88
86
  # Custom attribute writer method with validation
89
87
  # @param [Object] diagnostic_image Value to be assigned
90
88
  def diagnostic_image=(diagnostic_image)
91
-
92
89
  if !diagnostic_image.nil? && diagnostic_image !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
93
- fail ArgumentError, "invalid value for 'diagnostic_image', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
90
+ fail ArgumentError, 'invalid value for "diagnostic_image", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
94
91
  end
95
92
 
96
93
  @diagnostic_image = diagnostic_image
@@ -125,10 +122,10 @@ module CloudmersiveOcrApiClient
125
122
  return nil unless attributes.is_a?(Hash)
126
123
  self.class.swagger_types.each_pair do |key, type|
127
124
  if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
125
+ # check to ensure the input is an array given that the attribute
129
126
  # is documented as an array but the input is not
130
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
129
  end
133
130
  elsif !attributes[self.class.attribute_map[key]].nil?
134
131
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -210,7 +207,7 @@ module CloudmersiveOcrApiClient
210
207
  # @return [Hash] Returns the value in the form of hash
211
208
  def _to_hash(value)
212
209
  if value.is_a?(Array)
213
- value.compact.map{ |v| _to_hash(v) }
210
+ value.compact.map { |v| _to_hash(v) }
214
211
  elsif value.is_a?(Hash)
215
212
  {}.tap do |hash|
216
213
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -223,5 +220,4 @@ module CloudmersiveOcrApiClient
223
220
  end
224
221
 
225
222
  end
226
-
227
223
  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
  # Y location in 2D in the image, where 0 represents the top edge of the image
22
22
  attr_accessor :y
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?(:'X')
50
49
  self.x = attributes[:'X']
@@ -53,20 +52,19 @@ module CloudmersiveOcrApiClient
53
52
  if attributes.has_key?(:'Y')
54
53
  self.y = attributes[:'Y']
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
  # Price of the item if available
22
22
  attr_accessor :item_price
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?(:'ItemDescription')
50
49
  self.item_description = attributes[:'ItemDescription']
@@ -53,20 +52,19 @@ module CloudmersiveOcrApiClient
53
52
  if attributes.has_key?(:'ItemPrice')
54
53
  self.item_price = attributes[:'ItemPrice']
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