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
|
# 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
|
-
|
|
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,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
|
# 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
|
-
|
|
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,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
|
# 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
|
-
|
|
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,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
|
# 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(
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|