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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +7 -7
- data/cloudmersive-ocr-api-client.gemspec +3 -3
- data/docs/FormFieldDefinition.md +1 -0
- data/docs/ImageOcrApi.md +39 -33
- data/docs/PdfOcrApi.md +11 -9
- data/docs/PreprocessingApi.md +6 -6
- data/docs/ReceiptsApi.md +1 -1
- data/lib/cloudmersive-ocr-api-client.rb +1 -1
- data/lib/cloudmersive-ocr-api-client/api/image_ocr_api.rb +49 -49
- data/lib/cloudmersive-ocr-api-client/api/pdf_ocr_api.rb +17 -19
- data/lib/cloudmersive-ocr-api-client/api/preprocessing_api.rb +26 -32
- data/lib/cloudmersive-ocr-api-client/api/receipts_api.rb +6 -7
- data/lib/cloudmersive-ocr-api-client/api_client.rb +11 -9
- data/lib/cloudmersive-ocr-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-ocr-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-ocr-api-client/models/business_card_recognition_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/field_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/form_definition_template.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/form_field_definition.rb +18 -11
- data/lib/cloudmersive-ocr-api-client/models/form_recognition_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/form_table_column_definition.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/form_table_definition.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/get_page_angle_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/image_to_lines_with_location_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/image_to_text_response.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/image_to_words_with_location_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/ocr_line_element.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/ocr_page_result.rb +7 -11
- data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_lines_with_location.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_words_with_location.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/ocr_photo_text_element.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/ocr_word_element.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/pdf_to_lines_with_location_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/pdf_to_text_response.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/pdf_to_words_with_location_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/photo_to_words_with_location_result.rb +9 -13
- data/lib/cloudmersive-ocr-api-client/models/point.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/receipt_line_item.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/receipt_recognition_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/table_cell_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/table_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/models/table_row_result.rb +7 -10
- data/lib/cloudmersive-ocr-api-client/version.rb +2 -2
- data/spec/api/image_ocr_api_spec.rb +14 -11
- data/spec/api/pdf_ocr_api_spec.rb +5 -5
- data/spec/api/preprocessing_api_spec.rb +7 -7
- data/spec/api/receipts_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +52 -35
- data/spec/configuration_spec.rb +9 -9
- data/spec/models/business_card_recognition_result_spec.rb +9 -10
- data/spec/models/field_result_spec.rb +3 -4
- data/spec/models/form_definition_template_spec.rb +3 -4
- data/spec/models/form_field_definition_spec.rb +24 -19
- data/spec/models/form_recognition_result_spec.rb +6 -7
- data/spec/models/form_table_column_definition_spec.rb +7 -8
- data/spec/models/form_table_definition_spec.rb +5 -6
- data/spec/models/get_page_angle_result_spec.rb +3 -4
- data/spec/models/image_to_lines_with_location_result_spec.rb +3 -4
- data/spec/models/image_to_text_response_spec.rb +3 -4
- data/spec/models/image_to_words_with_location_result_spec.rb +3 -4
- data/spec/models/ocr_line_element_spec.rb +3 -4
- data/spec/models/ocr_page_result_spec.rb +4 -5
- data/spec/models/ocr_page_result_with_lines_with_location_spec.rb +4 -5
- data/spec/models/ocr_page_result_with_words_with_location_spec.rb +4 -5
- data/spec/models/ocr_photo_text_element_spec.rb +8 -9
- data/spec/models/ocr_word_element_spec.rb +12 -13
- data/spec/models/pdf_to_lines_with_location_result_spec.rb +3 -4
- data/spec/models/pdf_to_text_response_spec.rb +3 -4
- data/spec/models/pdf_to_words_with_location_result_spec.rb +3 -4
- data/spec/models/photo_to_words_with_location_result_spec.rb +4 -5
- data/spec/models/point_spec.rb +3 -4
- data/spec/models/receipt_line_item_spec.rb +3 -4
- data/spec/models/receipt_recognition_result_spec.rb +10 -11
- data/spec/models/table_cell_result_spec.rb +3 -4
- data/spec/models/table_result_spec.rb +3 -4
- data/spec/models/table_row_result_spec.rb +2 -3
- data/spec/spec_helper.rb +1 -1
- 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.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
|
|
|
21
21
|
# Word objects in the line
|
|
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?(:'LineText')
|
|
50
49
|
self.line_text = attributes[:'LineText']
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
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,14 +6,13 @@
|
|
|
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.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module CloudmersiveOcrApiClient
|
|
16
|
-
|
|
17
16
|
class OcrPageResult
|
|
18
17
|
# Page number of the page that was OCR-ed, starting with 1 for the first page in the PDF file
|
|
19
18
|
attr_accessor :page_number
|
|
@@ -24,7 +23,6 @@ module CloudmersiveOcrApiClient
|
|
|
24
23
|
# Converted text string from the image input.
|
|
25
24
|
attr_accessor :text_result
|
|
26
25
|
|
|
27
|
-
|
|
28
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
27
|
def self.attribute_map
|
|
30
28
|
{
|
|
@@ -49,7 +47,7 @@ module CloudmersiveOcrApiClient
|
|
|
49
47
|
return unless attributes.is_a?(Hash)
|
|
50
48
|
|
|
51
49
|
# convert string to symbol for hash key
|
|
52
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
53
51
|
|
|
54
52
|
if attributes.has_key?(:'PageNumber')
|
|
55
53
|
self.page_number = attributes[:'PageNumber']
|
|
@@ -62,20 +60,19 @@ module CloudmersiveOcrApiClient
|
|
|
62
60
|
if attributes.has_key?(:'TextResult')
|
|
63
61
|
self.text_result = attributes[:'TextResult']
|
|
64
62
|
end
|
|
65
|
-
|
|
66
63
|
end
|
|
67
64
|
|
|
68
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
66
|
# @return Array for valid properties with the reasons
|
|
70
67
|
def list_invalid_properties
|
|
71
68
|
invalid_properties = Array.new
|
|
72
|
-
|
|
69
|
+
invalid_properties
|
|
73
70
|
end
|
|
74
71
|
|
|
75
72
|
# Check to see if the all the properties in the model are valid
|
|
76
73
|
# @return true if the model is valid
|
|
77
74
|
def valid?
|
|
78
|
-
|
|
75
|
+
true
|
|
79
76
|
end
|
|
80
77
|
|
|
81
78
|
# Checks equality by comparing each attribute.
|
|
@@ -107,10 +104,10 @@ module CloudmersiveOcrApiClient
|
|
|
107
104
|
return nil unless attributes.is_a?(Hash)
|
|
108
105
|
self.class.swagger_types.each_pair do |key, type|
|
|
109
106
|
if type =~ /\AArray<(.*)>/i
|
|
110
|
-
# check to ensure the input is an array given that the
|
|
107
|
+
# check to ensure the input is an array given that the attribute
|
|
111
108
|
# is documented as an array but the input is not
|
|
112
109
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
113
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
114
111
|
end
|
|
115
112
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
116
113
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -192,7 +189,7 @@ module CloudmersiveOcrApiClient
|
|
|
192
189
|
# @return [Hash] Returns the value in the form of hash
|
|
193
190
|
def _to_hash(value)
|
|
194
191
|
if value.is_a?(Array)
|
|
195
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
|
196
193
|
elsif value.is_a?(Hash)
|
|
197
194
|
{}.tap do |hash|
|
|
198
195
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -205,5 +202,4 @@ module CloudmersiveOcrApiClient
|
|
|
205
202
|
end
|
|
206
203
|
|
|
207
204
|
end
|
|
208
|
-
|
|
209
205
|
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.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -24,7 +24,6 @@ module CloudmersiveOcrApiClient
|
|
|
24
24
|
# Word elements in the image
|
|
25
25
|
attr_accessor :lines
|
|
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?(:'PageNumber')
|
|
55
54
|
self.page_number = attributes[:'PageNumber']
|
|
@@ -64,20 +63,19 @@ module CloudmersiveOcrApiClient
|
|
|
64
63
|
self.lines = value
|
|
65
64
|
end
|
|
66
65
|
end
|
|
67
|
-
|
|
68
66
|
end
|
|
69
67
|
|
|
70
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
71
69
|
# @return Array for valid properties with the reasons
|
|
72
70
|
def list_invalid_properties
|
|
73
71
|
invalid_properties = Array.new
|
|
74
|
-
|
|
72
|
+
invalid_properties
|
|
75
73
|
end
|
|
76
74
|
|
|
77
75
|
# Check to see if the all the properties in the model are valid
|
|
78
76
|
# @return true if the model is valid
|
|
79
77
|
def valid?
|
|
80
|
-
|
|
78
|
+
true
|
|
81
79
|
end
|
|
82
80
|
|
|
83
81
|
# Checks equality by comparing each attribute.
|
|
@@ -109,10 +107,10 @@ module CloudmersiveOcrApiClient
|
|
|
109
107
|
return nil unless attributes.is_a?(Hash)
|
|
110
108
|
self.class.swagger_types.each_pair do |key, type|
|
|
111
109
|
if type =~ /\AArray<(.*)>/i
|
|
112
|
-
# check to ensure the input is an array given that the
|
|
110
|
+
# check to ensure the input is an array given that the attribute
|
|
113
111
|
# is documented as an array but the input is not
|
|
114
112
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
115
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
113
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
116
114
|
end
|
|
117
115
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
118
116
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -194,7 +192,7 @@ module CloudmersiveOcrApiClient
|
|
|
194
192
|
# @return [Hash] Returns the value in the form of hash
|
|
195
193
|
def _to_hash(value)
|
|
196
194
|
if value.is_a?(Array)
|
|
197
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
|
198
196
|
elsif value.is_a?(Hash)
|
|
199
197
|
{}.tap do |hash|
|
|
200
198
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -207,5 +205,4 @@ module CloudmersiveOcrApiClient
|
|
|
207
205
|
end
|
|
208
206
|
|
|
209
207
|
end
|
|
210
|
-
|
|
211
208
|
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.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -24,7 +24,6 @@ module CloudmersiveOcrApiClient
|
|
|
24
24
|
# Word elements in the image
|
|
25
25
|
attr_accessor :words
|
|
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?(:'PageNumber')
|
|
55
54
|
self.page_number = attributes[:'PageNumber']
|
|
@@ -64,20 +63,19 @@ module CloudmersiveOcrApiClient
|
|
|
64
63
|
self.words = value
|
|
65
64
|
end
|
|
66
65
|
end
|
|
67
|
-
|
|
68
66
|
end
|
|
69
67
|
|
|
70
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
71
69
|
# @return Array for valid properties with the reasons
|
|
72
70
|
def list_invalid_properties
|
|
73
71
|
invalid_properties = Array.new
|
|
74
|
-
|
|
72
|
+
invalid_properties
|
|
75
73
|
end
|
|
76
74
|
|
|
77
75
|
# Check to see if the all the properties in the model are valid
|
|
78
76
|
# @return true if the model is valid
|
|
79
77
|
def valid?
|
|
80
|
-
|
|
78
|
+
true
|
|
81
79
|
end
|
|
82
80
|
|
|
83
81
|
# Checks equality by comparing each attribute.
|
|
@@ -109,10 +107,10 @@ module CloudmersiveOcrApiClient
|
|
|
109
107
|
return nil unless attributes.is_a?(Hash)
|
|
110
108
|
self.class.swagger_types.each_pair do |key, type|
|
|
111
109
|
if type =~ /\AArray<(.*)>/i
|
|
112
|
-
# check to ensure the input is an array given that the
|
|
110
|
+
# check to ensure the input is an array given that the attribute
|
|
113
111
|
# is documented as an array but the input is not
|
|
114
112
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
115
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
113
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
116
114
|
end
|
|
117
115
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
118
116
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -194,7 +192,7 @@ module CloudmersiveOcrApiClient
|
|
|
194
192
|
# @return [Hash] Returns the value in the form of hash
|
|
195
193
|
def _to_hash(value)
|
|
196
194
|
if value.is_a?(Array)
|
|
197
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
|
198
196
|
elsif value.is_a?(Hash)
|
|
199
197
|
{}.tap do |hash|
|
|
200
198
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -207,5 +205,4 @@ module CloudmersiveOcrApiClient
|
|
|
207
205
|
end
|
|
208
206
|
|
|
209
207
|
end
|
|
210
|
-
|
|
211
208
|
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.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -36,7 +36,6 @@ module CloudmersiveOcrApiClient
|
|
|
36
36
|
# Confidence level of the machine learning result; possible values are 0.0 (lowest accuracy) - 1.0 (highest accuracy)
|
|
37
37
|
attr_accessor :confidence_level
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
40
|
def self.attribute_map
|
|
42
41
|
{
|
|
@@ -69,7 +68,7 @@ module CloudmersiveOcrApiClient
|
|
|
69
68
|
return unless attributes.is_a?(Hash)
|
|
70
69
|
|
|
71
70
|
# convert string to symbol for hash key
|
|
72
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
73
72
|
|
|
74
73
|
if attributes.has_key?(:'Text')
|
|
75
74
|
self.text = attributes[:'Text']
|
|
@@ -100,20 +99,19 @@ module CloudmersiveOcrApiClient
|
|
|
100
99
|
if attributes.has_key?(:'ConfidenceLevel')
|
|
101
100
|
self.confidence_level = attributes[:'ConfidenceLevel']
|
|
102
101
|
end
|
|
103
|
-
|
|
104
102
|
end
|
|
105
103
|
|
|
106
104
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
105
|
# @return Array for valid properties with the reasons
|
|
108
106
|
def list_invalid_properties
|
|
109
107
|
invalid_properties = Array.new
|
|
110
|
-
|
|
108
|
+
invalid_properties
|
|
111
109
|
end
|
|
112
110
|
|
|
113
111
|
# Check to see if the all the properties in the model are valid
|
|
114
112
|
# @return true if the model is valid
|
|
115
113
|
def valid?
|
|
116
|
-
|
|
114
|
+
true
|
|
117
115
|
end
|
|
118
116
|
|
|
119
117
|
# Checks equality by comparing each attribute.
|
|
@@ -149,10 +147,10 @@ module CloudmersiveOcrApiClient
|
|
|
149
147
|
return nil unless attributes.is_a?(Hash)
|
|
150
148
|
self.class.swagger_types.each_pair do |key, type|
|
|
151
149
|
if type =~ /\AArray<(.*)>/i
|
|
152
|
-
# check to ensure the input is an array given that the
|
|
150
|
+
# check to ensure the input is an array given that the attribute
|
|
153
151
|
# is documented as an array but the input is not
|
|
154
152
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
155
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
156
154
|
end
|
|
157
155
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
158
156
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -234,7 +232,7 @@ module CloudmersiveOcrApiClient
|
|
|
234
232
|
# @return [Hash] Returns the value in the form of hash
|
|
235
233
|
def _to_hash(value)
|
|
236
234
|
if value.is_a?(Array)
|
|
237
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
|
238
236
|
elsif value.is_a?(Hash)
|
|
239
237
|
{}.tap do |hash|
|
|
240
238
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -247,5 +245,4 @@ module CloudmersiveOcrApiClient
|
|
|
247
245
|
end
|
|
248
246
|
|
|
249
247
|
end
|
|
250
|
-
|
|
251
248
|
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.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -48,7 +48,6 @@ module CloudmersiveOcrApiClient
|
|
|
48
48
|
# Index of the containing page
|
|
49
49
|
attr_accessor :page_number
|
|
50
50
|
|
|
51
|
-
|
|
52
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
52
|
def self.attribute_map
|
|
54
53
|
{
|
|
@@ -89,7 +88,7 @@ module CloudmersiveOcrApiClient
|
|
|
89
88
|
return unless attributes.is_a?(Hash)
|
|
90
89
|
|
|
91
90
|
# convert string to symbol for hash key
|
|
92
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
93
92
|
|
|
94
93
|
if attributes.has_key?(:'WordText')
|
|
95
94
|
self.word_text = attributes[:'WordText']
|
|
@@ -134,20 +133,19 @@ module CloudmersiveOcrApiClient
|
|
|
134
133
|
if attributes.has_key?(:'PageNumber')
|
|
135
134
|
self.page_number = attributes[:'PageNumber']
|
|
136
135
|
end
|
|
137
|
-
|
|
138
136
|
end
|
|
139
137
|
|
|
140
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
139
|
# @return Array for valid properties with the reasons
|
|
142
140
|
def list_invalid_properties
|
|
143
141
|
invalid_properties = Array.new
|
|
144
|
-
|
|
142
|
+
invalid_properties
|
|
145
143
|
end
|
|
146
144
|
|
|
147
145
|
# Check to see if the all the properties in the model are valid
|
|
148
146
|
# @return true if the model is valid
|
|
149
147
|
def valid?
|
|
150
|
-
|
|
148
|
+
true
|
|
151
149
|
end
|
|
152
150
|
|
|
153
151
|
# Checks equality by comparing each attribute.
|
|
@@ -187,10 +185,10 @@ module CloudmersiveOcrApiClient
|
|
|
187
185
|
return nil unless attributes.is_a?(Hash)
|
|
188
186
|
self.class.swagger_types.each_pair do |key, type|
|
|
189
187
|
if type =~ /\AArray<(.*)>/i
|
|
190
|
-
# check to ensure the input is an array given that the
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
191
189
|
# is documented as an array but the input is not
|
|
192
190
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
193
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
191
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
194
192
|
end
|
|
195
193
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
196
194
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -272,7 +270,7 @@ module CloudmersiveOcrApiClient
|
|
|
272
270
|
# @return [Hash] Returns the value in the form of hash
|
|
273
271
|
def _to_hash(value)
|
|
274
272
|
if value.is_a?(Array)
|
|
275
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
273
|
+
value.compact.map { |v| _to_hash(v) }
|
|
276
274
|
elsif value.is_a?(Hash)
|
|
277
275
|
{}.tap do |hash|
|
|
278
276
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -285,5 +283,4 @@ module CloudmersiveOcrApiClient
|
|
|
285
283
|
end
|
|
286
284
|
|
|
287
285
|
end
|
|
288
|
-
|
|
289
286
|
end
|