aspose_cells_cloud 22.2 → 22.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92b8874e2b654f73bc8f49b0b869f6471184cbda7ad3e55de8411f66ac8df9ba
4
- data.tar.gz: c4183274376adfabdd663e8b37598a348b40df6caca3ec76f8e5a6ea8f0b9093
3
+ metadata.gz: 4ddedfc46768b7b6b95100aae57887d3f4bf159eed33a424e7192b4d037b14c4
4
+ data.tar.gz: 48fe782e98ac07cfd106c2e05c37fee9b914238cdff6d8ca374c91947f6e05d3
5
5
  SHA512:
6
- metadata.gz: 424a40b71a70e9cfcafbbe37f28a291c63bad9e03509ca16b70021e4ed855d7e05df27b78289be3ba3960887745cc71e068eb52828050fec37d36a73edeca107
7
- data.tar.gz: 07f43440db381800d75b3b484ac561764a628424b0b301c9960ec323fc715d1583801422ac869366af43f4e5fa333110d67c17e633007789f8226705387001a8
6
+ metadata.gz: e94b1b9feaf0d8bd01da6fb0a6dc2c6d4d9f902f156fa8e5432b710d2e908c43e8661420404971ea54eb6c5f7db64fb1b6e714b00c23330da1856f0dc811b4f7
7
+ data.tar.gz: b2a91c169f8719ad585ad177bc858ab91bb289c6dd54230ebb9055566c44470b97e6dd87bbd17007f7284ecba09a26ae9e5d098be6db780829b0d5e9d4cb7a82
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/22.2)
1
+ ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/22.5)
2
2
 
3
3
 
4
4
  # Ruby SDK for Spreadsheet Processing in the Cloud
