AsposeBarCodeCloud-BarcodeApi
view release on metacpan or search on metacpan
lib/AsposeBarCodeCloud/BarcodeApi.pm view on Meta::CPAN
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type'));
return $_response_object;
}
#
# PutBarcodeGenerateFile
#
# Generate barcode and save on server.
#
# @param String $name The image name. (required)
# @param String $text Barcode's text. (optional)
# @param String $type The barcode type. (optional)
# @param String $format The image format. (optional)
# @param String $resolutionX Horizontal resolution. (optional)
# @param String $resolutionY Vertical resolution. (optional)
# @param String $dimensionX Smallest width of barcode unit (bar or space). (optional)
# @param String $dimensionY Smallest height of barcode unit (for 2D barcodes). (optional)
# @param String $codeLocation property of the barcode. (optional)
# @param String $grUnit Measurement of barcode properties. (optional)
# @param String $autoSize Sets if barcode size will be updated automatically. (optional)
# @param String $barHeight Height of the bar. (optional)
# @param String $imageHeight Height of the image. (optional)
# @param String $imageWidth Width of the image. (optional)
# @param String $imageQuality Detepmines of the barcode image. (optional)
# @param String $rotAngle Angle of barcode orientation. (optional)
# @param String $topMargin Top margin. (optional)
# @param String $bottomMargin Bottom margin. (optional)
# @param String $leftMargin Left margin. (optional)
# @param String $rightMargin Right margin. (optional)
# @param String $enableChecksum Sets if checksum will be generated. (optional)
# @param String $storage Image's storage. (optional)
# @param String $folder Image's folder. (optional)
# @param File $file (required)
# @return SaaSposeResponse
#
sub PutBarcodeGenerateFile {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'}) {
croak("Missing the required parameter 'name' when calling PutBarcodeGenerateFile");
}
# verify the required parameter 'file' is set
#unless (exists $args{'file'}) {
# croak("Missing the required parameter 'file' when calling PutBarcodeGenerateFile");
#}
# parse inputs
my $_resource_path = '/barcode/{name}/generate/?appSid={appSid}&text={text}&type={type}&toFormat={toFormat}&resolutionX={resolutionX}&resolutionY={resolutionY}&dimensionX={dimensionX}&dimensionY={dimensionY}&codeLo...
$_resource_path =~ s/\Q&\E/&/g;
$_resource_path =~ s/\Q\/?\E/?/g;
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g;
$_resource_path =~ s/\Q{path}\E/{Path}/g;
my $_method = 'PUT';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data');
# query params
if ( exists $args{'name'}) {
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g;
}else{
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'text'}) {
my $escapedText = uri_escape( $args{'text'} );
$_resource_path =~ s/\Q{text}\E/$escapedText/g;
}else{
$_resource_path =~ s/[?&]text.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'type'}) {
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g;
}else{
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'format'}) {
$_resource_path =~ s/\Q{format}\E/$args{'format'}/g;
}else{
$_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'resolutionX'}) {
$_resource_path =~ s/\Q{resolutionX}\E/$args{'resolutionX'}/g;
}else{
$_resource_path =~ s/[?&]resolutionX.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'resolutionY'}) {
$_resource_path =~ s/\Q{resolutionY}\E/$args{'resolutionY'}/g;
}else{
$_resource_path =~ s/[?&]resolutionY.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'dimensionX'}) {
$_resource_path =~ s/\Q{dimensionX}\E/$args{'dimensionX'}/g;
}else{
$_resource_path =~ s/[?&]dimensionX.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'dimensionY'}) {
$_resource_path =~ s/\Q{dimensionY}\E/$args{'dimensionY'}/g;
}else{
$_resource_path =~ s/[?&]dimensionY.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'codeLocation'}) {
$_resource_path =~ s/\Q{codeLocation}\E/$args{'codeLocation'}/g;
}else{
$_resource_path =~ s/[?&]codeLocation.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'grUnit'}) {
$_resource_path =~ s/\Q{grUnit}\E/$args{'grUnit'}/g;
lib/AsposeBarCodeCloud/BarcodeApi.pm view on Meta::CPAN
$_body_data = read_file( $args{'file'} , binmode => ':raw' );
}
# authentication setting, if any
my $auth_settings = [];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
if($AsposeBarCodeCloud::Configuration::debug){
print "\nResponse Content: ".$response->content;
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'SaaSposeResponse', $response->header('content-type'));
return $_response_object;
}
#
# PutGenerateMultiple
#
# Generate image with multiple barcodes and put new file on server
#
# @param String $name New filename (required)
# @param String $format Format of file (optional)
# @param String $folder Folder to place file to (optional)
# @param File $file (required)
# @return SaaSposeResponse
#
sub PutGenerateMultiple {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'}) {
croak("Missing the required parameter 'name' when calling PutGenerateMultiple");
}
# verify the required parameter 'file' is set
unless (exists $args{'file'}) {
croak("Missing the required parameter 'file' when calling PutGenerateMultiple");
}
# parse inputs
my $_resource_path = '/barcode/{name}/generateMultiple/?appSid={appSid}&toFormat={toFormat}&folder={folder}';
$_resource_path =~ s/\Q&\E/&/g;
$_resource_path =~ s/\Q\/?\E/?/g;
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g;
$_resource_path =~ s/\Q{path}\E/{Path}/g;
my $_method = 'PUT';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if ( exists $args{'name'}) {
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g;
}else{
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'format'}) {
$_resource_path =~ s/\Q{format}\E/$args{'format'}/g;
}else{
$_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'folder'}) {
$_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g;
}else{
$_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g;
}
my $_body_data;
# form params
if ( exists $args{'file'} ) {
$_body_data = read_file( $args{'file'} , binmode => ':raw' );
}
# authentication setting, if any
my $auth_settings = [];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
if($AsposeBarCodeCloud::Configuration::debug){
print "\nResponse Content: ".$response->content;
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'SaaSposeResponse', $response->header('content-type'));
return $_response_object;
}
#
lib/AsposeBarCodeCloud/BarcodeApi.pm view on Meta::CPAN
my $_body_data;
# authentication setting, if any
my $auth_settings = [];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
if($AsposeBarCodeCloud::Configuration::debug){
print "\nResponse Content: ".$response->content;
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type'));
return $_response_object;
}
#
# PutBarcodeRecognizeFromBody
#
# Recognition of a barcode from file on server with parameters in body.
#
# @param String $name The image name. (required)
# @param String $type The barcode type. (optional)
# @param String $folder The image folder. (optional)
# @param BarcodeReader $body BarcodeReader object with parameters. (required)
# @return BarcodeResponseList
#
sub PutBarcodeRecognizeFromBody {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'}) {
croak("Missing the required parameter 'name' when calling PutBarcodeRecognizeFromBody");
}
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling PutBarcodeRecognizeFromBody");
}
# parse inputs
my $_resource_path = '/barcode/{name}/recognize/?appSid={appSid}&type={type}&folder={folder}';
$_resource_path =~ s/\Q&\E/&/g;
$_resource_path =~ s/\Q\/?\E/?/g;
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g;
$_resource_path =~ s/\Q{path}\E/{Path}/g;
my $_method = 'PUT';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if ( exists $args{'name'}) {
$_resource_path =~ s/\Q{name}\E/$args{'name'}/g;
}else{
$_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'type'}) {
$_resource_path =~ s/\Q{type}\E/$args{'type'}/g;
}else{
$_resource_path =~ s/[?&]type.*?(?=&|\?|$)//g;
}# query params
if ( exists $args{'folder'}) {
$_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g;
}else{
$_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g;
}
my $_body_data;
# body params
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
my $auth_settings = [];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
if($AsposeBarCodeCloud::Configuration::debug){
print "\nResponse Content: ".$response->content;
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'BarcodeResponseList', $response->header('content-type'));
return $_response_object;
}
1;
( run in 0.427 second using v1.01-cache-2.11-cpan-39bf76dae61 )