aspose_cells_cloud 23.10 → 23.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -13
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +234 -22899
  4. data/lib/aspose_cells_cloud/models/{value_type.rb → barcode_response.rb} +77 -20
  5. data/lib/aspose_cells_cloud/models/{total_request.rb → barcode_response_list.rb} +2 -2
  6. data/lib/aspose_cells_cloud/models/batch_convert_request.rb +13 -1
  7. data/lib/aspose_cells_cloud/models/batch_split_request.rb +13 -1
  8. data/lib/aspose_cells_cloud/models/convert_task_parameter.rb +13 -1
  9. data/lib/aspose_cells_cloud/models/{cells_error.rb → import_json_request.rb} +60 -55
  10. data/lib/aspose_cells_cloud/models/import_xml_request.rb +16 -4
  11. data/lib/aspose_cells_cloud/models/{spreadsheet_ml2003_save_options.rb → spreadsheet_m_l2003_save_options.rb} +134 -96
  12. data/lib/aspose_cells_cloud/requests/delete_metadata_request.rb +7 -0
  13. data/lib/aspose_cells_cloud/requests/get_workbook_request.rb +9 -2
  14. data/lib/aspose_cells_cloud/requests/post_assemble_request.rb +9 -2
  15. data/lib/aspose_cells_cloud/requests/post_clear_objects_request.rb +9 -2
  16. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_csv_request.rb +9 -2
  17. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_docx_request.rb +9 -2
  18. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_html_request.rb +9 -2
  19. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_json_request.rb +9 -2
  20. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_markdown_request.rb +9 -2
  21. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_pdf_request.rb +9 -2
  22. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_png_request.rb +9 -2
  23. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_pptx_request.rb +9 -2
  24. data/lib/aspose_cells_cloud/requests/post_convert_workbook_to_sql_request.rb +9 -2
  25. data/lib/aspose_cells_cloud/requests/post_export_request.rb +9 -2
  26. data/lib/aspose_cells_cloud/requests/post_import_data_request.rb +9 -2
  27. data/lib/aspose_cells_cloud/requests/post_import_request.rb +31 -2
  28. data/lib/aspose_cells_cloud/requests/post_merge_request.rb +15 -8
  29. data/lib/aspose_cells_cloud/requests/post_metadata_request.rb +16 -2
  30. data/lib/aspose_cells_cloud/requests/post_repair_request.rb +6 -6
  31. data/lib/aspose_cells_cloud/requests/post_reverse_request.rb +15 -8
  32. data/lib/aspose_cells_cloud/requests/post_rotate_request.rb +15 -8
  33. data/lib/aspose_cells_cloud/requests/post_split_request.rb +18 -11
  34. data/lib/aspose_cells_cloud/requests/post_watermark_request.rb +16 -2
  35. data/lib/aspose_cells_cloud/requests/post_workbook_export_xml_request.rb +9 -2
  36. data/lib/aspose_cells_cloud/requests/post_workbook_import_json_request.rb +163 -0
  37. data/lib/aspose_cells_cloud/requests/post_workbook_import_xml_request.rb +9 -2
  38. data/lib/aspose_cells_cloud/requests/post_workbook_save_as_request.rb +9 -2
  39. data/lib/aspose_cells_cloud/requests/put_convert_workbook_request.rb +9 -2
  40. data/lib/aspose_cells_cloud/version.rb +1 -1
  41. data/lib/aspose_cells_cloud.rb +7 -5
  42. data/spec/api/batch_controller_spec.rb +4 -4
  43. data/spec/api/folder_controller_spec.rb +1 -1
  44. data/spec/api/workbook_controller_spec.rb +3 -3
  45. data/spec/conversion/conversion_json_spec.rb +0 -242
  46. data/spec/conversion/conversion_png_spec.rb +0 -352
  47. data/spec/conversion/conversion_spec.rb +203 -1003
  48. data/spec/document/light_cells_spec.rb +86 -197
  49. metadata +9 -12
  50. data/lib/aspose_cells_cloud/api/light_cells_api.rb +0 -1304
  51. data/lib/aspose_cells_cloud/api/lite_cells_api.rb +0 -1179
  52. data/lib/aspose_cells_cloud/models/access_token_response.rb +0 -261
  53. data/spec/one_case_spec.rb +0 -26
