Skip to content

Commit a28c69b

Browse files
committed
Aspose.Cells.Cloud SDK 19.6
1 parent ee4ff8c commit a28c69b

File tree

7 files changed

+361
-6
lines changed

7 files changed

+361
-6
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ No description provided (generated by Swagger Codegen https://github.com/swagger
77
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
88

99
- API version: 1.0
10-
- Package version: 19.2.1
10+
- Package version: 19.6
1111
- Build package: io.swagger.codegen.languages.RubyClientCodegen
1212

1313
## Installation
@@ -23,15 +23,15 @@ gem build aspose_cells_cloud.gemspec
2323
Then either install the gem locally:
2424

2525
```shell
26-
gem install ./aspose_cells_cloud-19.2.1.gem
26+
gem install ./aspose_cells_cloud-19.6.gem
2727
```
28-
(for development, run `gem install --dev ./aspose_cells_cloud-19.2.1.gem` to install the development dependencies)
28+
(for development, run `gem install --dev ./aspose_cells_cloud-19.6.gem` to install the development dependencies)
2929

3030
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
3131

3232
Finally add this to the Gemfile:
3333

34-
gem 'aspose_cells_cloud', '~> 19.2.1'
34+
gem 'aspose_cells_cloud', '~> 19.6'
3535

3636
### Install from Git
3737

@@ -468,6 +468,7 @@ Class | Method | HTTP request | Description
468468
- [AsposeCellsCloud::ListObjects](docs/ListObjects.md)
469469
- [AsposeCellsCloud::ListObjectsResponse](docs/ListObjectsResponse.md)
470470
- [AsposeCellsCloud::MHtmlSaveOptions](docs/MHtmlSaveOptions.md)
471+
- [AsposeCellsCloud::MarkdownSaveOptions](docs/MarkdownSaveOptions.md)
471472
- [AsposeCellsCloud::MergedCell](docs/MergedCell.md)
472473
- [AsposeCellsCloud::MergedCellResponse](docs/MergedCellResponse.md)
473474
- [AsposeCellsCloud::MergedCells](docs/MergedCells.md)

docs/MarkdownSaveOptions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# AsposeCellsCloud::MarkdownSaveOptions
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**enable_http_compression** | **BOOLEAN** | | [optional]
7+
**save_format** | **String** | | [optional]
8+
**clear_data** | **BOOLEAN** | Make the workbook empty after saving the file. | [optional]
9+
**cached_file_folder** | **String** | The cached file folder is used to store some large data. | [optional]
10+
**validate_merged_areas** | **BOOLEAN** | Indicates whether validate merged areas before saving the file. The default value is false. | [optional]
11+
**refresh_chart_cache** | **BOOLEAN** | | [optional]
12+
**create_directory** | **BOOLEAN** | If true and the directory does not exist, the directory will be automatically created before saving the file. | [optional]
13+
**sort_names** | **BOOLEAN** | | [optional]
14+
**encoding** | **String** | | [optional]
15+
**format_strategy** | **String** | | [optional]
16+
**line_separator** | **String** | | [optional]
17+
18+

lib/aspose_cells_cloud.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
require 'aspose_cells_cloud/models/list_objects'
163163
require 'aspose_cells_cloud/models/list_objects_response'
164164
require 'aspose_cells_cloud/models/m_html_save_options'
165+
require 'aspose_cells_cloud/models/markdown_save_options'
165166
require 'aspose_cells_cloud/models/merged_cell'
166167
require 'aspose_cells_cloud/models/merged_cell_response'
167168
require 'aspose_cells_cloud/models/merged_cells'
Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
=begin
2+
#Web API Swagger specification
3+
4+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5+
6+
OpenAPI spec version: 1.0
7+
8+
Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
Swagger Codegen version: 2.3.0-SNAPSHOT
10+
11+
=end
12+
13+
require 'date'
14+
15+
module AsposeCellsCloud
16+
17+
class MarkdownSaveOptions
18+
attr_accessor :enable_http_compression
19+
20+
attr_accessor :save_format
21+
22+
# Make the workbook empty after saving the file.
23+
attr_accessor :clear_data
24+
25+
# The cached file folder is used to store some large data.
26+
attr_accessor :cached_file_folder
27+
28+
# Indicates whether validate merged areas before saving the file. The default value is false.
29+
attr_accessor :validate_merged_areas
30+
31+
attr_accessor :refresh_chart_cache
32+
33+
# If true and the directory does not exist, the directory will be automatically created before saving the file.
34+
attr_accessor :create_directory
35+
36+
attr_accessor :sort_names
37+
38+
attr_accessor :encoding
39+
40+
attr_accessor :format_strategy
41+
42+
attr_accessor :line_separator
43+
44+
45+
# Attribute mapping from ruby-style variable name to JSON key.
46+
def self.attribute_map
47+
{
48+
:'enable_http_compression' => :'EnableHTTPCompression',
49+
:'save_format' => :'SaveFormat',
50+
:'clear_data' => :'ClearData',
51+
:'cached_file_folder' => :'CachedFileFolder',
52+
:'validate_merged_areas' => :'ValidateMergedAreas',
53+
:'refresh_chart_cache' => :'RefreshChartCache',
54+
:'create_directory' => :'CreateDirectory',
55+
:'sort_names' => :'SortNames',
56+
:'encoding' => :'Encoding',
57+
:'format_strategy' => :'FormatStrategy',
58+
:'line_separator' => :'LineSeparator'
59+
}
60+
end
61+
62+
# Attribute type mapping.
63+
def self.swagger_types
64+
{
65+
:'enable_http_compression' => :'BOOLEAN',
66+
:'save_format' => :'String',
67+
:'clear_data' => :'BOOLEAN',
68+
:'cached_file_folder' => :'String',
69+
:'validate_merged_areas' => :'BOOLEAN',
70+
:'refresh_chart_cache' => :'BOOLEAN',
71+
:'create_directory' => :'BOOLEAN',
72+
:'sort_names' => :'BOOLEAN',
73+
:'encoding' => :'String',
74+
:'format_strategy' => :'String',
75+
:'line_separator' => :'String'
76+
}
77+
end
78+
79+
# Initializes the object
80+
# @param [Hash] attributes Model attributes in the form of hash
81+
def initialize(attributes = {})
82+
return unless attributes.is_a?(Hash)
83+
84+
# convert string to symbol for hash key
85+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
86+
87+
if attributes.has_key?(:'EnableHTTPCompression')
88+
self.enable_http_compression = attributes[:'EnableHTTPCompression']
89+
end
90+
91+
if attributes.has_key?(:'SaveFormat')
92+
self.save_format = attributes[:'SaveFormat']
93+
end
94+
95+
if attributes.has_key?(:'ClearData')
96+
self.clear_data = attributes[:'ClearData']
97+
end
98+
99+
if attributes.has_key?(:'CachedFileFolder')
100+
self.cached_file_folder = attributes[:'CachedFileFolder']
101+
end
102+
103+
if attributes.has_key?(:'ValidateMergedAreas')
104+
self.validate_merged_areas = attributes[:'ValidateMergedAreas']
105+
end
106+
107+
if attributes.has_key?(:'RefreshChartCache')
108+
self.refresh_chart_cache = attributes[:'RefreshChartCache']
109+
end
110+
111+
if attributes.has_key?(:'CreateDirectory')
112+
self.create_directory = attributes[:'CreateDirectory']
113+
end
114+
115+
if attributes.has_key?(:'SortNames')
116+
self.sort_names = attributes[:'SortNames']
117+
end
118+
119+
if attributes.has_key?(:'Encoding')
120+
self.encoding = attributes[:'Encoding']
121+
end
122+
123+
if attributes.has_key?(:'FormatStrategy')
124+
self.format_strategy = attributes[:'FormatStrategy']
125+
end
126+
127+
if attributes.has_key?(:'LineSeparator')
128+
self.line_separator = attributes[:'LineSeparator']
129+
end
130+
131+
end
132+
133+
# Show invalid properties with the reasons. Usually used together with valid?
134+
# @return Array for valid properies with the reasons
135+
def list_invalid_properties
136+
invalid_properties = Array.new
137+
return invalid_properties
138+
end
139+
140+
# Check to see if the all the properties in the model are valid
141+
# @return true if the model is valid
142+
def valid?
143+
return true
144+
end
145+
146+
# Checks equality by comparing each attribute.
147+
# @param [Object] Object to be compared
148+
def ==(o)
149+
return true if self.equal?(o)
150+
self.class == o.class &&
151+
enable_http_compression == o.enable_http_compression &&
152+
save_format == o.save_format &&
153+
clear_data == o.clear_data &&
154+
cached_file_folder == o.cached_file_folder &&
155+
validate_merged_areas == o.validate_merged_areas &&
156+
refresh_chart_cache == o.refresh_chart_cache &&
157+
create_directory == o.create_directory &&
158+
sort_names == o.sort_names &&
159+
encoding == o.encoding &&
160+
format_strategy == o.format_strategy &&
161+
line_separator == o.line_separator
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+
[enable_http_compression, save_format, clear_data, cached_file_folder, validate_merged_areas, refresh_chart_cache, create_directory, sort_names, encoding, format_strategy, line_separator].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

lib/aspose_cells_cloud/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module AsposeCellsCloud
14-
VERSION = "19.2.1"
14+
VERSION = "19.6"
1515
end

spec/api/cells_save_as_api_spec.rb

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,30 @@
6868
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
6969
end
7070
end
71-
71+
72+
# unit tests for cells_save_as_post_document_save_as
73+
# Convert document and save result to storage.
74+
#
75+
# @param name The document name.
76+
# @param [Hash] opts the optional parameters
77+
# @option opts [SaveOptions] :save_options Save options.
78+
# @option opts [String] :newfilename The new file name.
79+
# @option opts [BOOLEAN] :is_auto_fit_rows Autofit rows.
80+
# @option opts [BOOLEAN] :is_auto_fit_columns Autofit columns.
81+
# @option opts [String] :folder The document folder.
82+
# @option opts [String] :storage storage name.
83+
# @return [SaveResponse]
84+
describe 'cells_save_as_post_document_save_as md format test' do
85+
it "should work" do
86+
name = $BOOK1
87+
save_options = nil
88+
newfilename = 'newbook.xls.md'
89+
is_auto_fit_rows = true
90+
is_auto_fit_columns = true
91+
folder = $TEMPFOLDER
92+
93+
@instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>newfilename, :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder})
94+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
95+
end
96+
end
7297
end

0 commit comments

Comments
 (0)