@@ -22,12 +22,9 @@ Ruby Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate Mic
22
22
  - [Convert Excel files to popular formats](https://docs.aspose.cloud/cells/convert-excel-workbook-to-different-file-formats/).
23
23
 
24
24
 
25
- ## Feature & Enhancements in Version 22.2
25
+ ## Feature & Enhancements in Version 22.5
26
26
 
27
- - Update return value for the DeleteUnprotectWorksheet API on Aspose.Cells Cloud.
28
- - Update return value for the PutProtectWorksheet API on Aspose.Cells Cloud.
29
- - Update return value for the PostSetCellHtmlString API on Aspose.Cells Cloud.
30
- - Update return value for the PostUpdateWorksheetProperty API on Aspose.Cells Cloud.
27
+ - Add a new API for getting barcode description.
31
28
 
32
29
 
33
30
 
@@ -7353,7 +7353,80 @@ module AsposeCellsCloud
7353
7353
  end
7354
7354
  return data, status_code, headers
7355
7355
  end
7356
+ # Get chart area border info.
7357
+ #
7358
+ # @param name Workbook name.
7359
+ # @param sheet_name Worksheet name.
7360
+ # @param picture_index The picture index.
7361
+ # @param [Hash] opts the optional parameters
7362
+ # @option opts [String] :folder Workbook folder.
7363
+ # @option opts [String] :storage_name storage name.
7364
+ # @return [BarcodeResponseList]
7365
+ def cells_picture_get_extract_barcodes(name, sheet_name, picture_index, opts = {})
7366
+ data, _status_code, _headers = cells_picture_get_extract_barcodes_with_http_info(name, sheet_name, picture_index, opts)
7367
+ return data
7368
+ end
7356
7369
 
7370
+ # Get chart area border info.
7371
+ #
7372
+ # @param name Workbook name.
7373
+ # @param sheet_name Worksheet name.
7374
+ # @param picture_index The picture index.
7375
+ # @param [Hash] opts the optional parameters
7376
+ # @option opts [String] :folder Workbook folder.
7377
+ # @option opts [String] :storage_name storage name.
7378
+ # @return [Array<(BarcodeResponseList, Fixnum, Hash)>] BarcodeResponseList data, response status code and response headers
7379
+ def cells_picture_get_extract_barcodes_with_http_info(name, sheet_name, picture_index, opts = {})
7380
+ if @api_client.config.debugging
7381
+ @api_client.config.logger.debug "Calling API: CellsApi.cells_picture_get_extract_barcodes ..."
7382
+ end
7383
+ @api_client.request_token_if_needed
7384
+ # verify the required parameter 'name' is set
7385
+ if @api_client.config.client_side_validation && name.nil?
7386
+ fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.cells_picture_get_extract_barcodes"
7387
+ end
7388
+ # verify the required parameter 'sheet_name' is set
7389
+ if @api_client.config.client_side_validation && sheet_name.nil?
7390
+ fail ArgumentError, "Missing the required parameter 'sheet_name' when calling CellsApi.cells_picture_get_extract_barcodes"
7391
+ end
7392
+ # verify the required parameter 'picture_index' is set
7393
+ if @api_client.config.client_side_validation && picture_index.nil?
7394
+ fail ArgumentError, "Missing the required parameter 'picture_index' when calling CellsApi.cells_picture_get_extract_barcodes"
7395
+ end
7396
+ # resource path
7397
+ local_var_path = "/cells/{name}/worksheets/{sheetName}/pictures/{pictureIndex}/recognize".sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s).sub('{' + 'pictureIndex' + '}', picture_index.to_s)
7398
+
7399
+ # query parameters
7400
+ query_params = {}
7401
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
7402
+ query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
7403
+
7404
+ # header parameters
7405
+ header_params = {}
7406
+ # HTTP header 'Accept' (if needed)
7407
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
7408
+ # HTTP header 'Content-Type'
7409
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
7410
+
7411
+ # form parameters
7412
+ form_params = {}
7413
+
7414
+ # http body (model)
7415
+ post_body = nil
7416
+ #auth_names = []
7417
+ auth_names = ['JWT']
7418
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
7419
+ :header_params => header_params,
7420
+ :query_params => query_params,
7421
+ :form_params => form_params,
7422
+ :body => post_body,
7423
+ :auth_names => auth_names,
7424
+ :return_type => 'BarcodeResponseList')
7425
+ if @api_client.config.debugging
7426
+ @api_client.config.logger.debug "API called: CellsApi#cells_picture_get_extract_barcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7427
+ end
7428
+ return data, status_code, headers
7429
+ end
7357
7430
  # Delete a picture object in worksheet
7358
7431
  #
7359
7432
  # @param name The workbook name.
@@ -13316,7 +13389,11 @@ module AsposeCellsCloud
13316
13389
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
13317
13390
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
13318
13391
  query_params[:'outStorageName'] = opts[:'out_storage_name'] if !opts[:'out_storage_name'].nil?
13319
-
13392
+ if opts[:'extendedQueryParameters']
13393
+ opts[:'extendedQueryParameters'].each do |key , value|
13394
+ query_params[key] = value
13395
+ end
13396
+ end
13320
13397
  # header parameters
13321
13398
  header_params = {}
13322
13399
  # HTTP header 'Accept' (if needed)
@@ -14978,7 +15055,11 @@ module AsposeCellsCloud
14978
15055
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
14979
15056
  query_params[:'outPath'] = opts[:'out_path'] if !opts[:'out_path'].nil?
14980
15057
  query_params[:'outStorageName'] = opts[:'out_storage_name'] if !opts[:'out_storage_name'].nil?
14981
-
15058
+ if opts[:'extendedQueryParameters']
15059
+ opts[:'extendedQueryParameters'].each do |key , value|
15060
+ query_params[key] = value
15061
+ end
15062
+ end
14982
15063
  # header parameters
14983
15064
  header_params = {}
14984
15065
  # HTTP header 'Accept' (if needed)
@@ -15541,6 +15622,83 @@ module AsposeCellsCloud
15541
15622
  return data, status_code, headers
15542
15623
  end
15543
15624
 
