aspose_cells_cloud 24.9 → 24.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0ed9ffde4c5720d38ce2c83a23ed895c344a44bae73ad1ff0aefb4f4ecf0167
4
- data.tar.gz: 4492ebb6618270b0347cdd4e3b61622c77fe12bc680659373377bbbb8a3df963
3
+ metadata.gz: ca29cb3eab450bff26c40c566101e52667b7918860506c09be27573cb168f5ad
4
+ data.tar.gz: 20d14ce3809fb83b5bf461f709736252fbe0e13b62414c56598f2e7790111b0d
5
5
  SHA512:
6
- metadata.gz: fd81350bac60ecdf90e7fa82ddb80d77673039f2fdbf694d5418bc72e9c7866329241e2e6bc77c8b82b423f69f04d5a1c64339e8f8c6490808b2ea6d6394476b
7
- data.tar.gz: f2a8d44243c662b1dd3de7ae4e8d1b9bb9279969fecab3ec90d4a29fcdd4530651c7593a620664eb229cb96867ff8b2f5152566b829d777d1930f56b253d081d
6
+ metadata.gz: 690af03df81e004fade35ddde459c0dddcd5fc638f95b77458adc9ca8cd8e7dd7780e435af64887d8dc208f345b820804b0b3372f33140e16f6254cde041e8e1
7
+ data.tar.gz: 771f0f8273e561f89550fb96b2a4c945db5cad7ae9b1970f066c8f3051a28f3a6f77f02f372072e787ad378eb9d2aa4cf568b0957e70354fa76348a39f57e5a0
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](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/24.9)
1
+ ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](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/24.10)
2
2
 
3
3
 
4
4
  Aspose.Cells Cloud for Ruby enables you to handle various aspects of Excel files, including cell data, styles, formulas, charts, pivot tables, data validation, comments, drawing objects, images, hyperlinks, and so on. Additionally, it supports operations such as splitting, merging, repairing, and converting to other compatible file formats.
