Request/DeleteWorksheetDateFilterRequest.pm untested

filter: Statementstmt 0.0% 0 / 102 Branchbran 0.0% 0 / 26 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 144 CC 14 SCAR 47.0
CC
14
Cov
0%
run_http_request
210.0
new
2.0
BEGIN
2.0
CRAP 109.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::DeleteWorksheetDateFilterRequest;
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 # DeleteWorksheetDateFilterRequest.name : The workbook name. ,
64 # DeleteWorksheetDateFilterRequest.sheetName : The worksheet name. ,
65 # DeleteWorksheetDateFilterRequest.fieldIndex : The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0). ,
66 # DeleteWorksheetDateFilterRequest.dateTimeGroupingType : Specifies how to group dateTime values. ,
67 # DeleteWorksheetDateFilterRequest.year : The year. ,
68 # DeleteWorksheetDateFilterRequest.month : The month. ,
69 # DeleteWorksheetDateFilterRequest.day : The day. ,
70 # DeleteWorksheetDateFilterRequest.hour : The hour. ,
71 # DeleteWorksheetDateFilterRequest.minute : The minute. ,
72 # DeleteWorksheetDateFilterRequest.second : The second. ,
73 # DeleteWorksheetDateFilterRequest.folder : The folder where the file is situated. ,
74 # DeleteWorksheetDateFilterRequest.storageName : The storage name where the file is situated.
75
76 {
77 my $params = {
78 'client' =>{
79 data_type => 'ApiClient',
80 description => 'API Client.',
81 required => '0',
82 }
83 };
84 __PACKAGE__->method_documentation->{ 'delete_worksheet_date_filter' } = {
85 summary => 'Remove a date filter in the worksheet.',
86 params => $params,
87 returns => 'CellsCloudResponse',
88 };
89 }
90
91 sub run_http_request {
92 my ($self, %args) = @_;
93
94 my $client = $args{'client'};
95
96 # parse inputs
97 my $_resource_path = 'v3.0/cells/{name}/worksheets/{sheetName}/autoFilter/dateFilter';
98
99 my $_method = 'DELETE';
100 my $query_params = {};
101 my $header_params = {};
102 my $form_params = {};
103
104
105 my $_header_accept = $client->select_header_accept('application/json');
106 if ($_header_accept) {
107 $header_params->{'Accept'} = $_header_accept;
108 }
109 $header_params->{'Content-Type'} = $client->select_header_content_type('application/json');
110 if(defined $self->name){
111 my $_base_variable = "{" . "name" . "}";
112 my $_base_value = $client->to_path_value($self->name);
113 $_resource_path =~ s/$_base_variable/$_base_value/g;
114 }
115
116 if(defined $self->sheet_name){
117 my $_base_variable = "{" . "sheetName" . "}";
118 my $_base_value = $client->to_path_value($self->sheet_name);
119 $_resource_path =~ s/$_base_variable/$_base_value/g;
120 }
121 if(defined $self->field_index){
122 $query_params->{'fieldIndex'} = $client->to_query_value($self->field_index);
123 }
124
125 if(defined $self->date_time_grouping_type){
126 $query_params->{'dateTimeGroupingType'} = $client->to_query_value($self->date_time_grouping_type);
127 }
128
129 if(defined $self->year){
130 $query_params->{'year'} = $client->to_query_value($self->year);
131 }
132
133 if(defined $self->month){
134 $query_params->{'month'} = $client->to_query_value($self->month);
135 }
136
137 if(defined $self->day){
138 $query_params->{'day'} = $client->to_query_value($self->day);
139 }
140
141 if(defined $self->hour){
142 $query_params->{'hour'} = $client->to_query_value($self->hour);
143 }
144
145 if(defined $self->minute){
146 $query_params->{'minute'} = $client->to_query_value($self->minute);
147 }
148
149 if(defined $self->second){
150 $query_params->{'second'} = $client->to_query_value($self->second);
151 }
152
153 if(defined $self->folder){
154 $query_params->{'folder'} = $client->to_query_value($self->folder);
155 }
156
157 if(defined $self->storage_name){
158 $query_params->{'storageName'} = $client->to_query_value($self->storage_name);
159 }
160 my $_body_data;
161
162
163
164 # authentication setting, if any
165 my $auth_settings = [qw()];
166
167 # make the API Call
168 my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings);
169 return $response;
170 }
171
172
173 __PACKAGE__->method_documentation({
174 'name' => {
175 datatype => 'string',
176 base_name => 'name',
177 description => 'The workbook name.',
178 format => '',
179 read_only => '',
180 },
181 'sheet_name' => {
182 datatype => 'string',
183 base_name => 'sheetName',
184 description => 'The worksheet name.',
185 format => '',
186 read_only => '',
187 },
188 'field_index' => {
189 datatype => 'int',
190 base_name => 'fieldIndex',
191 description => 'The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).',
192 format => '',
193 read_only => '',
194 },
195 'date_time_grouping_type' => {
196 datatype => 'string',
197 base_name => 'dateTimeGroupingType',
198 description => 'Specifies how to group dateTime values.',
199 format => '',
200 read_only => '',
201 },
202 'year' => {
203 datatype => 'int',
204 base_name => 'year',
205 description => 'The year.',
206 format => '',
207 read_only => '',
208 },
209 'month' => {
210 datatype => 'int',
211 base_name => 'month',
212 description => 'The month.',
213 format => '',
214 read_only => '',
215 },
216 'day' => {
217 datatype => 'int',
218 base_name => 'day',
219 description => 'The day.',
220 format => '',
221 read_only => '',
222 },
223 'hour' => {
224 datatype => 'int',
225 base_name => 'hour',
226 description => 'The hour.',
227 format => '',
228 read_only => '',
229 },
230 'minute' => {
231 datatype => 'int',
232 base_name => 'minute',
233 description => 'The minute.',
234 format => '',
235 read_only => '',
236 },
237 'second' => {
238 datatype => 'int',
239 base_name => 'second',
240 description => 'The second.',
241 format => '',
242 read_only => '',
243 },
244 'folder' => {
245 datatype => 'string',
246 base_name => 'folder',
247 description => 'The folder where the file is situated.',
248 format => '',
249 read_only => '',
250 },
251 'storage_name' => {
252 datatype => 'string',
253 base_name => 'storageName',
254 description => 'The storage name where the file is situated.',
255 format => '',
256 read_only => '',
257 },
258 });
259
260
261 __PACKAGE__->attribute_map( {
262 'name' => 'name',
263 'sheet_name' => 'sheetName',
264 'field_index' => 'fieldIndex',
265 'date_time_grouping_type' => 'dateTimeGroupingType',
266 'year' => 'year',
267 'month' => 'month',
268 'day' => 'day',
269 'hour' => 'hour',
270 'minute' => 'minute',
271 'second' => 'second',
272 'folder' => 'folder',
273 'storage_name' => 'storageName'
274 } );
275
276 __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
277
278
279 1;