Request/RemoveCharactersRequest.pm untested

filter: Statementstmt 0.0% 0 / 97 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 / 137 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::RemoveCharactersRequest;
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 # RemoveCharactersRequest.Spreadsheet : Upload spreadsheet file. ,
64 # RemoveCharactersRequest.removeTextMethod : Specify the removal of text method type. ,
65 # RemoveCharactersRequest.characterSets : Specify the character sets. ,
66 # RemoveCharactersRequest.removeCustomValue : Specify the remove custom value. ,
67 # RemoveCharactersRequest.caseSensitive : ,
68 # RemoveCharactersRequest.worksheet : Specify the worksheet of spreadsheet. ,
69 # RemoveCharactersRequest.range : Specify the worksheet range of spreadsheet. ,
70 # RemoveCharactersRequest.outPath : (Optional) The folder path where the workbook is stored. The default is null. ,
71 # RemoveCharactersRequest.outStorageName : Output file Storage Name. ,
72 # RemoveCharactersRequest.region : The spreadsheet region setting. ,
73 # RemoveCharactersRequest.password : The password for opening spreadsheet file.
74
75 {
76 my $params = {
77 'client' =>{
78 data_type => 'ApiClient',
79 description => 'API Client.',
80 required => '0',
81 }
82 };
83 __PACKAGE__->method_documentation->{ 'remove_characters' } = {
84 summary => 'Deletes user-defined characters, predefined symbol sets, or any substring from every cell in the chosen range while preserving formulas, formatting and data-validation.',
85 params => $params,
86 returns => 'string',
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 = 'v4.0/cells/content/remove/characters';
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('multipart/form-data');
109
110 if(defined $self->remove_text_method){
111 $query_params->{'removeTextMethod'} = $client->to_query_value($self->remove_text_method);
112 }
113
114 if(defined $self->character_sets){
115 $query_params->{'characterSets'} = $client->to_query_value($self->character_sets);
116 }
117
118 if(defined $self->remove_custom_value){
119 $query_params->{'removeCustomValue'} = $client->to_query_value($self->remove_custom_value);
120 }
121
122 if(defined $self->case_sensitive){
123 $query_params->{'caseSensitive'} = $client->to_query_value($self->case_sensitive);
124 }
125
126 if(defined $self->worksheet){
127 $query_params->{'worksheet'} = $client->to_query_value($self->worksheet);
128 }
129
130 if(defined $self->range){
131 $query_params->{'range'} = $client->to_query_value($self->range);
132 }
133
134 if(defined $self->out_path){
135 $query_params->{'outPath'} = $client->to_query_value($self->out_path);
136 }
137
138 if(defined $self->out_storage_name){
139 $query_params->{'outStorageName'} = $client->to_query_value($self->out_storage_name);
140 }
141
142 if(defined $self->region){
143 $query_params->{'region'} = $client->to_query_value($self->region);
144 }
145
146 if(defined $self->password){
147 $query_params->{'password'} = $client->to_query_value($self->password);
148 }
149 my $_body_data;
150
151
152 if (defined $self->spreadsheet) {
153 $form_params->{basename($self->spreadsheet)} = [$self->spreadsheet ,basename($self->spreadsheet),'application/octet-stream'];
154 }
155
156
157 # authentication setting, if any
158 my $auth_settings = [qw()];
159
160 # make the API Call
161 my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings);
162 return $response;
163 }
164
165
166 __PACKAGE__->method_documentation({
167 'spreadsheet' => {
168 datatype => 'string',
169 base_name => 'Spreadsheet',
170 description => 'Upload spreadsheet file.',
171 format => '',
172 read_only => '',
173 },
174 'remove_text_method' => {
175 datatype => 'string',
176 base_name => 'removeTextMethod',
177 description => 'Specify the removal of text method type.',
178 format => '',
179 read_only => '',
180 },
181 'character_sets' => {
182 datatype => 'string',
183 base_name => 'characterSets',
184 description => 'Specify the character sets.',
185 format => '',
186 read_only => '',
187 },
188 'remove_custom_value' => {
189 datatype => 'string',
190 base_name => 'removeCustomValue',
191 description => 'Specify the remove custom value.',
192 format => '',
193 read_only => '',
194 },
195 'case_sensitive' => {
196 datatype => 'string',
197 base_name => 'caseSensitive',
198 description => '',
199 format => '',
200 read_only => '',
201 },
202 'worksheet' => {
203 datatype => 'string',
204 base_name => 'worksheet',
205 description => 'Specify the worksheet of spreadsheet.',
206 format => '',
207 read_only => '',
208 },
209 'range' => {
210 datatype => 'string',
211 base_name => 'range',
212 description => 'Specify the worksheet range of spreadsheet.',
213 format => '',
214 read_only => '',
215 },
216 'out_path' => {
217 datatype => 'string',
218 base_name => 'outPath',
219 description => '(Optional) The folder path where the workbook is stored. The default is null.',
220 format => '',
221 read_only => '',
222 },
223 'out_storage_name' => {
224 datatype => 'string',
225 base_name => 'outStorageName',
226 description => 'Output file Storage Name.',
227 format => '',
228 read_only => '',
229 },
230 'region' => {
231 datatype => 'string',
232 base_name => 'region',
233 description => 'The spreadsheet region setting.',
234 format => '',
235 read_only => '',
236 },
237 'password' => {
238 datatype => 'string',
239 base_name => 'password',
240 description => 'The password for opening spreadsheet file.',
241 format => '',
242 read_only => '',
243 },
244 });
245
246
247 __PACKAGE__->attribute_map( {
248 'spreadsheet' => 'Spreadsheet',
249 'remove_text_method' => 'removeTextMethod',
250 'character_sets' => 'characterSets',
251 'remove_custom_value' => 'removeCustomValue',
252 'case_sensitive' => 'caseSensitive',
253 'worksheet' => 'worksheet',
254 'range' => 'range',
255 'out_path' => 'outPath',
256 'out_storage_name' => 'outStorageName',
257 'region' => 'region',
258 'password' => 'password'
259 } );
260
261 __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
262
263
264 1;