@@ -22,12 +22,12 @@ Enhance your Ruby applications with the [Aspose.Cells Cloud](https://products.as
22
22
  - 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.
23
23
 
24
24
 
25
- ## Feature & Enhancements in Version 24.9
25
+ ## Feature & Enhancements in Version 24.10
26
26
 
27
27
  Full list of issues covering all changes in this release:
28
28
 
29
- - Add word case function for TextProcessingController.
30
- - Support to export Worksheet to HTML with cell address or id.
29
+ - Add the new feature about removing characters on TextProcessingController.
30
+
31
31
 
32
32
  ## Support file format
33
33
 
@@ -126,6 +126,11 @@ request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>mapFiles,:for
126
126
 
127
127
  # Release history version
128
128
 
129
+ ## Enhancements in Version 24.9
130
+
131
+ - Add word case function for TextProcessingController.
132
+ - Support to export Worksheet to HTML with cell address or id.
133
+
129
134
  ## Enhancements in Version 24.8
130
135
 
131
136
  - Add text trim feature on Cells Cloud Services.
@@ -2094,6 +2094,13 @@ module AsposeCellsCloud
2094
2094
  return data
2095
2095
  end
2096
2096
 
2097
+
2098
+ def post_remove_characters( post_remove_characters_request, opts = {})
2099
+
2100
+ data, _status_code, _headers = post_remove_characters_request.create_http_request(@api_client,opts )
2101
+ return data
2102
+ end
2103
+
2097
2104
  # Retrieve the description of the default style for the workbook .
2098
2105
 
2099
2106
  def get_workbook_default_style( get_workbook_default_style_request, opts = {})
@@ -0,0 +1,234 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="RemoveCharactersByCharacterrb.cs">
4
+ Copyright (c) 2024 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 'date'
30
+
31
+ module AsposeCellsCloud
32
+
33
+ class RemoveCharactersByCharacter
34
+ #
35
+ attr_accessor :remove_text_method
36
+ #
37
+ attr_accessor :remove_characters
38
+ #
39
+ attr_accessor :remove_character_sets_type
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'remove_text_method' => :'RemoveTextMethod',
45
+ :'remove_characters' => :'RemoveCharacters',
46
+ :'remove_character_sets_type' => :'RemoveCharacterSetsType'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'remove_text_method' => :'String',
54
+ :'remove_characters' => :'Array<String>',
55
+ :'remove_character_sets_type' => :'String'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ return unless attributes.is_a?(Hash)
63
+
64
+ # convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+
67
+ if attributes.has_key?(:'RemoveTextMethod')
68
+ self.remove_text_method = attributes[:'RemoveTextMethod']
69
+ end
70
+ if attributes.has_key?(:'RemoveCharacters')
71
+ self.remove_characters = attributes[:'RemoveCharacters']
72
+ end
73
+ if attributes.has_key?(:'RemoveCharacterSetsType')
74
+ self.remove_character_sets_type = attributes[:'RemoveCharacterSetsType']
75
+ end
76
+
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properies with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if @remove_text_method.nil?
84
+ invalid_properties.push("invalid value for 'remove_text_method', remove_text_method cannot be nil.")
85
+ end
86
+ if @remove_characters.nil?
87
+ invalid_properties.push("invalid value for 'remove_characters', remove_characters cannot be nil.")
88
+ end
89
+ if @remove_character_sets_type.nil?
90
+ invalid_properties.push("invalid value for 'remove_character_sets_type', remove_character_sets_type cannot be nil.")
91
+ end
92
+
93
+ return invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if @remove_text_method.nil?
100
+ return false if @remove_characters.nil?
101
+ return false if @remove_character_sets_type.nil?
102
+ return true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ remove_text_method == o.remove_text_method &&
111
+ remove_characters == o.remove_characters &&
112
+ remove_character_sets_type == o.remove_character_sets_type
113
+ std_dev == o.std_dev
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Fixnum] Hash code
124
+ def hash
125
+ [ remove_text_method , remove_characters , remove_character_sets_type ].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ self.class.swagger_types.each_pair do |key, type|
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
138
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
139
+ end
140
+ elsif !attributes[self.class.attribute_map[key]].nil?
141
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
143
+ end
144
+
145
+ self
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def _deserialize(type, value)
153
+ case type.to_sym
154
+ when :DateTime
155
+ DateTime.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :BOOLEAN
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ temp_model = AsposeCellsCloud.const_get(type).new
186
+ temp_model.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map{ |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -0,0 +1,246 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="RemoveCharactersByPositionrb.cs">
4
+ Copyright (c) 2024 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 'date'
30
+
31
+ module AsposeCellsCloud
32
+
33
+ class RemoveCharactersByPosition
34
+ #
35
+ attr_accessor :the_first_n_characters
36
+ #
37
+ attr_accessor :the_last_n_characters
38
+ #
39
+ attr_accessor :all_characters_before_text
40
+ #
41
+ attr_accessor :all_characters_after_text
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'the_first_n_characters' => :'TheFirstNCharacters',
47
+ :'the_last_n_characters' => :'TheLastNCharacters',
48
+ :'all_characters_before_text' => :'AllCharactersBeforeText',
49
+ :'all_characters_after_text' => :'AllCharactersAfterText'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'the_first_n_characters' => :'Integer',
57
+ :'the_last_n_characters' => :'Integer',
58
+ :'all_characters_before_text' => :'String',
59
+ :'all_characters_after_text' => :'String'
60
+ }
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ return unless attributes.is_a?(Hash)
67
+
68
+ # convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
70
+
71
+ if attributes.has_key?(:'TheFirstNCharacters')
72
+ self.the_first_n_characters = attributes[:'TheFirstNCharacters']
73
+ end
74
+ if attributes.has_key?(:'TheLastNCharacters')
75
+ self.the_last_n_characters = attributes[:'TheLastNCharacters']
76
+ end
77
+ if attributes.has_key?(:'AllCharactersBeforeText')
78
+ self.all_characters_before_text = attributes[:'AllCharactersBeforeText']
79
+ end
80
+ if attributes.has_key?(:'AllCharactersAfterText')
81
+ self.all_characters_after_text = attributes[:'AllCharactersAfterText']
82
+ end
83
+
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properies with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ if @the_first_n_characters.nil?
91
+ invalid_properties.push("invalid value for 'the_first_n_characters', the_first_n_characters cannot be nil.")
92
+ end
93
+ if @the_last_n_characters.nil?
94
+ invalid_properties.push("invalid value for 'the_last_n_characters', the_last_n_characters cannot be nil.")
95
+ end
96
+ if @all_characters_before_text.nil?
97
+ invalid_properties.push("invalid value for 'all_characters_before_text', all_characters_before_text cannot be nil.")
98
+ end
99
+ if @all_characters_after_text.nil?
100
+ invalid_properties.push("invalid value for 'all_characters_after_text', all_characters_after_text cannot be nil.")
101
+ end
102
+
103
+ return invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ return false if @the_first_n_characters.nil?
110
+ return false if @the_last_n_characters.nil?
111
+ return false if @all_characters_before_text.nil?
112
+ return false if @all_characters_after_text.nil?
113
+ return true
114
+ end
115
+
116
+ # Checks equality by comparing each attribute.
117
+ # @param [Object] Object to be compared
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ the_first_n_characters == o.the_first_n_characters &&
122
+ the_last_n_characters == o.the_last_n_characters &&
123
+ all_characters_before_text == o.all_characters_before_text &&
124
+ all_characters_after_text == o.all_characters_after_text
125
+ std_dev == o.std_dev
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [ the_first_n_characters , the_last_n_characters , all_characters_before_text , all_characters_after_text ].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = AsposeCellsCloud.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map{ |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+
246
+ end
@@ -0,0 +1,282 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="RemoveCharactersOptionsrb.cs">
4
+ Copyright (c) 2024 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 'date'
30
+
31
+ module AsposeCellsCloud
32
+
33
+ class RemoveCharactersOptions
34
+ #
35
+ attr_accessor :name
36
+ #
37
+ attr_accessor :data_source
38
+ #
39
+ attr_accessor :file_info
40
+ #
41
+ attr_accessor :worksheet
42
+ #
43
+ attr_accessor :range
44
+ #
45
+ attr_accessor :remove_characters_by_character
46
+ #
47
+ attr_accessor :remove_characters_by_position
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'name' => :'Name',
53
+ :'data_source' => :'DataSource',
54
+ :'file_info' => :'FileInfo',
55
+ :'worksheet' => :'Worksheet',
56
+ :'range' => :'Range',
57
+ :'remove_characters_by_character' => :'RemoveCharactersByCharacter',
58
+ :'remove_characters_by_position' => :'RemoveCharactersByPosition'
59
+ }
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.swagger_types
64
+ {
65
+ :'name' => :'String',
66
+ :'data_source' => :'DataSource',
67
+ :'file_info' => :'FileInfo',
68
+ :'worksheet' => :'String',
69
+ :'range' => :'String',
70
+ :'remove_characters_by_character' => :'RemoveCharactersByCharacter',
71
+ :'remove_characters_by_position' => :'RemoveCharactersByPosition'
72
+ }
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ return unless attributes.is_a?(Hash)
79
+
80
+ # convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
82
+
83
+ if attributes.has_key?(:'Name')
84
+ self.name = attributes[:'Name']
85
+ end
86
+ if attributes.has_key?(:'DataSource')
87
+ self.data_source = attributes[:'DataSource']
88
+ end
89
+ if attributes.has_key?(:'FileInfo')
90
+ self.file_info = attributes[:'FileInfo']
91
+ end
92
+ if attributes.has_key?(:'Worksheet')
93
+ self.worksheet = attributes[:'Worksheet']
94
+ end
95
+ if attributes.has_key?(:'Range')
96
+ self.range = attributes[:'Range']
97
+ end
98
+ if attributes.has_key?(:'RemoveCharactersByCharacter')
99
+ self.remove_characters_by_character = attributes[:'RemoveCharactersByCharacter']
100
+ end
101
+ if attributes.has_key?(:'RemoveCharactersByPosition')
102
+ self.remove_characters_by_position = attributes[:'RemoveCharactersByPosition']
103
+ end
104
+
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properies with the reasons
109
+ def list_invalid_properties
110
+ invalid_properties = Array.new
111
+ if @name.nil?
112
+ invalid_properties.push("invalid value for 'name', name cannot be nil.")
113
+ end
114
+ if @data_source.nil?
115
+ invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
116
+ end
117
+ if @file_info.nil?
118
+ invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
119
+ end
120
+ if @worksheet.nil?
121
+ invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
122
+ end
123
+ if @range.nil?
124
+ invalid_properties.push("invalid value for 'range', range cannot be nil.")
125
+ end
126
+ if @remove_characters_by_character.nil?
127
+ invalid_properties.push("invalid value for 'remove_characters_by_character', remove_characters_by_character cannot be nil.")
128
+ end
129
+ if @remove_characters_by_position.nil?
130
+ invalid_properties.push("invalid value for 'remove_characters_by_position', remove_characters_by_position cannot be nil.")
131
+ end
132
+
133
+ return invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ return false if @name.nil?
140
+ return false if @data_source.nil?
141
+ return false if @file_info.nil?
142
+ return false if @worksheet.nil?
143
+ return false if @range.nil?
144
+ return false if @remove_characters_by_character.nil?
145
+ return false if @remove_characters_by_position.nil?
146
+ return true
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ name == o.name &&
155
+ data_source == o.data_source &&
156
+ file_info == o.file_info &&
157
+ worksheet == o.worksheet &&
158
+ range == o.range &&
159
+ remove_characters_by_character == o.remove_characters_by_character &&
160
+ remove_characters_by_position == o.remove_characters_by_position
161
+ std_dev == o.std_dev
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Fixnum] Hash code
172
+ def hash
173
+ [ name , data_source , file_info , worksheet , range , remove_characters_by_character , remove_characters_by_position ].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def build_from_hash(attributes)
180
+ return nil unless attributes.is_a?(Hash)
181
+ self.class.swagger_types.each_pair do |key, type|
182
+ if type =~ /\AArray<(.*)>/i
183
+ # check to ensure the input is an array given that the the attribute
184
+ # is documented as an array but the input is not
185
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
186
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
187
+ end
188
+ elsif !attributes[self.class.attribute_map[key]].nil?
189
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
190
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
191
+ end
192
+
193
+ self
194
+ end
195
+
196
+ # Deserializes the data based on type
197
+ # @param string type Data type
198
+ # @param string value Value to be deserialized
199
+ # @return [Object] Deserialized data
200
+ def _deserialize(type, value)
201
+ case type.to_sym
202
+ when :DateTime
203
+ DateTime.parse(value)
204
+ when :Date
205
+ Date.parse(value)
206
+ when :String
207
+ value.to_s
208
+ when :Integer
209
+ value.to_i
210
+ when :Float
211
+ value.to_f
212
+ when :BOOLEAN
213
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
214
+ true
215
+ else
216
+ false
217
+ end
218
+ when :Object
219
+ # generic object (usually a Hash), return directly
220
+ value
221
+ when /\AArray<(?<inner_type>.+)>\z/
222
+ inner_type = Regexp.last_match[:inner_type]
223
+ value.map { |v| _deserialize(inner_type, v) }
224
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
225
+ k_type = Regexp.last_match[:k_type]
226
+ v_type = Regexp.last_match[:v_type]
227
+ {}.tap do |hash|
228
+ value.each do |k, v|
229
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
230
+ end
231
+ end
232
+ else # model
233
+ temp_model = AsposeCellsCloud.const_get(type).new
234
+ temp_model.build_from_hash(value)
235
+ end
236
+ end
237
+
238
+ # Returns the string representation of the object
239
+ # @return [String] String presentation of the object
240
+ def to_s
241
+ to_hash.to_s
242
+ end
243
+
244
+ # to_body is an alias to to_hash (backward compatibility)
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_body
247
+ to_hash
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ next if value.nil?
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map{ |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+
282
+ end
@@ -0,0 +1,103 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="PostRemoveCharacters_request.rb.cs">
4
+ Copyright (c) 2024 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 PostRemoveCharactersRequest
33
+
34
+ attr_accessor :remove_characters_options
35
+
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
41
+
42
+ if attributes.has_key?(:'removeCharactersOptions')
43
+ self.remove_characters_options = attributes[:'removeCharactersOptions']
44
+ end
45
+
46
+ end
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'remove_characters_options' => :'removeCharactersOptions'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'remove_characters_options' => :'RemoveCharactersOptions'
58
+ }
59
+ end
60
+
61
+ def create_http_request(api_client,opts = {})
62
+ if api_client.config.debugging
63
+ api_client.config.logger.debug "Calling API: CellsApi.post_remove_characters ..."
64
+ end
65
+ api_client.request_token_if_needed
66
+ # verify the required parameter 'remove_characters_options' is set
67
+ if api_client.config.client_side_validation && remove_characters_options.nil?
68
+ fail ArgumentError, "Missing the required parameter 'remove_characters_options' when calling CellsApi.post_remove_characters "
69
+ end
70
+
71
+ # resource path
72
+ local_var_path = "/cells/removecharacters"
73
+ # query parameters
74
+ query_params = {}
75
+ # header parameters
76
+ header_params = {}
77
+ # HTTP header 'Accept' (if needed)
78
+ header_params['Accept'] = api_client.select_header_accept(['application/json'])
79
+ # HTTP header 'Content-Type'
80
+ header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
81
+
82
+ # form parameters
83
+ form_params = {}
84
+ post_body = nil
85
+ post_body = api_client.object_to_http_body(remove_characters_options)
86
+
87
+
88
+ #auth_names = []
89
+ auth_names = ['JWT']
90
+ data, status_code, headers = api_client.call_api(:POST, local_var_path,
91
+ :header_params => header_params,
92
+ :query_params => query_params,
93
+ :form_params => form_params,
94
+ :body => post_body,
95
+ :auth_names => auth_names,
96
+ :return_type => 'FileInfo')
97
+ if api_client.config.debugging
98
+ api_client.config.logger.debug "API called: Specification.Name>Api.post_remove_characters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
+ end
100
+ return data, status_code, headers
101
+ end
102
+ end
103
+ end
@@ -27,5 +27,5 @@
27
27
 
