aspose_cells_cloud 24.7 → 24.8

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: c8627c7cc03570128cb4a1a912df4d894b7d2f1cadadad9ca3c9c32002a68531
4
- data.tar.gz: 90b5eef427393fb9d1b3955d5d435186faa663779a9fd4e0c5ab9e8fc8350846
3
+ metadata.gz: ec919c4c4c70d01f602512a48d0b30a9b4d99ce0b704ad72e557f2fba4d555ac
4
+ data.tar.gz: a7fb6162caecb1074f8e36968733adaffb0eaf4545961cd4ff0151f5960bdcaa
5
5
  SHA512:
6
- metadata.gz: 83bc4d429778fe562d0c8c2101280755f0a2df5df5107a467e136bffb94068c0cde18f8697b9453b6c072a37cc7d7296b1d67f11d036cb33fca3dc186d2c007d
7
- data.tar.gz: 31485a0800377deb9d63314c1b4abeb979463f45ea9337ddf6afc36b9ec860660ae863a1936ccfbd43f8e5fd46820c3f472b4a515f83cd292c44b65b4d734064
6
+ metadata.gz: 0f4e851ab86e6c9ccb2c5b5dd652a8954068b77f92747a1ca91c2c9b06dc678a19f6f37305c7b6f0ca6194a040484393fd1ed48e0028c070be501ee41e90fde2
7
+ data.tar.gz: defc2e78b5da7c73a70482af12cfeff4a5c7f8e5ce8daa6bb122423ea0458dde5c8aac57dcee56454d4c89e6073fe1737508c119652cbba17f14bed733718697
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.7)
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.8)
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,11 @@ 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.7
25
+ ## Feature & Enhancements in Version 24.8
26
26
 
27
27
  Full list of issues covering all changes in this release:
28
28
 
29
- - Add a new feature about adding text content.
30
- - Add get access token by client id and client secret.
29
+ - Add text trim feature on Cells Cloud Services.
31
30
 
32
31
  ## Support file format
33
32
 
@@ -126,6 +125,11 @@ request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>mapFiles,:for
126
125
 
127
126
  # Release history version
128
127
 
128
+ ## Enhancements in Version 24.7
129
+
130
+ - Add a new feature about adding text content.
131
+ - Add get access token by client id and client secret.
132
+
129
133
  ## Enhancements in Version 24.6
130
134
 
131
135
  - Optimize load data function of data transformation.
@@ -2080,6 +2080,13 @@ module AsposeCellsCloud
2080
2080
  return data
2081
2081
  end
2082
2082
 
2083
+
2084
+ def post_trim_content( post_trim_content_request, opts = {})
2085
+
2086
+ data, _status_code, _headers = post_trim_content_request.create_http_request(@api_client,opts )
2087
+ return data
2088
+ end
2089
+
2083
2090
  # Retrieve the description of the default style for the workbook .
2084
2091
 
2085
2092
  def get_workbook_default_style( get_workbook_default_style_request, opts = {})
@@ -440,13 +440,14 @@ module AsposeCellsCloud
440
440
  end
441
441
 
442
442
  # resource path
443
- local_var_path = "/connect/token"
443
+ local_var_path = "/cells/connect/token"
444
444
  if @config.api_version === "v1.1"
445
445
  local_var_path ="/oauth2/token"
446
446
  end
447
- url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
448
- #url = build_request_url(local_var_path).gsub('/v3.0', '')
449
-
447
+ url = build_request_url(local_var_path)
448
+ # url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
449
+ # url = build_request_url(local_var_path).gsub('/v3.0', '')
450
+ # print url
450
451
  # header parameters
451
452
  header_params = {}
452
453
  # HTTP header 'Content-Type'
