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,168 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ConvertTableToPdf_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 ConvertTableToPdfRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :table_name
37
+ attr_accessor :out_path
38
+ attr_accessor :out_storage_name
39
+ attr_accessor :fonts_location
40
+ attr_accessor :regoin
41
+ attr_accessor :password
42
+
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'Spreadsheet')
50
+ self.spreadsheet = attributes[:'Spreadsheet']
51
+ end
52
+
53
+ if attributes.has_key?(:'worksheet')
54
+ self.worksheet = attributes[:'worksheet']
55
+ end
56
+
57
+ if attributes.has_key?(:'tableName')
58
+ self.table_name = attributes[:'tableName']
59
+ end
60
+
61
+ if attributes.has_key?(:'outPath')
62
+ self.out_path = attributes[:'outPath']
63
+ end
64
+
65
+ if attributes.has_key?(:'outStorageName')
66
+ self.out_storage_name = attributes[:'outStorageName']
67
+ end
68
+
69
+ if attributes.has_key?(:'fontsLocation')
70
+ self.fonts_location = attributes[:'fontsLocation']
71
+ end
72
+
73
+ if attributes.has_key?(:'regoin')
74
+ self.regoin = attributes[:'regoin']
75
+ end
76
+
77
+ if attributes.has_key?(:'password')
78
+ self.password = attributes[:'password']
79
+ end
80
+
81
+ end
82
+ # Attribute mapping from ruby-style variable name to JSON key.
83
+ def self.attribute_map
84
+ {
85
+ :'spreadsheet' => :'Spreadsheet',
86
+ :'worksheet' => :'worksheet',
87
+ :'table_name' => :'tableName',
88
+ :'out_path' => :'outPath',
89
+ :'out_storage_name' => :'outStorageName',
90
+ :'fonts_location' => :'fontsLocation',
91
+ :'regoin' => :'regoin',
92
+ :'password' => :'password'
93
+ }
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.swagger_types
98
+ {
99
+ :'spreadsheet' => :'String',
100
+ :'worksheet' => :'String',
101
+ :'table_name' => :'String',
102
+ :'out_path' => :'String',
103
+ :'out_storage_name' => :'String',
104
+ :'fonts_location' => :'String',
105
+ :'regoin' => :'String',
106
+ :'password' => :'String'
107
+ }
108
+ end
109
+
110
+ def create_http_request(api_client,opts = {})
111
+ if api_client.config.debugging
112
+ api_client.config.logger.debug "Calling API: CellsApi.convert_table_to_pdf ..."
113
+ end
114
+ api_client.request_token_if_needed
115
+ # verify the required parameter 'spreadsheet' is set
116
+ if api_client.config.client_side_validation && spreadsheet.nil?
117
+ fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.convert_table_to_pdf "
118
+ end
119
+ # verify the required parameter 'worksheet' is set
120
+ if api_client.config.client_side_validation && worksheet.nil?
121
+ fail ArgumentError, "Missing the required parameter 'worksheet' when calling CellsApi.convert_table_to_pdf "
122
+ end
123
+ # verify the required parameter 'table_name' is set
124
+ if api_client.config.client_side_validation && table_name.nil?
125
+ fail ArgumentError, "Missing the required parameter 'table_name' when calling CellsApi.convert_table_to_pdf "
126
+ end
127
+
128
+ # resource path
129
+ local_var_path = "v4.0/cells/convert/table/pdf"
130
+ # query parameters
131
+ query_params = {}
132
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
133
+ query_params[:'tableName'] = self.table_name if !self.table_name.nil?
134
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
135
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
136
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
137
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
138
+ query_params[:'password'] = self.password if !self.password.nil?
139
+
140
+ # header parameters
141
+ header_params = {}
142
+ # HTTP header 'Accept' (if needed)
143
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
144
+ # HTTP header 'Content-Type'
145
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
146
+
147
+ # form parameters
148
+ form_params = {}
149
+ post_body = nil
150
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
151
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
152
+
153
+ #auth_names = []
154
+ auth_names = ['JWT']
155
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => 'File')
162
+ if api_client.config.debugging
163
+ api_client.config.logger.debug "API called: Specification.Name>Api.convert_table_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
164
+ end
165
+ return data, status_code, headers
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,168 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ConvertWorksheetToImage_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 ConvertWorksheetToImageRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :format
37
+ attr_accessor :out_path
38
+ attr_accessor :out_storage_name
39
+ attr_accessor :fonts_location
40
+ attr_accessor :regoin
41
+ attr_accessor :password
42
+
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'Spreadsheet')
50
+ self.spreadsheet = attributes[:'Spreadsheet']
51
+ end
52
+
53
+ if attributes.has_key?(:'worksheet')
54
+ self.worksheet = attributes[:'worksheet']
55
+ end
56
+
57
+ if attributes.has_key?(:'format')
58
+ self.format = attributes[:'format']
59
+ end
60
+
61
+ if attributes.has_key?(:'outPath')
62
+ self.out_path = attributes[:'outPath']
63
+ end
64
+
65
+ if attributes.has_key?(:'outStorageName')
66
+ self.out_storage_name = attributes[:'outStorageName']
67
+ end
68
+
69
+ if attributes.has_key?(:'fontsLocation')
70
+ self.fonts_location = attributes[:'fontsLocation']
71
+ end
72
+
73
+ if attributes.has_key?(:'regoin')
74
+ self.regoin = attributes[:'regoin']
75
+ end
76
+
77
+ if attributes.has_key?(:'password')
78
+ self.password = attributes[:'password']
79
+ end
80
+
81
+ end
82
+ # Attribute mapping from ruby-style variable name to JSON key.
83
+ def self.attribute_map
84
+ {
85
+ :'spreadsheet' => :'Spreadsheet',
86
+ :'worksheet' => :'worksheet',
87
+ :'format' => :'format',
88
+ :'out_path' => :'outPath',
89
+ :'out_storage_name' => :'outStorageName',
90
+ :'fonts_location' => :'fontsLocation',
91
+ :'regoin' => :'regoin',
92
+ :'password' => :'password'
93
+ }
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.swagger_types
98
+ {
99
+ :'spreadsheet' => :'String',
100
+ :'worksheet' => :'String',
101
+ :'format' => :'String',
102
+ :'out_path' => :'String',
103
+ :'out_storage_name' => :'String',
104
+ :'fonts_location' => :'String',
105
+ :'regoin' => :'String',
106
+ :'password' => :'String'
107
+ }
108
+ end
109
+
110
+ def create_http_request(api_client,opts = {})
111
+ if api_client.config.debugging
112
+ api_client.config.logger.debug "Calling API: CellsApi.convert_worksheet_to_image ..."
113
+ end
114
+ api_client.request_token_if_needed
115
+ # verify the required parameter 'spreadsheet' is set
116
+ if api_client.config.client_side_validation && spreadsheet.nil?
117
+ fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.convert_worksheet_to_image "
118
+ end
119
+ # verify the required parameter 'worksheet' is set
120
+ if api_client.config.client_side_validation && worksheet.nil?
121
+ fail ArgumentError, "Missing the required parameter 'worksheet' when calling CellsApi.convert_worksheet_to_image "
122
+ end
123
+ # verify the required parameter 'format' is set
124
+ if api_client.config.client_side_validation && format.nil?
125
+ fail ArgumentError, "Missing the required parameter 'format' when calling CellsApi.convert_worksheet_to_image "
126
+ end
127
+
128
+ # resource path
129
+ local_var_path = "v4.0/cells/convert/worksheet/image"
130
+ # query parameters
131
+ query_params = {}
132
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
133
+ query_params[:'format'] = self.format if !self.format.nil?
134
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
135
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
136
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
137
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
138
+ query_params[:'password'] = self.password if !self.password.nil?
139
+
140
+ # header parameters
141
+ header_params = {}
142
+ # HTTP header 'Accept' (if needed)
143
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
144
+ # HTTP header 'Content-Type'
145
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
146
+
147
+ # form parameters
148
+ form_params = {}
149
+ post_body = nil
150
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
151
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
152
+
153
+ #auth_names = []
154
+ auth_names = ['JWT']
155
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => 'File')
162
+ if api_client.config.debugging
163
+ api_client.config.logger.debug "API called: Specification.Name>Api.convert_worksheet_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
164
+ end
165
+ return data, status_code, headers
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ConvertWorksheetToPdf_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 ConvertWorksheetToPdfRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :out_path
37
+ attr_accessor :out_storage_name
38
+ attr_accessor :fonts_location
39
+ attr_accessor :regoin
40
+ attr_accessor :password
41
+
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
47
+
48
+ if attributes.has_key?(:'Spreadsheet')
49
+ self.spreadsheet = attributes[:'Spreadsheet']
50
+ end
51
+
52
+ if attributes.has_key?(:'worksheet')
53
+ self.worksheet = attributes[:'worksheet']
54
+ end
55
+
56
+ if attributes.has_key?(:'outPath')
57
+ self.out_path = attributes[:'outPath']
58
+ end
59
+
60
+ if attributes.has_key?(:'outStorageName')
61
+ self.out_storage_name = attributes[:'outStorageName']
62
+ end
63
+
64
+ if attributes.has_key?(:'fontsLocation')
65
+ self.fonts_location = attributes[:'fontsLocation']
66
+ end
67
+
68
+ if attributes.has_key?(:'regoin')
69
+ self.regoin = attributes[:'regoin']
70
+ end
71
+
72
+ if attributes.has_key?(:'password')
73
+ self.password = attributes[:'password']
74
+ end
75
+
76
+ end
77
+ # Attribute mapping from ruby-style variable name to JSON key.
78
+ def self.attribute_map
79
+ {
80
+ :'spreadsheet' => :'Spreadsheet',
81
+ :'worksheet' => :'worksheet',
82
+ :'out_path' => :'outPath',
83
+ :'out_storage_name' => :'outStorageName',
84
+ :'fonts_location' => :'fontsLocation',
85
+ :'regoin' => :'regoin',
86
+ :'password' => :'password'
87
+ }
88
+ end
89
+
90
+ # Attribute type mapping.
91
+ def self.swagger_types
92
+ {
93
+ :'spreadsheet' => :'String',
94
+ :'worksheet' => :'String',
95
+ :'out_path' => :'String',
96
+ :'out_storage_name' => :'String',
97
+ :'fonts_location' => :'String',
98
+ :'regoin' => :'String',
99
+ :'password' => :'String'
100
+ }
101
+ end
102
+
103
+ def create_http_request(api_client,opts = {})
104
+ if api_client.config.debugging
105
+ api_client.config.logger.debug "Calling API: CellsApi.convert_worksheet_to_pdf ..."
106
+ end
107
+ api_client.request_token_if_needed
108
+ # verify the required parameter 'spreadsheet' is set
109
+ if api_client.config.client_side_validation && spreadsheet.nil?
110
+ fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.convert_worksheet_to_pdf "
111
+ end
112
+ # verify the required parameter 'worksheet' is set
113
+ if api_client.config.client_side_validation && worksheet.nil?
114
+ fail ArgumentError, "Missing the required parameter 'worksheet' when calling CellsApi.convert_worksheet_to_pdf "
115
+ end
116
+
117
+ # resource path
118
+ local_var_path = "v4.0/cells/convert/worksheet/pdf"
119
+ # query parameters
120
+ query_params = {}
121
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
122
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
123
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
124
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
125
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
126
+ query_params[:'password'] = self.password if !self.password.nil?
127
+
128
+ # header parameters
129
+ header_params = {}
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
132
+ # HTTP header 'Content-Type'
133
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
134
+
135
+ # form parameters
136
+ form_params = {}
137
+ post_body = nil
138
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
139
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
140
+
141
+ #auth_names = []
142
+ auth_names = ['JWT']
143
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => 'File')
150
+ if api_client.config.debugging
151
+ api_client.config.logger.debug "API called: Specification.Name>Api.convert_worksheet_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,192 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ExportRangeAsFormat_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 ExportRangeAsFormatRequest
33
+
34
+ attr_accessor :name
35
+ attr_accessor :worksheet
36
+ attr_accessor :range
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?(:'range')
61
+ self.range = attributes[:'range']
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
+ :'range' => :'range',
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
+ :'range' => :'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_range_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_range_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_range_as_format "
143
+ end
144
+ # verify the required parameter 'range' is set
145
+ if api_client.config.client_side_validation && range.nil?
146
+ fail ArgumentError, "Missing the required parameter 'range' when calling CellsApi.export_range_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_range_as_format "
151
+ end
152
+
153
+ # resource path
154
+ local_var_path = "v4.0/cells/{name}/worksheets/{worksheet}/ranges/{range}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'worksheet' + '}', worksheet.to_s).sub('{' + 'range' + '}', range.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_range_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