aspose_cells_cloud 25.6 → 25.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_cells_cloud/api/cells_api.rb +160 -1
  3. data/lib/aspose_cells_cloud/models/add_text_options.rb +19 -31
  4. data/lib/aspose_cells_cloud/models/character_count_options.rb +2 -2
  5. data/lib/aspose_cells_cloud/models/convert_text_options.rb +13 -25
  6. data/lib/aspose_cells_cloud/models/extract_text_options.rb +2 -2
  7. data/lib/aspose_cells_cloud/models/remove_characters_options.rb +13 -25
  8. data/lib/aspose_cells_cloud/models/remove_duplicates_options.rb +13 -37
  9. data/lib/aspose_cells_cloud/models/scope_item.rb +12 -12
  10. data/lib/aspose_cells_cloud/models/scope_options.rb +2 -2
  11. data/lib/aspose_cells_cloud/models/split_text_options.rb +2 -2
  12. data/lib/aspose_cells_cloud/models/trim_content_options.rb +9 -9
  13. data/lib/aspose_cells_cloud/models/word_case_options.rb +2 -2
  14. data/lib/aspose_cells_cloud/models/words_count_options.rb +2 -2
  15. data/lib/aspose_cells_cloud/requests/codegen_spec_request.rb +106 -0
  16. data/lib/aspose_cells_cloud/requests/convert_range_to_csv_request.rb +168 -0
  17. data/lib/aspose_cells_cloud/requests/convert_range_to_html_request.rb +168 -0
  18. data/lib/aspose_cells_cloud/requests/convert_range_to_image_request.rb +188 -0
  19. data/lib/aspose_cells_cloud/requests/convert_range_to_json_request.rb +168 -0
  20. data/lib/aspose_cells_cloud/requests/convert_range_to_pdf_request.rb +168 -0
  21. data/lib/aspose_cells_cloud/requests/convert_table_to_csv_request.rb +168 -0
  22. data/lib/aspose_cells_cloud/requests/convert_table_to_html_request.rb +168 -0
  23. data/lib/aspose_cells_cloud/requests/convert_table_to_image_request.rb +180 -0
  24. data/lib/aspose_cells_cloud/requests/convert_table_to_json_request.rb +168 -0
  25. data/lib/aspose_cells_cloud/requests/convert_table_to_pdf_request.rb +168 -0
  26. data/lib/aspose_cells_cloud/requests/convert_worksheet_to_image_request.rb +168 -0
  27. data/lib/aspose_cells_cloud/requests/convert_worksheet_to_pdf_request.rb +156 -0
  28. data/lib/aspose_cells_cloud/requests/export_range_as_format_request.rb +192 -0
  29. data/lib/aspose_cells_cloud/requests/export_table_as_format_request.rb +192 -0
  30. data/lib/aspose_cells_cloud/requests/export_worksheet_as_format_request.rb +181 -0
  31. data/lib/aspose_cells_cloud/requests/protect_spreadsheet_request.rb +152 -0
  32. data/lib/aspose_cells_cloud/requests/put_workbook_background_request.rb +5 -4
  33. data/lib/aspose_cells_cloud/requests/put_worksheet_background_request.rb +5 -3
  34. data/lib/aspose_cells_cloud/requests/spec_request.rb +118 -0
  35. data/lib/aspose_cells_cloud/requests/unprotect_spreadsheet_request.rb +152 -0
  36. data/lib/aspose_cells_cloud/version.rb +1 -1
  37. data/lib/aspose_cells_cloud.rb +19 -0
  38. metadata +41 -9
  39. data/examples/CompanySales.xlsx +0 -0
  40. data/examples/EmployeeSalesSummary.xlsx +0 -0
  41. data/examples/Example_QuickStart.rb +0 -8
