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="ConvertRangeToHtml_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 ConvertRangeToHtmlRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :range
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?(:'range')
58
+ self.range = attributes[:'range']
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
+ :'range' => :'range',
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
+ :'range' => :'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_range_to_html ..."
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_range_to_html "
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_range_to_html "
122
+ end
123
+ # verify the required parameter 'range' is set
124
+ if api_client.config.client_side_validation && range.nil?
125
+ fail ArgumentError, "Missing the required parameter 'range' when calling CellsApi.convert_range_to_html "
126
+ end
127
+
128
+ # resource path
129
+ local_var_path = "v4.0/cells/convert/range/html"
130
+ # query parameters
131
+ query_params = {}
132
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
133
+ query_params[:'range'] = self.range if !self.range.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_range_to_html\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,188 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ConvertRangeToImage_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 ConvertRangeToImageRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :range
37
+ attr_accessor :format
38
+ attr_accessor :print_headings
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?(:'Spreadsheet')
52
+ self.spreadsheet = attributes[:'Spreadsheet']
53
+ end
54
+
55
+ if attributes.has_key?(:'worksheet')
56
+ self.worksheet = attributes[:'worksheet']
57
+ end
58
+
59
+ if attributes.has_key?(:'range')
60
+ self.range = attributes[:'range']
61
+ end
62
+
63
+ if attributes.has_key?(:'format')
64
+ self.format = attributes[:'format']
65
+ end
66
+
67
+ if attributes.has_key?(:'printHeadings')
68
+ self.print_headings = attributes[:'printHeadings']
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
+ :'spreadsheet' => :'Spreadsheet',
96
+ :'worksheet' => :'worksheet',
97
+ :'range' => :'range',
98
+ :'format' => :'format',
99
+ :'print_headings' => :'printHeadings',
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
+ :'spreadsheet' => :'String',
112
+ :'worksheet' => :'String',
113
+ :'range' => :'String',
114
+ :'format' => :'String',
115
+ :'print_headings' => :'BOOLEAN',
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.convert_range_to_image ..."
127
+ end
128
+ api_client.request_token_if_needed
129
+ # verify the required parameter 'spreadsheet' is set
130
+ if api_client.config.client_side_validation && spreadsheet.nil?
131
+ fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.convert_range_to_image "
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.convert_range_to_image "
136
+ end
137
+ # verify the required parameter 'range' is set
138
+ if api_client.config.client_side_validation && range.nil?
139
+ fail ArgumentError, "Missing the required parameter 'range' when calling CellsApi.convert_range_to_image "
140
+ end
141
+ # verify the required parameter 'format' is set
142
+ if api_client.config.client_side_validation && format.nil?
143
+ fail ArgumentError, "Missing the required parameter 'format' when calling CellsApi.convert_range_to_image "
144
+ end
145
+
146
+ # resource path
147
+ local_var_path = "v4.0/cells/convert/range/image"
148
+ # query parameters
149
+ query_params = {}
150
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
151
+ query_params[:'range'] = self.range if !self.range.nil?
152
+ query_params[:'format'] = self.format if !self.format.nil?
153
+ query_params[:'printHeadings'] = self.print_headings if !self.print_headings.nil?
154
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
155
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
156
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
157
+ query_params[:'regoin'] = self.regoin if !self.regoin.nil?
158
+ query_params[:'password'] = self.password if !self.password.nil?
159
+
160
+ # header parameters
161
+ header_params = {}
162
+ # HTTP header 'Accept' (if needed)
163
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
164
+ # HTTP header 'Content-Type'
165
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
166
+
167
+ # form parameters
168
+ form_params = {}
169
+ post_body = nil
170
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
171
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
172
+
173
+ #auth_names = []
174
+ auth_names = ['JWT']
175
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => 'File')
182
+ if api_client.config.debugging
183
+ api_client.config.logger.debug "API called: Specification.Name>Api.convert_range_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,168 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ConvertRangeToJson_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 ConvertRangeToJsonRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :range
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?(:'range')
58
+ self.range = attributes[:'range']
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
+ :'range' => :'range',
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
+ :'range' => :'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_range_to_json ..."
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_range_to_json "
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_range_to_json "
122
+ end
123
+ # verify the required parameter 'range' is set
124
+ if api_client.config.client_side_validation && range.nil?
125
+ fail ArgumentError, "Missing the required parameter 'range' when calling CellsApi.convert_range_to_json "
126
+ end
127
+
128
+ # resource path
129
+ local_var_path = "v4.0/cells/convert/range/json"
130
+ # query parameters
131
+ query_params = {}
132
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
133
+ query_params[:'range'] = self.range if !self.range.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_range_to_json\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="ConvertRangeToPdf_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 ConvertRangeToPdfRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :worksheet
36
+ attr_accessor :range
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?(:'range')
58
+ self.range = attributes[:'range']
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
+ :'range' => :'range',
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
+ :'range' => :'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_range_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_range_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_range_to_pdf "
122
+ end
123
+ # verify the required parameter 'range' is set
124
+ if api_client.config.client_side_validation && range.nil?
125
+ fail ArgumentError, "Missing the required parameter 'range' when calling CellsApi.convert_range_to_pdf "
126
+ end
127
+
128
+ # resource path
129
+ local_var_path = "v4.0/cells/convert/range/pdf"
130
+ # query parameters
131
+ query_params = {}
132
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
133
+ query_params[:'range'] = self.range if !self.range.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_range_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