aspose_cells_cloud 21.1 → 21.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +102 -28
  4. data/lib/aspose_cells_cloud/api/lite_cells_api.rb +957 -0
  5. data/lib/aspose_cells_cloud/api_client.rb +2 -1
  6. data/lib/aspose_cells_cloud/models/access_token_response.rb +13 -13
  7. data/lib/aspose_cells_cloud/models/cells_document_property.rb +46 -13
  8. data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +7 -7
  9. data/lib/aspose_cells_cloud/models/conditional_formatting_value.rb +1 -1
  10. data/lib/aspose_cells_cloud/models/custom_filter.rb +1 -1
  11. data/lib/aspose_cells_cloud/models/dynamic_filter.rb +2 -2
  12. data/lib/aspose_cells_cloud/models/file_info.rb +221 -0
  13. data/lib/aspose_cells_cloud/models/files_result.rb +200 -0
  14. data/lib/aspose_cells_cloud/models/import_picture_option.rb +285 -0
  15. data/lib/aspose_cells_cloud/models/pivot_item.rb +1 -1
  16. data/lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb +234 -0
  17. data/lib/aspose_cells_cloud/version.rb +1 -1
  18. data/lib/aspose_cells_cloud.rb +5 -0
  19. data/spec/api/cells_assembly_spec.rb +44 -0
  20. data/spec/api/cells_clear_objects_spec.rb +43 -0
  21. data/spec/api/cells_export_spec.rb +220 -0
  22. data/spec/api/cells_import_spec.rb +43 -0
  23. data/spec/api/cells_merge_spec.rb +43 -0
  24. data/spec/api/cells_metadata_spec.rb +72 -0
  25. data/spec/api/cells_properties_api_spec.rb +1 -1
  26. data/spec/api/cells_protect_spec.rb +43 -0
  27. data/spec/api/cells_search_spec.rb +43 -0
  28. data/spec/api/cells_split_spec.rb +44 -0
  29. data/spec/api/cells_unlock_spec.rb +43 -0
  30. data/spec/api/cells_watermark_spec.rb +42 -0
  31. data/spec/api/cells_workbook_api_spec.rb +26 -0
  32. data/spec/spec_helper.rb +5 -1
  33. metadata +18 -2
@@ -307,7 +307,8 @@ module AsposeCellsCloud
307
307
  form_params.each do |key, value|
308
308
  case value
309
309
  when ::File
310
- data[key] = Faraday::UploadIO.new(value.path, MimeMagic.by_magic(value).to_s, key)
310
+ data[key] = Faraday::UploadIO.new(value.path, "application/octet-stream", key) #MimeMagic::by_magic(value).to_s
311
+ # data[key] = Faraday::UploadIO.new(value.path, MimeMagic.by_magic(value).to_s, key)
311
312
  when ::Array, nil
312
313
  # let typhoeus handle File, Array and nil parameters
313
314
  data[key] = value
@@ -25,11 +25,11 @@ require 'date'
25
25
  module AsposeCellsCloud
26
26
 
27
27
  class AccessTokenResponse
28
- attr_accessor :_expires
28
+ attr_accessor :expires
29
29
 
30
30
  attr_accessor :access_token
31
31
 
32
- attr_accessor :_issued
32
+ attr_accessor :issued
33
33
 
34
34
  attr_accessor :client_refresh_token_life_time_in_minutes
35
35
 
@@ -45,9 +45,9 @@ module AsposeCellsCloud
45
45
  # Attribute mapping from ruby-style variable name to JSON key.
46
46
  def self.attribute_map
