Request/PutWorksheetListObjectRequest.pm untested

filter: Statementstmt 0.0% 0 / 100 Branchbran 0.0% 0 / 24 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 140 CC 13 SCAR 45.2
CC
13
Cov
0%
run_http_request
182.0
new
2.0
BEGIN
2.0
CRAP 92.0
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::PutWorksheetListObjectRequest;
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 # PutWorksheetListObjectRequest.name : The file name. ,
64 # PutWorksheetListObjectRequest.sheetName : The worksheet name. ,
65 # PutWorksheetListObjectRequest.startRow : The start row of the list range. ,
66 # PutWorksheetListObjectRequest.startColumn : The start column of the list range. ,
67 # PutWorksheetListObjectRequest.endRow : The start row of the list range. ,
68 # PutWorksheetListObjectRequest.endColumn : The start column of the list range. ,
69 # PutWorksheetListObjectRequest.folder : The folder where the file is situated. ,
70 # PutWorksheetListObjectRequest.hasHeaders : Indicate whether the range has headers. ,
71 # PutWorksheetListObjectRequest.displayName : Indicate whether display name. ,
72 # PutWorksheetListObjectRequest.showTotals : Indicate whether show totals. ,
73 # PutWorksheetListObjectRequest.storageName : The storage name where the file is situated.
74
75 {
76 my $params = {
77 'client' =>{
78 data_type => 'ApiClient',
79 description => 'API Client.',
80 required => '0',
81 }
82 };
83 __PACKAGE__->method_documentation->{ 'put_worksheet_list_object' } = {
84 summary => 'Add a ListObject in the worksheet.',
85 params => $params,
86 returns => 'CellsCloudResponse',
87 };
88 }
89
90 sub run_http_request {
91 my ($self, %args) = @_;
92
93 my $client = $args{'client'};
94
95 # parse inputs
96 my $_resource_path = 'v3.0/cells/{name}/worksheets/{sheetName}/listobjects';
97
98 my $_method = 'PUT';
99 my $query_params = {};
100 my $header_params = {};
101 my $form_params = {};
102
103
104 my $_header_accept = $client->select_header_accept('application/json');
105 if ($_header_accept) {
106 $header_params->{'Accept'} = $_header_accept;
107 }
108 $header_params->{'Content-Type'} = $client->select_header_content_type('application/json');
109 if(defined $self->name){
110 my $_base_variable = "{" . "name" . "}";
111 my $_base_value = $client->to_path_value($self->name);
112 $_resource_path =~ s/$_base_variable/$_base_value/g;
113 }
114
115 if(defined $self->sheet_name){
116 my $_base_variable = "{" . "sheetName" . "}";
117 my $_base_value = $client->to_path_value($self->sheet_name);
118 $_resource_path =~ s/$_base_variable/$_base_value/g;
119 }
120 if(defined $self->start_row){
121 $query_params->{'startRow'} = $client->to_query_value($self->start_row);
122 }
123
124 if(defined $self->start_column){
125 $query_params->{'startColumn'} = $client->to_query_value($self->start_column);
126 }
127
128 if(defined $self->end_row){
129 $query_params->{'endRow'} = $client->to_query_value($self->end_row);
130 }
131
132 if(defined $self->end_column){
133 $query_params->{'endColumn'} = $client->to_query_value($self->end_column);
134 }
135
136 if(defined $self->folder){
137 $query_params->{'folder'} = $client->to_query_value($self->folder);
138 }
139
140 if(defined $self->has_headers){
141 $query_params->{'hasHeaders'} = $client->to_query_value($self->has_headers);
142 }
143
144 if(defined $self->display_name){
145 $query_params->{'displayName'} = $client->to_query_value($self->display_name);
146 }
147
148 if(defined $self->show_totals){
149 $query_params->{'showTotals'} = $client->to_query_value($self->show_totals);
150 }
151
152 if(defined $self->storage_name){
153 $query_params->{'storageName'} = $client->to_query_value($self->storage_name);
154 }
155 my $_body_data;
156
157
158
159 # authentication setting, if any
160 my $auth_settings = [qw()];
161
162 # make the API Call
163 my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings);
164 return $response;
165 }
166
167
168 __PACKAGE__->method_documentation({
169 'name' => {
170 datatype => 'string',
171 base_name => 'name',
172 description => 'The file name.',
173 format => '',
174 read_only => '',
175 },
176 'sheet_name' => {
177 datatype => 'string',
178 base_name => 'sheetName',
179 description => 'The worksheet name.',
180 format => '',
181 read_only => '',
182 },
183 'start_row' => {
184 datatype => 'int',
185 base_name => 'startRow',
186 description => 'The start row of the list range.',
187 format => '',
188 read_only => '',
189 },
190 'start_column' => {
191 datatype => 'int',
192 base_name => 'startColumn',
193 description => 'The start column of the list range.',
194 format => '',
195 read_only => '',
196 },
197 'end_row' => {
198 datatype => 'int',
199 base_name => 'endRow',
200 description => 'The start row of the list range.',
201 format => '',
202 read_only => '',
203 },
204 'end_column' => {
205 datatype => 'int',
206 base_name => 'endColumn',
207 description => 'The start column of the list range.',
208 format => '',
209 read_only => '',
210 },
211 'folder' => {
212 datatype => 'string',
213 base_name => 'folder',
214 description => 'The folder where the file is situated.',
215 format => '',
216 read_only => '',
217 },
218 'has_headers' => {
219 datatype => 'string',
220 base_name => 'hasHeaders',
221 description => 'Indicate whether the range has headers.',
222 format => '',
223 read_only => '',
224 },
225 'display_name' => {
226 datatype => 'string',
227 base_name => 'displayName',
228 description => 'Indicate whether display name.',
229 format => '',
230 read_only => '',
231 },
232 'show_totals' => {
233 datatype => 'string',
234 base_name => 'showTotals',
235 description => 'Indicate whether show totals.',
236 format => '',
237 read_only => '',
238 },
239 'storage_name' => {
240 datatype => 'string',
241 base_name => 'storageName',
242 description => 'The storage name where the file is situated.',
243 format => '',
244 read_only => '',
245 },
246 });
247
248
249 __PACKAGE__->attribute_map( {
250 'name' => 'name',
251 'sheet_name' => 'sheetName',
252 'start_row' => 'startRow',
253 'start_column' => 'startColumn',
254 'end_row' => 'endRow',
255 'end_column' => 'endColumn',
256 'folder' => 'folder',
257 'has_headers' => 'hasHeaders',
258 'display_name' => 'displayName',
259 'show_totals' => 'showTotals',
260 'storage_name' => 'storageName'
261 } );
262
263 __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
264
265
266 1;