@@ -0,0 +1,192 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ExportTableAsFormat_request.rb.cs">
4
+ Copyright (c) 2025 Aspose.Cells Cloud
5
+ </copyright>
6
+ <summary>
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
24
+ </summary>
25
+ --------------------------------------------------------------------------------------------------------------------
26
+ =end
27
+
28
+
29
+ require "uri"
30
+
31
+ module AsposeCellsCloud
32
+ class ExportTableAsFormatRequest
33
+
34
+ attr_accessor :name
35
+ attr_accessor :worksheet
36
+ attr_accessor :table_name
37
+ attr_accessor :format
38
+ attr_accessor :folder
39
+ attr_accessor :storage_name
40
+ attr_accessor :out_path
41
+ attr_accessor :out_storage_name
42
+ attr_accessor :fonts_location
43
+ attr_accessor :regoin
44
+ attr_accessor :password
45
+
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+
52
+ if attributes.has_key?(:'name')
53
+ self.name = attributes[:'name']
54
+ end
55
+
56
+ if attributes.has_key?(:'worksheet')
57
+ self.worksheet = attributes[:'worksheet']
58
+ end
59
+
60
+ if attributes.has_key?(:'tableName')
61
+ self.table_name = attributes[:'tableName']
62
+ end
63
+
64
+ if attributes.has_key?(:'format')
65
+ self.format = attributes[:'format']
66
+ end
67
+
68
+ if attributes.has_key?(:'folder')
69
+ self.folder = attributes[:'folder']
70
+ end
71
+
72
+ if attributes.has_key?(:'storageName')
73
+ self.storage_name = attributes[:'storageName']
74
+ end
75
+
76
+ if attributes.has_key?(:'outPath')
77
+ self.out_path = attributes[:'outPath']
78
+ end
79
+
80
+ if attributes.has_key?(:'outStorageName')
81
+ self.out_storage_name = attributes[:'outStorageName']
82
+ end
83
+
84
+ if attributes.has_key?(:'fontsLocation')
85
+ self.fonts_location = attributes[:'fontsLocation']
86
+ end
87
+
88
+ if attributes.has_key?(:'regoin')
89
+ self.regoin = attributes[:'regoin']
90
+ end
91
+
92
+ if attributes.has_key?(:'password')
93
+ self.password = attributes[:'password']
94
+ end
95
+
96
+ end
97
+ # Attribute mapping from ruby-style variable name to JSON key.
98
+ def self.attribute_map
99
+ {
100
+ :'name' => :'name',
101
+ :'worksheet' => :'worksheet',
102
+ :'table_name' => :'tableName',
103
+ :'format' => :'format',
104
+ :'folder' => :'folder',
105
+ :'storage_name' => :'storageName',
106
+ :'out_path' => :'outPath',
107
+ :'out_storage_name' => :'outStorageName',
108
+ :'fonts_location' => :'fontsLocation',
109
+ :'regoin' => :'regoin',
110
+ :'password' => :'password'
111
+ }
112
+ end
113
+
114
+ # Attribute type mapping.
115
+ def self.swagger_types
116
+ {
117
+ :'name' => :'String',
118
+ :'worksheet' => :'String',
119
+ :'table_name' => :'String',
120
+ :'format' => :'String',
121
+ :'folder' => :'String',
122
+ :'storage_name' => :'String',
123
+ :'out_path' => :'String',
124
+ :'out_storage_name' => :'String',
125
+ :'fonts_location' => :'String',
126
+ :'regoin' => :'String',
127
+ :'password' => :'String'
128
+ }
129
+ end
130
+
131
+ def create_http_request(api_client,opts = {})
132
+ if api_client.config.debugging
133
+ api_client.config.logger.debug "Calling API: CellsApi.export_table_as_format ..."
134
+ end
135
+ api_client.request_token_if_needed
136
+ # verify the required parameter 'name' is set
137
+ if api_client.config.client_side_validation && name.nil?
138
+ fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.export_table_as_format "
139
+ end
140
+ # verify the required parameter 'worksheet' is set
141
+ if api_client.config.client_side_validation && worksheet.nil?
142
+ fail ArgumentError, "Missing the required parameter 'worksheet' when calling CellsApi.export_table_as_format "
143
+ end
144
+ # verify the required parameter 'table_name' is set
145
+ if api_client.config.client_side_validation && table_name.nil?
146
+ fail ArgumentError, "Missing the required parameter 'table_name' when calling CellsApi.export_table_as_format "
147
+ end
148
+ # verify the required parameter 'format' is set
149
+ if api_client.config.client_side_validation && format.nil?
150
+ fail ArgumentError, "Missing the required parameter 'format' when calling CellsApi.export_table_as_format "
151
+ end
152
+
153
+ # resource path
154
+ local_var_path = "v4.0/cells/{name}/worksheets/{worksheet}/tables/{tableName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'worksheet' + '}', worksheet.to_s).sub('{' + 'tableName' + '}', table_name.to_s)
155
+ # query parameters
156
+ query_params = {}
157
+ query_params[:'format'] = self.format if !self.format.nil?
158
+ query_params[:'folder'] = self.folder if !self.folder.nil?
159
+ query_params[:'storageName'] = self.storage_name if !self.storage_name.nil?
160
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
161
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
162
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
163
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
164
+ query_params[:'password'] = self.password if !self.password.nil?
165
+
166
+ # header parameters
167
+ header_params = {}
168
+ # HTTP header 'Accept' (if needed)
169
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
170
+ # HTTP header 'Content-Type'
171
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
172
+
173
+ # form parameters
174
+ form_params = {}
175
+ post_body = nil
176
+
177
+ #auth_names = []
178
+ auth_names = ['JWT']
179
+ data, status_code, headers = api_client.call_api(:GET, local_var_path,
180
+ :header_params => header_params,
181
+ :query_params => query_params,
182
+ :form_params => form_params,
183
+ :body => post_body,
184
+ :auth_names => auth_names,
185
+ :return_type => 'File')
186
+ if api_client.config.debugging
187
+ api_client.config.logger.debug "API called: Specification.Name>Api.export_table_as_format\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
188
+ end
189
+ return data, status_code, headers
190
+ end
191
+ end
192
+ end
@@ -0,0 +1,181 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ExportWorksheetAsFormat_request.rb.cs">
4
+ Copyright (c) 2025 Aspose.Cells Cloud
5
+ </copyright>
6
+ <summary>
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
24
+ </summary>
25
+ --------------------------------------------------------------------------------------------------------------------
26
+ =end
27
+
28
+
29
+ require "uri"
30
+
31
+ module AsposeCellsCloud
32
+ class ExportWorksheetAsFormatRequest
33
+
34
+ attr_accessor :name
35
+ attr_accessor :worksheet
36
+ attr_accessor :format
37
+ attr_accessor :folder
38
+ attr_accessor :storage_name
39
+ attr_accessor :out_path
40
+ attr_accessor :out_storage_name
41
+ attr_accessor :fonts_location
42
+ attr_accessor :regoin
43
+ attr_accessor :password
44
+
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
50
+
51
+ if attributes.has_key?(:'name')
52
+ self.name = attributes[:'name']
53
+ end
54
+
55
+ if attributes.has_key?(:'worksheet')
56
+ self.worksheet = attributes[:'worksheet']
57
+ end
58
+
59
+ if attributes.has_key?(:'format')
60
+ self.format = attributes[:'format']
61
+ end
62
+
63
+ if attributes.has_key?(:'folder')
64
+ self.folder = attributes[:'folder']
65
+ end
66
+
67
+ if attributes.has_key?(:'storageName')
68
+ self.storage_name = attributes[:'storageName']
69
+ end
70
+
71
+ if attributes.has_key?(:'outPath')
72
+ self.out_path = attributes[:'outPath']
73
+ end
74
+
75
+ if attributes.has_key?(:'outStorageName')
76
+ self.out_storage_name = attributes[:'outStorageName']
77
+ end
78
+
79
+ if attributes.has_key?(:'fontsLocation')
80
+ self.fonts_location = attributes[:'fontsLocation']
81
+ end
82
+
83
+ if attributes.has_key?(:'regoin')
84
+ self.regoin = attributes[:'regoin']
85
+ end
86
+
87
+ if attributes.has_key?(:'password')
88
+ self.password = attributes[:'password']
89
+ end
90
+
91
+ end
92
+ # Attribute mapping from ruby-style variable name to JSON key.
93
+ def self.attribute_map
94
+ {
95
+ :'name' => :'name',
96
+ :'worksheet' => :'worksheet',
97
+ :'format' => :'format',
98
+ :'folder' => :'folder',
99
+ :'storage_name' => :'storageName',
100
+ :'out_path' => :'outPath',
101
+ :'out_storage_name' => :'outStorageName',
102
+ :'fonts_location' => :'fontsLocation',
103
+ :'regoin' => :'regoin',
104
+ :'password' => :'password'
105
+ }
106
+ end
107
+
108
+ # Attribute type mapping.
109
+ def self.swagger_types
110
+ {
111
+ :'name' => :'String',
112
+ :'worksheet' => :'String',
113
+ :'format' => :'String',
114
+ :'folder' => :'String',
115
+ :'storage_name' => :'String',
116
+ :'out_path' => :'String',
117
+ :'out_storage_name' => :'String',
118
+ :'fonts_location' => :'String',
119
+ :'regoin' => :'String',
120
+ :'password' => :'String'
121
+ }
122
+ end
123
+
124
+ def create_http_request(api_client,opts = {})
125
+ if api_client.config.debugging
126
+ api_client.config.logger.debug "Calling API: CellsApi.export_worksheet_as_format ..."
127
+ end
128
+ api_client.request_token_if_needed
129
+ # verify the required parameter 'name' is set
130
+ if api_client.config.client_side_validation && name.nil?
131
+ fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.export_worksheet_as_format "
132
+ end
133
+ # verify the required parameter 'worksheet' is set
134
+ if api_client.config.client_side_validation && worksheet.nil?
135
+ fail ArgumentError, "Missing the required parameter 'worksheet' when calling CellsApi.export_worksheet_as_format "
136
+ end
137
+ # verify the required parameter 'format' is set
138
+ if api_client.config.client_side_validation && format.nil?
139
+ fail ArgumentError, "Missing the required parameter 'format' when calling CellsApi.export_worksheet_as_format "
140
+ end
141
+
142
+ # resource path
143
+ local_var_path = "v4.0/cells/{name}/worksheets/{worksheet}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'worksheet' + '}', worksheet.to_s)
144
+ # query parameters
145
+ query_params = {}
146
+ query_params[:'format'] = self.format if !self.format.nil?
147
+ query_params[:'folder'] = self.folder if !self.folder.nil?
148
+ query_params[:'storageName'] = self.storage_name if !self.storage_name.nil?
149
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
150
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
151
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
152
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
153
+ query_params[:'password'] = self.password if !self.password.nil?
154
+
155
+ # header parameters
156
+ header_params = {}
157
+ # HTTP header 'Accept' (if needed)
158
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
159
+ # HTTP header 'Content-Type'
160
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
161
+
162
+ # form parameters
163
+ form_params = {}
164
+ post_body = nil
165
+
166
+ #auth_names = []
167
+ auth_names = ['JWT']
168
+ data, status_code, headers = api_client.call_api(:GET, local_var_path,
169
+ :header_params => header_params,
170
+ :query_params => query_params,
171
+ :form_params => form_params,
172
+ :body => post_body,
173
+ :auth_names => auth_names,
174
+ :return_type => 'File')
175
+ if api_client.config.debugging
176
+ api_client.config.logger.debug "API called: Specification.Name>Api.export_worksheet_as_format\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
177
+ end
178
+ return data, status_code, headers
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,152 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ProtectSpreadsheet_request.rb.cs">
4
+ Copyright (c) 2025 Aspose.Cells Cloud
5
+ </copyright>
6
+ <summary>
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
24
+ </summary>
25
+ --------------------------------------------------------------------------------------------------------------------
26
+ =end
27
+
28
+
29
+ require "uri"
30
+
31
+ module AsposeCellsCloud
32
+ class ProtectSpreadsheetRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :password
36
+ attr_accessor :modify_password
37
+ attr_accessor :out_path
38
+ attr_accessor :out_storage_name
39
+ attr_accessor :regoin
40
+
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+
47
+ if attributes.has_key?(:'Spreadsheet')
48
+ self.spreadsheet = attributes[:'Spreadsheet']
49
+ end
50
+
51
+ if attributes.has_key?(:'password')
52
+ self.password = attributes[:'password']
53
+ end
54
+
55
+ if attributes.has_key?(:'modifyPassword')
56
+ self.modify_password = attributes[:'modifyPassword']
57
+ end
58
+
59
+ if attributes.has_key?(:'outPath')
60
+ self.out_path = attributes[:'outPath']
61
+ end
62
+
63
+ if attributes.has_key?(:'outStorageName')
64
+ self.out_storage_name = attributes[:'outStorageName']
65
+ end
66
+
67
+ if attributes.has_key?(:'regoin')
68
+ self.regoin = attributes[:'regoin']
69
+ end
70
+
71
+ end
72
+ # Attribute mapping from ruby-style variable name to JSON key.
73
+ def self.attribute_map
74
+ {
75
+ :'spreadsheet' => :'Spreadsheet',
76
+ :'password' => :'password',
77
+ :'modify_password' => :'modifyPassword',
78
+ :'out_path' => :'outPath',
79
+ :'out_storage_name' => :'outStorageName',
80
+ :'regoin' => :'regoin'
81
+ }
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.swagger_types
86
+ {
87
+ :'spreadsheet' => :'String',
88
+ :'password' => :'String',
89
+ :'modify_password' => :'String',
90
+ :'out_path' => :'String',
91
+ :'out_storage_name' => :'String',
92
+ :'regoin' => :'String'
93
+ }
94
+ end
95
+
96
+ def create_http_request(api_client,opts = {})
97
+ if api_client.config.debugging
98
+ api_client.config.logger.debug "Calling API: CellsApi.protect_spreadsheet ..."
99
+ end
100
+ api_client.request_token_if_needed
101
+ # verify the required parameter 'spreadsheet' is set
102
+ if api_client.config.client_side_validation && spreadsheet.nil?
103
+ fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.protect_spreadsheet "
104
+ end
105
+ # verify the required parameter 'password' is set
106
+ if api_client.config.client_side_validation && password.nil?
107
+ fail ArgumentError, "Missing the required parameter 'password' when calling CellsApi.protect_spreadsheet "
108
+ end
109
+ # verify the required parameter 'modify_password' is set
110
+ if api_client.config.client_side_validation && modify_password.nil?
111
+ fail ArgumentError, "Missing the required parameter 'modify_password' when calling CellsApi.protect_spreadsheet "
112
+ end
113
+
114
+ # resource path
115
+ local_var_path = "v4.0/cells/protection/spreadsheet"
116
+ # query parameters
117
+ query_params = {}
118
+ query_params[:'password'] = self.password if !self.password.nil?
119
+ query_params[:'modifyPassword'] = self.modify_password if !self.modify_password.nil?
120
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
121
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
122
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
123
+
124
+ # header parameters
125
+ header_params = {}
126
+ # HTTP header 'Accept' (if needed)
127
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
128
+ # HTTP header 'Content-Type'
129
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
130
+
131
+ # form parameters
132
+ form_params = {}
133
+ post_body = nil
134
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
135
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
136
+
137
+ #auth_names = []
138
+ auth_names = ['JWT']
139
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => 'File')
146
+ if api_client.config.debugging
147
+ api_client.config.logger.debug "API called: Specification.Name>Api.protect_spreadsheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+ end
152
+ end
@@ -122,11 +122,12 @@ module AsposeCellsCloud
122
122
  # form parameters