15625
+ # Add digital signature.
15626
+ #
15627
+ # @param name Workbook name.
15628
+ # @param digitalsignaturefile Digital signature file parameters.
15629
+ # @param password
15630
+ # @param [Hash] opts the optional parameters
15631
+ # @option opts [String] :folder Workbook&#39;s folder.
15632
+ # @option opts [String] :storage_name storage name.
15633
+ # @return [CellsCloudResponse]
15634
+ def cells_workbook_post_digital_signature(name, digitalsignaturefile, password, opts = {})
15635
+ data, _status_code, _headers = cells_workbook_post_digital_signature_with_http_info(name, digitalsignaturefile, password, opts)
15636
+ return data
15637
+ end
15638
+
15639
+ # Add digital signature.
15640
+ #
15641
+ # @param name Workbook name.
15642
+ # @param digitalsignaturefile Digital signature file parameters.
15643
+ # @param password
15644
+ # @param [Hash] opts the optional parameters
15645
+ # @option opts [String] :folder Workbook&#39;s folder.
15646
+ # @option opts [String] :storage_name storage name.
15647
+ # @return [Array<(CellsCloudResponse, Fixnum, Hash)>] CellsCloudResponse data, response status code and response headers
15648
+ def cells_workbook_post_digital_signature_with_http_info(name, digitalsignaturefile, password, opts = {})
15649
+ if @api_client.config.debugging
15650
+ @api_client.config.logger.debug "Calling API: CellsApi.cells_workbook_post_digital_signature ..."
15651
+ end
15652
+ @api_client.request_token_if_needed
15653
+ # verify the required parameter 'name' is set
15654
+ if @api_client.config.client_side_validation && name.nil?
15655
+ fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.cells_workbook_post_digital_signature"
15656
+ end
15657
+ # verify the required parameter 'digitalsignaturefile' is set
15658
+ if @api_client.config.client_side_validation && digitalsignaturefile.nil?
15659
+ fail ArgumentError, "Missing the required parameter 'digitalsignaturefile' when calling CellsApi.cells_workbook_post_digital_signature"
15660
+ end
15661
+ # verify the required parameter 'password' is set
15662
+ if @api_client.config.client_side_validation && password.nil?
15663
+ fail ArgumentError, "Missing the required parameter 'password' when calling CellsApi.cells_workbook_post_digital_signature"
15664
+ end
15665
+ # resource path
15666
+ local_var_path = "/cells/{name}/digitalsignature".sub('{' + 'name' + '}', name.to_s)
15667
+
15668
+ # query parameters
15669
+ query_params = {}
15670
+ query_params[:'digitalsignaturefile'] = digitalsignaturefile
15671
+ query_params[:'password'] = password
15672
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
15673
+ query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
15674
+
15675
+ # header parameters
15676
+ header_params = {}
15677
+ # HTTP header 'Accept' (if needed)
15678
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
15679
+ # HTTP header 'Content-Type'
15680
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
15681
+
15682
+ # form parameters
15683
+ form_params = {}
15684
+
15685
+ # http body (model)
15686
+ post_body = nil
15687
+ #auth_names = []
15688
+ auth_names = ['JWT']
15689
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
15690
+ :header_params => header_params,
15691
+ :query_params => query_params,
15692
+ :form_params => form_params,
15693
+ :body => post_body,
15694
+ :auth_names => auth_names,
15695
+ :return_type => 'CellsCloudResponse')
15696
+ if @api_client.config.debugging
15697
+ @api_client.config.logger.debug "API called: CellsApi#cells_workbook_post_digital_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
15698
+ end
15699
+ return data, status_code, headers
15700
+ end
15701
+
15544
15702
  # Encript document.
15545
15703
  #
15546
15704
  # @param name The document name.
@@ -16290,7 +16448,11 @@ module AsposeCellsCloud
16290
16448
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
16291
16449
  query_params[:'outPath'] = opts[:'out_path'] if !opts[:'out_path'].nil?
16292
16450
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
16293
-
16451
+ if opts[:'extendedQueryParameters']
16452
+ opts[:'extendedQueryParameters'].each do |key , value|
16453
+ query_params[key] = value
16454
+ end
16455
+ end
16294
16456
  # header parameters
