aspose_cells_cloud 25.6 → 25.7
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.
- checksums.yaml +4 -4
- data/lib/aspose_cells_cloud/api/cells_api.rb +160 -1
- data/lib/aspose_cells_cloud/models/add_text_options.rb +19 -31
- data/lib/aspose_cells_cloud/models/character_count_options.rb +2 -2
- data/lib/aspose_cells_cloud/models/convert_text_options.rb +13 -25
- data/lib/aspose_cells_cloud/models/extract_text_options.rb +2 -2
- data/lib/aspose_cells_cloud/models/remove_characters_options.rb +13 -25
- data/lib/aspose_cells_cloud/models/remove_duplicates_options.rb +13 -37
- data/lib/aspose_cells_cloud/models/scope_item.rb +12 -12
- data/lib/aspose_cells_cloud/models/scope_options.rb +2 -2
- data/lib/aspose_cells_cloud/models/split_text_options.rb +2 -2
- data/lib/aspose_cells_cloud/models/trim_content_options.rb +9 -9
- data/lib/aspose_cells_cloud/models/word_case_options.rb +2 -2
- data/lib/aspose_cells_cloud/models/words_count_options.rb +2 -2
- data/lib/aspose_cells_cloud/requests/codegen_spec_request.rb +106 -0
- data/lib/aspose_cells_cloud/requests/convert_range_to_csv_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_range_to_html_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_range_to_image_request.rb +188 -0
- data/lib/aspose_cells_cloud/requests/convert_range_to_json_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_range_to_pdf_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_table_to_csv_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_table_to_html_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_table_to_image_request.rb +180 -0
- data/lib/aspose_cells_cloud/requests/convert_table_to_json_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_table_to_pdf_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_worksheet_to_image_request.rb +168 -0
- data/lib/aspose_cells_cloud/requests/convert_worksheet_to_pdf_request.rb +156 -0
- data/lib/aspose_cells_cloud/requests/export_range_as_format_request.rb +192 -0
- data/lib/aspose_cells_cloud/requests/export_table_as_format_request.rb +192 -0
- data/lib/aspose_cells_cloud/requests/export_worksheet_as_format_request.rb +181 -0
- data/lib/aspose_cells_cloud/requests/protect_spreadsheet_request.rb +152 -0
- data/lib/aspose_cells_cloud/requests/put_workbook_background_request.rb +5 -4
- data/lib/aspose_cells_cloud/requests/put_worksheet_background_request.rb +5 -3
- data/lib/aspose_cells_cloud/requests/spec_request.rb +118 -0
- data/lib/aspose_cells_cloud/requests/unprotect_spreadsheet_request.rb +152 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +19 -0
- metadata +41 -9
- data/examples/CompanySales.xlsx +0 -0
- data/examples/EmployeeSalesSummary.xlsx +0 -0
- data/examples/Example_QuickStart.rb +0 -8
@@ -33,16 +33,12 @@ module AsposeCellsCloud
|
|
33
33
|
class RemoveDuplicatesOptions
|
34
34
|
#The class has a public property "Name" of type string that can be both read and written.
|
35
35
|
attr_accessor :name
|
36
|
-
#
|
36
|
+
#Represents data source. There are three types of data, they are CloudFileSystem, RequestFiles, HttpUri.
|
37
37
|
attr_accessor :data_source
|
38
|
-
#
|
38
|
+
#Represents file information. Include of filename, filesize, and file content(base64String).
|
39
39
|
attr_accessor :file_info
|
40
|
-
#
|
41
|
-
attr_accessor :
|
42
|
-
#
|
43
|
-
attr_accessor :remove_duplicates_area
|
44
|
-
#
|
45
|
-
attr_accessor :remove_duplicates_area_value
|
40
|
+
#Specifies the range of cells within the worksheet where the spreadsheet operations will be performed. This parameter allows users to define the exact area to be processed, ensuring that operations are applied only to the designated cells.
|
41
|
+
attr_accessor :scope_options
|
46
42
|
|
47
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
44
|
def self.attribute_map
|
@@ -50,9 +46,7 @@ module AsposeCellsCloud
|
|
50
46
|
:'name' => :'Name',
|
51
47
|
:'data_source' => :'DataSource',
|
52
48
|
:'file_info' => :'FileInfo',
|
53
|
-
:'
|
54
|
-
:'remove_duplicates_area' => :'RemoveDuplicatesArea',
|
55
|
-
:'remove_duplicates_area_value' => :'RemoveDuplicatesAreaValue'
|
49
|
+
:'scope_options' => :'ScopeOptions'
|
56
50
|
}
|
57
51
|
end
|
58
52
|
|
@@ -62,9 +56,7 @@ module AsposeCellsCloud
|
|
62
56
|
:'name' => :'String',
|
63
57
|
:'data_source' => :'DataSource',
|
64
58
|
:'file_info' => :'FileInfo',
|
65
|
-
:'
|
66
|
-
:'remove_duplicates_area' => :'String',
|
67
|
-
:'remove_duplicates_area_value' => :'String'
|
59
|
+
:'scope_options' => :'ScopeOptions'
|
68
60
|
}
|
69
61
|
end
|
70
62
|
|
@@ -85,14 +77,8 @@ module AsposeCellsCloud
|
|
85
77
|
if attributes.has_key?(:'FileInfo')
|
86
78
|
self.file_info = attributes[:'FileInfo']
|
87
79
|
end
|
88
|
-
if attributes.has_key?(:'
|
89
|
-
self.
|
90
|
-
end
|
91
|
-
if attributes.has_key?(:'RemoveDuplicatesArea')
|
92
|
-
self.remove_duplicates_area = attributes[:'RemoveDuplicatesArea']
|
93
|
-
end
|
94
|
-
if attributes.has_key?(:'RemoveDuplicatesAreaValue')
|
95
|
-
self.remove_duplicates_area_value = attributes[:'RemoveDuplicatesAreaValue']
|
80
|
+
if attributes.has_key?(:'ScopeOptions')
|
81
|
+
self.scope_options = attributes[:'ScopeOptions']
|
96
82
|
end
|
97
83
|
|
98
84
|
end
|
@@ -110,14 +96,8 @@ module AsposeCellsCloud
|
|
110
96
|
if @file_info.nil?
|
111
97
|
invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
|
112
98
|
end
|
113
|
-
if @
|
114
|
-
invalid_properties.push("invalid value for '
|
115
|
-
end
|
116
|
-
if @remove_duplicates_area.nil?
|
117
|
-
invalid_properties.push("invalid value for 'remove_duplicates_area', remove_duplicates_area cannot be nil.")
|
118
|
-
end
|
119
|
-
if @remove_duplicates_area_value.nil?
|
120
|
-
invalid_properties.push("invalid value for 'remove_duplicates_area_value', remove_duplicates_area_value cannot be nil.")
|
99
|
+
if @scope_options.nil?
|
100
|
+
invalid_properties.push("invalid value for 'scope_options', scope_options cannot be nil.")
|
121
101
|
end
|
122
102
|
|
123
103
|
return invalid_properties
|
@@ -129,9 +109,7 @@ module AsposeCellsCloud
|
|
129
109
|
return false if @name.nil?
|
130
110
|
return false if @data_source.nil?
|
131
111
|
return false if @file_info.nil?
|
132
|
-
return false if @
|
133
|
-
return false if @remove_duplicates_area.nil?
|
134
|
-
return false if @remove_duplicates_area_value.nil?
|
112
|
+
return false if @scope_options.nil?
|
135
113
|
return true
|
136
114
|
end
|
137
115
|
|
@@ -143,9 +121,7 @@ module AsposeCellsCloud
|
|
143
121
|
name == o.name &&
|
144
122
|
data_source == o.data_source &&
|
145
123
|
file_info == o.file_info &&
|
146
|
-
|
147
|
-
remove_duplicates_area == o.remove_duplicates_area &&
|
148
|
-
remove_duplicates_area_value == o.remove_duplicates_area_value
|
124
|
+
scope_options == o.scope_options
|
149
125
|
std_dev == o.std_dev
|
150
126
|
end
|
151
127
|
|
@@ -158,7 +134,7 @@ module AsposeCellsCloud
|
|
158
134
|
# Calculates hash code according to all attributes.
|
159
135
|
# @return [Fixnum] Hash code
|
160
136
|
def hash
|
161
|
-
[ name , data_source , file_info ,
|
137
|
+
[ name , data_source , file_info , scope_options ].hash
|
162
138
|
end
|
163
139
|
|
164
140
|
# Builds the object from hash
|
@@ -31,15 +31,15 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class ScopeItem
|
34
|
-
#
|
35
|
-
attr_accessor :
|
36
|
-
#
|
34
|
+
#The specific worksheet of spreadsheet.
|
35
|
+
attr_accessor :worksheet
|
36
|
+
#The specific ranges of worksheet.
|
37
37
|
attr_accessor :ranges
|
38
38
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
40
|
def self.attribute_map
|
41
41
|
{
|
42
|
-
:'
|
42
|
+
:'worksheet' => :'Worksheet',
|
43
43
|
:'ranges' => :'Ranges'
|
44
44
|
}
|
45
45
|
end
|
@@ -47,7 +47,7 @@ module AsposeCellsCloud
|
|
47
47
|
# Attribute type mapping.
|
48
48
|
def self.swagger_types
|
49
49
|
{
|
50
|
-
:'
|
50
|
+
:'worksheet' => :'String',
|
51
51
|
:'ranges' => :'Array<String>'
|
52
52
|
}
|
53
53
|
end
|
@@ -60,8 +60,8 @@ module AsposeCellsCloud
|
|
60
60
|
# convert string to symbol for hash key
|
61
61
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
62
|
|
63
|
-
if attributes.has_key?(:'
|
64
|
-
self.
|
63
|
+
if attributes.has_key?(:'Worksheet')
|
64
|
+
self.worksheet = attributes[:'Worksheet']
|
65
65
|
end
|
66
66
|
if attributes.has_key?(:'Ranges')
|
67
67
|
self.ranges = attributes[:'Ranges']
|
@@ -73,8 +73,8 @@ module AsposeCellsCloud
|
|
73
73
|
# @return Array for valid properies with the reasons
|
74
74
|
def list_invalid_properties
|
75
75
|
invalid_properties = Array.new
|
76
|
-
if @
|
77
|
-
invalid_properties.push("invalid value for '
|
76
|
+
if @worksheet.nil?
|
77
|
+
invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
|
78
78
|
end
|
79
79
|
if @ranges.nil?
|
80
80
|
invalid_properties.push("invalid value for 'ranges', ranges cannot be nil.")
|
@@ -86,7 +86,7 @@ module AsposeCellsCloud
|
|
86
86
|
# Check to see if the all the properties in the model are valid
|
87
87
|
# @return true if the model is valid
|
88
88
|
def valid?
|
89
|
-
return false if @
|
89
|
+
return false if @worksheet.nil?
|
90
90
|
return false if @ranges.nil?
|
91
91
|
return true
|
92
92
|
end
|
@@ -96,7 +96,7 @@ module AsposeCellsCloud
|
|
96
96
|
def ==(o)
|
97
97
|
return true if self.equal?(o)
|
98
98
|
self.class == o.class &&
|
99
|
-
|
99
|
+
worksheet == o.worksheet &&
|
100
100
|
ranges == o.ranges
|
101
101
|
std_dev == o.std_dev
|
102
102
|
end
|
@@ -110,7 +110,7 @@ module AsposeCellsCloud
|
|
110
110
|
# Calculates hash code according to all attributes.
|
111
111
|
# @return [Fixnum] Hash code
|
112
112
|
def hash
|
113
|
-
[
|
113
|
+
[ worksheet , ranges ].hash
|
114
114
|
end
|
115
115
|
|
116
116
|
# Builds the object from hash
|
@@ -31,9 +31,9 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class ScopeOptions
|
34
|
-
#
|
34
|
+
#ScopeOptionsType is a type that represents options or settings that are specific to a particular scope.
|
35
35
|
attr_accessor :scope
|
36
|
-
#
|
36
|
+
#Specifies the designated work area within the worksheet where operations are to be performed.
|
37
37
|
attr_accessor :scope_items
|
38
38
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -33,9 +33,9 @@ module AsposeCellsCloud
|
|
33
33
|
class SplitTextOptions
|
34
34
|
#The property "Name" is a publicly accessible and overridable property of type string in the class.
|
35
35
|
attr_accessor :name
|
36
|
-
#
|
36
|
+
#Represents data source. There are three types of data, they are CloudFileSystem, RequestFiles, HttpUri.
|
37
37
|
attr_accessor :data_source
|
38
|
-
#
|
38
|
+
#Represents file information. Include of filename, filesize, and file content(base64String).
|
39
39
|
attr_accessor :file_info
|
40
40
|
#
|
41
41
|
attr_accessor :worksheet
|
@@ -31,25 +31,25 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class TrimContentOptions
|
34
|
-
#
|
34
|
+
#Represents data source. There are three types of data, they are CloudFileSystem, RequestFiles, HttpUri.
|
35
35
|
attr_accessor :data_source
|
36
|
-
#
|
36
|
+
#Represents file information. Include of filename, filesize, and file content(base64String).
|
37
37
|
attr_accessor :file_info
|
38
|
-
#
|
38
|
+
#Trim Content
|
39
39
|
attr_accessor :trim_content
|
40
|
-
#
|
40
|
+
#If the trim leading value is true, the trim content before and after cell values will be deleted.
|
41
41
|
attr_accessor :trim_leading
|
42
|
-
#
|
42
|
+
#If the trim trailing value is true, the trim content before and after cell values will be deleted.
|
43
43
|
attr_accessor :trim_trailing
|
44
|
-
#
|
44
|
+
#When the trim space between word to 1 parameter is true, it enables the removal of extra spaces between words within a cell, ensuring that only a single space is maintained between words.
|
45
45
|
attr_accessor :trim_space_between_word_to1
|
46
46
|
#
|
47
47
|
attr_accessor :trim_non_breaking_spaces
|
48
|
-
#
|
48
|
+
#When this parameter is enabled (set to True), it deletes extra line breaks within the selected range, ensuring that only necessary line breaks are retained.
|
49
49
|
attr_accessor :remove_extra_line_breaks
|
50
|
-
#
|
50
|
+
#When this parameter is enabled (set to True), it removes all line breaks within the selected range, resulting in a continuous block of text without any line breaks.
|
51
51
|
attr_accessor :remove_all_line_breaks
|
52
|
-
#
|
52
|
+
#Specifies the range of cells within the worksheet where the spreadsheet operations will be performed. This parameter allows users to define the exact area to be processed, ensuring that operations are applied only to the designated cells.
|
53
53
|
attr_accessor :scope_options
|
54
54
|
|
55
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -31,9 +31,9 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class WordCaseOptions
|
34
|
-
#
|
34
|
+
#Represents data source. There are three types of data, they are CloudFileSystem, RequestFiles, HttpUri.
|
35
35
|
attr_accessor :data_source
|
36
|
-
#
|
36
|
+
#Represents file information. Include of filename, filesize, and file content(base64String).
|
37
37
|
attr_accessor :file_info
|
38
38
|
#
|
39
39
|
attr_accessor :word_case_type
|
@@ -31,9 +31,9 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class WordsCountOptions
|
34
|
-
#
|
34
|
+
#Represents data source. There are three types of data, they are CloudFileSystem, RequestFiles, HttpUri.
|
35
35
|
attr_accessor :data_source
|
36
|
-
#
|
36
|
+
#Represents file information. Include of filename, filesize, and file content(base64String).
|
37
37
|
attr_accessor :file_info
|
38
38
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -0,0 +1,106 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="CodegenSpec_request.rb.cs">
|
4
|
+
Copyright (c) 2025 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 CodegenSpecRequest
|
33
|
+
|
34
|
+
attr_accessor :regoin
|
35
|
+
attr_accessor :password
|
36
|
+
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
|
43
|
+
if attributes.has_key?(:'regoin')
|
44
|
+
self.regoin = attributes[:'regoin']
|
45
|
+
end
|
46
|
+
|
47
|
+
if attributes.has_key?(:'password')
|
48
|
+
self.password = attributes[:'password']
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
:'regoin' => :'regoin',
|
56
|
+
:'password' => :'password'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attribute type mapping.
|
61
|
+
def self.swagger_types
|
62
|
+
{
|
63
|
+
:'regoin' => :'String',
|
64
|
+
:'password' => :'String'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
def create_http_request(api_client,opts = {})
|
69
|
+
if api_client.config.debugging
|
70
|
+
api_client.config.logger.debug "Calling API: CellsApi.codegen_spec ..."
|
71
|
+
end
|
72
|
+
api_client.request_token_if_needed
|
73
|
+
|
74
|
+
# resource path
|
75
|
+
local_var_path = "v4.0/cells/codegen/spec"
|
76
|
+
# query parameters
|
77
|
+
query_params = {}
|
78
|
+
query_params[:'regoin'] = self.regoin if !self.regoin.nil?
|
79
|
+
query_params[:'password'] = self.password if !self.password.nil?
|
80
|
+
|
81
|
+
# header parameters
|
82
|
+
header_params = {}
|
83
|
+
# HTTP header 'Accept' (if needed)
|
84
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
85
|
+
# HTTP header 'Content-Type'
|
86
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
87
|
+
|
88
|
+
# form parameters
|
89
|
+
form_params = {}
|
90
|
+
post_body = nil
|
91
|
+
|
92
|
+
#auth_names = []
|
93
|
+
auth_names = ['JWT']
|
94
|
+
data, status_code, headers = api_client.call_api(:GET, local_var_path,
|
95
|
+
:header_params => header_params,
|
96
|
+
:query_params => query_params,
|
97
|
+
:form_params => form_params,
|
98
|
+
:body => post_body,
|
99
|
+
:auth_names => auth_names)
|
100
|
+
if api_client.config.debugging
|
101
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.codegen_spec\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
102
|
+
end
|
103
|
+
return data, status_code, headers
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ConvertRangeToCsv_request.rb.cs">
|
4
|
+
Copyright (c) 2025 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 ConvertRangeToCsvRequest
|
33
|
+
|
34
|
+
attr_accessor :spreadsheet
|
35
|
+
attr_accessor :worksheet
|
36
|
+
attr_accessor :range
|
37
|
+
attr_accessor :out_path
|
38
|
+
attr_accessor :out_storage_name
|
39
|
+
attr_accessor :fonts_location
|
40
|
+
attr_accessor :regoin
|
41
|
+
attr_accessor :password
|
42
|
+
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
|
+
|
49
|
+
if attributes.has_key?(:'Spreadsheet')
|
50
|
+
self.spreadsheet = attributes[:'Spreadsheet']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'worksheet')
|
54
|
+
self.worksheet = attributes[:'worksheet']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'range')
|
58
|
+
self.range = attributes[:'range']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'outPath')
|
62
|
+
self.out_path = attributes[:'outPath']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'outStorageName')
|
66
|
+
self.out_storage_name = attributes[:'outStorageName']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'fontsLocation')
|
70
|
+
self.fonts_location = attributes[:'fontsLocation']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'regoin')
|
74
|
+
self.regoin = attributes[:'regoin']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'password')
|
78
|
+
self.password = attributes[:'password']
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
83
|
+
def self.attribute_map
|
84
|
+
{
|
85
|
+
:'spreadsheet' => :'Spreadsheet',
|
86
|
+
:'worksheet' => :'worksheet',
|
87
|
+
:'range' => :'range',
|
88
|
+
:'out_path' => :'outPath',
|
89
|
+
:'out_storage_name' => :'outStorageName',
|
90
|
+
:'fonts_location' => :'fontsLocation',
|
91
|
+
:'regoin' => :'regoin',
|
92
|
+
:'password' => :'password'
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
# Attribute type mapping.
|
97
|
+
def self.swagger_types
|
98
|
+
{
|
99
|
+
:'spreadsheet' => :'String',
|
100
|
+
:'worksheet' => :'String',
|
101
|
+
:'range' => :'String',
|
102
|
+
:'out_path' => :'String',
|
103
|
+
:'out_storage_name' => :'String',
|
104
|
+
:'fonts_location' => :'String',
|
105
|
+
:'regoin' => :'String',
|
106
|
+
:'password' => :'String'
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
def create_http_request(api_client,opts = {})
|
111
|
+
if api_client.config.debugging
|
112
|
+
api_client.config.logger.debug "Calling API: CellsApi.convert_range_to_csv ..."
|
113
|
+
end
|
114
|
+
api_client.request_token_if_needed
|
115
|
+
# verify the required parameter 'spreadsheet' is set
|
116
|
+
if api_client.config.client_side_validation && spreadsheet.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'spreadsheet' when calling CellsApi.convert_range_to_csv "
|
118
|
+
end
|
119
|
+
# verify the required parameter 'worksheet' is set
|
120
|
+
if api_client.config.client_side_validation && worksheet.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'worksheet' when calling CellsApi.convert_range_to_csv "
|
122
|
+
end
|
123
|
+
# verify the required parameter 'range' is set
|
124
|
+
if api_client.config.client_side_validation && range.nil?
|
125
|
+
fail ArgumentError, "Missing the required parameter 'range' when calling CellsApi.convert_range_to_csv "
|
126
|
+
end
|
127
|
+
|
128
|
+
# resource path
|
129
|
+
local_var_path = "v4.0/cells/convert/range/csv"
|
130
|
+
# query parameters
|
131
|
+
query_params = {}
|
132
|
+
query_params[:'worksheet'] = self.worksheet if !self.worksheet.nil?
|
133
|
+
query_params[:'range'] = self.range if !self.range.nil?
|
134
|
+
query_params[:'outPath'] = self.out_path if !self.out_path.nil?
|
135
|
+
query_params[:'outStorageName'] = self.out_storage_name if !self.out_storage_name.nil?
|
136
|
+
query_params[:'fontsLocation'] = self.fonts_location if !self.fonts_location.nil?
|
137
|
+
query_params[:'regoin'] = self.regoin if !self.regoin.nil?
|
138
|
+
query_params[:'password'] = self.password if !self.password.nil?
|
139
|
+
|
140
|
+
# header parameters
|
141
|
+
header_params = {}
|
142
|
+
# HTTP header 'Accept' (if needed)
|
143
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
144
|
+
# HTTP header 'Content-Type'
|
145
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
146
|
+
|
147
|
+
# form parameters
|
148
|
+
form_params = {}
|
149
|
+
post_body = nil
|
150
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
|
151
|
+
form_params[File.basename(spreadsheet)] = ::File.open(spreadsheet,"r")
|
152
|
+
|
153
|
+
#auth_names = []
|
154
|
+
auth_names = ['JWT']
|
155
|
+
data, status_code, headers = api_client.call_api(:PUT, local_var_path,
|
156
|
+
:header_params => header_params,
|
157
|
+
:query_params => query_params,
|
158
|
+
:form_params => form_params,
|
159
|
+
:body => post_body,
|
160
|
+
:auth_names => auth_names,
|
161
|
+
:return_type => 'File')
|
162
|
+
if api_client.config.debugging
|
163
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.convert_range_to_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|