aspose_cells_cloud 21.1 → 21.5
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/README.md +5 -4
- data/lib/aspose_cells_cloud.rb +1 -0
- data/lib/aspose_cells_cloud/api/cells_api.rb +96 -25
- data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +7 -7
- data/lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb +234 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/spec/api/cells_workbook_api_spec.rb +26 -0
- data/spec/spec_helper.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c0ddb6f61dfcbf590518412bd717d329c747910ac5490b77f3b7d0e809b928c
|
4
|
+
data.tar.gz: 36718c1f6494e25ea2d9e7e7dbd51abbab27d01da8a827a079c84e34cd1dba40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a5152e2191ce3ab7693d80621d4e333c2b592aad72dd9262cc76aa814df55ff582e1d8e95f558fc4a8c345bf89fd8671e4b4d5bdbc5e070b6081475efd3dc8c
|
7
|
+
data.tar.gz: e43c1b278d3427ab303d305c4579c68f3e3b530e23ec3007337cf8520f5e7c0577a67eb9a71d572c3e9003c63574b0ded1b20dc77c06661339965f774f0cf572
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
   [](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE)    [](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) 
|
2
2
|
|
3
3
|
|
4
4
|
# Ruby SDK for Spreadsheet Processing in the Cloud
|
@@ -21,10 +21,11 @@ Ruby Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate Mic
|
|
21
21
|
- Convert worksheets to PDF, XPS & SVG formats.
|
22
22
|
- [Convert Excel files to popular formats](https://docs.aspose.cloud/cells/convert-excel-workbook-to-different-file-formats/).
|
23
23
|
|
24
|
-
## Feature & Enhancements in Version 21.
|
24
|
+
## Feature & Enhancements in Version 21.5
|
25
25
|
|
26
|
-
- Support
|
27
|
-
-
|
26
|
+
- Support autofit columns for workbook and worksheet.
|
27
|
+
- Improve add and post row/column APIs.
|
28
|
+
- Improve Task APIs.
|
28
29
|
|
29
30
|
## Read & Write Spreadsheet Formats
|
30
31
|
|
data/lib/aspose_cells_cloud.rb
CHANGED
@@ -261,6 +261,7 @@ require 'aspose_cells_cloud/models/workbook_replace_response'
|
|
261
261
|
require 'aspose_cells_cloud/models/workbook_response'
|
262
262
|
require 'aspose_cells_cloud/models/workbook_settings_operate_parameter'
|
263
263
|
require 'aspose_cells_cloud/models/workbook_settings_response'
|
264
|
+
require 'aspose_cells_cloud/models/worksheet_operate_parameter'
|
264
265
|
require 'aspose_cells_cloud/models/worksheet_replace_response'
|
265
266
|
require 'aspose_cells_cloud/models/worksheet_response'
|
266
267
|
require 'aspose_cells_cloud/models/worksheets'
|
@@ -3455,7 +3455,7 @@ module AsposeCellsCloud
|
|
3455
3455
|
# @param [Hash] opts the optional parameters
|
3456
3456
|
# @option opts [String] :folder The workbook folder.
|
3457
3457
|
# @option opts [String] :storage_name storage name.
|
3458
|
-
# @return [
|
3458
|
+
# @return [CellsCloudResponse]
|
3459
3459
|
def cells_delete_worksheet_columns(name, sheet_name, column_index, columns, update_reference, opts = {})
|
3460
3460
|
data, _status_code, _headers = cells_delete_worksheet_columns_with_http_info(name, sheet_name, column_index, columns, update_reference, opts)
|
3461
3461
|
return data
|
@@ -3471,7 +3471,7 @@ module AsposeCellsCloud
|
|
3471
3471
|
# @param [Hash] opts the optional parameters
|
3472
3472
|
# @option opts [String] :folder The workbook folder.
|
3473
3473
|
# @option opts [String] :storage_name storage name.
|
3474
|
-
# @return [Array<(
|
3474
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
3475
3475
|
def cells_delete_worksheet_columns_with_http_info(name, sheet_name, column_index, columns, update_reference, opts = {})
|
3476
3476
|
if @api_client.config.debugging
|
3477
3477
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_delete_worksheet_columns ..."
|
@@ -3527,7 +3527,7 @@ module AsposeCellsCloud
|
|
3527
3527
|
:form_params => form_params,
|
3528
3528
|
:body => post_body,
|
3529
3529
|
:auth_names => auth_names,
|
3530
|
-
:return_type => '
|
3530
|
+
:return_type => 'CellsCloudResponse')
|
3531
3531
|
if @api_client.config.debugging
|
3532
3532
|
@api_client.config.logger.debug "API called: CellsApi#cells_delete_worksheet_columns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3533
3533
|
end
|
@@ -10656,7 +10656,7 @@ module AsposeCellsCloud
|
|
10656
10656
|
# @param [Hash] opts the optional parameters
|
10657
10657
|
# @option opts [String] :folder The workbook folder.
|
10658
10658
|
# @option opts [String] :storage_name storage name.
|
10659
|
-
# @return [
|
10659
|
+
# @return [CellsCloudResponse]
|
10660
10660
|
def cells_post_set_worksheet_column_width(name, sheet_name, column_index, width, opts = {})
|
10661
10661
|
data, _status_code, _headers = cells_post_set_worksheet_column_width_with_http_info(name, sheet_name, column_index, width, opts)
|
10662
10662
|
return data
|
@@ -10671,7 +10671,7 @@ module AsposeCellsCloud
|
|
10671
10671
|
# @param [Hash] opts the optional parameters
|
10672
10672
|
# @option opts [String] :folder The workbook folder.
|
10673
10673
|
# @option opts [String] :storage_name storage name.
|
10674
|
-
# @return [Array<(
|
10674
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
10675
10675
|
def cells_post_set_worksheet_column_width_with_http_info(name, sheet_name, column_index, width, opts = {})
|
10676
10676
|
if @api_client.config.debugging
|
10677
10677
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_post_set_worksheet_column_width ..."
|
@@ -10722,7 +10722,7 @@ module AsposeCellsCloud
|
|
10722
10722
|
:form_params => form_params,
|
10723
10723
|
:body => post_body,
|
10724
10724
|
:auth_names => auth_names,
|
10725
|
-
:return_type => '
|
10725
|
+
:return_type => 'CellsCloudResponse')
|
10726
10726
|
if @api_client.config.debugging
|
10727
10727
|
@api_client.config.logger.debug "API called: CellsApi#cells_post_set_worksheet_column_width\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10728
10728
|
end
|
@@ -11234,7 +11234,7 @@ module AsposeCellsCloud
|
|
11234
11234
|
# @option opts [Float] :height The new row height. (default to 0.0)
|
11235
11235
|
# @option opts [String] :folder The document folder.
|
11236
11236
|
# @option opts [String] :storage_name storage name.
|
11237
|
-
# @return [
|
11237
|
+
# @return [CellsCloudResponse]
|
11238
11238
|
def cells_post_update_worksheet_row(name, sheet_name, row_index, opts = {})
|
11239
11239
|
data, _status_code, _headers = cells_post_update_worksheet_row_with_http_info(name, sheet_name, row_index, opts)
|
11240
11240
|
return data
|
@@ -11249,7 +11249,7 @@ module AsposeCellsCloud
|
|
11249
11249
|
# @option opts [Float] :height The new row height.
|
11250
11250
|
# @option opts [String] :folder The document folder.
|
11251
11251
|
# @option opts [String] :storage_name storage name.
|
11252
|
-
# @return [Array<(
|
11252
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
11253
11253
|
def cells_post_update_worksheet_row_with_http_info(name, sheet_name, row_index, opts = {})
|
11254
11254
|
if @api_client.config.debugging
|
11255
11255
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_post_update_worksheet_row ..."
|
@@ -11296,7 +11296,7 @@ module AsposeCellsCloud
|
|
11296
11296
|
:form_params => form_params,
|
11297
11297
|
:body => post_body,
|
11298
11298
|
:auth_names => auth_names,
|
11299
|
-
:return_type => '
|
11299
|
+
:return_type => 'CellsCloudResponse')
|
11300
11300
|
if @api_client.config.debugging
|
11301
11301
|
@api_client.config.logger.debug "API called: CellsApi#cells_post_update_worksheet_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
11302
11302
|
end
|
@@ -11926,7 +11926,7 @@ module AsposeCellsCloud
|
|
11926
11926
|
# @option opts [BOOLEAN] :update_reference The update reference. (default to true)
|
11927
11927
|
# @option opts [String] :folder The workbook folder.
|
11928
11928
|
# @option opts [String] :storage_name storage name.
|
11929
|
-
# @return [
|
11929
|
+
# @return [CellsCloudResponse]
|
11930
11930
|
def cells_put_insert_worksheet_columns(name, sheet_name, column_index, columns, opts = {})
|
11931
11931
|
data, _status_code, _headers = cells_put_insert_worksheet_columns_with_http_info(name, sheet_name, column_index, columns, opts)
|
11932
11932
|
return data
|
@@ -11942,7 +11942,7 @@ module AsposeCellsCloud
|
|
11942
11942
|
# @option opts [BOOLEAN] :update_reference The update reference.
|
11943
11943
|
# @option opts [String] :folder The workbook folder.
|
11944
11944
|
# @option opts [String] :storage_name storage name.
|
11945
|
-
# @return [Array<(
|
11945
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
11946
11946
|
def cells_put_insert_worksheet_columns_with_http_info(name, sheet_name, column_index, columns, opts = {})
|
11947
11947
|
if @api_client.config.debugging
|
11948
11948
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_put_insert_worksheet_columns ..."
|
@@ -11994,7 +11994,7 @@ module AsposeCellsCloud
|
|
11994
11994
|
:form_params => form_params,
|
11995
11995
|
:body => post_body,
|
11996
11996
|
:auth_names => auth_names,
|
11997
|
-
:return_type => '
|
11997
|
+
:return_type => 'CellsCloudResponse')
|
11998
11998
|
if @api_client.config.debugging
|
11999
11999
|
@api_client.config.logger.debug "API called: CellsApi#cells_put_insert_worksheet_columns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
12000
12000
|
end
|
@@ -12009,7 +12009,7 @@ module AsposeCellsCloud
|
|
12009
12009
|
# @param [Hash] opts the optional parameters
|
12010
12010
|
# @option opts [String] :folder The document folder.
|
12011
12011
|
# @option opts [String] :storage_name storage name.
|
12012
|
-
# @return [
|
12012
|
+
# @return [CellsCloudResponse]
|
12013
12013
|
def cells_put_insert_worksheet_row(name, sheet_name, row_index, opts = {})
|
12014
12014
|
data, _status_code, _headers = cells_put_insert_worksheet_row_with_http_info(name, sheet_name, row_index, opts)
|
12015
12015
|
return data
|
@@ -12023,7 +12023,7 @@ module AsposeCellsCloud
|
|
12023
12023
|
# @param [Hash] opts the optional parameters
|
12024
12024
|
# @option opts [String] :folder The document folder.
|
12025
12025
|
# @option opts [String] :storage_name storage name.
|
12026
|
-
# @return [Array<(
|
12026
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
12027
12027
|
def cells_put_insert_worksheet_row_with_http_info(name, sheet_name, row_index, opts = {})
|
12028
12028
|
if @api_client.config.debugging
|
12029
12029
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_put_insert_worksheet_row ..."
|
@@ -12069,7 +12069,7 @@ module AsposeCellsCloud
|
|
12069
12069
|
:form_params => form_params,
|
12070
12070
|
:body => post_body,
|
12071
12071
|
:auth_names => auth_names,
|
12072
|
-
:return_type => '
|
12072
|
+
:return_type => 'CellsCloudResponse')
|
12073
12073
|
if @api_client.config.debugging
|
12074
12074
|
@api_client.config.logger.debug "API called: CellsApi#cells_put_insert_worksheet_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
12075
12075
|
end
|
@@ -14998,6 +14998,77 @@ module AsposeCellsCloud
|
|
14998
14998
|
return data, status_code, headers
|
14999
14999
|
end
|
15000
15000
|
|
15001
|
+
# Autofit workbook columns.
|
15002
|
+
#
|
15003
|
+
# @param name Document name.
|
15004
|
+
# @param [Hash] opts the optional parameters
|
15005
|
+
# @option opts [AutoFitterOptions] :auto_fitter_options Auto Fitter Options.
|
15006
|
+
# @option opts [Integer] :start_column Start column.
|
15007
|
+
# @option opts [Integer] :end_column End column.
|
15008
|
+
# @option opts [String] :folder Document's folder.
|
15009
|
+
# @option opts [String] :storage_name storage name.
|
15010
|
+
# @return [CellsCloudResponse]
|
15011
|
+
def cells_workbook_post_autofit_workbook_columns(name, opts = {})
|
15012
|
+
data, _status_code, _headers = cells_workbook_post_autofit_workbook_columns_with_http_info(name, opts)
|
15013
|
+
return data
|
15014
|
+
end
|
15015
|
+
|
15016
|
+
# Autofit workbook columns.
|
15017
|
+
#
|
15018
|
+
# @param name Document name.
|
15019
|
+
# @param [Hash] opts the optional parameters
|
15020
|
+
# @option opts [AutoFitterOptions] :auto_fitter_options Auto Fitter Options.
|
15021
|
+
# @option opts [Integer] :start_column Start column.
|
15022
|
+
# @option opts [Integer] :end_column End column.
|
15023
|
+
# @option opts [String] :folder Document's folder.
|
15024
|
+
# @option opts [String] :storage_name storage name.
|
15025
|
+
# @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
|
15026
|
+
def cells_workbook_post_autofit_workbook_columns_with_http_info(name, opts = {})
|
15027
|
+
if @api_client.config.debugging
|
15028
|
+
@api_client.config.logger.debug "Calling API: CellsApi.cells_workbook_post_autofit_workbook_columns ..."
|
15029
|
+
end
|
15030
|
+
@api_client.request_token_if_needed
|
15031
|
+
# verify the required parameter 'name' is set
|
15032
|
+
if @api_client.config.client_side_validation && name.nil?
|
15033
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.cells_workbook_post_autofit_workbook_columns"
|
15034
|
+
end
|
15035
|
+
# resource path
|
15036
|
+
local_var_path = "/cells/{name}/autofitcolumns".sub('{' + 'name' + '}', name.to_s)
|
15037
|
+
|
15038
|
+
# query parameters
|
15039
|
+
query_params = {}
|
15040
|
+
query_params[:'startColumn'] = opts[:'start_column'] if !opts[:'start_column'].nil?
|
15041
|
+
query_params[:'endColumn'] = opts[:'end_column'] if !opts[:'end_column'].nil?
|
15042
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
15043
|
+
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
15044
|
+
|
15045
|
+
# header parameters
|
15046
|
+
header_params = {}
|
15047
|
+
# HTTP header 'Accept' (if needed)
|
15048
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
15049
|
+
# HTTP header 'Content-Type'
|
15050
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
15051
|
+
|
15052
|
+
# form parameters
|
15053
|
+
form_params = {}
|
15054
|
+
|
15055
|
+
# http body (model)
|
15056
|
+
post_body = @api_client.object_to_http_body(opts[:'auto_fitter_options'])
|
15057
|
+
#auth_names = []
|
15058
|
+
auth_names = ['JWT']
|
15059
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
15060
|
+
:header_params => header_params,
|
15061
|
+
:query_params => query_params,
|
15062
|
+
:form_params => form_params,
|
15063
|
+
:body => post_body,
|
15064
|
+
:auth_names => auth_names,
|
15065
|
+
:return_type => 'CellsCloudResponse')
|
15066
|
+
if @api_client.config.debugging
|
15067
|
+
@api_client.config.logger.debug "API called: CellsApi#cells_workbook_post_autofit_workbook_columns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
15068
|
+
end
|
15069
|
+
return data, status_code, headers
|
15070
|
+
end
|
15071
|
+
|
15001
15072
|
# Autofit workbook rows.
|
15002
15073
|
#
|
15003
15074
|
# @param name Document name.
|
@@ -15773,33 +15844,33 @@ module AsposeCellsCloud
|
|
15773
15844
|
|
15774
15845
|
# Convert workbook from request content to some format.
|
15775
15846
|
#
|
15776
|
-
# @param
|
15847
|
+
# @param file
|
15777
15848
|
# @param [Hash] opts the optional parameters
|
15778
15849
|
# @option opts [String] :format The format to convert.
|
15779
15850
|
# @option opts [String] :password The workbook password.
|
15780
15851
|
# @option opts [String] :out_path Path to save result
|
15781
15852
|
# @return [File]
|
15782
|
-
def cells_workbook_put_convert_workbook(
|
15783
|
-
data, _status_code, _headers = cells_workbook_put_convert_workbook_with_http_info(
|
15853
|
+
def cells_workbook_put_convert_workbook(file, opts = {})
|
15854
|
+
data, _status_code, _headers = cells_workbook_put_convert_workbook_with_http_info(file, opts)
|
15784
15855
|
return data
|
15785
15856
|
end
|
15786
15857
|
|
15787
15858
|
# Convert workbook from request content to some format.
|
15788
15859
|
#
|
15789
|
-
# @param
|
15860
|
+
# @param file
|
15790
15861
|
# @param [Hash] opts the optional parameters
|
15791
15862
|
# @option opts [String] :format The format to convert.
|
15792
15863
|
# @option opts [String] :password The workbook password.
|
15793
15864
|
# @option opts [String] :out_path Path to save result
|
15794
15865
|
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
15795
|
-
def cells_workbook_put_convert_workbook_with_http_info(
|
15866
|
+
def cells_workbook_put_convert_workbook_with_http_info(file, opts = {})
|
15796
15867
|
if @api_client.config.debugging
|
15797
15868
|
@api_client.config.logger.debug "Calling API: CellsApi.cells_workbook_put_convert_workbook ..."
|
15798
15869
|
end
|
15799
15870
|
@api_client.request_token_if_needed
|
15800
|
-
# verify the required parameter '
|
15801
|
-
if @api_client.config.client_side_validation &&
|
15802
|
-
fail ArgumentError, "Missing the required parameter '
|
15871
|
+
# verify the required parameter 'file' is set
|
15872
|
+
if @api_client.config.client_side_validation && file.nil?
|
15873
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling CellsApi.cells_workbook_put_convert_workbook"
|
15803
15874
|
end
|
15804
15875
|
# resource path
|
15805
15876
|
local_var_path = "/cells/convert"
|
@@ -15815,14 +15886,14 @@ module AsposeCellsCloud
|
|
15815
15886
|
# HTTP header 'Accept' (if needed)
|
15816
15887
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
15817
15888
|
# HTTP header 'Content-Type'
|
15818
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['
|
15889
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
15819
15890
|
|
15820
15891
|
# form parameters
|
15821
15892
|
form_params = {}
|
15822
15893
|
|
15823
15894
|
# http body (model)
|
15824
15895
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
15825
|
-
post_body =
|
15896
|
+
post_body =file
|
15826
15897
|
#auth_names = []
|
15827
15898
|
auth_names = ['JWT']
|
15828
15899
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
@@ -27,7 +27,7 @@ module AsposeCellsCloud
|
|
27
27
|
class ChartOperateParameter
|
28
28
|
attr_accessor :operate_type
|
29
29
|
|
30
|
-
attr_accessor :
|
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
|
-
:'
|
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
|
-
:'
|
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?(:'
|
94
|
-
self.
|
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
|
-
|
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,
|
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
|
@@ -0,0 +1,234 @@
|
|
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 WorksheetOperateParameter
|
28
|
+
attr_accessor :operate_type
|
29
|
+
|
30
|
+
attr_accessor :name
|
31
|
+
|
32
|
+
attr_accessor :sheet_type
|
33
|
+
|
34
|
+
attr_accessor :new_name
|
35
|
+
|
36
|
+
attr_accessor :moving_request
|
37
|
+
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'operate_type' => :'OperateType',
|
43
|
+
:'name' => :'Name',
|
44
|
+
:'sheet_type' => :'SheetType',
|
45
|
+
:'new_name' => :'NewName',
|
46
|
+
:'moving_request' => :'MovingRequest'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'operate_type' => :'String',
|
54
|
+
:'name' => :'String',
|
55
|
+
:'sheet_type' => :'String',
|
56
|
+
:'new_name' => :'String',
|
57
|
+
:'moving_request' => :'WorksheetMovingRequest'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
68
|
+
|
69
|
+
if attributes.has_key?(:'OperateType')
|
70
|
+
self.operate_type = attributes[:'OperateType']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'Name')
|
74
|
+
self.name = attributes[:'Name']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'SheetType')
|
78
|
+
self.sheet_type = attributes[:'SheetType']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'NewName')
|
82
|
+
self.new_name = attributes[:'NewName']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'MovingRequest')
|
86
|
+
self.moving_request = attributes[:'MovingRequest']
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
92
|
+
# @return Array for valid properies with the reasons
|
93
|
+
def list_invalid_properties
|
94
|
+
invalid_properties = Array.new
|
95
|
+
return invalid_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Check to see if the all the properties in the model are valid
|
99
|
+
# @return true if the model is valid
|
100
|
+
def valid?
|
101
|
+
return true
|
102
|
+
end
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
operate_type == o.operate_type &&
|
110
|
+
name == o.name &&
|
111
|
+
sheet_type == o.sheet_type &&
|
112
|
+
new_name == o.new_name &&
|
113
|
+
moving_request == o.moving_request
|
114
|
+
end
|
115
|
+
|
116
|
+
# @see the `==` method
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def eql?(o)
|
119
|
+
self == o
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Fixnum] Hash code
|
124
|
+
def hash
|
125
|
+
[operate_type, name, sheet_type, new_name, moving_request].hash
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def build_from_hash(attributes)
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
133
|
+
self.class.swagger_types.each_pair do |key, type|
|
134
|
+
if type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :DateTime
|
155
|
+
DateTime.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :BOOLEAN
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
186
|
+
temp_model.build_from_hash(value)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the string representation of the object
|
191
|
+
# @return [String] String presentation of the object
|
192
|
+
def to_s
|
193
|
+
to_hash.to_s
|
194
|
+
end
|
195
|
+
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_body
|
199
|
+
to_hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the object in the form of hash
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_hash
|
205
|
+
hash = {}
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
207
|
+
value = self.send(attr)
|
208
|
+
next if value.nil?
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map{ |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -230,6 +230,32 @@ describe 'CellsWorkbookApi' do
|
|
230
230
|
end
|
231
231
|
end
|
232
232
|
|
233
|
+
# unit tests for cells_workbook_post_autofit_workbook_columns
|
234
|
+
# Autofit workbook columns.
|
235
|
+
#
|
236
|
+
# @param name Document name.
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @option opts [AutoFitterOptions] :auto_fitter_options Auto Fitter Options.
|
239
|
+
# @option opts [Integer] :start_column Start column.
|
240
|
+
# @option opts [Integer] :end_column End column.
|
241
|
+
# @option opts [String] :folder Document's folder.
|
242
|
+
# @option opts [String] :storage storage name.
|
243
|
+
# @return [CellsCloudResponse]
|
244
|
+
describe 'cells_workbook_post_autofit_workbook_columns test' do
|
245
|
+
it "should work" do
|
246
|
+
name = $BOOK1
|
247
|
+
auto_fitter_options = nil
|
248
|
+
start_column = 1
|
249
|
+
end_column = 100
|
250
|
+
only_auto = true
|
251
|
+
folder = $TEMPFOLDER
|
252
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
253
|
+
expect(result.uploaded.size).to be > 0
|
254
|
+
result = @instance.cells_workbook_post_autofit_workbook_columns(name, {:auto_fitter_options=>auto_fitter_options, :start_column=>start_column, :end_column=>end_column, :folder=>folder})
|
255
|
+
expect(result.code).to eql(200)
|
256
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
257
|
+
end
|
258
|
+
end
|
233
259
|
|
234
260
|
# unit tests for cells_workbook_post_import_data
|
235
261
|
#
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_cells_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '21.
|
4
|
+
version: '21.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspose Cells Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -474,6 +474,7 @@ files:
|
|
474
474
|
- lib/aspose_cells_cloud/models/workbook_settings_response.rb
|
475
475
|
- lib/aspose_cells_cloud/models/worksheet.rb
|
476
476
|
- lib/aspose_cells_cloud/models/worksheet_moving_request.rb
|
477
|
+
- lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb
|
477
478
|
- lib/aspose_cells_cloud/models/worksheet_replace_response.rb
|
478
479
|
- lib/aspose_cells_cloud/models/worksheet_response.rb
|
479
480
|
- lib/aspose_cells_cloud/models/worksheets.rb
|