28
28
 
29
29
  module AsposeCellsCloud
30
- VERSION = "24.9"
30
+ VERSION = "24.10"
31
31
  end
@@ -351,6 +351,9 @@ require 'aspose_cells_cloud/models/pivot_table'
351
351
  require 'aspose_cells_cloud/models/pivot_tables'
352
352
  require 'aspose_cells_cloud/models/add_text_options'
353
353
  require 'aspose_cells_cloud/models/base_operate_options'
354
+ require 'aspose_cells_cloud/models/remove_characters_by_character'
355
+ require 'aspose_cells_cloud/models/remove_characters_by_position'
356
+ require 'aspose_cells_cloud/models/remove_characters_options'
354
357
  require 'aspose_cells_cloud/models/scope_item'
355
358
  require 'aspose_cells_cloud/models/scope_options'
356
359
  require 'aspose_cells_cloud/models/trim_content_options'
@@ -706,6 +709,7 @@ require 'aspose_cells_cloud/requests/post_run_task_request'
706
709
  require 'aspose_cells_cloud/requests/post_add_text_content_request'
707
710
  require 'aspose_cells_cloud/requests/post_trim_content_request'
708
711
  require 'aspose_cells_cloud/requests/post_update_word_case_request'
712
+ require 'aspose_cells_cloud/requests/post_remove_characters_request'
709
713
  require 'aspose_cells_cloud/requests/get_workbook_default_style_request'