16295
16457
  header_params = {}
16296
16458
  # HTTP header 'Accept' (if needed)
@@ -344,6 +344,11 @@ module AsposeCellsCloud
344
344
  query_params = {}
345
345
  query_params[:'objectType'] = object_type
346
346
  query_params[:'format'] = format
347
+ if opts[:'extendedQueryParameters']
348
+ opts[:'extendedQueryParameters'].each do |key , value|
349
+ query_params[key] = value
350
+ end
351
+ end
347
352
 
348
353
  # header parameters
349
354
  header_params = {}
@@ -116,7 +116,7 @@ module AsposeCellsCloud
116
116
  :params => query_params,
117
117
  :body => body
118
118
  }
119
-
119
+
120
120
  if [:post, :patch, :put, :delete].include?(http_method)
121
121
  req_body = build_request_body(header_params, form_params, opts[:body])
122
122
  req_opts.update :body => req_body
@@ -137,7 +137,7 @@ module AsposeCellsCloud
137
137
  f.request :url_encoded
138
138
  f.adapter Faraday.default_adapter
139
139
  end
140
-
140
+
141
141
  if req_opts[:body] == {}
142
142
  req_opts[:body] = nil
143
143
  end
@@ -0,0 +1,215 @@
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 BarcodeResponse
28
+ attr_accessor :barcode_value
29
+
30
+ attr_accessor :barcode_type
31
+
32
+ attr_accessor :checksum
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'barcode_value' => :'BarcodeValue',
38
+ :'barcode_type' => :'BarcodeType',
39
+ :'checksum' => :'Checksum'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'barcode_value' => :'String',
47
+ :'barcode_type' => :'String',
48
+ :'checksum' => :'String'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ return unless attributes.is_a?(Hash)
56
+
57
+ # convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
59
+
60
+ if attributes.has_key?(:'BarcodeValue')
61
+ self.barcode_value = attributes[:'BarcodeValue']
62
+ end
63
+
64
+ if attributes.has_key?(:'BarcodeType')
65
+ self.barcode_type = attributes[:'BarcodeType']
66
+ end
67
+
68
+ if attributes.has_key?(:'Checksum')
69
+ self.checksum = attributes[:'Checksum']
70
+ end
71
+
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properies with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ return invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ return true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ barcode_value == o.barcode_value &&
93
+ barcode_type == o.barcode_type &&
94
+ checksum == o.checksum
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [barcode_value, barcode_type, checksum, region].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = AsposeCellsCloud.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map{ |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+
215
+ end
@@ -0,0 +1,200 @@
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 BarcodeResponseList
28
+ attr_accessor :barcodes
29
+
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'barcodes' => :'Barcodes'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'barcodes' => :'Array<BarcodeResponse>'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
52
+
53
+ if attributes.has_key?(:'Barcodes')
54
+ if (value = attributes[:'Barcodes']).is_a?(Array)
55
+ self.barcodes = value
56
+ end
57
+ end
58
+
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properies with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ return invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ barcodes == o.barcodes
80
+ end
81
+
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(o)
85
+ self == o
86
+ end
87
+
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Fixnum] Hash code
90
+ def hash
91
+ [barcodes].hash
92
+ end
93
+
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def build_from_hash(attributes)
98
+ return nil unless attributes.is_a?(Hash)
99
+ self.class.swagger_types.each_pair do |key, type|
100
+ if type =~ /\AArray<(.*)>/i
101
+ # check to ensure the input is an array given that the the attribute
102
+ # is documented as an array but the input is not
103
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
104
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
105
+ end
106
+ elsif !attributes[self.class.attribute_map[key]].nil?
107
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
108
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
109
+ end
110
+
111
+ self
112
+ end
113
+
114
+ # Deserializes the data based on type
115
+ # @param string type Data type
116
+ # @param string value Value to be deserialized
117
+ # @return [Object] Deserialized data
118
+ def _deserialize(type, value)
119
+ case type.to_sym
120
+ when :DateTime
121
+ DateTime.parse(value)
122
+ when :Date
123
+ Date.parse(value)
124
+ when :String
125
+ value.to_s
126
+ when :Integer
127
+ value.to_i
128
+ when :Float
129
+ value.to_f
130
+ when :BOOLEAN
131
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
132
+ true
133
+ else
134
+ false
135
+ end
136
+ when :Object
137
+ # generic object (usually a Hash), return directly
138
+ value
139
+ when /\AArray<(?<inner_type>.+)>\z/
140
+ inner_type = Regexp.last_match[:inner_type]
141
+ value.map { |v| _deserialize(inner_type, v) }
142
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
143
+ k_type = Regexp.last_match[:k_type]
144
+ v_type = Regexp.last_match[:v_type]
145
+ {}.tap do |hash|
146
+ value.each do |k, v|
147
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
148
+ end
149
+ end
150
+ else # model
151
+ temp_model = AsposeCellsCloud.const_get(type).new
152
+ temp_model.build_from_hash(value)
153
+ end
154
+ end
155
+
156
+ # Returns the string representation of the object
157
+ # @return [String] String presentation of the object
158
+ def to_s
159
+ to_hash.to_s
160
+ end
161
+
162
+ # to_body is an alias to to_hash (backward compatibility)
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_body
165
+ to_hash
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = self.send(attr)
174
+ next if value.nil?
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ # Outputs non-array value in the form of hash
181
+ # For object, use to_hash. Otherwise, just return the value
182
+ # @param [Object] value Any valid value
183
+ # @return [Hash] Returns the value in the form of hash
184
+ def _to_hash(value)
185
+ if value.is_a?(Array)
186
+ value.compact.map{ |v| _to_hash(v) }
187
+ elsif value.is_a?(Hash)
188
+ {}.tap do |hash|
189
+ value.each { |k, v| hash[k] = _to_hash(v) }
190
+ end
191
+ elsif value.respond_to? :to_hash
192
+ value.to_hash
193
+ else
194
+ value
195
+ end
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -21,5 +21,5 @@ SOFTWARE.
21
21
  =end
