Request/SpreadsheetDigitalsignatureRequest.pm untested

filter: Statementstmt 0.0% 0 / 85 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 113 CC 7 SCAR 30.4
CC
7
Cov
0%
run_http_request
56.0
new
2.0
BEGIN
2.0
CRAP 20.9
1 =begin comment
2
3 Copyright (c) 2026 Aspose.Cells Cloud
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 SOFTWARE.
21
22 =end comment
23
24 =cut
25
26 package AsposeCellsCloud::Request::SpreadsheetDigitalsignatureRequest;
27
28 require 5.6.0;
29 use strict;
30 use warnings;
31 use utf8;
32 use JSON ;
33 use Data::Dumper;
34 use Module::Runtime qw(use_module);
35 use Log::Any qw($log);
36 use Date::Parse;
37 use DateTime;
38 use File::Basename;
39
40 use base ("Class::Accessor", "Class::Data::Inheritable");
41
42 __PACKAGE__->mk_classdata('attribute_map' => {});
43 __PACKAGE__->mk_classdata('method_documentation' => {});
44 __PACKAGE__->mk_classdata('class_documentation' => {});
45
46
47 # new object
48 sub new {
49 my ($class, %args) = @_;
50
51 my $self = bless {}, $class;
52
53 foreach my $attribute (keys %{$class->attribute_map}) {
54 my $args_key = $class->attribute_map->{$attribute};
55 $self->$attribute( $args{ $args_key } );
56 }
57
58 return $self;
59 }
60
61
62 # Run Operation Request
63 # SpreadsheetDigitalsignatureRequest.Spreadsheet : Upload spreadsheet file. ,
64 # SpreadsheetDigitalsignatureRequest.password : ,
65 # SpreadsheetDigitalsignatureRequest.outPath : (Optional) The folder path where the workbook is stored. The default is null. ,
66 # SpreadsheetDigitalsignatureRequest.outStorageName : Output file Storage Name. ,
67 # SpreadsheetDigitalsignatureRequest.region : The spreadsheet region setting.
68
69 {
70 my $params = {
71 'client' =>{
72 data_type => 'ApiClient',
73 description => 'API Client.',
74 required => '0',
75 }
76 };
77 __PACKAGE__->method_documentation->{ 'spreadsheet_digitalsignature' } = {
78 summary => '',
79 params => $params,
80 returns => 'string',
81 };
82 }
83
84 sub run_http_request {
85 my ($self, %args) = @_;
86
87 my $client = $args{'client'};
88
89 # parse inputs
90 my $_resource_path = 'v4.0/cells/digitalsignature/spreadsheet';
91
92 my $_method = 'PUT';
93 my $query_params = {};
94 my $header_params = {};
95 my $form_params = {};
96
97
98 my $_header_accept = $client->select_header_accept('application/json');
99 if ($_header_accept) {
100 $header_params->{'Accept'} = $_header_accept;
101 }
102 $header_params->{'Content-Type'} = $client->select_header_content_type('multipart/form-data');
103
104 if(defined $self->password){
105 $query_params->{'password'} = $client->to_query_value($self->password);
106 }
107
108 if(defined $self->out_path){
109 $query_params->{'outPath'} = $client->to_query_value($self->out_path);
110 }
111
112 if(defined $self->out_storage_name){
113 $query_params->{'outStorageName'} = $client->to_query_value($self->out_storage_name);
114 }
115
116 if(defined $self->region){
117 $query_params->{'region'} = $client->to_query_value($self->region);
118 }
119 my $_body_data;
120
121
122 if (defined $self->spreadsheet) {
123 $form_params->{basename($self->spreadsheet)} = [$self->spreadsheet ,basename($self->spreadsheet),'application/octet-stream'];
124 }
125
126
127 # authentication setting, if any
128 my $auth_settings = [qw()];
129
130 # make the API Call
131 my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings);
132 return $response;
133 }
134
135
136 __PACKAGE__->method_documentation({
137 'spreadsheet' => {
138 datatype => 'string',
139 base_name => 'Spreadsheet',
140 description => 'Upload spreadsheet file.',
141 format => '',
142 read_only => '',
143 },
144 'password' => {
145 datatype => 'string',
146 base_name => 'password',
147 description => '',
148 format => '',
149 read_only => '',
150 },
151 'out_path' => {
152 datatype => 'string',
153 base_name => 'outPath',
154 description => '(Optional) The folder path where the workbook is stored. The default is null.',
155 format => '',
156 read_only => '',
157 },
158 'out_storage_name' => {
159 datatype => 'string',
160 base_name => 'outStorageName',
161 description => 'Output file Storage Name.',
162 format => '',
163 read_only => '',
164 },
165 'region' => {
166 datatype => 'string',
167 base_name => 'region',
168 description => 'The spreadsheet region setting.',
169 format => '',
170 read_only => '',
171 },
172 });
173
174
175 __PACKAGE__->attribute_map( {
176 'spreadsheet' => 'Spreadsheet',
177 'password' => 'password',
178 'out_path' => 'outPath',
179 'out_storage_name' => 'outStorageName',
180 'region' => 'region'
181 } );
182
183 __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
184
185
186 1;