aspose_cells_cloud 22.6 → 22.7

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: 6745d2d226a6e26b84452b750095c3d06148cb94f1e22ddbf521bf9cda3973d8
4
- data.tar.gz: a4ab4b1e32bac7f4a67fb698db931094e3c588eae644ec5e9d21a99b7d5f6911
3
+ metadata.gz: b0def74a407c4a24e80749a740b1450ec8acce19c13f7df26fc63ed56202ca79
4
+ data.tar.gz: 195f29b30be2e220a59c2c6a06265cbbf15c4829d402c6581adc48997e6718c9
5
5
  SHA512:
6
- metadata.gz: b01d20e815db5695542ccc7e0e18656057aeb0fe1852995844daf32d2777ba55a9f721e1fa01bb3d71a837e2e69904f270f13cb2102c36761b6e9805a2764064
7
- data.tar.gz: 62260ab9631c963a11f4ca9d65b76467a5d3ffafc0541e66b3ed54a8559cf822aaf71117bd3da36255ce011c6cce8b3e47a0454db37450e178453e153ca08338
6
+ metadata.gz: b6c72f78993e7dc818eaf05b3c5262b795f9097169a6be8219e71bc50e02c0f552774026361ccdb8f3d34f52242b88fa989c31d2e235a3e25378b05c2d3462a9
7
+ data.tar.gz: eb34ef8e5e47a996832a366de1eb1d3ca0cbb00fe04218b841966a4bac2b7449125753d7213ddb35fa70eb9c7291318ffe4f18ca42a34dee580e7300196240b8
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/22.6)
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/22.7)
2
2
 
3
3
 
4
4
  # Ruby SDK for Spreadsheet Processing in the Cloud
