Request/PutWorksheetDateFilterRequest.pm untested

filter: Statementstmt 0.0% 0 / 108 Branchbran 0.0% 0 / 32 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 156 CC 17 SCAR 51.6
CC
17
Cov
0%
run_http_request
306.0
new
2.0
BEGIN
2.0
CRAP 174.3
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::PutWorksheetDateFilterRequest;
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 # PutWorksheetDateFilterRequest.name : The file name. ,
64 # PutWorksheetDateFilterRequest.sheetName : The worksheet name. ,
65 # PutWorksheetDateFilterRequest.range : Represents the range to which the specified AutoFilter applies. ,
66 # PutWorksheetDateFilterRequest.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). ,
67 # PutWorksheetDateFilterRequest.dateTimeGroupingType : Specifies how to group dateTime values (Day, Hour, Minute, Month, Second, Year). ,
68 # PutWorksheetDateFilterRequest.year : The year. ,
69 # PutWorksheetDateFilterRequest.month : The month. ,
70 # PutWorksheetDateFilterRequest.day : The day. ,
71 # PutWorksheetDateFilterRequest.hour : The hour. ,
72 # PutWorksheetDateFilterRequest.minute : The minute. ,
73 # PutWorksheetDateFilterRequest.second : The second. ,
74 # PutWorksheetDateFilterRequest.matchBlanks : Match all blank cell in the list. ,
75 # PutWorksheetDateFilterRequest.refresh : Refresh auto filters to hide or unhide the rows. ,
76 # PutWorksheetDateFilterRequest.folder : The folder where the file is situated. ,
77 # PutWorksheetDateFilterRequest.storageName : The storage name where the file is situated.
78
79 {
80 my $params = {
81 'client' =>{
82 data_type => 'ApiClient',
83 description => 'API Client.',
84 required => '0',
85 }
86 };
87 __PACKAGE__->method_documentation->{ 'put_worksheet_date_filter' } = {
88 summary => 'Apply a date filter in the worksheet.',
89 params => $params,
90 returns => 'CellsCloudResponse',
91 };
92 }
93
94 sub run_http_request {
95 my ($self, %args) = @_;
96
97 my $client = $args{'client'};
98
99 # parse inputs
100 my $_resource_path = 'v3.0/cells/{name}/worksheets/{sheetName}/autoFilter/dateFilter';
101
102 my $_method = 'PUT';
103 my $query_params = {};
104 my $header_params = {};
105 my $form_params = {};
106
107
108 my $_header_accept = $client->select_header_accept('application/json');
109 if ($_header_accept) {
110 $header_params->{'Accept'} = $_header_accept;
111 }
112 $header_params->{'Content-Type'} = $client->select_header_content_type('application/json');
113 if(defined $self->name){
114 my $_base_variable = "{" . "name" . "}";
115 my $_base_value = $client->to_path_value($self->name);
116 $_resource_path =~ s/$_base_variable/$_base_value/g;
117 }
118
119 if(defined $self->sheet_name){
120 my $_base_variable = "{" . "sheetName" . "}";
121 my $_base_value = $client->to_path_value($self->sheet_name);
122 $_resource_path =~ s/$_base_variable/$_base_value/g;
123 }
124 if(defined $self->range){
125 $query_params->{'range'} = $client->to_query_value($self->range);
126 }
127
128 if(defined $self->field_index){
129 $query_params->{'fieldIndex'} = $client->to_query_value($self->field_index);
130 }
131
132 if(defined $self->date_time_grouping_type){
133 $query_params->{'dateTimeGroupingType'} = $client->to_query_value($self->date_time_grouping_type);
134 }
135
136 if(defined $self->year){
137 $query_params->{'year'} = $client->to_query_value($self->year);
138 }
139
140 if(defined $self->month){
141 $query_params->{'month'} = $client->to_query_value($self->month);
142 }
143
144 if(defined $self->day){
145 $query_params->{'day'} = $client->to_query_value($self->day);
146 }
147
148 if(defined $self->hour){
149 $query_params->{'hour'} = $client->to_query_value($self->hour);
150 }
151
152 if(defined $self->minute){
153 $query_params->{'minute'} = $client->to_query_value($self->minute);
154 }
155
156 if(defined $self->second){
157 $query_params->{'second'} = $client->to_query_value($self->second);
158 }
159
160 if(defined $self->match_blanks){
161 $query_params->{'matchBlanks'} = $client->to_query_value($self->match_blanks);
162 }
163
164 if(defined $self->refresh){
165 $query_params->{'refresh'} = $client->to_query_value($self->refresh);
166 }
167
168 if(defined $self->folder){
169 $query_params->{'folder'} = $client->to_query_value($self->folder);
170 }
171
172 if(defined $self->storage_name){
173 $query_params->{'storageName'} = $client->to_query_value($self->storage_name);
174 }
175 my $_body_data;
176
177
178
179 # authentication setting, if any
180 my $auth_settings = [qw()];
181
182 # make the API Call
183 my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings);
184 return $response;
185 }
186
187
188 __PACKAGE__->method_documentation({
189 'name' => {
190 datatype => 'string',
191 base_name => 'name',
192 description => 'The file name.',
193 format => '',
194 read_only => '',
195 },
196 'sheet_name' => {
197 datatype => 'string',
198 base_name => 'sheetName',
199 description => 'The worksheet name.',
200 format => '',
201 read_only => '',
202 },
203 'range' => {
204 datatype => 'string',
205 base_name => 'range',
206 description => 'Represents the range to which the specified AutoFilter applies.',
207 format => '',
208 read_only => '',
209 },
210 'field_index' => {
211 datatype => 'int',
212 base_name => 'fieldIndex',
213 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).',
214 format => '',
215 read_only => '',
216 },
217 'date_time_grouping_type' => {
218 datatype => 'string',
219 base_name => 'dateTimeGroupingType',
220 description => 'Specifies how to group dateTime values (Day, Hour, Minute, Month, Second, Year).',
221 format => '',
222 read_only => '',
223 },
224 'year' => {
225 datatype => 'int',
226 base_name => 'year',
227 description => 'The year.',
228 format => '',
229 read_only => '',
230 },
231 'month' => {
232 datatype => 'int',
233 base_name => 'month',
234 description => 'The month.',
235 format => '',
236 read_only => '',
237 },
238 'day' => {
239 datatype => 'int',
240 base_name => 'day',
241 description => 'The day.',
242 format => '',
243 read_only => '',
244 },
245 'hour' => {
246 datatype => 'int',
247 base_name => 'hour',
248 description => 'The hour.',
249 format => '',
250 read_only => '',
251 },
252 'minute' => {
253 datatype => 'int',
254 base_name => 'minute',
255 description => 'The minute.',
256 format => '',
257 read_only => '',
258 },
259 'second' => {
260 datatype => 'int',
261 base_name => 'second',
262 description => 'The second.',
263 format => '',
264 read_only => '',
265 },
266 'match_blanks' => {
267 datatype => 'string',
268 base_name => 'matchBlanks',
269 description => 'Match all blank cell in the list.',
270 format => '',
271 read_only => '',
272 },
273 'refresh' => {
274 datatype => 'string',
275 base_name => 'refresh',
276 description => 'Refresh auto filters to hide or unhide the rows.',
277 format => '',
278 read_only => '',
279 },
280 'folder' => {
281 datatype => 'string',
282 base_name => 'folder',
283 description => 'The folder where the file is situated.',
284 format => '',
285 read_only => '',
286 },
287 'storage_name' => {
288 datatype => 'string',
289 base_name => 'storageName',
290 description => 'The storage name where the file is situated.',
291 format => '',
292 read_only => '',
293 },
294 });
295
296
297 __PACKAGE__->attribute_map( {
298 'name' => 'name',
299 'sheet_name' => 'sheetName',
300 'range' => 'range',
301 'field_index' => 'fieldIndex',
302 'date_time_grouping_type' => 'dateTimeGroupingType',
303 'year' => 'year',
304 'month' => 'month',
305 'day' => 'day',
306 'hour' => 'hour',
307 'minute' => 'minute',
308 'second' => 'second',
309 'match_blanks' => 'matchBlanks',
310 'refresh' => 'refresh',
311 'folder' => 'folder',
312 'storage_name' => 'storageName'
313 } );
314
315 __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
316
317
318 1;