710
714
  require 'aspose_cells_cloud/requests/get_workbook_text_items_request'
711
715
  require 'aspose_cells_cloud/requests/get_workbook_names_request'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_cells_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '24.9'
4
+ version: '24.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aspose Cells Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-18 00:00:00.000000000 Z
11
+ date: 2024-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -534,6 +534,9 @@ files:
534
534
  - lib/aspose_cells_cloud/models/ranges_response.rb
535
535
  - lib/aspose_cells_cloud/models/rectangle_shape.rb
536
536
  - lib/aspose_cells_cloud/models/rectangle_shape_response.rb
537
+ - lib/aspose_cells_cloud/models/remove_characters_by_character.rb
538
+ - lib/aspose_cells_cloud/models/remove_characters_by_position.rb
539
+ - lib/aspose_cells_cloud/models/remove_characters_options.rb
537
540
  - lib/aspose_cells_cloud/models/rendering_font.rb
538
541
  - lib/aspose_cells_cloud/models/rendering_watermark.rb
539
542
  - lib/aspose_cells_cloud/models/result_destination.rb
@@ -864,6 +867,7 @@ files:
864
867
  - lib/aspose_cells_cloud/requests/post_pivot_table_update_pivot_fields_request.rb
865
868
  - lib/aspose_cells_cloud/requests/post_protect_request.rb
866
869
  - lib/aspose_cells_cloud/requests/post_protect_workbook_request.rb
870
+ - lib/aspose_cells_cloud/requests/post_remove_characters_request.rb
867
871
  - lib/aspose_cells_cloud/requests/post_rename_worksheet_request.rb
868
872
  - lib/aspose_cells_cloud/requests/post_repair_request.rb
869
873
  - lib/aspose_cells_cloud/requests/post_replace_request.rb