22
22
 
23
23
  module AsposeCellsCloud
24
- VERSION = "22.2"
24
+ VERSION = "22.5"
25
25
  end
@@ -31,6 +31,8 @@ require 'aspose_cells_cloud/models/above_average'
31
31
  require 'aspose_cells_cloud/models/access_token_response'
32
32
  require 'aspose_cells_cloud/models/area'
33
33
  require 'aspose_cells_cloud/models/auto_fitter_options'
34
+ require 'aspose_cells_cloud/models/barcode_response'
35
+ require 'aspose_cells_cloud/models/barcode_response_list'
34
36
  require 'aspose_cells_cloud/models/batch_convert_request'
35
37
  require 'aspose_cells_cloud/models/border'
36
38
  require 'aspose_cells_cloud/models/calculation_options'
@@ -0,0 +1,41 @@
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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for AsposeCellsCloud::CellsApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'CellsBarcodeApi' do
20
+ before do
21
+ @instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
22
+ $VERBOSE = nil
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'cells_unit test' do
30
+ it "should work" do
31
+ folder = $TEMPFOLDER
32
+ result = @instance.upload_file( folder+"/"+ $BOOK1, ::File.open(File.expand_path("data/"+ $BOOK1),"r") {|io| io.read(io.size) })
33
+ expect(result.uploaded.size).to be > 0
34
+
35
+ result = @instance.cells_picture_get_extract_barcodes($BOOK1,"Sheet8",0, { :folder=>folder})
36
+
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+ end
41
+
@@ -161,6 +161,7 @@ describe 'LightCellsApi' do
161
161
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
162
162
  end
163
163
  end
164
+
164
165
  describe 'lite_cells_unit export object test' do
165
166
  it "should work" do
166
167
  files = {}
