Request/DeleteWorksheetRowsRequest.pm untested

filter: Statementstmt 0.0% 0 / 92 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 124 CC 9 SCAR 36.4
CC
9
Cov
0%
run_http_request
90.0
new
2.0
BEGIN
2.0
CRAP 38.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::DeleteWorksheetRowsRequest;
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 # DeleteWorksheetRowsRequest.name : The file name. ,
64 # DeleteWorksheetRowsRequest.sheetName : The worksheet name. ,
65 # DeleteWorksheetRowsRequest.startrow : The begin row index to be operated. ,
66 # DeleteWorksheetRowsRequest.totalRows : Number of rows to be operated. ,
67 # DeleteWorksheetRowsRequest.updateReference : Indicates if update references in other worksheets. ,
68 # DeleteWorksheetRowsRequest.folder : The folder where the file is situated. ,
69 # DeleteWorksheetRowsRequest.storageName : The storage name where the file is situated.
70
71 {
72 my $params = {
73 'client' =>{
74 data_type => 'ApiClient',
75 description => 'API Client.',
76 required => '0',
77 }
78 };
79 __PACKAGE__->method_documentation->{ 'delete_worksheet_rows' } = {
80 summary => 'Delete several rows in the worksheet.',
81 params => $params,
82 returns => 'CellsCloudResponse',
83 };
84 }
85
86 sub run_http_request {
87 my ($self, %args) = @_;
88
89 my $client = $args{'client'};
90
91 # parse inputs
92 my $_resource_path = 'v3.0/cells/{name}/worksheets/{sheetName}/cells/rows/';
93
94 my $_method = 'DELETE';
95 my $query_params = {};
96 my $header_params = {};
97 my $form_params = {};
98
99
100 my $_header_accept = $client->select_header_accept('application/json');
101 if ($_header_accept) {
102 $header_params->{'Accept'} = $_header_accept;
103 }
104 $header_params->{'Content-Type'} = $client->select_header_content_type('application/json');
105 if(defined $self->name){
106 my $_base_variable = "{" . "name" . "}";
107 my $_base_value = $client->to_path_value($self->name);
108 $_resource_path =~ s/$_base_variable/$_base_value/g;
109 }
110
111 if(defined $self->sheet_name){
112 my $_base_variable = "{" . "sheetName" . "}";
113 my $_base_value = $client->to_path_value($self->sheet_name);
114 $_resource_path =~ s/$_base_variable/$_base_value/g;
115 }
116 if(defined $self->startrow){
117 $query_params->{'startrow'} = $client->to_query_value($self->startrow);
118 }
119
120 if(defined $self->total_rows){
121 $query_params->{'totalRows'} = $client->to_query_value($self->total_rows);
122 }
123
124 if(defined $self->update_reference){
125 $query_params->{'updateReference'} = $client->to_query_value($self->update_reference);
126 }
127
128 if(defined $self->folder){
129 $query_params->{'folder'} = $client->to_query_value($self->folder);
130 }
131
132 if(defined $self->storage_name){
133 $query_params->{'storageName'} = $client->to_query_value($self->storage_name);
134 }
135 my $_body_data;
136
137
138
139 # authentication setting, if any
140 my $auth_settings = [qw()];
141
142 # make the API Call
143 my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings);
144 return $response;
145 }
146
147
148 __PACKAGE__->method_documentation({
149 'name' => {
150 datatype => 'string',
151 base_name => 'name',
152 description => 'The file name.',
153 format => '',
154 read_only => '',
155 },
156 'sheet_name' => {
157 datatype => 'string',
158 base_name => 'sheetName',
159 description => 'The worksheet name.',
160 format => '',
161 read_only => '',
162 },
163 'startrow' => {
164 datatype => 'int',
165 base_name => 'startrow',
166 description => 'The begin row index to be operated.',
167 format => '',
168 read_only => '',
169 },
170 'total_rows' => {
171 datatype => 'int',
172 base_name => 'totalRows',
173 description => 'Number of rows to be operated.',
174 format => '',
175 read_only => '',
176 },
177 'update_reference' => {
178 datatype => 'string',
179 base_name => 'updateReference',
180 description => 'Indicates if update references in other worksheets.',
181 format => '',
182 read_only => '',
183 },
184 'folder' => {
185 datatype => 'string',
186 base_name => 'folder',
187 description => 'The folder where the file is situated.',
188 format => '',
189 read_only => '',
190 },
191 'storage_name' => {
192 datatype => 'string',
193 base_name => 'storageName',
194 description => 'The storage name where the file is situated.',
195 format => '',
196 read_only => '',
197 },
198 });
199
200
201 __PACKAGE__->attribute_map( {
202 'name' => 'name',
203 'sheet_name' => 'sheetName',
204 'startrow' => 'startrow',
205 'total_rows' => 'totalRows',
206 'update_reference' => 'updateReference',
207 'folder' => 'folder',
208 'storage_name' => 'storageName'
209 } );
210
211 __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
212
213
214 1;