@@ -0,0 +1,222 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ScopeItemrb.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 ScopeItem
34
+ #
35
+ attr_accessor :worksheet_name
36
+ #
37
+ attr_accessor :ranges
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'worksheet_name' => :'WorksheetName',
43
+ :'ranges' => :'Ranges'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'worksheet_name' => :'String',
51
+ :'ranges' => :'Array<String>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'WorksheetName')
64
+ self.worksheet_name = attributes[:'WorksheetName']
65
+ end
66
+ if attributes.has_key?(:'Ranges')
67
+ self.ranges = attributes[:'Ranges']
68
+ end
69
+
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properies with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @worksheet_name.nil?
77
+ invalid_properties.push("invalid value for 'worksheet_name', worksheet_name cannot be nil.")
78
+ end
79
+ if @ranges.nil?
80
+ invalid_properties.push("invalid value for 'ranges', ranges cannot be nil.")
81
+ end
82
+
83
+ return invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ return false if @worksheet_name.nil?
90
+ return false if @ranges.nil?
91
+ return true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ worksheet_name == o.worksheet_name &&
100
+ ranges == o.ranges
101
+ std_dev == o.std_dev
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [ worksheet_name , ranges ].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = AsposeCellsCloud.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map{ |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -0,0 +1,222 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="ScopeOptionsrb.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 ScopeOptions
34
+ #
35
+ attr_accessor :scope
36
+ #
37
+ attr_accessor :scope_items
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'scope' => :'Scope',
43
+ :'scope_items' => :'ScopeItems'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'scope' => :'String',
51
+ :'scope_items' => :'Array<ScopeItem>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'Scope')
64
+ self.scope = attributes[:'Scope']
65
+ end
66
+ if attributes.has_key?(:'ScopeItems')
67
+ self.scope_items = attributes[:'ScopeItems']
68
+ end
69
+
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properies with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @scope.nil?
77
+ invalid_properties.push("invalid value for 'scope', scope cannot be nil.")
78
+ end
79
+ if @scope_items.nil?
80
+ invalid_properties.push("invalid value for 'scope_items', scope_items cannot be nil.")
81
+ end
82
+
83
+ return invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ return false if @scope.nil?
90
+ return false if @scope_items.nil?
91
+ return true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ scope == o.scope &&
100
+ scope_items == o.scope_items
101
+ std_dev == o.std_dev
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [ scope , scope_items ].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = AsposeCellsCloud.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map{ |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -0,0 +1,318 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="TrimContentOptionsrb.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 TrimContentOptions
34
+ #
35
+ attr_accessor :data_source
36
+ #
37
+ attr_accessor :file_info
38
+ #
39
+ attr_accessor :trim_content
40
+ #
41
+ attr_accessor :trim_leading
42
+ #
43
+ attr_accessor :trim_trailing
44
+ #
45
+ attr_accessor :trim_space_between_word_to1
46
+ #
47
+ attr_accessor :trim_non_breaking_spaces
48
+ #
49
+ attr_accessor :remove_extra_line_breaks
50
+ #
51
+ attr_accessor :remove_all_line_breaks
52
+ #
53
+ attr_accessor :scope_options
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'data_source' => :'DataSource',
59
+ :'file_info' => :'FileInfo',
60
+ :'trim_content' => :'TrimContent',
61
+ :'trim_leading' => :'TrimLeading',
62
+ :'trim_trailing' => :'TrimTrailing',
63
+ :'trim_space_between_word_to1' => :'TrimSpaceBetweenWordTo1',
64
+ :'trim_non_breaking_spaces' => :'TrimNonBreakingSpaces',
65
+ :'remove_extra_line_breaks' => :'RemoveExtraLineBreaks',
66
+ :'remove_all_line_breaks' => :'RemoveAllLineBreaks',
67
+ :'scope_options' => :'ScopeOptions'
68
+ }
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.swagger_types
73
+ {
74
+ :'data_source' => :'DataSource',
75
+ :'file_info' => :'FileInfo',
76
+ :'trim_content' => :'String',
77
+ :'trim_leading' => :'BOOLEAN',
78
+ :'trim_trailing' => :'BOOLEAN',
79
+ :'trim_space_between_word_to1' => :'BOOLEAN',
80
+ :'trim_non_breaking_spaces' => :'BOOLEAN',
81
+ :'remove_extra_line_breaks' => :'BOOLEAN',
82
+ :'remove_all_line_breaks' => :'BOOLEAN',
83
+ :'scope_options' => :'ScopeOptions'
84
+ }
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ return unless attributes.is_a?(Hash)
91
+
92
+ # convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
94
+
95
+ if attributes.has_key?(:'DataSource')
96
+ self.data_source = attributes[:'DataSource']
97
+ end
98
+ if attributes.has_key?(:'FileInfo')
99
+ self.file_info = attributes[:'FileInfo']
100
+ end
101
+ if attributes.has_key?(:'TrimContent')
102
+ self.trim_content = attributes[:'TrimContent']
103
+ end
104
+ if attributes.has_key?(:'TrimLeading')
105
+ self.trim_leading = attributes[:'TrimLeading']
106
+ end
107
+ if attributes.has_key?(:'TrimTrailing')
108
+ self.trim_trailing = attributes[:'TrimTrailing']
109
+ end
110
+ if attributes.has_key?(:'TrimSpaceBetweenWordTo1')
111
+ self.trim_space_between_word_to1 = attributes[:'TrimSpaceBetweenWordTo1']
112
+ end
113
+ if attributes.has_key?(:'TrimNonBreakingSpaces')
114
+ self.trim_non_breaking_spaces = attributes[:'TrimNonBreakingSpaces']
115
+ end
116
+ if attributes.has_key?(:'RemoveExtraLineBreaks')
117
+ self.remove_extra_line_breaks = attributes[:'RemoveExtraLineBreaks']
118
+ end
119
+ if attributes.has_key?(:'RemoveAllLineBreaks')
120
+ self.remove_all_line_breaks = attributes[:'RemoveAllLineBreaks']
121
+ end
122
+ if attributes.has_key?(:'ScopeOptions')
123
+ self.scope_options = attributes[:'ScopeOptions']
124
+ end
125
+
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properies with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+ if @data_source.nil?
133
+ invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
134
+ end
135
+ if @file_info.nil?
136
+ invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
137
+ end
138
+ if @trim_content.nil?
139
+ invalid_properties.push("invalid value for 'trim_content', trim_content cannot be nil.")
140
+ end
141
+ if @trim_leading.nil?
142
+ invalid_properties.push("invalid value for 'trim_leading', trim_leading cannot be nil.")
143
+ end
144
+ if @trim_trailing.nil?
145
+ invalid_properties.push("invalid value for 'trim_trailing', trim_trailing cannot be nil.")
146
+ end
147
+ if @trim_space_between_word_to1.nil?
148
+ invalid_properties.push("invalid value for 'trim_space_between_word_to1', trim_space_between_word_to1 cannot be nil.")
149
+ end
150
+ if @trim_non_breaking_spaces.nil?
151
+ invalid_properties.push("invalid value for 'trim_non_breaking_spaces', trim_non_breaking_spaces cannot be nil.")
152
+ end
153
+ if @remove_extra_line_breaks.nil?
154
+ invalid_properties.push("invalid value for 'remove_extra_line_breaks', remove_extra_line_breaks cannot be nil.")
155
+ end
156
+ if @remove_all_line_breaks.nil?
157
+ invalid_properties.push("invalid value for 'remove_all_line_breaks', remove_all_line_breaks cannot be nil.")
158
+ end
159
+ if @scope_options.nil?
160
+ invalid_properties.push("invalid value for 'scope_options', scope_options cannot be nil.")
161
+ end
162
+
163
+ return invalid_properties
164
+ end
165
+
166
+ # Check to see if the all the properties in the model are valid
167
+ # @return true if the model is valid
168
+ def valid?
169
+ return false if @data_source.nil?
170
+ return false if @file_info.nil?
171
+ return false if @trim_content.nil?
172
+ return false if @trim_leading.nil?
173
+ return false if @trim_trailing.nil?
174
+ return false if @trim_space_between_word_to1.nil?
175
+ return false if @trim_non_breaking_spaces.nil?
176
+ return false if @remove_extra_line_breaks.nil?
177
+ return false if @remove_all_line_breaks.nil?
178
+ return false if @scope_options.nil?
179
+ return true
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(o)
185
+ return true if self.equal?(o)
186
+ self.class == o.class &&
187
+ data_source == o.data_source &&
188
+ file_info == o.file_info &&
189
+ trim_content == o.trim_content &&
190
+ trim_leading == o.trim_leading &&
191
+ trim_trailing == o.trim_trailing &&
192
+ trim_space_between_word_to1 == o.trim_space_between_word_to1 &&
193
+ trim_non_breaking_spaces == o.trim_non_breaking_spaces &&
194
+ remove_extra_line_breaks == o.remove_extra_line_breaks &&
195
+ remove_all_line_breaks == o.remove_all_line_breaks &&
196
+ scope_options == o.scope_options
197
+ std_dev == o.std_dev
198
+ end
199
+
200
+ # @see the `==` method
201
+ # @param [Object] Object to be compared
202
+ def eql?(o)
203
+ self == o
204
+ end
205
+
206
+ # Calculates hash code according to all attributes.
207
+ # @return [Fixnum] Hash code
208
+ def hash
209
+ [ data_source , file_info , trim_content , trim_leading , trim_trailing , trim_space_between_word_to1 , trim_non_breaking_spaces , remove_extra_line_breaks , remove_all_line_breaks , scope_options ].hash
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ self.class.swagger_types.each_pair do |key, type|
218
+ if type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
222
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
223
+ end
224
+ elsif !attributes[self.class.attribute_map[key]].nil?
225
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
226
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
227
+ end
228
+
229
+ self
230
+ end
231
+
232
+ # Deserializes the data based on type
233
+ # @param string type Data type
234
+ # @param string value Value to be deserialized
235
+ # @return [Object] Deserialized data
236
+ def _deserialize(type, value)
237
+ case type.to_sym
238
+ when :DateTime
239
+ DateTime.parse(value)
240
+ when :Date
241
+ Date.parse(value)
242
+ when :String
243
+ value.to_s
244
+ when :Integer
245
+ value.to_i
246
+ when :Float
247
+ value.to_f
248
+ when :BOOLEAN
249
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
250
+ true
251
+ else
252
+ false
253
+ end
254
+ when :Object
255
+ # generic object (usually a Hash), return directly
256
+ value
257
+ when /\AArray<(?<inner_type>.+)>\z/
258
+ inner_type = Regexp.last_match[:inner_type]
259
+ value.map { |v| _deserialize(inner_type, v) }
260
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
261
+ k_type = Regexp.last_match[:k_type]
262
+ v_type = Regexp.last_match[:v_type]
263
+ {}.tap do |hash|
264
+ value.each do |k, v|
265
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
266
+ end
267
+ end
268
+ else # model
269
+ temp_model = AsposeCellsCloud.const_get(type).new
270
+ temp_model.build_from_hash(value)
271
+ end
272
+ end
273
+
274
+ # Returns the string representation of the object
275
+ # @return [String] String presentation of the object
276
+ def to_s
277
+ to_hash.to_s
278
+ end
279
+
280
+ # to_body is an alias to to_hash (backward compatibility)
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_body
283
+ to_hash
284
+ end
285
+
286
+ # Returns the object in the form of hash
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_hash
289
+ hash = {}
290
+ self.class.attribute_map.each_pair do |attr, param|
291
+ value = self.send(attr)
292
+ next if value.nil?
293
+ hash[param] = _to_hash(value)
294
+ end
295
+ hash
296
+ end
297
+
298
+ # Outputs non-array value in the form of hash
299
+ # For object, use to_hash. Otherwise, just return the value
300
+ # @param [Object] value Any valid value
301
+ # @return [Hash] Returns the value in the form of hash
302
+ def _to_hash(value)
303
+ if value.is_a?(Array)
304
+ value.compact.map{ |v| _to_hash(v) }
305
+ elsif value.is_a?(Hash)
306
+ {}.tap do |hash|
307
+ value.each { |k, v| hash[k] = _to_hash(v) }
308
+ end
309
+ elsif value.respond_to? :to_hash
310
+ value.to_hash
311
+ else
312
+ value
313
+ end
314
+ end
315
+
316
+ end
317
+
318
+ end
@@ -0,0 +1,103 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="PostTrimContent_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 PostTrimContentRequest
33
+
34
+ attr_accessor :trim_content_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?(:'trimContentOptions')
43
+ self.trim_content_options = attributes[:'trimContentOptions']
44
+ end
45
+
46
+ end
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'trim_content_options' => :'trimContentOptions'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'trim_content_options' => :'TrimContentOptions'
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_trim_content ..."
64
+ end
65
+ api_client.request_token_if_needed
66
+ # verify the required parameter 'trim_content_options' is set
67
+ if api_client.config.client_side_validation && trim_content_options.nil?
68
+ fail ArgumentError, "Missing the required parameter 'trim_content_options' when calling CellsApi.post_trim_content "
69
+ end
70
+
71
+ # resource path
72
+ local_var_path = "/cells/trimcontent"
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(trim_content_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_trim_content\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.7"
30
+ VERSION = "24.8"
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/scope_item'
355
+ require 'aspose_cells_cloud/models/scope_options'
356
+ require 'aspose_cells_cloud/models/trim_content_options'
354
357
  require 'aspose_cells_cloud/models/cell_value'
355
358
  require 'aspose_cells_cloud/models/custom_parser_config'
356
359
  require 'aspose_cells_cloud/models/import2_dimension_double_array_option'
@@ -700,6 +703,7 @@ require 'aspose_cells_cloud/requests/put_worksheet_sparkline_group_request'
700
703
  require 'aspose_cells_cloud/requests/post_worksheet_sparkline_group_request'
701
704
  require 'aspose_cells_cloud/requests/post_run_task_request'
702
705
  require 'aspose_cells_cloud/requests/post_add_text_content_request'
706
+ require 'aspose_cells_cloud/requests/post_trim_content_request'
703
707
  require 'aspose_cells_cloud/requests/get_workbook_default_style_request'
704
708
  require 'aspose_cells_cloud/requests/get_workbook_text_items_request'
705
709
  require 'aspose_cells_cloud/requests/get_workbook_names_request'
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ describe 'CellsApi' do
5
+ before do
6
+ @instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
7
+ $VERBOSE = nil
8
+ end
9
+
10
+ after do
11
+ # run after each test
12
+ end
13
+
14
+ describe 'post_add_text_content test' do
15
+ it "should work" do
16
+ remote_folder = 'TestData/In'
17
+
18
+ local_name = 'BookText.xlsx'
19
+ remote_name = 'BookText.xlsx'
20
+
21
+
22
+ mapFiles = { }
23
+ mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
24
+
25
+ uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
26
+ @instance.upload_file(uploadrequest)
27
+ addTextOptionsDataSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>'BookText.xlsx' );
28
+ addTextOptions = AsposeCellsCloud::AddTextOptions.new(:DataSource=>addTextOptionsDataSource ,:Text=>'Aspose.Cells Cloud is an excellent product.' ,:Worksheet=>'202401' ,:SelectPoistion=>'AtTheBeginning' ,:SkipEmptyCells=>true );
29
+ request = AsposeCellsCloud::PostAddTextContentRequest.new(:addTextOptions=>addTextOptions);
30
+ @instance.post_add_text_content(request);
31
+ end
32
+ end
33
+
34
+ describe 'post_trim_content test' do
35
+ it "should work" do
36
+ remote_folder = 'TestData/In'
37
+
38
+ local_name = 'BookText.xlsx'
39
+ remote_name = 'BookText.xlsx'
40
+
41
+
42
+ mapFiles = { }
43
+ mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
44
+
45
+ uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
46
+ @instance.upload_file(uploadrequest)
47
+ trimContentOptionsDataSource = AsposeCellsCloud::DataSource.new(:DataSourceType=>'CloudFileSystem' ,:DataPath=>'BookText.xlsx' );
48
+ trimContentOptionsScopeOptions = AsposeCellsCloud::ScopeOptions.new(:Scope=>'EntireWorkbook' );
49
+ trimContentOptions = AsposeCellsCloud::TrimContentOptions.new(:DataSource=>trimContentOptionsDataSource ,:TrimLeading=>true ,:TrimTrailing=>true ,:TrimSpaceBetweenWordTo1=>true ,:RemoveAllLineBreaks=>true ,:ScopeOptions=>trimContentOptionsScopeOptions );
50
+ request = AsposeCellsCloud::PostTrimContentRequest.new(:trimContentOptions=>trimContentOptions);
51
+ @instance.post_trim_content(request);
52
+ end
53
+ end
54
+ end
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.7'
4
+ version: '24.8'
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-07-31 00:00:00.000000000 Z
11
+ date: 2024-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -547,6 +547,8 @@ files:
547
547
  - lib/aspose_cells_cloud/models/save_response.rb
548
548
  - lib/aspose_cells_cloud/models/save_result.rb
549
549
  - lib/aspose_cells_cloud/models/save_result_task_parameter.rb
550
+ - lib/aspose_cells_cloud/models/scope_item.rb
551
+ - lib/aspose_cells_cloud/models/scope_options.rb
550
552
  - lib/aspose_cells_cloud/models/scroll_bar.rb
551
553
  - lib/aspose_cells_cloud/models/scroll_bar_response.rb
552
554
  - lib/aspose_cells_cloud/models/series.rb
@@ -613,6 +615,7 @@ files:
613
615
  - lib/aspose_cells_cloud/models/trendline_response.rb
614
616
  - lib/aspose_cells_cloud/models/trendlines.rb
615
617
  - lib/aspose_cells_cloud/models/trendlines_response.rb
618
+ - lib/aspose_cells_cloud/models/trim_content_options.rb
616
619
  - lib/aspose_cells_cloud/models/txt_save_options.rb
617
620
  - lib/aspose_cells_cloud/models/unpivot_column.rb
618
621
  - lib/aspose_cells_cloud/models/validation.rb
@@ -872,6 +875,7 @@ files:
872
875
  - lib/aspose_cells_cloud/requests/post_set_cell_range_value_request.rb
873
876
  - lib/aspose_cells_cloud/requests/post_set_worksheet_column_width_request.rb
874
877
  - lib/aspose_cells_cloud/requests/post_split_request.rb
878
+ - lib/aspose_cells_cloud/requests/post_trim_content_request.rb
875
879
  - lib/aspose_cells_cloud/requests/post_ungroup_worksheet_columns_request.rb
876
880
  - lib/aspose_cells_cloud/requests/post_ungroup_worksheet_rows_request.rb
877
881
  - lib/aspose_cells_cloud/requests/post_unhide_worksheet_columns_request.rb
@@ -1010,6 +1014,7 @@ files:
1010
1014
  - spec/api/shapes_controller_spec.rb
1011
1015
  - spec/api/sparkline_groups_controller_spec.rb
1012
1016
  - spec/api/storage_controller_spec.rb
1017
+ - spec/api/text_processing_controller_spec.rb
1013
1018
  - spec/api/workbook_controller_spec.rb
1014
1019
  - spec/api/worksheet_controller_spec.rb
1015
1020
  - spec/api/worksheet_validations_controller_spec.rb