@@ -169,11 +170,26 @@ describe 'LightCellsApi' do
169
170
  name =$AssemblyTestXlsx
170
171
  files[name] = ::File.open(File.expand_path("data/"+name),"r")
171
172
 
173
+
172
174
  result = @instance.post_export(files ,"workbook","pdf")
173
175
 
174
176
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
175
- end
177
+ end
176
178
  end
179
+
180
+ describe 'lite_cells_unit export object test' do
181
+ it "should work" do
182
+ files = {}
183
+ name = $DataSourceXlsx
184
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
185
+ name =$AssemblyTestXlsx
186
+ files[name] = ::File.open(File.expand_path("data/"+name),"r")
187
+
188
+ result = @instance.post_export(files ,"listobject","xlsx")
189
+
190
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
191
+ end
192
+ end
177
193
 
178
194
  describe 'lite_cells_unit export object test' do
179
195
  it "should work" do
@@ -211,10 +227,13 @@ describe 'LightCellsApi' do
211
227
  name =$AssemblyTestXlsx
212
228
  files[name] = ::File.open(File.expand_path("data/"+name),"r")
213
229
 
214
- result = @instance.post_export(files ,"listobject","xlsx")
230
+ extendedQueryParameters = {}
231
+ extendedQueryParameters['OnePagePerSheet'] = 'false'
232
+ result = @instance.post_export(files ,"listobject","pdf", { :extendedQueryParameters=>extendedQueryParameters})
215
233
 
216
234
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
217
235
  end
218
236
  end
237
+
219
238
  end
220
239
 
@@ -86,4 +86,21 @@ describe 'CellsSaveAsApi' do
86
86
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
87
  end
88
88
  end
89
+ describe 'cells_save_as_post_document_save_as to extend format test' do
90
+ it "should work" do
91
+ name = $BOOK1
92
+ save_options = nil
93
+ newfilename = 'newbook.xls.md'
94
+ is_auto_fit_rows = true
95
+ is_auto_fit_columns = true
96
+ folder = $TEMPFOLDER
97
+ extendedQueryParameters = {}
98
+ extendedQueryParameters['OnePagePerSheet'] = 'false'
99
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
100
+ expect(result.uploaded.size).to be > 0
101
+ result = @instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>(folder+"/"+newfilename), :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder,:extendedQueryParameters=>extendedQueryParameters})
102
+ expect(result.code).to eql(200)
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
89
106
  end
@@ -29,15 +29,18 @@ describe 'CellsApi' do
29
29
  describe 'cells_ranges_post_worksheet_cells_range_outline_border test' do
30
30
  it "should work" do
31
31
  name = $BOOK1
32
- sheet_name = $SHEET1
33
- color = AsposeCellsCloud::Color.new({:A=>255})
34
- range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
35
- range_operate = AsposeCellsCloud::RangeSetOutlineBorderRequest.new({:BorderEdge=>'LeftBorder',:BorderStyle=>'Dotted',:BorderColor=>color,:Range=>range })
32
+ password = nil
33
+ format = 'pdf'
34
+ is_auto_fit = true
35
+ only_save_table = true
36
36
  folder = $TEMPFOLDER
37
- # result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
38
- # expect(result.uploaded.size).to be > 0
39
- result = @instance.cells_ranges_post_worksheet_cells_range_outline_border(name, sheet_name, { :range_operate=>range_operate, :folder=>folder})
40
- expect(result.code).to eql(200)
37
+ out_path = nil
38
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
39
+ expect(result.uploaded.size).to be > 0
40
+ extendedQueryParameters = {}
41
+ extendedQueryParameters['OnePagePerSheet'] = 'false'
42
+ result = @instance.cells_workbook_get_workbook(name, { :password=>password, :format=>format,:folder=>folder, :out_path=>out_path, :extendedQueryParameters=>extendedQueryParameters})
43
+ # expect(result.code).to eql(200)
41
44
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
45
  end
43
46
  end
@@ -63,6 +63,24 @@ describe 'CellsWorkbookApi' do
63
63
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
64
  end