123
123
  form_params = {}
124
124
  post_body = nil
125
- header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
126
- file.each do |filename , context|
127
- form_params[File.basename(filename)] = context
125
+ if file && !file.empty?
126
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
127
+ file.each do |filename , context|
128
+ form_params[File.basename(filename)] = context
129
+ end
128
130
  end
129
-
130
131
  #auth_names = []
131
132
  auth_names = ['JWT']
132
133
  data, status_code, headers = api_client.call_api(:PUT, local_var_path,
@@ -133,9 +133,11 @@ module AsposeCellsCloud
133
133
  # form parameters
134
134
  form_params = {}
135
135
  post_body = nil
136
- header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
137
- file.each do |filename , context|
138
- form_params[File.basename(filename)] = context
136
+ if file && !file.empty?
137
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
138
+ file.each do |filename , context|
139
+ form_params[File.basename(filename)] = context
140
+ end
139
141
  end
140
142
 
141
143
  #auth_names = []
@@ -0,0 +1,118 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="Spec_request.rb.cs">
4
+ Copyright (c) 2025 Aspose.Cells Cloud
5
+ </copyright>
6
+ <summary>
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
24
+ </summary>
25
+ --------------------------------------------------------------------------------------------------------------------
26
+ =end
27
+
28
+
29
+ require "uri"
30
+
31
+ module AsposeCellsCloud
32
+ class SpecRequest
33
+
34
+ attr_accessor :version
35
+ attr_accessor :regoin
36
+ attr_accessor :password
37
+
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
43
+
44
+ if attributes.has_key?(:'version')
45
+ self.version = attributes[:'version']
46
+ end
47
+
48
+ if attributes.has_key?(:'regoin')
49
+ self.regoin = attributes[:'regoin']
50
+ end
51
+
52
+ if attributes.has_key?(:'password')
53
+ self.password = attributes[:'password']
54
+ end
55
+
56
+ end
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'version' => :'version',
61
+ :'regoin' => :'regoin',
62
+ :'password' => :'password'
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.swagger_types
68
+ {
69
+ :'version' => :'String',
70
+ :'regoin' => :'String',
71
+ :'password' => :'String'
72
+ }
73
+ end
74
+
75
+ def create_http_request(api_client,opts = {})
76
+ if api_client.config.debugging
77
+ api_client.config.logger.debug "Calling API: CellsApi.spec ..."
78
+ end
79
+ api_client.request_token_if_needed
80
+ # verify the required parameter 'version' is set
81
+ if api_client.config.client_side_validation && version.nil?
82
+ fail ArgumentError, "Missing the required parameter 'version' when calling CellsApi.spec "
83
+ end
84
+
85
+ # resource path
86
+ local_var_path = "v4.0/cells/swagger/spec"
87
+ # query parameters
88
+ query_params = {}
89
+ query_params[:'version'] = self.version if !self.version.nil?
90
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
91
+ query_params[:'password'] = self.password if !self.password.nil?
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+ post_body = nil
103
+
104
+ #auth_names = []
105
+ auth_names = ['JWT']
106
+ data, status_code, headers = api_client.call_api(:GET, local_var_path,
107
+ :header_params => header_params,
108
+ :query_params => query_params,
109
+ :form_params => form_params,
110
+ :body => post_body,
111
+ :auth_names => auth_names)
112
+ if api_client.config.debugging
113
+ api_client.config.logger.debug "API called: Specification.Name>Api.spec\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
114
+ end
115
+ return data, status_code, headers
116
+ end
117
+ end
118
+ end