47
47
  {
48
- :'_expires' => :'.expires',
48
+ :'expires' => :'expires',
49
49
  :'access_token' => :'access_token',
50
- :'_issued' => :'.issued',
50
+ :'issued' => :'issued',
51
51
  :'client_refresh_token_life_time_in_minutes' => :'clientRefreshTokenLifeTimeInMinutes',
52
52
  :'expires_in' => :'expires_in',
53
53
  :'token_type' => :'token_type',
@@ -59,9 +59,9 @@ module AsposeCellsCloud
59
59
  # Attribute type mapping.
60
60
  def self.swagger_types
61
61
  {
62
- :'_expires' => :'String',
62
+ :'expires' => :'String',
63
63
  :'access_token' => :'String',
64
- :'_issued' => :'String',
64
+ :'issued' => :'String',
65
65
  :'client_refresh_token_life_time_in_minutes' => :'String',
66
66
  :'expires_in' => :'Integer',
67
67
  :'token_type' => :'String',
@@ -78,16 +78,16 @@ module AsposeCellsCloud
78
78
  # convert string to symbol for hash key
79
79
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
80
80
 
81
- if attributes.has_key?(:'.expires')
82
- self._expires = attributes[:'.expires']
81
+ if attributes.has_key?(:'expires')
82
+ self.expires = attributes[:'expires']
83
83
  end
84
84
 
85
85
  if attributes.has_key?(:'access_token')
86
86
  self.access_token = attributes[:'access_token']
87
87
  end
88
88
 
89
- if attributes.has_key?(:'.issued')
90
- self._issued = attributes[:'.issued']
89
+ if attributes.has_key?(:'issued')
90
+ self.issued = attributes[:'issued']
91
91
  end
92
92
 
93
93
  if attributes.has_key?(:'clientRefreshTokenLifeTimeInMinutes')
@@ -130,9 +130,9 @@ module AsposeCellsCloud
130
130
  def ==(o)
131
131
  return true if self.equal?(o)
132
132
  self.class == o.class &&
133
- _expires == o._expires &&
133
+ expires == o.expires &&
134
134
  access_token == o.access_token &&
135
- _issued == o._issued &&
135
+ issued == o.issued &&
136
136
  client_refresh_token_life_time_in_minutes == o.client_refresh_token_life_time_in_minutes &&
137
137
  expires_in == o.expires_in &&
138
138
  token_type == o.token_type &&
@@ -149,7 +149,7 @@ module AsposeCellsCloud
149
149
  # Calculates hash code according to all attributes.
150
150
  # @return [Fixnum] Hash code
151
151
  def hash
152
- [_expires, access_token, _issued, client_refresh_token_life_time_in_minutes, expires_in, token_type, client_id, refresh_token].hash
152
+ [expires, access_token, issued, client_refresh_token_life_time_in_minutes, expires_in, token_type, client_id, refresh_token].hash
153
153
  end
154
154
 
155
155
  # Builds the object from hash
@@ -27,20 +27,35 @@ module AsposeCellsCloud
27
27
  class CellsDocumentProperty
28
28
  attr_accessor :link
29
29
 
30
- attr_accessor :built_in
31
-
30
+ # Returns the name of the property.
32
31
  attr_accessor :name
33
32
 
33
+ # Gets or sets the value of the property.
34
34
  attr_accessor :value
35
35
 
36
+ # Indicates whether this property is linked to content
37
+ attr_accessor :is_linked_to_content
38
+
39
+ # The linked content source.
40
+ attr_accessor :source
41
+
42
+ # Gets the data type of the property.
43
+ attr_accessor :type
44
+
45
+ # Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API.
46
+ attr_accessor :is_generated_name
47
+
36
48
 
37
49
  # Attribute mapping from ruby-style variable name to JSON key.
38
50
  def self.attribute_map
39
51
  {
40
52
  :'link' => :'link',
41
- :'built_in' => :'BuiltIn',
42
53
  :'name' => :'Name',
43
- :'value' => :'Value'
54
+ :'value' => :'Value',
55
+ :'is_linked_to_content' => :'IsLinkedToContent',
56
+ :'source' => :'Source',
57
+ :'type' => :'Type',
58
+ :'is_generated_name' => :'IsGeneratedName'
44
59
  }
45
60
  end
46
61
 
@@ -48,9 +63,12 @@ module AsposeCellsCloud
48
63
  def self.swagger_types
49
64
  {
50
65
  :'link' => :'Link',
51
- :'built_in' => :'String',
52
66
  :'name' => :'String',
53
- :'value' => :'String'
67
+ :'value' => :'String',
68
+ :'is_linked_to_content' => :'String',
69
+ :'source' => :'String',
70
+ :'type' => :'String',
71
+ :'is_generated_name' => :'String'
54
72
  }
55
73
  end
56
74
 
@@ -66,10 +84,6 @@ module AsposeCellsCloud
66
84
  self.link = attributes[:'link']
67
85
  end
68
86
 
69
- if attributes.has_key?(:'BuiltIn')
70
- self.built_in = attributes[:'BuiltIn']
71
- end
72
-
73
87
  if attributes.has_key?(:'Name')
74
88
  self.name = attributes[:'Name']
75
89
  end
@@ -78,6 +92,22 @@ module AsposeCellsCloud
78
92
  self.value = attributes[:'Value']
79
93
  end
80
94
 
95
+ if attributes.has_key?(:'IsLinkedToContent')
96
+ self.is_linked_to_content = attributes[:'IsLinkedToContent']
97
+ end
98
+
99
+ if attributes.has_key?(:'Source')
100
+ self.source = attributes[:'Source']
101
+ end
102
+
103
+ if attributes.has_key?(:'Type')
104
+ self.type = attributes[:'Type']
105
+ end
106
+
107
+ if attributes.has_key?(:'IsGeneratedName')
108
+ self.is_generated_name = attributes[:'IsGeneratedName']
109
+ end
110
+
81
111
  end
82
112
 
83
113
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,9 +129,12 @@ module AsposeCellsCloud
99
129
  return true if self.equal?(o)
100
130
  self.class == o.class &&
101
131
  link == o.link &&
102
- built_in == o.built_in &&
103
132
  name == o.name &&
104
- value == o.value
133
+ value == o.value &&
134
+ is_linked_to_content == o.is_linked_to_content &&
135
+ source == o.source &&
136
+ type == o.type &&
137
+ is_generated_name == o.is_generated_name
105
138
  end
106
139
 
107
140
  # @see the `==` method
@@ -113,7 +146,7 @@ module AsposeCellsCloud
113
146
  # Calculates hash code according to all attributes.
114
147
  # @return [Fixnum] Hash code
115
148
  def hash
116
- [link, built_in, name, value].hash
149
+ [link, name, value, is_linked_to_content, source, type, is_generated_name].hash
117
150
  end
118
151
 
119
152
  # Builds the object from hash
@@ -27,7 +27,7 @@ module AsposeCellsCloud
27
27
  class ChartOperateParameter
28
28
  attr_accessor :operate_type
29
29
 
30
- attr_accessor :string
30
+ attr_accessor :title
31
31
 
32
32
  attr_accessor :area
33
33
 
@@ -50,7 +50,7 @@ module AsposeCellsCloud
50
50
  def self.attribute_map
51
51
  {
52
52
  :'operate_type' => :'OperateType',
53
- :'string' => :'string',
53
+ :'title' => :'Title',
54
54
  :'area' => :'Area',
55
55
  :'category_data' => :'CategoryData',
56
56
  :'upper_left_row' => :'UpperLeftRow',
@@ -66,7 +66,7 @@ module AsposeCellsCloud
66
66
  def self.swagger_types
67
67
  {
68
68
  :'operate_type' => :'String',
69
- :'string' => :'String',
69
+ :'title' => :'String',
70
70
  :'area' => :'String',
71
71
  :'category_data' => :'String',
72
72
  :'upper_left_row' => :'Integer',
@@ -90,8 +90,8 @@ module AsposeCellsCloud
90
90
  self.operate_type = attributes[:'OperateType']
91
91
  end
92
92
 
93
- if attributes.has_key?(:'string')
94
- self.string = attributes[:'string']
93
+ if attributes.has_key?(:'Title')
94
+ self.title = attributes[:'Title']
95
95
  end
96
96
 
97
97
  if attributes.has_key?(:'Area')
@@ -147,7 +147,7 @@ module AsposeCellsCloud
147
147
  return true if self.equal?(o)
148
148
  self.class == o.class &&
149
149
  operate_type == o.operate_type &&
150
- string == o.string &&
150
+ title == o.title &&
151
151
  area == o.area &&
152
152
  category_data == o.category_data &&
153
153
  upper_left_row == o.upper_left_row &&
@@ -167,7 +167,7 @@ module AsposeCellsCloud
167
167
  # Calculates hash code according to all attributes.
168
168
  # @return [Fixnum] Hash code
169
169
  def hash
170
- [operate_type, string, area, category_data, upper_left_row, lower_right_column, lower_right_row, is_auto_get_serial_name, chart_type, is_vertical].hash
170
+ [operate_type, title, area, category_data, upper_left_row, lower_right_column, lower_right_row, is_auto_get_serial_name, chart_type, is_vertical].hash
171
171
  end
172
172
 
173
173
  # Builds the object from hash
@@ -49,7 +49,7 @@ module AsposeCellsCloud
49
49
  {
50
50
  :'is_gte' => :'BOOLEAN',
51
51
  :'type' => :'String',
52
- :'value' => :'Object'
52
+ :'value' => :'String'
53
53
  }
54
54
  end
55
55
 
@@ -42,7 +42,7 @@ module AsposeCellsCloud
42
42
  def self.swagger_types
43
43
  {
44
44
  :'filter_operator_type' => :'String',
45
- :'criteria' => :'Object'
45
+ :'criteria' => :'String'
46
46
  }
47
47
  end
48
48
 
@@ -45,8 +45,8 @@ module AsposeCellsCloud
45
45
  def self.swagger_types
46
46
  {
47
47
  :'dynamic_filter_type' => :'String',
48
- :'max_value' => :'Object',
49
- :'value' => :'Object'
48
+ :'max_value' => :'Integer',
49
+ :'value' => :'Integer'
50
50
  }
51
51
  end
52
52
 
@@ -0,0 +1,221 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2021 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 FileInfo
28
+ attr_accessor :filename
29
+
30
+ attr_accessor :file_size
31
+
32
+ attr_accessor :file_content
33
+
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'filename' => :'Filename',
39
+ :'file_size' => :'FileSize',
40
+ :'file_content' => :'FileContent'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'filename' => :'String',
48
+ :'file_size' => :'Integer',
49
+ :'file_content' => :'String'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ return unless attributes.is_a?(Hash)
57
+
58
+ # convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
60
+
61
+ if attributes.has_key?(:'Filename')
62
+ self.filename = attributes[:'Filename']
63
+ end
64
+
65
+ if attributes.has_key?(:'FileSize')
66
+ self.file_size = attributes[:'FileSize']
67
+ end
68
+
69
+ if attributes.has_key?(:'FileContent')
70
+ self.file_content = attributes[:'FileContent']
71
+ end
72
+
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properies with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if @file_size.nil?
80
+ invalid_properties.push("invalid value for 'file_size', file_size 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 @file_size.nil?
90
+ return true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ filename == o.filename &&
99
+ file_size == o.file_size &&
100
+ file_content == o.file_content
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Fixnum] Hash code
111
+ def hash
112
+ [filename, file_size, file_content].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.swagger_types.each_pair do |key, type|
121
+ if type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :DateTime
142
+ DateTime.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :BOOLEAN
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ temp_model = AsposeCellsCloud.const_get(type).new
173
+ temp_model.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ next if value.nil?
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map{ |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end