65
65
  end
66
+ describe 'cells_workbook_get_workbook to extend test' do
67
+ it "should work" do
68
+ name = $BOOK1
69
+ password = nil
70
+ format = 'XPS'
71
+ is_auto_fit = true
72
+ only_save_table = true
73
+ folder = $TEMPFOLDER
74
+ out_path = nil
75
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
76
+ expect(result.uploaded.size).to be > 0
77
+ extendedQueryParameters = {}
78
+ extendedQueryParameters['OnePagePerSheet'] = 'false'
79
+ result = @instance.cells_workbook_get_workbook(name, { :password=>password, :format=>format,:folder=>folder, :out_path=>out_path, :extendedQueryParameters=>extendedQueryParameters})
80
+ # expect(result.code).to eql(200)
81
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ end
83
+ end
66
84
  # unit tests for cells_workbook_get_workbook
67
85
  # Read workbook info or export.
68
86
  #
@@ -512,6 +530,20 @@ describe 'CellsWorkbookApi' do
512
530
  end
513
531
  end
514
532
 
533
+ describe 'cells_workbook_put_convert_workbook_extend test' do
534
+ it "should work" do
535
+ name = $BOOK1
536
+ format = 'pdf'
537
+ password = nil
538
+ out_path = "Tdd.pdf"
539
+ extendedQueryParameters = {}
540
+ extendedQueryParameters['OnePagePerSheet'] = 'false'
541
+ result = @instance.cells_workbook_put_convert_workbook( ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) },{:format=>format,out_path=>out_path,:extendedQueryParameters=>extendedQueryParameters})
542
+ # expect(result.code).to eql(200)
543
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
544
+ end
545
+ end
546
+
515
547
  # unit tests for cells_workbook_put_workbook_create
516
548
  # Create new workbook using deferent methods.
517
549
  #
@@ -717,4 +749,18 @@ describe 'CellsWorkbookApi' do
717
749
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
718
750
  end
719
751
  end
752
+ describe 'cells_workbook_post_digital_signature test' do
753
+ it "should work" do
754
+ name = $BOOK1
755
+ pfx_name = 'roywang.pfx'
756
+ folder = $TEMPFOLDER
757
+ result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
758
+ expect(result.uploaded.size).to be > 0
759
+ result = @instance.upload_file( folder+"/"+pfx_name, ::File.open(File.expand_path("data/"+pfx_name),"r") {|io| io.read(io.size) })
760
+ expect(result.uploaded.size).to be > 0
761
+ result = @instance.cells_workbook_post_digital_signature(name,folder+"/"+pfx_name,"123456" , { :folder=>folder})
762
+ expect(result.code).to eql(200)
763
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
764
+ end
765
+ end
720
766
  end
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: '22.2'
4
+ version: '22.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: 2022-02-24 00:00:00.000000000 Z
11
+ date: 2022-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -246,6 +246,8 @@ files:
246
246
  - lib/aspose_cells_cloud/models/auto_shape_response.rb
247
247
  - lib/aspose_cells_cloud/models/auto_shapes.rb
248
248
  - lib/aspose_cells_cloud/models/auto_shapes_response.rb
249
+ - lib/aspose_cells_cloud/models/barcode_response.rb
250
+ - lib/aspose_cells_cloud/models/barcode_response_list.rb
249
251
  - lib/aspose_cells_cloud/models/batch_convert_request.rb
250
252
  - lib/aspose_cells_cloud/models/border.rb
251
253
  - lib/aspose_cells_cloud/models/calculation_options.rb
@@ -494,6 +496,7 @@ files:
494
496
  - spec/api/cells_api_spec.rb
495
497
  - spec/api/cells_assembly_spec.rb
496
498
  - spec/api/cells_auto_filter_api_spec.rb
499
+ - spec/api/cells_barcode_spec.rb
497
500
  - spec/api/cells_batch_spec.rb
498
501
  - spec/api/cells_chart_area_api_spec.rb
499
502
  - spec/api/cells_charts_api_spec.rb