line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AsposeBarCodeCloud::BarcodeApi; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 5.6.0; |
4
|
1
|
|
|
1
|
|
177799
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
6
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
17
|
use Exporter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
8
|
1
|
|
|
1
|
|
5
|
use Carp qw( croak ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
9
|
1
|
|
|
1
|
|
5
|
use Log::Any qw($log); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
10
|
1
|
|
|
1
|
|
210
|
use File::Slurp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
11
|
1
|
|
|
1
|
|
5
|
use URI::Escape; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
272
|
use AsposeBarCodeCloud::ApiClient; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
14
|
1
|
|
|
1
|
|
5
|
use AsposeBarCodeCloud::Configuration; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4781
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# my $VERSION = '1.05'; |
17
|
|
|
|
|
|
|
our $VERSION = '1.05'; |
18
|
|
|
|
|
|
|
sub new { |
19
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
20
|
0
|
0
|
|
|
|
|
my $default_api_client = $AsposeBarCodeCloud::Configuration::api_client ? $AsposeBarCodeCloud::Configuration::api_client : |
21
|
|
|
|
|
|
|
AsposeBarCodeCloud::ApiClient->new; |
22
|
0
|
|
|
|
|
|
my (%self) = ( |
23
|
|
|
|
|
|
|
'api_client' => $default_api_client, |
24
|
|
|
|
|
|
|
@_ |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#my $self = { |
28
|
|
|
|
|
|
|
# #api_client => $options->{api_client} |
29
|
|
|
|
|
|
|
# api_client => $default_api_client |
30
|
|
|
|
|
|
|
#}; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
bless \%self, $class; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# |
37
|
|
|
|
|
|
|
# GetBarcodeGenerate |
38
|
|
|
|
|
|
|
# |
39
|
|
|
|
|
|
|
# Generate barcode. |
40
|
|
|
|
|
|
|
# |
41
|
|
|
|
|
|
|
# @param String $text The code text. (optional) |
42
|
|
|
|
|
|
|
# @param String $type Barcode type. (optional) |
43
|
|
|
|
|
|
|
# @param String $format Result format. (optional) |
44
|
|
|
|
|
|
|
# @param String $resolutionX Horizontal resolution. (optional) |
45
|
|
|
|
|
|
|
# @param String $resolutionY Vertical resolution. (optional) |
46
|
|
|
|
|
|
|
# @param String $dimensionX Smallest width of barcode unit (bar or space). (optional) |
47
|
|
|
|
|
|
|
# @param String $dimensionY Smallest height of barcode unit (for 2D barcodes). (optional) |
48
|
|
|
|
|
|
|
# @param String $enableChecksum Sets if checksum will be generated. (optional) |
49
|
|
|
|
|
|
|
# @return ResponseMessage |
50
|
|
|
|
|
|
|
# |
51
|
|
|
|
|
|
|
sub GetBarcodeGenerate { |
52
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# parse inputs |
57
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/generate/?appSid={appSid}&text={text}&type={type}&toFormat={toFormat}&resolutionX={resolutionX}&resolutionY={resolutionY}&dimensionX={dimensionX}&dimensionY={dimensionY}&enableChecksum={enableChecksum}'; |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
60
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
61
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
62
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
my $_method = 'GET'; |
65
|
0
|
|
|
|
|
|
my $query_params = {}; |
66
|
0
|
|
|
|
|
|
my $header_params = {}; |
67
|
0
|
|
|
|
|
|
my $form_params = {}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
70
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); |
71
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
72
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
73
|
|
|
|
|
|
|
} |
74
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
# query params |
77
|
0
|
0
|
|
|
|
|
if ( exists $args{'text'}) { |
78
|
0
|
|
|
|
|
|
my $escapedText = uri_escape( $args{'text'} ); |
79
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{text}\E/$escapedText/g; |
80
|
|
|
|
|
|
|
}else{ |
81
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]text.*?(?=&|\?|$)//g; |
82
|
|
|
|
|
|
|
}# query params |
83
|
0
|
0
|
|
|
|
|
if ( exists $args{'type'}) { |
84
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g; |
85
|
|
|
|
|
|
|
}else{ |
86
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g; |
87
|
|
|
|
|
|
|
}# query params |
88
|
0
|
0
|
|
|
|
|
if ( exists $args{'format'}) { |
89
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{format}\E/$args{'format'}/g; |
90
|
|
|
|
|
|
|
}else{ |
91
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; |
92
|
|
|
|
|
|
|
}# query params |
93
|
0
|
0
|
|
|
|
|
if ( exists $args{'resolutionX'}) { |
94
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{resolutionX}\E/$args{'resolutionX'}/g; |
95
|
|
|
|
|
|
|
}else{ |
96
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]resolutionX.*?(?=&|\?|$)//g; |
97
|
|
|
|
|
|
|
}# query params |
98
|
0
|
0
|
|
|
|
|
if ( exists $args{'resolutionY'}) { |
99
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{resolutionY}\E/$args{'resolutionY'}/g; |
100
|
|
|
|
|
|
|
}else{ |
101
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]resolutionY.*?(?=&|\?|$)//g; |
102
|
|
|
|
|
|
|
}# query params |
103
|
0
|
0
|
|
|
|
|
if ( exists $args{'dimensionX'}) { |
104
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{dimensionX}\E/$args{'dimensionX'}/g; |
105
|
|
|
|
|
|
|
}else{ |
106
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]dimensionX.*?(?=&|\?|$)//g; |
107
|
|
|
|
|
|
|
}# query params |
108
|
0
|
0
|
|
|
|
|
if ( exists $args{'dimensionY'}) { |
109
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{dimensionY}\E/$args{'dimensionY'}/g; |
110
|
|
|
|
|
|
|
}else{ |
111
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]dimensionY.*?(?=&|\?|$)//g; |
112
|
|
|
|
|
|
|
}# query params |
113
|
0
|
0
|
|
|
|
|
if ( exists $args{'enableChecksum'}) { |
114
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{enableChecksum}\E/$args{'enableChecksum'}/g; |
115
|
|
|
|
|
|
|
}else{ |
116
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]enableChecksum.*?(?=&|\?|$)//g; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
my $_body_data; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# authentication setting, if any |
126
|
0
|
|
|
|
|
|
my $auth_settings = []; |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
# make the API Call |
129
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
130
|
|
|
|
|
|
|
$query_params, $form_params, |
131
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
132
|
0
|
0
|
|
|
|
|
if (!$response) { |
133
|
0
|
|
|
|
|
|
return; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
137
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); |
141
|
0
|
|
|
|
|
|
return $_response_object; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
# |
145
|
|
|
|
|
|
|
# PostGenerateMultiple |
146
|
|
|
|
|
|
|
# |
147
|
|
|
|
|
|
|
# Generate multiple barcodes and return in response stream |
148
|
|
|
|
|
|
|
# |
149
|
|
|
|
|
|
|
# @param String $format Format to return stream in (optional) |
150
|
|
|
|
|
|
|
# @param BarcodeBuildersList $body (required) |
151
|
|
|
|
|
|
|
# @return ResponseMessage |
152
|
|
|
|
|
|
|
# |
153
|
|
|
|
|
|
|
sub PostGenerateMultiple { |
154
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
# verify the required parameter 'body' is set |
158
|
0
|
0
|
|
|
|
|
unless (exists $args{'body'}) { |
159
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'body' when calling PutSlidesSetDocumentProperty"); |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
# parse inputs |
163
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/generateMultiple/?appSid={appSid}&toFormat={toFormat}'; |
164
|
|
|
|
|
|
|
|
165
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
166
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
167
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
168
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
169
|
|
|
|
|
|
|
|
170
|
0
|
|
|
|
|
|
my $_method = 'POST'; |
171
|
0
|
|
|
|
|
|
my $query_params = {}; |
172
|
0
|
|
|
|
|
|
my $header_params = {}; |
173
|
0
|
|
|
|
|
|
my $form_params = {}; |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
176
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); |
177
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
178
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
179
|
|
|
|
|
|
|
} |
180
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
# query params |
183
|
0
|
0
|
|
|
|
|
if ( exists $args{'format'}) { |
184
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{format}\E/$args{'format'}/g; |
185
|
|
|
|
|
|
|
}else{ |
186
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
0
|
|
|
|
|
|
my $_body_data; |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# body params |
194
|
0
|
0
|
|
|
|
|
if ( exists $args{'body'}) { |
195
|
0
|
|
|
|
|
|
$_body_data = $args{'body'}; |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
# authentication setting, if any |
200
|
0
|
|
|
|
|
|
my $auth_settings = []; |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
# make the API Call |
203
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
204
|
|
|
|
|
|
|
$query_params, $form_params, |
205
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
206
|
0
|
0
|
|
|
|
|
if (!$response) { |
207
|
0
|
|
|
|
|
|
return; |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
211
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
|
214
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); |
215
|
0
|
|
|
|
|
|
return $_response_object; |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
# |
219
|
|
|
|
|
|
|
# PostBarcodeRecognizeFromUrlorContent |
220
|
|
|
|
|
|
|
# |
221
|
|
|
|
|
|
|
# Recognize barcode from an url. |
222
|
|
|
|
|
|
|
# |
223
|
|
|
|
|
|
|
# @param String $type Barcode type. (optional) |
224
|
|
|
|
|
|
|
# @param String $checksumValidation Checksum validation parameter. (optional) |
225
|
|
|
|
|
|
|
# @param Boolean $stripFnc Allows to strip FNC symbol in recognition results. (optional) |
226
|
|
|
|
|
|
|
# @param String $rotationAngle Recognition of rotated barcode. Possible angles are 90, 180, 270, default is 0 (optional) |
227
|
|
|
|
|
|
|
# @param String $url The image file url. (optional) |
228
|
|
|
|
|
|
|
# @param File $file (required) |
229
|
|
|
|
|
|
|
# @return BarcodeResponseList |
230
|
|
|
|
|
|
|
# |
231
|
|
|
|
|
|
|
sub PostBarcodeRecognizeFromUrlorContent { |
232
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
# verify the required parameter 'file' is set |
236
|
|
|
|
|
|
|
#unless (exists $args{'file'}) { |
237
|
|
|
|
|
|
|
# croak("Missing the required parameter 'file' when calling PostBarcodeRecognizeFromUrlorContent"); |
238
|
|
|
|
|
|
|
#} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
# parse inputs |
242
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/recognize/?appSid={appSid}&type={type}&checksumValidation={checksumValidation}&stripFnc={stripFnc}&rotationAngle={rotationAngle}&url={url}'; |
243
|
|
|
|
|
|
|
|
244
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
245
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
246
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
247
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
248
|
|
|
|
|
|
|
|
249
|
0
|
|
|
|
|
|
my $_method = 'POST'; |
250
|
0
|
|
|
|
|
|
my $query_params = {}; |
251
|
0
|
|
|
|
|
|
my $header_params = {}; |
252
|
0
|
|
|
|
|
|
my $form_params = {}; |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
255
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); |
256
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
257
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
258
|
|
|
|
|
|
|
} |
259
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
# query params |
262
|
0
|
0
|
|
|
|
|
if ( exists $args{'type'}) { |
263
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g; |
264
|
|
|
|
|
|
|
}else{ |
265
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g; |
266
|
|
|
|
|
|
|
}# query params |
267
|
0
|
0
|
|
|
|
|
if ( exists $args{'checksumValidation'}) { |
268
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{checksumValidation}\E/$args{'checksumValidation'}/g; |
269
|
|
|
|
|
|
|
}else{ |
270
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]checksumValidation.*?(?=&|\?|$)//g; |
271
|
|
|
|
|
|
|
}# query params |
272
|
0
|
0
|
|
|
|
|
if ( exists $args{'stripFnc'}) { |
273
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{stripFnc}\E/$args{'stripFnc'}/g; |
274
|
|
|
|
|
|
|
}else{ |
275
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]stripFnc.*?(?=&|\?|$)//g; |
276
|
|
|
|
|
|
|
}# query params |
277
|
0
|
0
|
|
|
|
|
if ( exists $args{'rotationAngle'}) { |
278
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rotationAngle}\E/$args{'rotationAngle'}/g; |
279
|
|
|
|
|
|
|
}else{ |
280
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rotationAngle.*?(?=&|\?|$)//g; |
281
|
|
|
|
|
|
|
}# query params |
282
|
0
|
0
|
|
|
|
|
if ( exists $args{'url'}) { |
283
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{url}\E/$args{'url'}/g; |
284
|
|
|
|
|
|
|
}else{ |
285
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]url.*?(?=&|\?|$)//g; |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
0
|
|
|
|
|
|
my $_body_data; |
290
|
|
|
|
|
|
|
# form params |
291
|
0
|
0
|
|
|
|
|
if ( exists $args{'file'} ) { |
292
|
|
|
|
|
|
|
|
293
|
0
|
|
|
|
|
|
$_body_data = read_file( $args{'file'} , binmode => ':raw' ); |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
# authentication setting, if any |
301
|
0
|
|
|
|
|
|
my $auth_settings = []; |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
# make the API Call |
304
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
305
|
|
|
|
|
|
|
$query_params, $form_params, |
306
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
307
|
0
|
0
|
|
|
|
|
if (!$response) { |
308
|
0
|
|
|
|
|
|
return; |
309
|
|
|
|
|
|
|
} |
310
|
|
|
|
|
|
|
|
311
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
312
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
313
|
|
|
|
|
|
|
} |
314
|
|
|
|
|
|
|
|
315
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type')); |
316
|
0
|
|
|
|
|
|
return $_response_object; |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
} |
319
|
|
|
|
|
|
|
# |
320
|
|
|
|
|
|
|
# PostBarcodeRecognizeFromRequestBody |
321
|
|
|
|
|
|
|
# |
322
|
|
|
|
|
|
|
# Recognize barcode from request body. |
323
|
|
|
|
|
|
|
# |
324
|
|
|
|
|
|
|
# @param String $type Barcode type (required). |
325
|
|
|
|
|
|
|
# @param String $checksumValidation Checksum validation parameter. (optional) |
326
|
|
|
|
|
|
|
# @param Boolean $stripFnc Allows to strip FNC symbol in recognition results. (optional) |
327
|
|
|
|
|
|
|
# @param String $rotationAngle Recognition of rotated barcode. Possible angles are 90, 180, 270, default is 0 (optional) |
328
|
|
|
|
|
|
|
# @param String $body (required) |
329
|
|
|
|
|
|
|
# @return BarcodeResponseList |
330
|
|
|
|
|
|
|
# |
331
|
|
|
|
|
|
|
sub PostBarcodeRecognizeFromRequestBody{ |
332
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
# verify the required parameter 'type' is set |
336
|
0
|
0
|
|
|
|
|
unless (exists $args{'type'}) { |
337
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'type' when calling PostBarcodeRecognizeFromRequestBody"); |
338
|
|
|
|
|
|
|
} |
339
|
|
|
|
|
|
|
|
340
|
0
|
0
|
|
|
|
|
unless (exists $args{'body'}) { |
341
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'body' when calling PostBarcodeRecognizeFromRequestBody"); |
342
|
|
|
|
|
|
|
} |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
# parse inputs |
346
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/recognize/?appSid={appSid}&type={type}&checksumValidation={checksumValidation}&stripFnc={stripFnc}&rotationAngle={rotationAngle}'; |
347
|
|
|
|
|
|
|
|
348
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
349
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
350
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
351
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
352
|
|
|
|
|
|
|
|
353
|
0
|
|
|
|
|
|
my $_method = 'POST'; |
354
|
0
|
|
|
|
|
|
my $query_params = {}; |
355
|
0
|
|
|
|
|
|
my $header_params = {}; |
356
|
0
|
|
|
|
|
|
my $form_params = {}; |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
359
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); |
360
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
361
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
362
|
|
|
|
|
|
|
} |
363
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
# query params |
366
|
0
|
0
|
|
|
|
|
if ( exists $args{'type'}) { |
367
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g; |
368
|
|
|
|
|
|
|
}else{ |
369
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g; |
370
|
|
|
|
|
|
|
}# query params |
371
|
0
|
0
|
|
|
|
|
if ( exists $args{'checksumValidation'}) { |
372
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{checksumValidation}\E/$args{'checksumValidation'}/g; |
373
|
|
|
|
|
|
|
}else{ |
374
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]checksumValidation.*?(?=&|\?|$)//g; |
375
|
|
|
|
|
|
|
}# query params |
376
|
0
|
0
|
|
|
|
|
if ( exists $args{'stripFnc'}) { |
377
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{stripFnc}\E/$args{'stripFnc'}/g; |
378
|
|
|
|
|
|
|
}else{ |
379
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]stripFnc.*?(?=&|\?|$)//g; |
380
|
|
|
|
|
|
|
}# query params |
381
|
0
|
0
|
|
|
|
|
if ( exists $args{'rotationAngle'}) { |
382
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rotationAngle}\E/$args{'rotationAngle'}/g; |
383
|
|
|
|
|
|
|
}else{ |
384
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rotationAngle.*?(?=&|\?|$)//g; |
385
|
|
|
|
|
|
|
} |
386
|
|
|
|
|
|
|
|
387
|
0
|
|
|
|
|
|
my $_body_data; |
388
|
|
|
|
|
|
|
# body params |
389
|
0
|
0
|
|
|
|
|
if ( exists $args{'body'}) { |
390
|
0
|
|
|
|
|
|
$_body_data = $args{'body'}; |
391
|
|
|
|
|
|
|
} |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
# authentication setting, if any |
396
|
0
|
|
|
|
|
|
my $auth_settings = []; |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
# make the API Call |
399
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
400
|
|
|
|
|
|
|
$query_params, $form_params, |
401
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
402
|
0
|
0
|
|
|
|
|
if (!$response) { |
403
|
0
|
|
|
|
|
|
return; |
404
|
|
|
|
|
|
|
} |
405
|
|
|
|
|
|
|
|
406
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
407
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type')); |
411
|
0
|
|
|
|
|
|
return $_response_object; |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
# |
415
|
|
|
|
|
|
|
# PutBarcodeGenerateFile |
416
|
|
|
|
|
|
|
# |
417
|
|
|
|
|
|
|
# Generate barcode and save on server. |
418
|
|
|
|
|
|
|
# |
419
|
|
|
|
|
|
|
# @param String $name The image name. (required) |
420
|
|
|
|
|
|
|
# @param String $text Barcode's text. (optional) |
421
|
|
|
|
|
|
|
# @param String $type The barcode type. (optional) |
422
|
|
|
|
|
|
|
# @param String $format The image format. (optional) |
423
|
|
|
|
|
|
|
# @param String $resolutionX Horizontal resolution. (optional) |
424
|
|
|
|
|
|
|
# @param String $resolutionY Vertical resolution. (optional) |
425
|
|
|
|
|
|
|
# @param String $dimensionX Smallest width of barcode unit (bar or space). (optional) |
426
|
|
|
|
|
|
|
# @param String $dimensionY Smallest height of barcode unit (for 2D barcodes). (optional) |
427
|
|
|
|
|
|
|
# @param String $codeLocation property of the barcode. (optional) |
428
|
|
|
|
|
|
|
# @param String $grUnit Measurement of barcode properties. (optional) |
429
|
|
|
|
|
|
|
# @param String $autoSize Sets if barcode size will be updated automatically. (optional) |
430
|
|
|
|
|
|
|
# @param String $barHeight Height of the bar. (optional) |
431
|
|
|
|
|
|
|
# @param String $imageHeight Height of the image. (optional) |
432
|
|
|
|
|
|
|
# @param String $imageWidth Width of the image. (optional) |
433
|
|
|
|
|
|
|
# @param String $imageQuality Detepmines of the barcode image. (optional) |
434
|
|
|
|
|
|
|
# @param String $rotAngle Angle of barcode orientation. (optional) |
435
|
|
|
|
|
|
|
# @param String $topMargin Top margin. (optional) |
436
|
|
|
|
|
|
|
# @param String $bottomMargin Bottom margin. (optional) |
437
|
|
|
|
|
|
|
# @param String $leftMargin Left margin. (optional) |
438
|
|
|
|
|
|
|
# @param String $rightMargin Right margin. (optional) |
439
|
|
|
|
|
|
|
# @param String $enableChecksum Sets if checksum will be generated. (optional) |
440
|
|
|
|
|
|
|
# @param String $storage Image's storage. (optional) |
441
|
|
|
|
|
|
|
# @param String $folder Image's folder. (optional) |
442
|
|
|
|
|
|
|
# @param File $file (required) |
443
|
|
|
|
|
|
|
# @return SaaSposeResponse |
444
|
|
|
|
|
|
|
# |
445
|
|
|
|
|
|
|
sub PutBarcodeGenerateFile { |
446
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
# verify the required parameter 'name' is set |
450
|
0
|
0
|
|
|
|
|
unless (exists $args{'name'}) { |
451
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'name' when calling PutBarcodeGenerateFile"); |
452
|
|
|
|
|
|
|
} |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
# verify the required parameter 'file' is set |
455
|
|
|
|
|
|
|
#unless (exists $args{'file'}) { |
456
|
|
|
|
|
|
|
# croak("Missing the required parameter 'file' when calling PutBarcodeGenerateFile"); |
457
|
|
|
|
|
|
|
#} |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
# parse inputs |
461
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/{name}/generate/?appSid={appSid}&text={text}&type={type}&toFormat={toFormat}&resolutionX={resolutionX}&resolutionY={resolutionY}&dimensionX={dimensionX}&dimensionY={dimensionY}&codeLocation={codeLocation}&grUnit={grUnit}&autoSize={autoSize}&barHeight={barHeight}&imageHeight={imageHeight}&imageWidth={imageWidth}&imageQuality={imageQuality}&rotAngle={rotAngle}&topMargin={topMargin}&bottomMargin={bottomMargin}&leftMargin={leftMargin}&rightMargin={rightMargin}&enableChecksum={enableChecksum}&storage={storage}&folder={folder}'; |
462
|
|
|
|
|
|
|
|
463
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
464
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
465
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
466
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
467
|
|
|
|
|
|
|
|
468
|
0
|
|
|
|
|
|
my $_method = 'PUT'; |
469
|
0
|
|
|
|
|
|
my $query_params = {}; |
470
|
0
|
|
|
|
|
|
my $header_params = {}; |
471
|
0
|
|
|
|
|
|
my $form_params = {}; |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
474
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); |
475
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
476
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
477
|
|
|
|
|
|
|
} |
478
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
# query params |
481
|
0
|
0
|
|
|
|
|
if ( exists $args{'name'}) { |
482
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g; |
483
|
|
|
|
|
|
|
}else{ |
484
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; |
485
|
|
|
|
|
|
|
}# query params |
486
|
0
|
0
|
|
|
|
|
if ( exists $args{'text'}) { |
487
|
0
|
|
|
|
|
|
my $escapedText = uri_escape( $args{'text'} ); |
488
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{text}\E/$escapedText/g; |
489
|
|
|
|
|
|
|
}else{ |
490
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]text.*?(?=&|\?|$)//g; |
491
|
|
|
|
|
|
|
}# query params |
492
|
0
|
0
|
|
|
|
|
if ( exists $args{'type'}) { |
493
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g; |
494
|
|
|
|
|
|
|
}else{ |
495
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g; |
496
|
|
|
|
|
|
|
}# query params |
497
|
0
|
0
|
|
|
|
|
if ( exists $args{'format'}) { |
498
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{format}\E/$args{'format'}/g; |
499
|
|
|
|
|
|
|
}else{ |
500
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; |
501
|
|
|
|
|
|
|
}# query params |
502
|
0
|
0
|
|
|
|
|
if ( exists $args{'resolutionX'}) { |
503
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{resolutionX}\E/$args{'resolutionX'}/g; |
504
|
|
|
|
|
|
|
}else{ |
505
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]resolutionX.*?(?=&|\?|$)//g; |
506
|
|
|
|
|
|
|
}# query params |
507
|
0
|
0
|
|
|
|
|
if ( exists $args{'resolutionY'}) { |
508
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{resolutionY}\E/$args{'resolutionY'}/g; |
509
|
|
|
|
|
|
|
}else{ |
510
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]resolutionY.*?(?=&|\?|$)//g; |
511
|
|
|
|
|
|
|
}# query params |
512
|
0
|
0
|
|
|
|
|
if ( exists $args{'dimensionX'}) { |
513
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{dimensionX}\E/$args{'dimensionX'}/g; |
514
|
|
|
|
|
|
|
}else{ |
515
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]dimensionX.*?(?=&|\?|$)//g; |
516
|
|
|
|
|
|
|
}# query params |
517
|
0
|
0
|
|
|
|
|
if ( exists $args{'dimensionY'}) { |
518
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{dimensionY}\E/$args{'dimensionY'}/g; |
519
|
|
|
|
|
|
|
}else{ |
520
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]dimensionY.*?(?=&|\?|$)//g; |
521
|
|
|
|
|
|
|
}# query params |
522
|
0
|
0
|
|
|
|
|
if ( exists $args{'codeLocation'}) { |
523
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{codeLocation}\E/$args{'codeLocation'}/g; |
524
|
|
|
|
|
|
|
}else{ |
525
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]codeLocation.*?(?=&|\?|$)//g; |
526
|
|
|
|
|
|
|
}# query params |
527
|
0
|
0
|
|
|
|
|
if ( exists $args{'grUnit'}) { |
528
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{grUnit}\E/$args{'grUnit'}/g; |
529
|
|
|
|
|
|
|
}else{ |
530
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]grUnit.*?(?=&|\?|$)//g; |
531
|
|
|
|
|
|
|
}# query params |
532
|
0
|
0
|
|
|
|
|
if ( exists $args{'autoSize'}) { |
533
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{autoSize}\E/$args{'autoSize'}/g; |
534
|
|
|
|
|
|
|
}else{ |
535
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]autoSize.*?(?=&|\?|$)//g; |
536
|
|
|
|
|
|
|
}# query params |
537
|
0
|
0
|
|
|
|
|
if ( exists $args{'barHeight'}) { |
538
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{barHeight}\E/$args{'barHeight'}/g; |
539
|
|
|
|
|
|
|
}else{ |
540
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]barHeight.*?(?=&|\?|$)//g; |
541
|
|
|
|
|
|
|
}# query params |
542
|
0
|
0
|
|
|
|
|
if ( exists $args{'imageHeight'}) { |
543
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{imageHeight}\E/$args{'imageHeight'}/g; |
544
|
|
|
|
|
|
|
}else{ |
545
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]imageHeight.*?(?=&|\?|$)//g; |
546
|
|
|
|
|
|
|
}# query params |
547
|
0
|
0
|
|
|
|
|
if ( exists $args{'imageWidth'}) { |
548
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{imageWidth}\E/$args{'imageWidth'}/g; |
549
|
|
|
|
|
|
|
}else{ |
550
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]imageWidth.*?(?=&|\?|$)//g; |
551
|
|
|
|
|
|
|
}# query params |
552
|
0
|
0
|
|
|
|
|
if ( exists $args{'imageQuality'}) { |
553
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{imageQuality}\E/$args{'imageQuality'}/g; |
554
|
|
|
|
|
|
|
}else{ |
555
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]imageQuality.*?(?=&|\?|$)//g; |
556
|
|
|
|
|
|
|
}# query params |
557
|
0
|
0
|
|
|
|
|
if ( exists $args{'rotAngle'}) { |
558
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rotAngle}\E/$args{'rotAngle'}/g; |
559
|
|
|
|
|
|
|
}else{ |
560
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rotAngle.*?(?=&|\?|$)//g; |
561
|
|
|
|
|
|
|
}# query params |
562
|
0
|
0
|
|
|
|
|
if ( exists $args{'topMargin'}) { |
563
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{topMargin}\E/$args{'topMargin'}/g; |
564
|
|
|
|
|
|
|
}else{ |
565
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]topMargin.*?(?=&|\?|$)//g; |
566
|
|
|
|
|
|
|
}# query params |
567
|
0
|
0
|
|
|
|
|
if ( exists $args{'bottomMargin'}) { |
568
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{bottomMargin}\E/$args{'bottomMargin'}/g; |
569
|
|
|
|
|
|
|
}else{ |
570
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]bottomMargin.*?(?=&|\?|$)//g; |
571
|
|
|
|
|
|
|
}# query params |
572
|
0
|
0
|
|
|
|
|
if ( exists $args{'leftMargin'}) { |
573
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{leftMargin}\E/$args{'leftMargin'}/g; |
574
|
|
|
|
|
|
|
}else{ |
575
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]leftMargin.*?(?=&|\?|$)//g; |
576
|
|
|
|
|
|
|
}# query params |
577
|
0
|
0
|
|
|
|
|
if ( exists $args{'rightMargin'}) { |
578
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rightMargin}\E/$args{'rightMargin'}/g; |
579
|
|
|
|
|
|
|
}else{ |
580
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rightMargin.*?(?=&|\?|$)//g; |
581
|
|
|
|
|
|
|
}# query params |
582
|
0
|
0
|
|
|
|
|
if ( exists $args{'enableChecksum'}) { |
583
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{enableChecksum}\E/$args{'enableChecksum'}/g; |
584
|
|
|
|
|
|
|
}else{ |
585
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]enableChecksum.*?(?=&|\?|$)//g; |
586
|
|
|
|
|
|
|
}# query params |
587
|
0
|
0
|
|
|
|
|
if ( exists $args{'storage'}) { |
588
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; |
589
|
|
|
|
|
|
|
}else{ |
590
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; |
591
|
|
|
|
|
|
|
}# query params |
592
|
0
|
0
|
|
|
|
|
if ( exists $args{'folder'}) { |
593
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; |
594
|
|
|
|
|
|
|
}else{ |
595
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; |
596
|
|
|
|
|
|
|
} |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
|
599
|
0
|
|
|
|
|
|
my $_body_data; |
600
|
|
|
|
|
|
|
# form params |
601
|
0
|
0
|
|
|
|
|
if ( exists $args{'file'} ) { |
602
|
|
|
|
|
|
|
|
603
|
0
|
|
|
|
|
|
$_body_data = read_file( $args{'file'} , binmode => ':raw' ); |
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
} |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
# authentication setting, if any |
611
|
0
|
|
|
|
|
|
my $auth_settings = []; |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
# make the API Call |
614
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
615
|
|
|
|
|
|
|
$query_params, $form_params, |
616
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
617
|
0
|
0
|
|
|
|
|
if (!$response) { |
618
|
0
|
|
|
|
|
|
return; |
619
|
|
|
|
|
|
|
} |
620
|
|
|
|
|
|
|
|
621
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
622
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
623
|
|
|
|
|
|
|
} |
624
|
|
|
|
|
|
|
|
625
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'SaaSposeResponse', $response->header('content-type')); |
626
|
0
|
|
|
|
|
|
return $_response_object; |
627
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
} |
629
|
|
|
|
|
|
|
# |
630
|
|
|
|
|
|
|
# PutGenerateMultiple |
631
|
|
|
|
|
|
|
# |
632
|
|
|
|
|
|
|
# Generate image with multiple barcodes and put new file on server |
633
|
|
|
|
|
|
|
# |
634
|
|
|
|
|
|
|
# @param String $name New filename (required) |
635
|
|
|
|
|
|
|
# @param String $format Format of file (optional) |
636
|
|
|
|
|
|
|
# @param String $folder Folder to place file to (optional) |
637
|
|
|
|
|
|
|
# @param File $file (required) |
638
|
|
|
|
|
|
|
# @return SaaSposeResponse |
639
|
|
|
|
|
|
|
# |
640
|
|
|
|
|
|
|
sub PutGenerateMultiple { |
641
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
642
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
# verify the required parameter 'name' is set |
645
|
0
|
0
|
|
|
|
|
unless (exists $args{'name'}) { |
646
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'name' when calling PutGenerateMultiple"); |
647
|
|
|
|
|
|
|
} |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
# verify the required parameter 'file' is set |
650
|
0
|
0
|
|
|
|
|
unless (exists $args{'file'}) { |
651
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'file' when calling PutGenerateMultiple"); |
652
|
|
|
|
|
|
|
} |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
|
655
|
|
|
|
|
|
|
# parse inputs |
656
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/{name}/generateMultiple/?appSid={appSid}&toFormat={toFormat}&folder={folder}'; |
657
|
|
|
|
|
|
|
|
658
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
659
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
660
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
661
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
662
|
|
|
|
|
|
|
|
663
|
0
|
|
|
|
|
|
my $_method = 'PUT'; |
664
|
0
|
|
|
|
|
|
my $query_params = {}; |
665
|
0
|
|
|
|
|
|
my $header_params = {}; |
666
|
0
|
|
|
|
|
|
my $form_params = {}; |
667
|
|
|
|
|
|
|
|
668
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
669
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); |
670
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
671
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
672
|
|
|
|
|
|
|
} |
673
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); |
674
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
# query params |
676
|
0
|
0
|
|
|
|
|
if ( exists $args{'name'}) { |
677
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g; |
678
|
|
|
|
|
|
|
}else{ |
679
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; |
680
|
|
|
|
|
|
|
}# query params |
681
|
0
|
0
|
|
|
|
|
if ( exists $args{'format'}) { |
682
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{format}\E/$args{'format'}/g; |
683
|
|
|
|
|
|
|
}else{ |
684
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; |
685
|
|
|
|
|
|
|
}# query params |
686
|
0
|
0
|
|
|
|
|
if ( exists $args{'folder'}) { |
687
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; |
688
|
|
|
|
|
|
|
}else{ |
689
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; |
690
|
|
|
|
|
|
|
} |
691
|
|
|
|
|
|
|
|
692
|
|
|
|
|
|
|
|
693
|
0
|
|
|
|
|
|
my $_body_data; |
694
|
|
|
|
|
|
|
# form params |
695
|
0
|
0
|
|
|
|
|
if ( exists $args{'file'} ) { |
696
|
|
|
|
|
|
|
|
697
|
0
|
|
|
|
|
|
$_body_data = read_file( $args{'file'} , binmode => ':raw' ); |
698
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
} |
701
|
|
|
|
|
|
|
|
702
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
# authentication setting, if any |
705
|
0
|
|
|
|
|
|
my $auth_settings = []; |
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
# make the API Call |
708
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
709
|
|
|
|
|
|
|
$query_params, $form_params, |
710
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
711
|
0
|
0
|
|
|
|
|
if (!$response) { |
712
|
0
|
|
|
|
|
|
return; |
713
|
|
|
|
|
|
|
} |
714
|
|
|
|
|
|
|
|
715
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
716
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
717
|
|
|
|
|
|
|
} |
718
|
|
|
|
|
|
|
|
719
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'SaaSposeResponse', $response->header('content-type')); |
720
|
0
|
|
|
|
|
|
return $_response_object; |
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
|
# |
724
|
|
|
|
|
|
|
# GetBarcodeRecognize |
725
|
|
|
|
|
|
|
# |
726
|
|
|
|
|
|
|
# Recognize barcode from a file on server. |
727
|
|
|
|
|
|
|
# |
728
|
|
|
|
|
|
|
# @param String $name The image name. (required) |
729
|
|
|
|
|
|
|
# @param String $type The barcode type. (optional) |
730
|
|
|
|
|
|
|
# @param String $checksumValidation Checksum validation parameter. (optional) |
731
|
|
|
|
|
|
|
# @param Boolean $stripFnc Allows to strip FNC symbol in recognition results. (optional) |
732
|
|
|
|
|
|
|
# @param String $rotationAngle Allows to correct angle of barcode. (optional) |
733
|
|
|
|
|
|
|
# @param String $barcodesCount Count of barcodes to recognize. (optional) |
734
|
|
|
|
|
|
|
# @param String $rectX Top left point X coordinate of to recognize barcode inside. (optional) |
735
|
|
|
|
|
|
|
# @param String $rectY Top left point Y coordinate of to recognize barcode inside. (optional) |
736
|
|
|
|
|
|
|
# @param String $rectWidth Width of to recognize barcode inside. (optional) |
737
|
|
|
|
|
|
|
# @param String $rectHeight Height of to recognize barcode inside. (optional) |
738
|
|
|
|
|
|
|
# @param String $storage The image storage. (optional) |
739
|
|
|
|
|
|
|
# @param String $folder The image folder. (optional) |
740
|
|
|
|
|
|
|
# @return BarcodeResponseList |
741
|
|
|
|
|
|
|
# |
742
|
|
|
|
|
|
|
sub GetBarcodeRecognize { |
743
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
744
|
|
|
|
|
|
|
|
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
# verify the required parameter 'name' is set |
747
|
0
|
0
|
|
|
|
|
unless (exists $args{'name'}) { |
748
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'name' when calling GetBarcodeRecognize"); |
749
|
|
|
|
|
|
|
} |
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
# parse inputs |
753
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/{name}/recognize/?appSid={appSid}&type={type}&checksumValidation={checksumValidation}&stripFnc={stripFnc}&rotationAngle={rotationAngle}&barcodesCount={barcodesCount}&rectX={rectX}&rectY={rectY}&rectWidth={rectWidth}&rectHeight={rectHeight}&storage={storage}&folder={folder}'; |
754
|
|
|
|
|
|
|
|
755
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
756
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
757
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
758
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
759
|
|
|
|
|
|
|
|
760
|
0
|
|
|
|
|
|
my $_method = 'GET'; |
761
|
0
|
|
|
|
|
|
my $query_params = {}; |
762
|
0
|
|
|
|
|
|
my $header_params = {}; |
763
|
0
|
|
|
|
|
|
my $form_params = {}; |
764
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
766
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); |
767
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
768
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
769
|
|
|
|
|
|
|
} |
770
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
# query params |
773
|
0
|
0
|
|
|
|
|
if ( exists $args{'name'}) { |
774
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g; |
775
|
|
|
|
|
|
|
}else{ |
776
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; |
777
|
|
|
|
|
|
|
}# query params |
778
|
0
|
0
|
|
|
|
|
if ( exists $args{'type'}) { |
779
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g; |
780
|
|
|
|
|
|
|
}else{ |
781
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g; |
782
|
|
|
|
|
|
|
}# query params |
783
|
0
|
0
|
|
|
|
|
if ( exists $args{'checksumValidation'}) { |
784
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{checksumValidation}\E/$args{'checksumValidation'}/g; |
785
|
|
|
|
|
|
|
}else{ |
786
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]checksumValidation.*?(?=&|\?|$)//g; |
787
|
|
|
|
|
|
|
}# query params |
788
|
0
|
0
|
|
|
|
|
if ( exists $args{'stripFnc'}) { |
789
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{stripFnc}\E/$args{'stripFnc'}/g; |
790
|
|
|
|
|
|
|
}else{ |
791
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]stripFnc.*?(?=&|\?|$)//g; |
792
|
|
|
|
|
|
|
}# query params |
793
|
0
|
0
|
|
|
|
|
if ( exists $args{'rotationAngle'}) { |
794
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rotationAngle}\E/$args{'rotationAngle'}/g; |
795
|
|
|
|
|
|
|
}else{ |
796
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rotationAngle.*?(?=&|\?|$)//g; |
797
|
|
|
|
|
|
|
}# query params |
798
|
0
|
0
|
|
|
|
|
if ( exists $args{'barcodesCount'}) { |
799
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{barcodesCount}\E/$args{'barcodesCount'}/g; |
800
|
|
|
|
|
|
|
}else{ |
801
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]barcodesCount.*?(?=&|\?|$)//g; |
802
|
|
|
|
|
|
|
}# query params |
803
|
0
|
0
|
|
|
|
|
if ( exists $args{'rectX'}) { |
804
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rectX}\E/$args{'rectX'}/g; |
805
|
|
|
|
|
|
|
}else{ |
806
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rectX.*?(?=&|\?|$)//g; |
807
|
|
|
|
|
|
|
}# query params |
808
|
0
|
0
|
|
|
|
|
if ( exists $args{'rectY'}) { |
809
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rectY}\E/$args{'rectY'}/g; |
810
|
|
|
|
|
|
|
}else{ |
811
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rectY.*?(?=&|\?|$)//g; |
812
|
|
|
|
|
|
|
}# query params |
813
|
0
|
0
|
|
|
|
|
if ( exists $args{'rectWidth'}) { |
814
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rectWidth}\E/$args{'rectWidth'}/g; |
815
|
|
|
|
|
|
|
}else{ |
816
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rectWidth.*?(?=&|\?|$)//g; |
817
|
|
|
|
|
|
|
}# query params |
818
|
0
|
0
|
|
|
|
|
if ( exists $args{'rectHeight'}) { |
819
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{rectHeight}\E/$args{'rectHeight'}/g; |
820
|
|
|
|
|
|
|
}else{ |
821
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]rectHeight.*?(?=&|\?|$)//g; |
822
|
|
|
|
|
|
|
}# query params |
823
|
0
|
0
|
|
|
|
|
if ( exists $args{'storage'}) { |
824
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; |
825
|
|
|
|
|
|
|
}else{ |
826
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; |
827
|
|
|
|
|
|
|
}# query params |
828
|
0
|
0
|
|
|
|
|
if ( exists $args{'folder'}) { |
829
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; |
830
|
|
|
|
|
|
|
}else{ |
831
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; |
832
|
|
|
|
|
|
|
} |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
|
835
|
0
|
|
|
|
|
|
my $_body_data; |
836
|
|
|
|
|
|
|
|
837
|
|
|
|
|
|
|
|
838
|
|
|
|
|
|
|
|
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
# authentication setting, if any |
841
|
0
|
|
|
|
|
|
my $auth_settings = []; |
842
|
|
|
|
|
|
|
|
843
|
|
|
|
|
|
|
# make the API Call |
844
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
845
|
|
|
|
|
|
|
$query_params, $form_params, |
846
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
847
|
0
|
0
|
|
|
|
|
if (!$response) { |
848
|
0
|
|
|
|
|
|
return; |
849
|
|
|
|
|
|
|
} |
850
|
|
|
|
|
|
|
|
851
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
852
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
853
|
|
|
|
|
|
|
} |
854
|
|
|
|
|
|
|
|
855
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type')); |
856
|
0
|
|
|
|
|
|
return $_response_object; |
857
|
|
|
|
|
|
|
|
858
|
|
|
|
|
|
|
} |
859
|
|
|
|
|
|
|
# |
860
|
|
|
|
|
|
|
# PutBarcodeRecognizeFromBody |
861
|
|
|
|
|
|
|
# |
862
|
|
|
|
|
|
|
# Recognition of a barcode from file on server with parameters in body. |
863
|
|
|
|
|
|
|
# |
864
|
|
|
|
|
|
|
# @param String $name The image name. (required) |
865
|
|
|
|
|
|
|
# @param String $type The barcode type. (optional) |
866
|
|
|
|
|
|
|
# @param String $folder The image folder. (optional) |
867
|
|
|
|
|
|
|
# @param BarcodeReader $body BarcodeReader object with parameters. (required) |
868
|
|
|
|
|
|
|
# @return BarcodeResponseList |
869
|
|
|
|
|
|
|
# |
870
|
|
|
|
|
|
|
sub PutBarcodeRecognizeFromBody { |
871
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
872
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
# verify the required parameter 'name' is set |
875
|
0
|
0
|
|
|
|
|
unless (exists $args{'name'}) { |
876
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'name' when calling PutBarcodeRecognizeFromBody"); |
877
|
|
|
|
|
|
|
} |
878
|
|
|
|
|
|
|
|
879
|
|
|
|
|
|
|
# verify the required parameter 'body' is set |
880
|
0
|
0
|
|
|
|
|
unless (exists $args{'body'}) { |
881
|
0
|
|
|
|
|
|
croak("Missing the required parameter 'body' when calling PutBarcodeRecognizeFromBody"); |
882
|
|
|
|
|
|
|
} |
883
|
|
|
|
|
|
|
|
884
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
# parse inputs |
886
|
0
|
|
|
|
|
|
my $_resource_path = '/barcode/{name}/recognize/?appSid={appSid}&type={type}&folder={folder}'; |
887
|
|
|
|
|
|
|
|
888
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q&\E/&/g; |
889
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q\/?\E/?/g; |
890
|
0
|
|
|
|
|
|
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; |
891
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{path}\E/{Path}/g; |
892
|
|
|
|
|
|
|
|
893
|
0
|
|
|
|
|
|
my $_method = 'PUT'; |
894
|
0
|
|
|
|
|
|
my $query_params = {}; |
895
|
0
|
|
|
|
|
|
my $header_params = {}; |
896
|
0
|
|
|
|
|
|
my $form_params = {}; |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
# 'Accept' and 'Content-Type' header |
899
|
0
|
|
|
|
|
|
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); |
900
|
0
|
0
|
|
|
|
|
if ($_header_accept) { |
901
|
0
|
|
|
|
|
|
$header_params->{'Accept'} = $_header_accept; |
902
|
|
|
|
|
|
|
} |
903
|
0
|
|
|
|
|
|
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
# query params |
906
|
0
|
0
|
|
|
|
|
if ( exists $args{'name'}) { |
907
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g; |
908
|
|
|
|
|
|
|
}else{ |
909
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; |
910
|
|
|
|
|
|
|
}# query params |
911
|
0
|
0
|
|
|
|
|
if ( exists $args{'type'}) { |
912
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g; |
913
|
|
|
|
|
|
|
}else{ |
914
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g; |
915
|
|
|
|
|
|
|
}# query params |
916
|
0
|
0
|
|
|
|
|
if ( exists $args{'folder'}) { |
917
|
0
|
|
|
|
|
|
$_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; |
918
|
|
|
|
|
|
|
}else{ |
919
|
0
|
|
|
|
|
|
$_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; |
920
|
|
|
|
|
|
|
} |
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
|
923
|
0
|
|
|
|
|
|
my $_body_data; |
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
|
926
|
|
|
|
|
|
|
# body params |
927
|
0
|
0
|
|
|
|
|
if ( exists $args{'body'}) { |
928
|
0
|
|
|
|
|
|
$_body_data = $args{'body'}; |
929
|
|
|
|
|
|
|
} |
930
|
|
|
|
|
|
|
|
931
|
|
|
|
|
|
|
# authentication setting, if any |
932
|
0
|
|
|
|
|
|
my $auth_settings = []; |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
# make the API Call |
935
|
0
|
|
|
|
|
|
my $response = $self->{api_client}->call_api($_resource_path, $_method, |
936
|
|
|
|
|
|
|
$query_params, $form_params, |
937
|
|
|
|
|
|
|
$header_params, $_body_data, $auth_settings); |
938
|
0
|
0
|
|
|
|
|
if (!$response) { |
939
|
0
|
|
|
|
|
|
return; |
940
|
|
|
|
|
|
|
} |
941
|
|
|
|
|
|
|
|
942
|
0
|
0
|
|
|
|
|
if($AsposeBarCodeCloud::Configuration::debug){ |
943
|
0
|
|
|
|
|
|
print "\nResponse Content: ".$response->content; |
944
|
|
|
|
|
|
|
} |
945
|
|
|
|
|
|
|
|
946
|
0
|
|
|
|
|
|
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type')); |
947
|
0
|
|
|
|
|
|
return $_response_object; |
948
|
|
|
|
|
|
|
|
949
|
|
|
|
|
|
|
} |
950
|
|
|
|
|
|
|
|
951
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
1; |