@@ -22,10 +22,10 @@ Ruby Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate Mic
22
22
  - [Convert Excel files to popular formats](https://docs.aspose.cloud/cells/convert-excel-workbook-to-different-file-formats/).
23
23
 
24
24
 
25
- ## Feature & Enhancements in Version 22.6
25
+ ## Feature & Enhancements in Version 22.7
26
26
 
27
- - Improve save as api.
28
- - Improve clear objects api.
27
+ - Add 4 kinds of Save Option.
28
+ - Add the checkExcelRestriction parameter for multiple APIs.
29
29
 
30
30
  ## Read & Write Spreadsheet Formats
31
31
 
@@ -66,6 +66,7 @@ module AsposeCellsCloud
66
66
  # query parameters
67
67
  query_params = {}
68
68
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
69
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
69
70
 
70
71
  # header parameters
71
72
  header_params = {}
@@ -130,6 +131,7 @@ module AsposeCellsCloud
130
131
  # query parameters
131
132
  query_params = {}
132
133
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
134
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
133
135
 
134
136
  # header parameters
135
137
  header_params = {}
@@ -201,6 +203,7 @@ module AsposeCellsCloud
201
203
  query_params = {}
202
204
  query_params[:'datasource'] = datasource
203
205
  query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
206
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
204
207
 
205
208
  # header parameters
206
209
  header_params = {}
@@ -271,6 +274,7 @@ module AsposeCellsCloud
271
274
  query_params[:'objecttype'] = objecttype
272
275
  query_params[:'sheetname'] = opts[:'sheetname'] if !opts[:'sheetname'].nil?
273
276
  query_params[:'outFormat'] = opts[:'out_format'] if !opts[:'out_format'].nil?
277
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
274
278
  # header parameters
275
279
  header_params = {}
276
280
  # HTTP header 'Accept' (if needed)
@@ -345,6 +349,7 @@ module AsposeCellsCloud
345
349
  query_params = {}
346
350
  query_params[:'objectType'] = object_type
347
351
  query_params[:'format'] = format
352
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
348
353
  if opts[:'extendedQueryParameters']
349
354
  opts[:'extendedQueryParameters'].each do |key , value|
350
355
  query_params[key] = value
@@ -491,6 +496,7 @@ module AsposeCellsCloud
491
496
  query_params = {}
492
497
  query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
493
498
  query_params[:'mergeToOneSheet'] = opts[:'merge_to_one_sheet'] if !opts[:'merge_to_one_sheet'].nil?
499
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
494
500
 
495
501
  # header parameters
496
502
  header_params = {}
@@ -558,6 +564,7 @@ module AsposeCellsCloud
558
564
 
559
565
  # query parameters
560
566
  query_params = {}
567
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
561
568
 
562
569
  # header parameters
563
570
  header_params = {}
@@ -706,6 +713,7 @@ module AsposeCellsCloud
706
713
  query_params[:'text'] = text
707
714
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
708
715
  query_params[:'sheetname'] = opts[:'sheetname'] if !opts[:'sheetname'].nil?
716
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
709
717
 
710
718
  # header parameters
711
719
  header_params = {}
@@ -785,6 +793,7 @@ module AsposeCellsCloud
785
793
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
786
794
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
787
795
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
796
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
788
797
 
789
798
  # header parameters
790
799
  header_params = {}
@@ -928,6 +937,7 @@ module AsposeCellsCloud
928
937
  query_params = {}
929
938
  query_params[:'text'] = text
930
939
  query_params[:'color'] = color
940
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
931
941
 
932
942
  # header parameters
933
943
  header_params = {}
@@ -997,6 +1007,7 @@ module AsposeCellsCloud
997
1007
  # query parameters
998
1008
  query_params = {}
999
1009
  query_params[:'compressLevel'] = compress_level
1010
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
1000
1011
 
1001
1012
  # header parameters
1002
1013
  header_params = {}
@@ -1078,6 +1089,7 @@ module AsposeCellsCloud
1078
1089
  query_params[:'newtext'] = newtext
1079
1090
  query_params[:'password'] = opts[:'password'] if !opts[:'storagpassworde_name'].nil?
1080
1091
  query_params[:'sheetName'] = opts[:'sheet_name'] if !opts[:'sheet_name'].nil?
1092
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
1081
1093
  # header parameters
1082
1094
  header_params = {}
1083
1095
  # HTTP header 'Accept' (if needed)
@@ -1149,6 +1161,7 @@ module AsposeCellsCloud
1149
1161
  query_params = {}
1150
1162
  query_params[:'rotateType'] = rotate_type
1151
1163
  query_params[:'format'] = format
1164
+ query_params[:'checkExcelRestriction'] = opts[:'check_excel_restriction'] if !opts[:'check_excel_restriction'].nil?
1152
1165
  # header parameters
1153
1166
  header_params = {}
1154
1167
  # HTTP header 'Accept' (if needed)
@@ -0,0 +1,265 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2022 Aspose.Cells Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeCellsCloud
26
+
27
+ class DocxSaveOptions
28
+ attr_accessor :enable_http_compression
29
+
30
+ attr_accessor :save_format
31
+
32
+ # Make the workbook empty after saving the file.
33
+ attr_accessor :clear_data
34
+
35
+ # The cached file folder is used to store some large data.
36
+ attr_accessor :cached_file_folder
37
+
38
+ # Indicates whether validate merged areas before saving the file. The default value is false.
39
+ attr_accessor :validate_merged_areas
40
+
41
+ attr_accessor :refresh_chart_cache
42
+
43
+ # If true and the directory does not exist, the directory will be automatically created before saving the file.
44
+ attr_accessor :create_directory
45
+
46
+ attr_accessor :sort_names
47
+
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'enable_http_compression' => :'EnableHTTPCompression',
53
+ :'save_format' => :'SaveFormat',
54
+ :'clear_data' => :'ClearData',
55
+ :'cached_file_folder' => :'CachedFileFolder',
56
+ :'validate_merged_areas' => :'ValidateMergedAreas',
57
+ :'refresh_chart_cache' => :'RefreshChartCache',
58
+ :'create_directory' => :'CreateDirectory',
59
+ :'sort_names' => :'SortNames'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.swagger_types
65
+ {
66
+ :'enable_http_compression' => :'BOOLEAN',
67
+ :'save_format' => :'String',
68
+ :'clear_data' => :'BOOLEAN',
69
+ :'cached_file_folder' => :'String',
70
+ :'validate_merged_areas' => :'BOOLEAN',
71
+ :'refresh_chart_cache' => :'BOOLEAN',
72
+ :'create_directory' => :'BOOLEAN',
73
+ :'sort_names' => :'BOOLEAN'
74
+ }
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ return unless attributes.is_a?(Hash)
81
+
82
+ # convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
84
+
85
+ if attributes.has_key?(:'EnableHTTPCompression')
86
+ self.enable_http_compression = attributes[:'EnableHTTPCompression']
87
+ end
88
+
89
+ if attributes.has_key?(:'SaveFormat')
90
+ self.save_format = attributes[:'SaveFormat']
91
+ end
92
+
93
+ if attributes.has_key?(:'ClearData')
94
+ self.clear_data = attributes[:'ClearData']
95
+ end
96
+
97
+ if attributes.has_key?(:'CachedFileFolder')
98
+ self.cached_file_folder = attributes[:'CachedFileFolder']
99
+ end
100
+
101
+ if attributes.has_key?(:'ValidateMergedAreas')
102
+ self.validate_merged_areas = attributes[:'ValidateMergedAreas']
103
+ end
104
+
105
+ if attributes.has_key?(:'RefreshChartCache')
106
+ self.refresh_chart_cache = attributes[:'RefreshChartCache']
107
+ end
108
+
109
+ if attributes.has_key?(:'CreateDirectory')
110
+ self.create_directory = attributes[:'CreateDirectory']
111
+ end
112
+
113
+ if attributes.has_key?(:'SortNames')
114
+ self.sort_names = attributes[:'SortNames']
115
+ end
116
+
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properies with the reasons
121
+ def list_invalid_properties
122
+ invalid_properties = Array.new
123
+ return invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ return true
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] Object to be compared
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ enable_http_compression == o.enable_http_compression &&
138
+ save_format == o.save_format &&
139
+ clear_data == o.clear_data &&
140
+ cached_file_folder == o.cached_file_folder &&
141
+ validate_merged_areas == o.validate_merged_areas &&
142
+ refresh_chart_cache == o.refresh_chart_cache &&
143
+ create_directory == o.create_directory &&
144
+ sort_names == o.sort_names
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Fixnum] Hash code
155
+ def hash
156
+ [enable_http_compression, save_format, clear_data, cached_file_folder, validate_merged_areas, refresh_chart_cache, create_directory, sort_names].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ self.class.swagger_types.each_pair do |key, type|
165
+ if type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :DateTime
186
+ DateTime.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :BOOLEAN
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ temp_model = AsposeCellsCloud.const_get(type).new
217
+ temp_model.build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ next if value.nil?
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map{ |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end