aspose_cells_cloud 25.10 → 25.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cbd190fc6a52a9ab31719aee387fcef5864ddae02d8523934c4a51135476bb7
4
- data.tar.gz: 5152b3839c1e466c791a958a770b18da92945c6124091c5689d6469b8064a975
3
+ metadata.gz: '068bd9a9a338997b49052a6777b766cc42be2f525870858e68187e3e9abafa8e'
4
+ data.tar.gz: e884c74fd67056b5788b5f97a5740325caaff1536abef3f1fc5001e3f3d907a6
5
5
  SHA512:
6
- metadata.gz: 255f7a0f2b04da523d262bc333a24753756df370e02f034d0808352a169f7221ec0747ceb697fa0e693822e66d029acfb9d2b7788721e46502cf1a0b67397542
7
- data.tar.gz: 60c2d4d437b04faf4d02d459b7fb0936f8a345600f00ce4c05b87da9157d7114e39c3279f616160048c803c4ec6235f39bfb538a520643614c0e145ba3c2dcbc
6
+ metadata.gz: 403af39a5e2643fd8bbd9e4fd3d6272aa2c6f300c5e8d397bbe2962a7e2cf215aa1193ec4c8e0665b2df1795788d46918b13ed42b7bcd051dc5d9dbca4ce5048
7
+ data.tar.gz: 675cac3ae29a61332a4b88094d173c0caf56464af545d75dc18fb64713fa9e2919e4d1f34f28272317dd21a36c1def255bc4c405a8fc3a7e2802bc44084ea759
data/README.md CHANGED
@@ -1,6 +1,16 @@
1
- ![](https://img.shields.io/badge/aspose.cells%20Cloud%20SDK-25.10-green?style=for-the-badge&logo=ruby) [![Product Page](https://img.shields.io/badge/Product-0288d1?style=for-the-badge&logo=Google-Chrome&logoColor=white)](https://products.aspose.cloud/cells/ruby/) [![Documentation](https://img.shields.io/badge/Documentation-388e3c?style=for-the-badge&logo=Hugo&logoColor=white)](https://docs.aspose.cloud/cells/) [![API Ref](https://img.shields.io/badge/Reference-f39c12?style=for-the-badge&logo=html5&logoColor=white)](https://reference.aspose.cloud/cells/) [![Examples](https://img.shields.io/badge/Examples-1565c0?style=for-the-badge&logo=Github&logoColor=white)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-perl/tree/master/Examples) [![Blog](https://img.shields.io/badge/Blog-d32f2f?style=for-the-badge&logo=WordPress&logoColor=white)](https://blog.aspose.cloud/categories/aspose.cells-cloud-product-family/) [![Support](https://img.shields.io/badge/Support-7b1fa2?style=for-the-badge&logo=Discourse&logoColor=white)](https://forum.aspose.cloud/c/cells/7) [![Gem](https://img.shields.io/gem/v/aspose_cells_cloud?style=for-the-badge)](https://rubygems.org/gems/aspose_cells_cloud) [![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/archive/refs/heads/master.zip) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/25.10?style=for-the-badge)
1
+ ![](https://img.shields.io/badge/aspose.cells%20Cloud%20SDK-25.11-green?style=for-the-badge&logo=ruby) [![Product Page](https://img.shields.io/badge/Product-0288d1?style=for-the-badge&logo=Google-Chrome&logoColor=white)](https://products.aspose.cloud/cells/ruby/) [![Documentation](https://img.shields.io/badge/Documentation-388e3c?style=for-the-badge&logo=Hugo&logoColor=white)](https://docs.aspose.cloud/cells/) [![API Ref](https://img.shields.io/badge/Reference-f39c12?style=for-the-badge&logo=html5&logoColor=white)](https://reference.aspose.cloud/cells/) [![Examples](https://img.shields.io/badge/Examples-1565c0?style=for-the-badge&logo=Github&logoColor=white)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-perl/tree/master/Examples) [![Blog](https://img.shields.io/badge/Blog-d32f2f?style=for-the-badge&logo=WordPress&logoColor=white)](https://blog.aspose.cloud/categories/aspose.cells-cloud-product-family/) [![Support](https://img.shields.io/badge/Support-7b1fa2?style=for-the-badge&logo=Discourse&logoColor=white)](https://forum.aspose.cloud/c/cells/7) [![Gem](https://img.shields.io/gem/v/aspose_cells_cloud?style=for-the-badge)](https://rubygems.org/gems/aspose_cells_cloud) [![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/archive/refs/heads/master.zip) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/25.11?style=for-the-badge)
2
2
 
3
- [Aspose.Cells Cloud SDK for Ruby](https://products.aspose.cloud/cells/ruby) is a cloud-first REST API that lets Ruby applications create, read, edit, convert, and repair [Excel, ODS, CSV, JSON, and other spreadsheet files](https://docs.aspose.cloud/cells/supported-file-formats/) without installing Microsoft Office. It supports advanced features, including cell formatting, formulas, pivot tables, conditional styling, charts, hyperlinks, comments, data validation, document splitting, and merging, and runs on AWS, Azure, and Google Cloud, while ensuring data integrity.
3
+ [Aspose.Cells Cloud SDK for Ruby](https://products.aspose.cloud/cells/ruby) is a cloud-native REST API that enables Ruby developers to **create**, **read**, **edit**, **convert**, and **repair** spreadsheet filesincluding **Excel** (**XLS**, **XLSX**, **XLSB**, **XLSM**), **OpenDocument Spreadsheet (ODS**), **CSV**, **TSV**, **JSON**, **HTML**, **PDF**, and **more—without requiring Microsoft Excel or Office to be installed**.
4
+
5
+ Built on the **Aspose.Cells Cloud Web API**, this MIT-licensed SDK supports advanced spreadsheet operations such as:
6
+
7
+ - Cell formatting, formulas, and data validation
8
+ - Pivot tables, charts, hyperlinks, and comments
9
+ - Conditional formatting and smart markers
10
+ - Worksheet merging, splitting, and protection
11
+ - Batch processing and background removal
12
+
13
+ It seamlessly integrates with **AWS**, **Microsoft Azure**, and **Google Cloud**, ensuring **high availability**, **scalability**, and **data integrity**. Ideal for serverless apps, microservices, and cloud automation workflows.
4
14
 
5
15
  ## Quick Start Guide
6
16
 
@@ -12,7 +22,7 @@ To begin with Aspose.Cells Cloud, here's what you need to do:
12
22
  - execute the following command to get the latest Gem package.
13
23
 
14
24
  ```console
15
- gem 'aspose_cells_cloud', '~> 25.10'
25
+ gem 'aspose_cells_cloud', '~> 25.11'
16
26
  ```
17
27
 
18
28
  or install directly
@@ -114,7 +124,7 @@ request = AsposeCellsCloud::UploadFileRequest.new(:UploadFiles=>"EmployeeSales
114
124
  - Import/Export: Facilitates importing data from various sources into spreadsheets and exporting spreadsheet data to other formats.
115
125
  - Security Management: Offers a range of security features like data encryption, access control, and permission management to safeguard the security and integrity of spreadsheet data.
116
126
 
117
- ## Feature & Enhancements in Version 25.10
127
+ ## Feature & Enhancements in Version 25.11
118
128
 
119
129
  Full list of issues covering all changes in this release:
120
130
 
@@ -40,6 +40,21 @@ module AsposeCellsCloud
40
40
  @api_client.config.host = app_host
41
41
  end
42
42
 
43
+ # Translates the entire spreadsheet to the specified target language.
44
+
45
+ def translation_spreadsheet( translation_spreadsheet_request, opts = {})
46
+
47
+ data, _status_code, _headers = translation_spreadsheet_request.create_http_request(@api_client,opts )
48
+ return data
49
+ end
50
+
51
+
52
+ def translate_text_file( translate_text_file_request, opts = {})
53
+
54
+ data, _status_code, _headers = translate_text_file_request.create_http_request(@api_client,opts )
55
+ return data
56
+ end
57
+
43
58
  # The Aggregate by Color API provides a convenient way to perform calculations on cells that share the same fill or font color. This API supports a range of aggregate operations, including count, sum, maximum value, minimum value, and average value, enabling you to analyze and summarize data based on color distinctions.
44
59
 
45
60
  def aggregate_cells_by_color( aggregate_cells_by_color_request, opts = {})
@@ -136,6 +151,13 @@ module AsposeCellsCloud
136
151
  return data
137
152
  end
138
153
 
154
+
155
+ def convert_spreadsheet_to_json( convert_spreadsheet_to_json_request, opts = {})
156
+
157
+ data, _status_code, _headers = convert_spreadsheet_to_json_request.create_http_request(@api_client,opts )
158
+ return data
159
+ end
160
+
139
161
  # Converts a spreadsheet on a local drive to the csv file.
140
162
 
141
163
  def convert_spreadsheet_to_csv( convert_spreadsheet_to_csv_request, opts = {})
@@ -525,7 +547,7 @@ module AsposeCellsCloud
525
547
  return data
526
548
  end
527
549
 
528
- # Perform operations or delete any custom characters, character sets, and substrings within a selected range for a specific position.
550
+ # Deletes user-defined characters, predefined symbol sets, or any substring from every cell in the chosen range while preserving formulas, formatting and data-validation.
529
551
 
530
552
  def remove_characters( remove_characters_request, opts = {})
531
553
 
@@ -533,6 +555,22 @@ module AsposeCellsCloud
533
555
  return data
534
556
  end
535
557
 
558
+ # Deletes characters from every cell in the target range by position (first/last N, before/after a substring, or between two delimiters) while preserving formulas, formatting and data-validation.
559
+
560
+ def remove_characters_by_position( remove_characters_by_position_request, opts = {})
561
+
562
+ data, _status_code, _headers = remove_characters_by_position_request.create_http_request(@api_client,opts )
563
+ return data
564
+ end
565
+
566
+ # Finds and removes repeated substrings inside every cell of the chosen range, using user-defined or preset delimiters, while preserving formulas, formatting and data-validation.
567
+
568
+ def remove_duplicate_substrings( remove_duplicate_substrings_request, opts = {})
569
+
570
+ data, _status_code, _headers = remove_duplicate_substrings_request.create_http_request(@api_client,opts )
571
+ return data
572
+ end
573
+
536
574
  # Specify appending text to multiple cells at once, allowing you to add prefixes, suffixes, labels, or any specific characters. You can choose the exact position of the text—in the beginning, at the end, or before or after certain characters in the cell.
537
575
 
538
576
  def add_text( add_text_request, opts = {})
@@ -145,10 +145,6 @@ module AsposeCellsCloud
145
145
  if api_client.config.client_side_validation && position.nil?
146
146
  fail ArgumentError, "Missing the required parameter 'position' when calling CellsApi.add_text "
147
147
  end
148
- # verify the required parameter 'select_text' is set
149
- if api_client.config.client_side_validation && select_text.nil?
150
- fail ArgumentError, "Missing the required parameter 'select_text' when calling CellsApi.add_text "
151
- end
152
148
 
153
149
  # resource path
154
150
  local_var_path = "v4.0/cells/content/add/text"
@@ -0,0 +1,146 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ConvertSpreadsheetToJson_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 ConvertSpreadsheetToJsonRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :out_path
36
+ attr_accessor :out_storage_name
37
+ attr_accessor :fonts_location
38
+ attr_accessor :region
39
+ attr_accessor :password
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?(:'outPath')
52
+ self.out_path = attributes[:'outPath']
53
+ end
54
+
55
+ if attributes.has_key?(:'outStorageName')
56
+ self.out_storage_name = attributes[:'outStorageName']
57
+ end
58
+
59
+ if attributes.has_key?(:'fontsLocation')
60
+ self.fonts_location = attributes[:'fontsLocation']
61
+ end
62
+
63
+ if attributes.has_key?(:'region')
64
+ self.region = attributes[:'region']
65
+ end
66
+
67
+ if attributes.has_key?(:'password')
68
+ self.password = attributes[:'password']
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
+ :'out_path' => :'outPath',
77
+ :'out_storage_name' => :'outStorageName',
78
+ :'fonts_location' => :'fontsLocation',
79
+ :'region' => :'region',
80
+ :'password' => :'password'
81
+ }
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.swagger_types
86
+ {
87
+ :'spreadsheet' => :'String',
88
+ :'out_path' => :'String',
89
+ :'out_storage_name' => :'String',
90
+ :'fonts_location' => :'String',
91
+ :'region' => :'String',
92
+ :'password' => :'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.convert_spreadsheet_to_json ..."
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.convert_spreadsheet_to_json "
104
+ end
105
+
106
+ # resource path
107
+ local_var_path = "v4.0/cells/convert/spreadsheet/json"
108
+ # query parameters
109
+ query_params = {}
110
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
111
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
112
+ query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
113
+ query_params[:'region'] = self.region if !self.region.nil?
114
+ query_params[:'password'] = self.password if !self.password.nil?
115
+
116
+ # header parameters
117
+ header_params = {}
118
+ # HTTP header 'Accept' (if needed)
119
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
120
+ # HTTP header 'Content-Type'
121
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
122
+
123
+ # form parameters
124
+ form_params = {}
125
+ post_body = nil
126
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
127
+ if !spreadsheet.empty? && File.exist?(spreadsheet )
128
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
129
+ end
130
+
131
+ #auth_names = []
132
+ auth_names = ['JWT']
133
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => 'File')
140
+ if api_client.config.debugging
141
+ api_client.config.logger.debug "API called: Specification.Name>Api.convert_spreadsheet_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+ end
146
+ end
@@ -134,14 +134,6 @@ module AsposeCellsCloud
134
134
  if api_client.config.client_side_validation && convert_text_type.nil?
135
135
  fail ArgumentError, "Missing the required parameter 'convert_text_type' when calling CellsApi.convert_text "
136
136
  end
137
- # verify the required parameter 'source_characters' is set
138
- if api_client.config.client_side_validation && source_characters.nil?
139
- fail ArgumentError, "Missing the required parameter 'source_characters' when calling CellsApi.convert_text "
140
- end
141
- # verify the required parameter 'target_characters' is set
142
- if api_client.config.client_side_validation && target_characters.nil?
143
- fail ArgumentError, "Missing the required parameter 'target_characters' when calling CellsApi.convert_text "
144
- end
145
137
 
146
138
  # resource path
147
139
  local_var_path = "v4.0/cells/content/convert/text"
@@ -33,11 +33,11 @@ module AsposeCellsCloud
33
33
 
34
34
  attr_accessor :spreadsheet
35
35
  attr_accessor :extract_text_type
36
+ attr_accessor :out_position_range
36
37
  attr_accessor :before_text
37
38
  attr_accessor :after_text
38
39
  attr_accessor :before_position
39
40
  attr_accessor :after_position
40
- attr_accessor :out_position_range
41
41
  attr_accessor :worksheet
42
42
  attr_accessor :range
43
43
  attr_accessor :out_path
@@ -59,6 +59,10 @@ module AsposeCellsCloud
59
59
  self.extract_text_type = attributes[:'extractTextType']
60
60
  end
61
61
 
62
+ if attributes.has_key?(:'outPositionRange')
63
+ self.out_position_range = attributes[:'outPositionRange']
64
+ end
65
+
62
66
  if attributes.has_key?(:'beforeText')
63
67
  self.before_text = attributes[:'beforeText']
64
68
  end
@@ -75,10 +79,6 @@ module AsposeCellsCloud
75
79
  self.after_position = attributes[:'afterPosition']
76
80
  end
77
81
 
78
- if attributes.has_key?(:'outPositionRange')
79
- self.out_position_range = attributes[:'outPositionRange']
80
- end
81
-
82
82
  if attributes.has_key?(:'worksheet')
83
83
  self.worksheet = attributes[:'worksheet']
84
84
  end
@@ -109,11 +109,11 @@ module AsposeCellsCloud
109
109
  {
110
110
  :'spreadsheet' => :'Spreadsheet',
111
111
  :'extract_text_type' => :'extractTextType',
112
+ :'out_position_range' => :'outPositionRange',
112
113
  :'before_text' => :'beforeText',
113
114
  :'after_text' => :'afterText',
114
115
  :'before_position' => :'beforePosition',
115
116
  :'after_position' => :'afterPosition',
116
- :'out_position_range' => :'outPositionRange',
117
117
  :'worksheet' => :'worksheet',
118
118
  :'range' => :'range',
119
119
  :'out_path' => :'outPath',
@@ -128,11 +128,11 @@ module AsposeCellsCloud
128
128
  {
129
129
  :'spreadsheet' => :'String',
130
130
  :'extract_text_type' => :'String',
131
+ :'out_position_range' => :'String',
131
132
  :'before_text' => :'String',
132
133
  :'after_text' => :'String',
133
134
  :'before_position' => :'Integer',
134
135
  :'after_position' => :'Integer',
135
- :'out_position_range' => :'String',
136
136
  :'worksheet' => :'String',
137
137
  :'range' => :'String',
138
138
  :'out_path' => :'String',
@@ -155,22 +155,6 @@ module AsposeCellsCloud
155
155
  if api_client.config.client_side_validation && extract_text_type.nil?
156
156
  fail ArgumentError, "Missing the required parameter 'extract_text_type' when calling CellsApi.extract_text "
157
157
  end
158
- # verify the required parameter 'before_text' is set
159
- if api_client.config.client_side_validation && before_text.nil?
160
- fail ArgumentError, "Missing the required parameter 'before_text' when calling CellsApi.extract_text "
161
- end
162
- # verify the required parameter 'after_text' is set
163
- if api_client.config.client_side_validation && after_text.nil?
164
- fail ArgumentError, "Missing the required parameter 'after_text' when calling CellsApi.extract_text "
165
- end
166
- # verify the required parameter 'before_position' is set
167
- if api_client.config.client_side_validation && before_position.nil?
168
- fail ArgumentError, "Missing the required parameter 'before_position' when calling CellsApi.extract_text "
169
- end
170
- # verify the required parameter 'after_position' is set
171
- if api_client.config.client_side_validation && after_position.nil?
172
- fail ArgumentError, "Missing the required parameter 'after_position' when calling CellsApi.extract_text "
173
- end
174
158
  # verify the required parameter 'out_position_range' is set
175
159
  if api_client.config.client_side_validation && out_position_range.nil?
176
160
  fail ArgumentError, "Missing the required parameter 'out_position_range' when calling CellsApi.extract_text "
@@ -181,11 +165,11 @@ module AsposeCellsCloud
181
165
  # query parameters
182
166
  query_params = {}
183
167
  query_params[:'extractTextType'] = self.extract_text_type if !self.extract_text_type.nil?
168
+ query_params[:'outPositionRange'] = self.out_position_range if !self.out_position_range.nil?
184
169
  query_params[:'beforeText'] = self.before_text if !self.before_text.nil?
185
170
  query_params[:'afterText'] = self.after_text if !self.after_text.nil?
186
171
  query_params[:'beforePosition'] = self.before_position if !self.before_position.nil?
187
172
  query_params[:'afterPosition'] = self.after_position if !self.after_position.nil?
188
- query_params[:'outPositionRange'] = self.out_position_range if !self.out_position_range.nil?
189
173
  query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
190
174
  query_params[:'range'] = self.range if !self.range.nil?
191
175
  query_params[:'outPath'] = self.out_path if !self.out_path.nil?
@@ -0,0 +1,194 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="RemoveCharactersByPosition_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 RemoveCharactersByPositionRequest
33
+
34
+ attr_accessor :spreadsheet
35
+ attr_accessor :the_first_n_characters
36
+ attr_accessor :the_last_n_characters
37
+ attr_accessor :all_characters_before_text
38
+ attr_accessor :all_characters_after_text
39
+ attr_accessor :case_sensitive
40
+ attr_accessor :worksheet
41
+ attr_accessor :range
42
+ attr_accessor :out_path
43
+ attr_accessor :out_storage_name
44
+ attr_accessor :region
45
+ attr_accessor :password
46
+
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
52
+
53
+ if attributes.has_key?(:'Spreadsheet')
54
+ self.spreadsheet = attributes[:'Spreadsheet']
55
+ end
56
+
57
+ if attributes.has_key?(:'theFirstNCharacters')
58
+ self.the_first_n_characters = attributes[:'theFirstNCharacters']
59
+ end
60
+
61
+ if attributes.has_key?(:'theLastNCharacters')
62
+ self.the_last_n_characters = attributes[:'theLastNCharacters']
63
+ end
64
+
65
+ if attributes.has_key?(:'allCharactersBeforeText')
66
+ self.all_characters_before_text = attributes[:'allCharactersBeforeText']
67
+ end
68
+
69
+ if attributes.has_key?(:'allCharactersAfterText')
70
+ self.all_characters_after_text = attributes[:'allCharactersAfterText']
71
+ end
72
+
73
+ if attributes.has_key?(:'caseSensitive')
74
+ self.case_sensitive = attributes[:'caseSensitive']
75
+ end
76
+
77
+ if attributes.has_key?(:'worksheet')
78
+ self.worksheet = attributes[:'worksheet']
79
+ end
80
+
81
+ if attributes.has_key?(:'range')
82
+ self.range = attributes[:'range']
83
+ end
84
+
85
+ if attributes.has_key?(:'outPath')
86
+ self.out_path = attributes[:'outPath']
87
+ end
88
+
89
+ if attributes.has_key?(:'outStorageName')
90
+ self.out_storage_name = attributes[:'outStorageName']
91
+ end
92
+
93
+ if attributes.has_key?(:'region')
94
+ self.region = attributes[:'region']
95
+ end
96
+
97
+ if attributes.has_key?(:'password')
98
+ self.password = attributes[:'password']
99
+ end
100
+
101
+ end
102
+ # Attribute mapping from ruby-style variable name to JSON key.
103
+ def self.attribute_map
104
+ {
105
+ :'spreadsheet' => :'Spreadsheet',
106
+ :'the_first_n_characters' => :'theFirstNCharacters',
107
+ :'the_last_n_characters' => :'theLastNCharacters',
108
+ :'all_characters_before_text' => :'allCharactersBeforeText',
109
+ :'all_characters_after_text' => :'allCharactersAfterText',
110
+ :'case_sensitive' => :'caseSensitive',
111
+ :'worksheet' => :'worksheet',
112
+ :'range' => :'range',
113
+ :'out_path' => :'outPath',
114
+ :'out_storage_name' => :'outStorageName',
115
+ :'region' => :'region',
116
+ :'password' => :'password'
117
+ }
118
+ end
119
+
120
+ # Attribute type mapping.
121
+ def self.swagger_types
122
+ {
123
+ :'spreadsheet' => :'String',
124
+ :'the_first_n_characters' => :'Integer',
125
+ :'the_last_n_characters' => :'Integer',
126
+ :'all_characters_before_text' => :'String',
127
+ :'all_characters_after_text' => :'String',
128
+ :'case_sensitive' => :'BOOLEAN',
129
+ :'worksheet' => :'String',
130
+ :'range' => :'String',
131
+ :'out_path' => :'String',
132
+ :'out_storage_name' => :'String',
133
+ :'region' => :'String',
134
+ :'password' => :'String'
135
+ }
136
+ end
137
+
138
+ def create_http_request(api_client,opts = {})
139
+ if api_client.config.debugging
140
+ api_client.config.logger.debug "Calling API: CellsApi.remove_characters_by_position ..."
141
+ end
142
+ api_client.request_token_if_needed
143
+ # verify the required parameter 'spreadsheet' is set
144
+ if api_client.config.client_side_validation && spreadsheet.nil?
145
+ fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.remove_characters_by_position "
146
+ end
147
+
148
+ # resource path
149
+ local_var_path = "v4.0/cells/content/remove/characters-by-position"
150
+ # query parameters
151
+ query_params = {}
152
+ query_params[:'theFirstNCharacters'] = self.the_first_n_characters if !self.the_first_n_characters.nil?
153
+ query_params[:'theLastNCharacters'] = self.the_last_n_characters if !self.the_last_n_characters.nil?
154
+ query_params[:'allCharactersBeforeText'] = self.all_characters_before_text if !self.all_characters_before_text.nil?
155
+ query_params[:'allCharactersAfterText'] = self.all_characters_after_text if !self.all_characters_after_text.nil?
156
+ query_params[:'caseSensitive'] = self.case_sensitive if !self.case_sensitive.nil?
157
+ query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
158
+ query_params[:'range'] = self.range if !self.range.nil?
159
+ query_params[:'outPath'] = self.out_path if !self.out_path.nil?
160
+ query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
161
+ query_params[:'region'] = self.region if !self.region.nil?
162
+ query_params[:'password'] = self.password if !self.password.nil?
163
+
164
+ # header parameters
165
+ header_params = {}
166
+ # HTTP header 'Accept' (if needed)
167
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
168
+ # HTTP header 'Content-Type'
169
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
170
+
171
+ # form parameters
172
+ form_params = {}
173
+ post_body = nil
174
+ header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
175
+ if !spreadsheet.empty? && File.exist?(spreadsheet )
176
+ form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
177
+ end
178
+
179
+ #auth_names = []
180
+ auth_names = ['JWT']
181
+ data, status_code, headers = api_client.call_api(:PUT, local_var_path,
182
+ :header_params => header_params,
183
+ :query_params => query_params,
184
+ :form_params => form_params,
185
+ :body => post_body,
186
+ :auth_names => auth_names,
187
+ :return_type => 'File')
188
+ if api_client.config.debugging
189
+ api_client.config.logger.debug "API called: Specification.Name>Api.remove_characters_by_position\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
190
+ end
191
+ return data, status_code, headers
192
+ end
193
+ end
194
+ end