@@ -1,261 +0,0 @@
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 AccessTokenResponse
28
- attr_accessor :expires
29
-
30
- attr_accessor :access_token
31
-
32
- attr_accessor :issued
33
-
34
- attr_accessor :client_refresh_token_life_time_in_minutes
35
-
36
- attr_accessor :expires_in
37
-
38
- attr_accessor :token_type
39
-
40
- attr_accessor :client_id
41
-
42
- attr_accessor :refresh_token
43
-
44
-
45
- # Attribute mapping from ruby-style variable name to JSON key.
46
- def self.attribute_map
47
- {
48
- :'expires' => :'expires',
49
- :'access_token' => :'access_token',
50
- :'issued' => :'issued',
51
- :'client_refresh_token_life_time_in_minutes' => :'clientRefreshTokenLifeTimeInMinutes',
52
- :'expires_in' => :'expires_in',
53
- :'token_type' => :'token_type',
54
- :'client_id' => :'client_id',
55
- :'refresh_token' => :'refresh_token'
56
- }
57
- end
58
-
59
- # Attribute type mapping.
60
- def self.swagger_types
61
- {
62
- :'expires' => :'String',
63
- :'access_token' => :'String',
64
- :'issued' => :'String',
65
- :'client_refresh_token_life_time_in_minutes' => :'String',
66
- :'expires_in' => :'Integer',
67
- :'token_type' => :'String',
68
- :'client_id' => :'String',
69
- :'refresh_token' => :'String'
70
- }
71
- end
72
-
73
- # Initializes the object
74
- # @param [Hash] attributes Model attributes in the form of hash
75
- def initialize(attributes = {})
76
- return unless attributes.is_a?(Hash)
77
-
78
- # convert string to symbol for hash key
79
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
80
-
81
- if attributes.has_key?(:'expires')
82
- self.expires = attributes[:'expires']
83
- end
84
-
85
- if attributes.has_key?(:'access_token')
86
- self.access_token = attributes[:'access_token']
87
- end
88
-
89
- if attributes.has_key?(:'issued')
90
- self.issued = attributes[:'issued']
91
- end
92
-
93
- if attributes.has_key?(:'clientRefreshTokenLifeTimeInMinutes')
94
- self.client_refresh_token_life_time_in_minutes = attributes[:'clientRefreshTokenLifeTimeInMinutes']
95
- end
96
-
97
- if attributes.has_key?(:'expires_in')
98
- self.expires_in = attributes[:'expires_in']
99
- end
100
-
101
- if attributes.has_key?(:'token_type')
102
- self.token_type = attributes[:'token_type']
103
- end
104
-
105
- if attributes.has_key?(:'client_id')
106
- self.client_id = attributes[:'client_id']
107
- end
108
-
109
- if attributes.has_key?(:'refresh_token')
110
- self.refresh_token = attributes[:'refresh_token']
111
- end
112
-
113
- end
114
-
115
- # Show invalid properties with the reasons. Usually used together with valid?
116
- # @return Array for valid properies with the reasons
117
- def list_invalid_properties
118
- invalid_properties = Array.new
119
- return invalid_properties
120
- end
121
-
122
- # Check to see if the all the properties in the model are valid
123
- # @return true if the model is valid
124
- def valid?
125
- return true
126
- end
127
-
128
- # Checks equality by comparing each attribute.
129
- # @param [Object] Object to be compared
130
- def ==(o)
131
- return true if self.equal?(o)
132
- self.class == o.class &&
133
- expires == o.expires &&
134
- access_token == o.access_token &&
135
- issued == o.issued &&
136
- client_refresh_token_life_time_in_minutes == o.client_refresh_token_life_time_in_minutes &&
137
- expires_in == o.expires_in &&
138
- token_type == o.token_type &&
139
- client_id == o.client_id &&
140
- refresh_token == o.refresh_token
141
- end
142
-
143
- # @see the `==` method
144
- # @param [Object] Object to be compared
145
- def eql?(o)
146
- self == o
147
- end
148
-
149
- # Calculates hash code according to all attributes.
150
- # @return [Fixnum] Hash code
151
- def hash
152
- [expires, access_token, issued, client_refresh_token_life_time_in_minutes, expires_in, token_type, client_id, refresh_token].hash
153
- end
154
-
155
- # Builds the object from hash
156
- # @param [Hash] attributes Model attributes in the form of hash
157
- # @return [Object] Returns the model itself
158
- def build_from_hash(attributes)
159
- return nil unless attributes.is_a?(Hash)
160
- self.class.swagger_types.each_pair do |key, type|
161
- if type =~ /\AArray<(.*)>/i
162
- # check to ensure the input is an array given that the the attribute
163
- # is documented as an array but the input is not
164
- if attributes[self.class.attribute_map[key]].is_a?(Array)
165
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
166
- end
167
- elsif !attributes[self.class.attribute_map[key]].nil?
168
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
- end # or else data not found in attributes(hash), not an issue as the data can be optional
170
- end
171
-
172
- self
173
- end
174
-
175
- # Deserializes the data based on type
176
- # @param string type Data type
177
- # @param string value Value to be deserialized
178
- # @return [Object] Deserialized data
179
- def _deserialize(type, value)
180
- case type.to_sym
181
- when :DateTime
182
- DateTime.parse(value)
183
- when :Date
184
- Date.parse(value)
185
- when :String
186
- value.to_s
187
- when :Integer
188
- value.to_i
189
- when :Float
190
- value.to_f
191
- when :BOOLEAN
192
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
- true
194
- else
195
- false
196
- end
197
- when :Object
198
- # generic object (usually a Hash), return directly
199
- value
200
- when /\AArray<(?<inner_type>.+)>\z/
201
- inner_type = Regexp.last_match[:inner_type]
202
- value.map { |v| _deserialize(inner_type, v) }
203
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
- k_type = Regexp.last_match[:k_type]
205
- v_type = Regexp.last_match[:v_type]
206
- {}.tap do |hash|
207
- value.each do |k, v|
208
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
- end
210
- end
211
- else # model
212
- temp_model = AsposeCellsCloud.const_get(type).new
213
- temp_model.build_from_hash(value)
214
- end
215
- end
216
-
217
- # Returns the string representation of the object
218
- # @return [String] String presentation of the object
219
- def to_s
220
- to_hash.to_s
221
- end
222
-
223
- # to_body is an alias to to_hash (backward compatibility)
224
- # @return [Hash] Returns the object in the form of hash
225
- def to_body
226
- to_hash
227
- end
228
-
229
- # Returns the object in the form of hash
230
- # @return [Hash] Returns the object in the form of hash
231
- def to_hash
232
- hash = {}
233
- self.class.attribute_map.each_pair do |attr, param|
234
- value = self.send(attr)
235
- next if value.nil?
236
- hash[param] = _to_hash(value)
237
- end
238
- hash
239
- end
240
-
241
- # Outputs non-array value in the form of hash
242
- # For object, use to_hash. Otherwise, just return the value
243
- # @param [Object] value Any valid value
244
- # @return [Hash] Returns the value in the form of hash
245
- def _to_hash(value)
246
- if value.is_a?(Array)
247
- value.compact.map{ |v| _to_hash(v) }
248
- elsif value.is_a?(Hash)
249
- {}.tap do |hash|
250
- value.each { |k, v| hash[k] = _to_hash(v) }
251
- end
252
- elsif value.respond_to? :to_hash
253
- value.to_hash
254
- else
255
- value
256
- end
257
- end
258
-
259
- end
260
-
261
- end
@@ -1,26 +0,0 @@
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
- describe 'post_protect test' do
14
- it "should work" do
15
- assembly_test_xlsx = 'assemblytest.xlsx'
16
- data_source_xlsx = 'datasource.xlsx'
17
-
18
- mapFiles = { }
19
- mapFiles[assembly_test_xlsx]= ::File.open(File.expand_path("TestData/"+assembly_test_xlsx),"r")
20
- mapFiles[data_source_xlsx]= ::File.open(File.expand_path("TestData/"+data_source_xlsx),"r")
21
- protectWorkbookRequest = AsposeCellsCloud::ProtectWorkbookRequest.new(:aways_open_read_only=>true, :encrypt_with_password=>'123456')
22
- request = AsposeCellsCloud::PostProtectRequest.new(:File=>mapFiles,:protectWorkbookRequest=>protectWorkbookRequest ,:password=>'123456');
23
- @instance.post_protect(request);
24
- end
25
- end
26
- end