cloudmersive-convert-api-client 1.6.9 → 1.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f6e2dcc39edb5f0e0877b63809bc3b052c8959a54161930c1e29c456d8c34cc
4
- data.tar.gz: efdda5cd96ff0607b153672262bbda38223590f0e278fb5972def206a1e7d471
3
+ metadata.gz: 6cbc736f369c676882e9fdfc58062d1ef8237db27c4626df1c3e2ef876b80b15
4
+ data.tar.gz: 92fc2e9dbfcc09976418d9d8cf13a78ffbf8e9d866c4dec8536986bcb80604e6
5
5
  SHA512:
6
- metadata.gz: 46e2d9e7ebbff002811fe53edd9f017306a92847549cd5ef0079290d91f8e40a38e03e06b1c1285b924ff04fe91c4344c9b37591158488b088039285560fe466
7
- data.tar.gz: 91141264ea4b8d7697dd7e3e4a63507e61b11d82d896c37df15c82ddafe2c864992bd5967287f7313588a3c258871f0bce8d128eedf8b2378382b6063feecd2a
6
+ metadata.gz: 20ac8e7525b1d6b185b7af6e4e3e8c15e305385442143839e9fd445c999e1d0248bbc02d8f9a22ca98d21811b9d3affa5c22acab3a865b3347b9d81cb99e315a
7
+ data.tar.gz: 927548c14e6008d64568ab621bbe3fc39ccadd49c6c98f2cf7a7b767001e375968b44d904baaf2401ace2aca9e0defb85fc52604d6da9bc342b8a88d519fa55f
data/README.md CHANGED
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 1.6.9
10
+ - Package version: 1.7.0
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-convert-api-client-1.6.9.gem
26
+ gem install ./cloudmersive-convert-api-client-1.7.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-convert-api-client-1.6.9.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-convert-api-client-1.7.0.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-convert-api-client', '~> 1.6.9'
34
+ gem 'cloudmersive-convert-api-client', '~> 1.7.0'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -181,6 +181,7 @@ Class | Method | HTTP request | Description
181
181
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_create_blank_spreadsheet**](docs/EditDocumentApi.md#edit_document_xlsx_create_blank_spreadsheet) | **POST** /convert/edit/xlsx/create/blank | Create a blank Excel XLSX spreadsheet
182
182
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_create_spreadsheet_from_data**](docs/EditDocumentApi.md#edit_document_xlsx_create_spreadsheet_from_data) | **POST** /convert/edit/xlsx/create/from/data | Create a new Excel XLSX spreadsheet from column and row data
183
183
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_delete_worksheet**](docs/EditDocumentApi.md#edit_document_xlsx_delete_worksheet) | **POST** /convert/edit/xlsx/delete-worksheet | Delete, remove worksheet from an Excel XLSX spreadsheet document
184
+ *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_enable_shared_workbook**](docs/EditDocumentApi.md#edit_document_xlsx_enable_shared_workbook) | **POST** /convert/edit/xlsx/configuration/enable-shared-workbook | Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
184
185
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_get_cell_by_identifier**](docs/EditDocumentApi.md#edit_document_xlsx_get_cell_by_identifier) | **POST** /convert/edit/xlsx/get-cell/by-identifier | Get cell from an Excel XLSX spreadsheet, worksheet by cell identifier
185
186
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_get_cell_by_index**](docs/EditDocumentApi.md#edit_document_xlsx_get_cell_by_index) | **POST** /convert/edit/xlsx/get-cell/by-index | Get cell from an Excel XLSX spreadsheet, worksheet by index
186
187
  *CloudmersiveConvertApiClient::EditDocumentApi* | [**edit_document_xlsx_get_columns**](docs/EditDocumentApi.md#edit_document_xlsx_get_columns) | **POST** /convert/edit/xlsx/get-columns | Get columns from a Excel XLSX spreadsheet, worksheet
@@ -312,6 +313,8 @@ Class | Method | HTTP request | Description
312
313
  - [CloudmersiveConvertApiClient::DocxTemplateOperation](docs/DocxTemplateOperation.md)
313
314
  - [CloudmersiveConvertApiClient::DocxText](docs/DocxText.md)
314
315
  - [CloudmersiveConvertApiClient::DocxTopLevelComment](docs/DocxTopLevelComment.md)
316
+ - [CloudmersiveConvertApiClient::EnableSharedWorkbookRequest](docs/EnableSharedWorkbookRequest.md)
317
+ - [CloudmersiveConvertApiClient::EnableSharedWorkbookResponse](docs/EnableSharedWorkbookResponse.md)
315
318
  - [CloudmersiveConvertApiClient::ExifValue](docs/ExifValue.md)
316
319
  - [CloudmersiveConvertApiClient::FindRegexMatch](docs/FindRegexMatch.md)
317
320
  - [CloudmersiveConvertApiClient::FindStringMatch](docs/FindStringMatch.md)
@@ -40,6 +40,7 @@ Method | HTTP request | Description
40
40
  [**edit_document_xlsx_create_blank_spreadsheet**](EditDocumentApi.md#edit_document_xlsx_create_blank_spreadsheet) | **POST** /convert/edit/xlsx/create/blank | Create a blank Excel XLSX spreadsheet
41
41
  [**edit_document_xlsx_create_spreadsheet_from_data**](EditDocumentApi.md#edit_document_xlsx_create_spreadsheet_from_data) | **POST** /convert/edit/xlsx/create/from/data | Create a new Excel XLSX spreadsheet from column and row data
42
42
  [**edit_document_xlsx_delete_worksheet**](EditDocumentApi.md#edit_document_xlsx_delete_worksheet) | **POST** /convert/edit/xlsx/delete-worksheet | Delete, remove worksheet from an Excel XLSX spreadsheet document
43
+ [**edit_document_xlsx_enable_shared_workbook**](EditDocumentApi.md#edit_document_xlsx_enable_shared_workbook) | **POST** /convert/edit/xlsx/configuration/enable-shared-workbook | Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
43
44
  [**edit_document_xlsx_get_cell_by_identifier**](EditDocumentApi.md#edit_document_xlsx_get_cell_by_identifier) | **POST** /convert/edit/xlsx/get-cell/by-identifier | Get cell from an Excel XLSX spreadsheet, worksheet by cell identifier
44
45
  [**edit_document_xlsx_get_cell_by_index**](EditDocumentApi.md#edit_document_xlsx_get_cell_by_index) | **POST** /convert/edit/xlsx/get-cell/by-index | Get cell from an Excel XLSX spreadsheet, worksheet by index
45
46
  [**edit_document_xlsx_get_columns**](EditDocumentApi.md#edit_document_xlsx_get_columns) | **POST** /convert/edit/xlsx/get-columns | Get columns from a Excel XLSX spreadsheet, worksheet
@@ -1996,6 +1997,60 @@ Name | Type | Description | Notes
1996
1997
 
1997
1998
 
1998
1999
 
2000
+ # **edit_document_xlsx_enable_shared_workbook**
2001
+ > EnableSharedWorkbookResponse edit_document_xlsx_enable_shared_workbook(input)
2002
+
2003
+ Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
2004
+
2005
+ Enables the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
2006
+
2007
+ ### Example
2008
+ ```ruby
2009
+ # load the gem
2010
+ require 'cloudmersive-convert-api-client'
2011
+ # setup authorization
2012
+ CloudmersiveConvertApiClient.configure do |config|
2013
+ # Configure API key authorization: Apikey
2014
+ config.api_key['Apikey'] = 'YOUR API KEY'
2015
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2016
+ #config.api_key_prefix['Apikey'] = 'Bearer'
2017
+ end
2018
+
2019
+ api_instance = CloudmersiveConvertApiClient::EditDocumentApi.new
2020
+
2021
+ input = CloudmersiveConvertApiClient::EnableSharedWorkbookRequest.new # EnableSharedWorkbookRequest | Document input request
2022
+
2023
+
2024
+ begin
2025
+ #Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
2026
+ result = api_instance.edit_document_xlsx_enable_shared_workbook(input)
2027
+ p result
2028
+ rescue CloudmersiveConvertApiClient::ApiError => e
2029
+ puts "Exception when calling EditDocumentApi->edit_document_xlsx_enable_shared_workbook: #{e}"
2030
+ end
2031
+ ```
2032
+
2033
+ ### Parameters
2034
+
2035
+ Name | Type | Description | Notes
2036
+ ------------- | ------------- | ------------- | -------------
2037
+ **input** | [**EnableSharedWorkbookRequest**](EnableSharedWorkbookRequest.md)| Document input request |
2038
+
2039
+ ### Return type
2040
+
2041
+ [**EnableSharedWorkbookResponse**](EnableSharedWorkbookResponse.md)
2042
+
2043
+ ### Authorization
2044
+
2045
+ [Apikey](../README.md#Apikey)
2046
+
2047
+ ### HTTP request headers
2048
+
2049
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
2050
+ - **Accept**: application/json, text/json, application/xml, text/xml
2051
+
2052
+
2053
+
1999
2054
  # **edit_document_xlsx_get_cell_by_identifier**
2000
2055
  > GetXlsxCellByIdentifierResponse edit_document_xlsx_get_cell_by_identifier(input)
2001
2056
 
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::EnableSharedWorkbookRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_file_bytes** | **String** | Optional: Bytes of the input file to operate on | [optional]
7
+ **input_file_url** | **String** | Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::EnableSharedWorkbookResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **edited_document_url** | **String** | URL to the edited XLSX file; file is stored in an in-memory cache and will be deleted. Call Finish-Editing to get the result document contents. | [optional]
8
+
9
+
@@ -74,6 +74,8 @@ require 'cloudmersive-convert-api-client/models/docx_template_application_reques
74
74
  require 'cloudmersive-convert-api-client/models/docx_template_operation'
75
75
  require 'cloudmersive-convert-api-client/models/docx_text'
76
76
  require 'cloudmersive-convert-api-client/models/docx_top_level_comment'
77
+ require 'cloudmersive-convert-api-client/models/enable_shared_workbook_request'
78
+ require 'cloudmersive-convert-api-client/models/enable_shared_workbook_response'
77
79
  require 'cloudmersive-convert-api-client/models/exif_value'
78
80
  require 'cloudmersive-convert-api-client/models/find_regex_match'
79
81
  require 'cloudmersive-convert-api-client/models/find_string_match'
@@ -2001,6 +2001,61 @@ module CloudmersiveConvertApiClient
2001
2001
  return data, status_code, headers
2002
2002
  end
2003
2003
 
2004
+ # Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
2005
+ # Enables the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
2006
+ # @param input Document input request
2007
+ # @param [Hash] opts the optional parameters
2008
+ # @return [EnableSharedWorkbookResponse]
2009
+ def edit_document_xlsx_enable_shared_workbook(input, opts = {})
2010
+ data, _status_code, _headers = edit_document_xlsx_enable_shared_workbook_with_http_info(input, opts)
2011
+ return data
2012
+ end
2013
+
2014
+ # Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
2015
+ # Enables the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
2016
+ # @param input Document input request
2017
+ # @param [Hash] opts the optional parameters
2018
+ # @return [Array<(EnableSharedWorkbookResponse, Fixnum, Hash)>] EnableSharedWorkbookResponse data, response status code and response headers
2019
+ def edit_document_xlsx_enable_shared_workbook_with_http_info(input, opts = {})
2020
+ if @api_client.config.debugging
2021
+ @api_client.config.logger.debug "Calling API: EditDocumentApi.edit_document_xlsx_enable_shared_workbook ..."
2022
+ end
2023
+ # verify the required parameter 'input' is set
2024
+ if @api_client.config.client_side_validation && input.nil?
2025
+ fail ArgumentError, "Missing the required parameter 'input' when calling EditDocumentApi.edit_document_xlsx_enable_shared_workbook"
2026
+ end
2027
+ # resource path
2028
+ local_var_path = "/convert/edit/xlsx/configuration/enable-shared-workbook"
2029
+
2030
+ # query parameters
2031
+ query_params = {}
2032
+
2033
+ # header parameters
2034
+ header_params = {}
2035
+ # HTTP header 'Accept' (if needed)
2036
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
2037
+ # HTTP header 'Content-Type'
2038
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
2039
+
2040
+ # form parameters
2041
+ form_params = {}
2042
+
2043
+ # http body (model)
2044
+ post_body = @api_client.object_to_http_body(input)
2045
+ auth_names = ['Apikey']
2046
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2047
+ :header_params => header_params,
2048
+ :query_params => query_params,
2049
+ :form_params => form_params,
2050
+ :body => post_body,
2051
+ :auth_names => auth_names,
2052
+ :return_type => 'EnableSharedWorkbookResponse')
2053
+ if @api_client.config.debugging
2054
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_xlsx_enable_shared_workbook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2055
+ end
2056
+ return data, status_code, headers
2057
+ end
2058
+
2004
2059
  # Get cell from an Excel XLSX spreadsheet, worksheet by cell identifier
2005
2060
  # Returns the value of a specific cell based on its identifier (e.g. A1, B22, C33, etc.) in the Excel Spreadsheet worksheet
2006
2061
  # @param input Document input request
@@ -0,0 +1,215 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Input to a Enabled Shared Workbook request
17
+ class EnableSharedWorkbookRequest
18
+ # Optional: Bytes of the input file to operate on
19
+ attr_accessor :input_file_bytes
20
+
21
+ # Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public).
22
+ attr_accessor :input_file_url
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'input_file_bytes' => :'InputFileBytes',
29
+ :'input_file_url' => :'InputFileUrl'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'input_file_bytes' => :'String',
37
+ :'input_file_url' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
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?(:'InputFileBytes')
50
+ self.input_file_bytes = attributes[:'InputFileBytes']
51
+ end
52
+
53
+ if attributes.has_key?(:'InputFileUrl')
54
+ self.input_file_url = attributes[:'InputFileUrl']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if !@input_file_bytes.nil? && @input_file_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
64
+ invalid_properties.push("invalid value for 'input_file_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
65
+ end
66
+
67
+ return invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if !@input_file_bytes.nil? && @input_file_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
74
+ return true
75
+ end
76
+
77
+ # Custom attribute writer method with validation
78
+ # @param [Object] input_file_bytes Value to be assigned
79
+ def input_file_bytes=(input_file_bytes)
80
+
81
+ if !input_file_bytes.nil? && input_file_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
82
+ fail ArgumentError, "invalid value for 'input_file_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
83
+ end
84
+
85
+ @input_file_bytes = input_file_bytes
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ input_file_bytes == o.input_file_bytes &&
94
+ input_file_url == o.input_file_url
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
+ [input_file_bytes, input_file_url].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 = CloudmersiveConvertApiClient.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,199 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Result of running a Enable Shared Workbook command
17
+ class EnableSharedWorkbookResponse
18
+ # True if successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # URL to the edited XLSX file; file is stored in an in-memory cache and will be deleted. Call Finish-Editing to get the result document contents.
22
+ attr_accessor :edited_document_url
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'successful' => :'Successful',
29
+ :'edited_document_url' => :'EditedDocumentURL'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'successful' => :'BOOLEAN',
37
+ :'edited_document_url' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
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?(:'Successful')
50
+ self.successful = attributes[:'Successful']
51
+ end
52
+
53
+ if attributes.has_key?(:'EditedDocumentURL')
54
+ self.edited_document_url = attributes[:'EditedDocumentURL']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ successful == o.successful &&
78
+ edited_document_url == o.edited_document_url
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [successful, edited_document_url].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map{ |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveConvertApiClient
16
- # Input to a Get Worksheets request
16
+ # Input to a Insert Worksheets request
17
17
  class InsertXlsxWorksheetRequest
18
18
  # Optional: Bytes of the input file to operate on
19
19
  attr_accessor :input_file_bytes
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.3.1
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveConvertApiClient
16
- # Result of running a Get-Worksheets command
16
+ # Result of running a insert worksheet command
17
17
  class InsertXlsxWorksheetResponse
18
18
  # True if successful, false otherwise
19
19
  attr_accessor :successful
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = "1.6.9"
14
+ VERSION = "1.7.0"
15
15
  end
@@ -464,6 +464,18 @@ describe 'EditDocumentApi' do
464
464
  end
465
465
  end
466
466
 
467
+ # unit tests for edit_document_xlsx_enable_shared_workbook
468
+ # Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
469
+ # Enables the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
470
+ # @param input Document input request
471
+ # @param [Hash] opts the optional parameters
472
+ # @return [EnableSharedWorkbookResponse]
473
+ describe 'edit_document_xlsx_enable_shared_workbook test' do
474
+ it "should work" do
475
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
476
+ end
477
+ end
478
+
467
479
  # unit tests for edit_document_xlsx_get_cell_by_identifier
468
480
  # Get cell from an Excel XLSX spreadsheet, worksheet by cell identifier
469
481
  # Returns the value of a specific cell based on its identifier (e.g. A1, B22, C33, etc.) in the Excel Spreadsheet worksheet
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::EnableSharedWorkbookRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'EnableSharedWorkbookRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::EnableSharedWorkbookRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of EnableSharedWorkbookRequest' do
31
+ it 'should create an instance of EnableSharedWorkbookRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::EnableSharedWorkbookRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "input_file_bytes"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "input_file_url"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
48
+
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::EnableSharedWorkbookResponse
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'EnableSharedWorkbookResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::EnableSharedWorkbookResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of EnableSharedWorkbookResponse' do
31
+ it 'should create an instance of EnableSharedWorkbookResponse' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::EnableSharedWorkbookResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "successful"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "edited_document_url"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
48
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-convert-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.9
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -268,6 +268,8 @@ files:
268
268
  - "./docs/EditDocumentApi.md"
269
269
  - "./docs/EditPdfApi.md"
270
270
  - "./docs/EditTextApi.md"
271
+ - "./docs/EnableSharedWorkbookRequest.md"
272
+ - "./docs/EnableSharedWorkbookResponse.md"
271
273
  - "./docs/ExifValue.md"
272
274
  - "./docs/FindRegexMatch.md"
273
275
  - "./docs/FindStringMatch.md"
@@ -483,6 +485,8 @@ files:
483
485
  - "./lib/cloudmersive-convert-api-client/models/docx_template_operation.rb"
484
486
  - "./lib/cloudmersive-convert-api-client/models/docx_text.rb"
485
487
  - "./lib/cloudmersive-convert-api-client/models/docx_top_level_comment.rb"
488
+ - "./lib/cloudmersive-convert-api-client/models/enable_shared_workbook_request.rb"
489
+ - "./lib/cloudmersive-convert-api-client/models/enable_shared_workbook_response.rb"
486
490
  - "./lib/cloudmersive-convert-api-client/models/exif_value.rb"
487
491
  - "./lib/cloudmersive-convert-api-client/models/find_regex_match.rb"
488
492
  - "./lib/cloudmersive-convert-api-client/models/find_string_match.rb"
@@ -691,6 +695,8 @@ files:
691
695
  - "./spec/models/docx_template_operation_spec.rb"
692
696
  - "./spec/models/docx_text_spec.rb"
693
697
  - "./spec/models/docx_top_level_comment_spec.rb"
698
+ - "./spec/models/enable_shared_workbook_request_spec.rb"
699
+ - "./spec/models/enable_shared_workbook_response_spec.rb"
694
700
  - "./spec/models/exif_value_spec.rb"
695
701
  - "./spec/models/find_regex_match_spec.rb"
696
702
  - "./spec/models/find_string_match_spec.rb"