cloudmersive-barcode-api-client 2.0.3 → 2.2.0
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/README.md +11 -4
- data/docs/BarcodeAdvancedResultItem.md +9 -0
- data/docs/BarcodeAdvancedScanResult.md +11 -0
- data/docs/BarcodeQRResultItem.md +8 -0
- data/docs/BarcodeScanApi.md +116 -0
- data/docs/BarcodeScanQRAdvancedResult.md +11 -0
- data/docs/GenerateBarcodeApi.md +111 -10
- data/lib/cloudmersive-barcode-api-client/api/barcode_scan_api.rb +116 -0
- data/lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb +105 -0
- data/lib/cloudmersive-barcode-api-client/models/barcode_advanced_result_item.rb +196 -0
- data/lib/cloudmersive-barcode-api-client/models/barcode_advanced_scan_result.rb +218 -0
- data/lib/cloudmersive-barcode-api-client/models/barcode_qr_result_item.rb +186 -0
- data/lib/cloudmersive-barcode-api-client/models/barcode_scan_qr_advanced_result.rb +218 -0
- data/lib/cloudmersive-barcode-api-client/version.rb +1 -1
- data/lib/cloudmersive-barcode-api-client.rb +4 -0
- data/spec/api/barcode_scan_api_spec.rb +26 -0
- data/spec/api/generate_barcode_api_spec.rb +29 -0
- data/spec/models/barcode_advanced_result_item_spec.rb +47 -0
- data/spec/models/barcode_advanced_scan_result_spec.rb +59 -0
- data/spec/models/barcode_qr_result_item_spec.rb +41 -0
- data/spec/models/barcode_scan_qr_advanced_result_spec.rb +59 -0
- metadata +30 -18
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#barcodeapi
|
|
3
|
+
|
|
4
|
+
#Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module CloudmersiveBarcodeApiClient
|
|
16
|
+
# QR barcode instance
|
|
17
|
+
class BarcodeQRResultItem
|
|
18
|
+
# The barcode text
|
|
19
|
+
attr_accessor :raw_text
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'raw_text' => :'RawText'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Attribute type mapping.
|
|
29
|
+
def self.swagger_types
|
|
30
|
+
{
|
|
31
|
+
:'raw_text' => :'String'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Initializes the object
|
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
37
|
+
def initialize(attributes = {})
|
|
38
|
+
return unless attributes.is_a?(Hash)
|
|
39
|
+
|
|
40
|
+
# convert string to symbol for hash key
|
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
42
|
+
|
|
43
|
+
if attributes.has_key?(:'RawText')
|
|
44
|
+
self.raw_text = attributes[:'RawText']
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
+
# @return Array for valid properties with the reasons
|
|
50
|
+
def list_invalid_properties
|
|
51
|
+
invalid_properties = Array.new
|
|
52
|
+
invalid_properties
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Check to see if the all the properties in the model are valid
|
|
56
|
+
# @return true if the model is valid
|
|
57
|
+
def valid?
|
|
58
|
+
true
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Checks equality by comparing each attribute.
|
|
62
|
+
# @param [Object] Object to be compared
|
|
63
|
+
def ==(o)
|
|
64
|
+
return true if self.equal?(o)
|
|
65
|
+
self.class == o.class &&
|
|
66
|
+
raw_text == o.raw_text
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @see the `==` method
|
|
70
|
+
# @param [Object] Object to be compared
|
|
71
|
+
def eql?(o)
|
|
72
|
+
self == o
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Calculates hash code according to all attributes.
|
|
76
|
+
# @return [Fixnum] Hash code
|
|
77
|
+
def hash
|
|
78
|
+
[raw_text].hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Builds the object from hash
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
# @return [Object] Returns the model itself
|
|
84
|
+
def build_from_hash(attributes)
|
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
|
88
|
+
# check to ensure the input is an array given that the attribute
|
|
89
|
+
# is documented as an array but the input is not
|
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
92
|
+
end
|
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
self
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Deserializes the data based on type
|
|
102
|
+
# @param string type Data type
|
|
103
|
+
# @param string value Value to be deserialized
|
|
104
|
+
# @return [Object] Deserialized data
|
|
105
|
+
def _deserialize(type, value)
|
|
106
|
+
case type.to_sym
|
|
107
|
+
when :DateTime
|
|
108
|
+
DateTime.parse(value)
|
|
109
|
+
when :Date
|
|
110
|
+
Date.parse(value)
|
|
111
|
+
when :String
|
|
112
|
+
value.to_s
|
|
113
|
+
when :Integer
|
|
114
|
+
value.to_i
|
|
115
|
+
when :Float
|
|
116
|
+
value.to_f
|
|
117
|
+
when :BOOLEAN
|
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
119
|
+
true
|
|
120
|
+
else
|
|
121
|
+
false
|
|
122
|
+
end
|
|
123
|
+
when :Object
|
|
124
|
+
# generic object (usually a Hash), return directly
|
|
125
|
+
value
|
|
126
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
127
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
128
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
130
|
+
k_type = Regexp.last_match[:k_type]
|
|
131
|
+
v_type = Regexp.last_match[:v_type]
|
|
132
|
+
{}.tap do |hash|
|
|
133
|
+
value.each do |k, v|
|
|
134
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
else # model
|
|
138
|
+
temp_model = CloudmersiveBarcodeApiClient.const_get(type).new
|
|
139
|
+
temp_model.build_from_hash(value)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Returns the string representation of the object
|
|
144
|
+
# @return [String] String presentation of the object
|
|
145
|
+
def to_s
|
|
146
|
+
to_hash.to_s
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
|
151
|
+
def to_body
|
|
152
|
+
to_hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Returns the object in the form of hash
|
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
|
157
|
+
def to_hash
|
|
158
|
+
hash = {}
|
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
160
|
+
value = self.send(attr)
|
|
161
|
+
next if value.nil?
|
|
162
|
+
hash[param] = _to_hash(value)
|
|
163
|
+
end
|
|
164
|
+
hash
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Outputs non-array value in the form of hash
|
|
168
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
169
|
+
# @param [Object] value Any valid value
|
|
170
|
+
# @return [Hash] Returns the value in the form of hash
|
|
171
|
+
def _to_hash(value)
|
|
172
|
+
if value.is_a?(Array)
|
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
|
174
|
+
elsif value.is_a?(Hash)
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
177
|
+
end
|
|
178
|
+
elsif value.respond_to? :to_hash
|
|
179
|
+
value.to_hash
|
|
180
|
+
else
|
|
181
|
+
value
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#barcodeapi
|
|
3
|
+
|
|
4
|
+
#Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module CloudmersiveBarcodeApiClient
|
|
16
|
+
# Result of the advanced QR barcode scan
|
|
17
|
+
class BarcodeScanQRAdvancedResult
|
|
18
|
+
# True if the operation was successful, false otherwise
|
|
19
|
+
attr_accessor :successful
|
|
20
|
+
|
|
21
|
+
# Results of performing the QR barcode scan operation
|
|
22
|
+
attr_accessor :result_barcodes
|
|
23
|
+
|
|
24
|
+
# Number of barcodes read
|
|
25
|
+
attr_accessor :barcode_count
|
|
26
|
+
|
|
27
|
+
# Error message if any
|
|
28
|
+
attr_accessor :error_message
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'successful' => :'Successful',
|
|
34
|
+
:'result_barcodes' => :'ResultBarcodes',
|
|
35
|
+
:'barcode_count' => :'BarcodeCount',
|
|
36
|
+
:'error_message' => :'ErrorMessage'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.swagger_types
|
|
42
|
+
{
|
|
43
|
+
:'successful' => :'BOOLEAN',
|
|
44
|
+
:'result_barcodes' => :'Array<BarcodeQRResultItem>',
|
|
45
|
+
:'barcode_count' => :'Integer',
|
|
46
|
+
:'error_message' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
57
|
+
|
|
58
|
+
if attributes.has_key?(:'Successful')
|
|
59
|
+
self.successful = attributes[:'Successful']
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if attributes.has_key?(:'ResultBarcodes')
|
|
63
|
+
if (value = attributes[:'ResultBarcodes']).is_a?(Array)
|
|
64
|
+
self.result_barcodes = value
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.has_key?(:'BarcodeCount')
|
|
69
|
+
self.barcode_count = attributes[:'BarcodeCount']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.has_key?(:'ErrorMessage')
|
|
73
|
+
self.error_message = attributes[:'ErrorMessage']
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
78
|
+
# @return Array for valid properties with the reasons
|
|
79
|
+
def list_invalid_properties
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
invalid_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check to see if the all the properties in the model are valid
|
|
85
|
+
# @return true if the model is valid
|
|
86
|
+
def valid?
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Checks equality by comparing each attribute.
|
|
91
|
+
# @param [Object] Object to be compared
|
|
92
|
+
def ==(o)
|
|
93
|
+
return true if self.equal?(o)
|
|
94
|
+
self.class == o.class &&
|
|
95
|
+
successful == o.successful &&
|
|
96
|
+
result_barcodes == o.result_barcodes &&
|
|
97
|
+
barcode_count == o.barcode_count &&
|
|
98
|
+
error_message == o.error_message
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @see the `==` method
|
|
102
|
+
# @param [Object] Object to be compared
|
|
103
|
+
def eql?(o)
|
|
104
|
+
self == o
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Calculates hash code according to all attributes.
|
|
108
|
+
# @return [Fixnum] Hash code
|
|
109
|
+
def hash
|
|
110
|
+
[successful, result_barcodes, barcode_count, error_message].hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Builds the object from hash
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
# @return [Object] Returns the model itself
|
|
116
|
+
def build_from_hash(attributes)
|
|
117
|
+
return nil unless attributes.is_a?(Hash)
|
|
118
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
119
|
+
if type =~ /\AArray<(.*)>/i
|
|
120
|
+
# check to ensure the input is an array given that the attribute
|
|
121
|
+
# is documented as an array but the input is not
|
|
122
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
123
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
124
|
+
end
|
|
125
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
126
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
127
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
self
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Deserializes the data based on type
|
|
134
|
+
# @param string type Data type
|
|
135
|
+
# @param string value Value to be deserialized
|
|
136
|
+
# @return [Object] Deserialized data
|
|
137
|
+
def _deserialize(type, value)
|
|
138
|
+
case type.to_sym
|
|
139
|
+
when :DateTime
|
|
140
|
+
DateTime.parse(value)
|
|
141
|
+
when :Date
|
|
142
|
+
Date.parse(value)
|
|
143
|
+
when :String
|
|
144
|
+
value.to_s
|
|
145
|
+
when :Integer
|
|
146
|
+
value.to_i
|
|
147
|
+
when :Float
|
|
148
|
+
value.to_f
|
|
149
|
+
when :BOOLEAN
|
|
150
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
151
|
+
true
|
|
152
|
+
else
|
|
153
|
+
false
|
|
154
|
+
end
|
|
155
|
+
when :Object
|
|
156
|
+
# generic object (usually a Hash), return directly
|
|
157
|
+
value
|
|
158
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
159
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
160
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
161
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
162
|
+
k_type = Regexp.last_match[:k_type]
|
|
163
|
+
v_type = Regexp.last_match[:v_type]
|
|
164
|
+
{}.tap do |hash|
|
|
165
|
+
value.each do |k, v|
|
|
166
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
else # model
|
|
170
|
+
temp_model = CloudmersiveBarcodeApiClient.const_get(type).new
|
|
171
|
+
temp_model.build_from_hash(value)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the string representation of the object
|
|
176
|
+
# @return [String] String presentation of the object
|
|
177
|
+
def to_s
|
|
178
|
+
to_hash.to_s
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_body
|
|
184
|
+
to_hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the object in the form of hash
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_hash
|
|
190
|
+
hash = {}
|
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
next if value.nil?
|
|
194
|
+
hash[param] = _to_hash(value)
|
|
195
|
+
end
|
|
196
|
+
hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Outputs non-array value in the form of hash
|
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
201
|
+
# @param [Object] value Any valid value
|
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
|
203
|
+
def _to_hash(value)
|
|
204
|
+
if value.is_a?(Array)
|
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
|
206
|
+
elsif value.is_a?(Hash)
|
|
207
|
+
{}.tap do |hash|
|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
209
|
+
end
|
|
210
|
+
elsif value.respond_to? :to_hash
|
|
211
|
+
value.to_hash
|
|
212
|
+
else
|
|
213
|
+
value
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
end
|
|
@@ -17,7 +17,11 @@ require 'cloudmersive-barcode-api-client/version'
|
|
|
17
17
|
require 'cloudmersive-barcode-api-client/configuration'
|
|
18
18
|
|
|
19
19
|
# Models
|
|
20
|
+
require 'cloudmersive-barcode-api-client/models/barcode_advanced_result_item'
|
|
21
|
+
require 'cloudmersive-barcode-api-client/models/barcode_advanced_scan_result'
|
|
20
22
|
require 'cloudmersive-barcode-api-client/models/barcode_lookup_response'
|
|
23
|
+
require 'cloudmersive-barcode-api-client/models/barcode_qr_result_item'
|
|
24
|
+
require 'cloudmersive-barcode-api-client/models/barcode_scan_qr_advanced_result'
|
|
21
25
|
require 'cloudmersive-barcode-api-client/models/barcode_scan_result'
|
|
22
26
|
require 'cloudmersive-barcode-api-client/models/product_match'
|
|
23
27
|
|
|
@@ -44,4 +44,30 @@ describe 'BarcodeScanApi' do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
# unit tests for barcode_scan_image_advanced
|
|
48
|
+
# Advanced AI scan and recognition of an image of one or more barcodes of any type
|
|
49
|
+
# Scan an image or photo of a barcode and return the result with enhanced accuracy, particularlly for low quality inputs using Advanced AI. Supported barcode types include AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, MAXICODE, PDF_417, QR_CODE, RSS_14, RSS_EXPANDED, UPC_A, UPC_E, All_1D, UPC_EAN_EXTENSION, MSI, PLESSEY, IMB. Uses large model AI. Consumes 100 API calls per image page. For Managed Instance and Private Cloud requires GPU infrastructure. Supports PNG, PDF and JPEG input file formats.
|
|
50
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [BarcodeAdvancedScanResult]
|
|
53
|
+
describe 'barcode_scan_image_advanced test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for barcode_scan_image_advanced_qr
|
|
60
|
+
# Advanced AI scan and recognition of an image of one or more QR barcodes
|
|
61
|
+
# Scan an image or photo of a QR barcode and return the result. Uses AI deep learning to read blurry or low resultion QR barcodes. Supports PNG, PDF and JPEG input file formats.
|
|
62
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @option opts [String] :preprocessing Optional, preprocessing mode, default is 'Auto'. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image - including automatic unrotation of the image - before OCR is applied; this is recommended). Set this to 'None' if you do not want to use automatic image unrotation and enhancement.
|
|
65
|
+
# @option opts [String] :recognition_mode Optional, recognitionMode mode, default is 'Advanced'. Possible values are Advanced, and Advanced2 which provides the most advanced available barcode recognition.
|
|
66
|
+
# @return [BarcodeScanQRAdvancedResult]
|
|
67
|
+
describe 'barcode_scan_image_advanced_qr test' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
47
73
|
end
|
|
@@ -32,11 +32,29 @@ describe 'GenerateBarcodeApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for generate_barcode_code128
|
|
36
|
+
# Generate a EAN-13 code barcode as PNG file
|
|
37
|
+
# Validates and generate a EAN-13 barcode as a PNG file, a type of 1D barcode
|
|
38
|
+
# @param value Barcode value to generate from
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [Integer] :width Optional: width of the barcode in pixels. Minimum value of 10.
|
|
41
|
+
# @option opts [Integer] :height Optional: width of the barcode in pixels. Minimum value of 10.
|
|
42
|
+
# @option opts [BOOLEAN] :include_label Optional: show text label on the image of the barcode value, default is true.
|
|
43
|
+
# @return [String]
|
|
44
|
+
describe 'generate_barcode_code128 test' do
|
|
45
|
+
it 'should work' do
|
|
46
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
35
50
|
# unit tests for generate_barcode_ean13
|
|
36
51
|
# Generate a EAN-13 code barcode as PNG file
|
|
37
52
|
# Validates and generate a EAN-13 barcode as a PNG file, a type of 1D barcode
|
|
38
53
|
# @param value Barcode value to generate from
|
|
39
54
|
# @param [Hash] opts the optional parameters
|
|
55
|
+
# @option opts [Integer] :width Optional: width of the barcode in pixels. Minimum value of 10.
|
|
56
|
+
# @option opts [Integer] :height Optional: width of the barcode in pixels. Minimum value of 10.
|
|
57
|
+
# @option opts [BOOLEAN] :include_label Optional: show text label on the image of the barcode value, default is true.
|
|
40
58
|
# @return [String]
|
|
41
59
|
describe 'generate_barcode_ean13 test' do
|
|
42
60
|
it 'should work' do
|
|
@@ -49,6 +67,9 @@ describe 'GenerateBarcodeApi' do
|
|
|
49
67
|
# Validates and generate a EAN-8 barcode as a PNG file, a type of 1D barcode
|
|
50
68
|
# @param value Barcode value to generate from
|
|
51
69
|
# @param [Hash] opts the optional parameters
|
|
70
|
+
# @option opts [Integer] :width Optional: width of the barcode in pixels. Minimum value of 10.
|
|
71
|
+
# @option opts [Integer] :height Optional: width of the barcode in pixels. Minimum value of 10.
|
|
72
|
+
# @option opts [BOOLEAN] :include_label Optional: show text label on the image of the barcode value, default is true.
|
|
52
73
|
# @return [String]
|
|
53
74
|
describe 'generate_barcode_ean8 test' do
|
|
54
75
|
it 'should work' do
|
|
@@ -61,6 +82,8 @@ describe 'GenerateBarcodeApi' do
|
|
|
61
82
|
# Generate a QR code barcode as a PNG file, a type of 2D barcode which can encode free-form text information
|
|
62
83
|
# @param value QR code text to convert into the QR code barcode
|
|
63
84
|
# @param [Hash] opts the optional parameters
|
|
85
|
+
# @option opts [Integer] :width Optional: width of the barcode in pixels. Minimum value of 10.
|
|
86
|
+
# @option opts [Integer] :height Optional: width of the barcode in pixels. Minimum value of 10.
|
|
64
87
|
# @return [String]
|
|
65
88
|
describe 'generate_barcode_qr_code test' do
|
|
66
89
|
it 'should work' do
|
|
@@ -73,6 +96,9 @@ describe 'GenerateBarcodeApi' do
|
|
|
73
96
|
# Validate and generate a UPC-A barcode as a PNG file, a type of 1D barcode
|
|
74
97
|
# @param value UPC-A barcode value to generate from
|
|
75
98
|
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [Integer] :width Optional: width of the barcode in pixels. Minimum value of 10.
|
|
100
|
+
# @option opts [Integer] :height Optional: width of the barcode in pixels. Minimum value of 10.
|
|
101
|
+
# @option opts [BOOLEAN] :include_label Optional: show text label on the image of the barcode value, default is true.
|
|
76
102
|
# @return [String]
|
|
77
103
|
describe 'generate_barcode_upca test' do
|
|
78
104
|
it 'should work' do
|
|
@@ -85,6 +111,9 @@ describe 'GenerateBarcodeApi' do
|
|
|
85
111
|
# Validates and generate a UPC-E barcode as a PNG file, a type of 1D barcode
|
|
86
112
|
# @param value UPC-E barcode value to generate from
|
|
87
113
|
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @option opts [Integer] :width Optional: width of the barcode in pixels. Minimum value of 10.
|
|
115
|
+
# @option opts [Integer] :height Optional: width of the barcode in pixels. Minimum value of 10.
|
|
116
|
+
# @option opts [BOOLEAN] :include_label Optional: show text label on the image of the barcode value, default is true.
|
|
88
117
|
# @return [String]
|
|
89
118
|
describe 'generate_barcode_upce test' do
|
|
90
119
|
it 'should work' do
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#barcodeapi
|
|
3
|
+
|
|
4
|
+
#Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for CloudmersiveBarcodeApiClient::BarcodeAdvancedResultItem
|
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'BarcodeAdvancedResultItem' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = CloudmersiveBarcodeApiClient::BarcodeAdvancedResultItem.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of BarcodeAdvancedResultItem' do
|
|
31
|
+
it 'should create an instance of BarcodeAdvancedResultItem' do
|
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveBarcodeApiClient::BarcodeAdvancedResultItem)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "raw_text"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe 'test attribute "barcode_type"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#barcodeapi
|
|
3
|
+
|
|
4
|
+
#Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for CloudmersiveBarcodeApiClient::BarcodeAdvancedScanResult
|
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'BarcodeAdvancedScanResult' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = CloudmersiveBarcodeApiClient::BarcodeAdvancedScanResult.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of BarcodeAdvancedScanResult' do
|
|
31
|
+
it 'should create an instance of BarcodeAdvancedScanResult' do
|
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveBarcodeApiClient::BarcodeAdvancedScanResult)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "successful"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe 'test attribute "result_barcodes"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe 'test attribute "barcode_count"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
describe 'test attribute "error_message"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#barcodeapi
|
|
3
|
+
|
|
4
|
+
#Barcode APIs let you generate barcode images, and recognize values from images of barcodes.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for CloudmersiveBarcodeApiClient::BarcodeQRResultItem
|
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'BarcodeQRResultItem' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = CloudmersiveBarcodeApiClient::BarcodeQRResultItem.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of BarcodeQRResultItem' do
|
|
31
|
+
it 'should create an instance of BarcodeQRResultItem' do
|
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveBarcodeApiClient::BarcodeQRResultItem)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "raw_text"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|