Request/PutWorksheetCustomFilterRequest.pm untested

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