cloudmersive-convert-api-client 1.7.0 → 1.7.1

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: 6cbc736f369c676882e9fdfc58062d1ef8237db27c4626df1c3e2ef876b80b15
4
- data.tar.gz: 92fc2e9dbfcc09976418d9d8cf13a78ffbf8e9d866c4dec8536986bcb80604e6
3
+ metadata.gz: ccfa3a1a055b851db8bcc419067d2cb26b7654322e58511aaa2dd5c78538602d
4
+ data.tar.gz: 67aecc13db25b107754c2ebfb7eeaba770f180127bb47245d1c1631111762113
5
5
  SHA512:
6
- metadata.gz: 20ac8e7525b1d6b185b7af6e4e3e8c15e305385442143839e9fd445c999e1d0248bbc02d8f9a22ca98d21811b9d3affa5c22acab3a865b3347b9d81cb99e315a
7
- data.tar.gz: 927548c14e6008d64568ab621bbe3fc39ccadd49c6c98f2cf7a7b767001e375968b44d904baaf2401ace2aca9e0defb85fc52604d6da9bc342b8a88d519fa55f
6
+ metadata.gz: daa76fb88020e4c05bb7df466ecdd9c9e9ebdd9e2a45f33b8c8011ba8ab91e98f3e633b94e7ce2c7a55687567387c9f7023a74b12cc59a3fa8cf96379de503be
7
+ data.tar.gz: 53ab55fdfc99bac247c8dd112cf2d650a359659b3859ea94c956fb4337e92ad9f2422e6e58aa168a8eb578c7400fdc133776b52361d3a9509f59b4e4f34a0bf3
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.7.0
10
+ - Package version: 1.7.1
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.7.0.gem
26
+ gem install ./cloudmersive-convert-api-client-1.7.1.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-convert-api-client-1.7.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-convert-api-client-1.7.1.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.7.0'
34
+ gem 'cloudmersive-convert-api-client', '~> 1.7.1'
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_disable_shared_workbook**](docs/EditDocumentApi.md#edit_document_xlsx_disable_shared_workbook) | **POST** /convert/edit/xlsx/configuration/disable-shared-workbook | Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
184
185
  *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
185
186
  *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
186
187
  *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
@@ -283,6 +284,8 @@ Class | Method | HTTP request | Description
283
284
  - [CloudmersiveConvertApiClient::DeleteDocxTableRowRequest](docs/DeleteDocxTableRowRequest.md)
284
285
  - [CloudmersiveConvertApiClient::DeleteDocxTableRowResponse](docs/DeleteDocxTableRowResponse.md)
285
286
  - [CloudmersiveConvertApiClient::DetectLineEndingsResponse](docs/DetectLineEndingsResponse.md)
287
+ - [CloudmersiveConvertApiClient::DisableSharedWorkbookRequest](docs/DisableSharedWorkbookRequest.md)
288
+ - [CloudmersiveConvertApiClient::DisableSharedWorkbookResponse](docs/DisableSharedWorkbookResponse.md)
286
289
  - [CloudmersiveConvertApiClient::DocumentValidationError](docs/DocumentValidationError.md)
287
290
  - [CloudmersiveConvertApiClient::DocumentValidationResult](docs/DocumentValidationResult.md)
288
291
  - [CloudmersiveConvertApiClient::DocxBody](docs/DocxBody.md)
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::DisableSharedWorkbookRequest
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::DisableSharedWorkbookResponse
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
+
@@ -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_disable_shared_workbook**](EditDocumentApi.md#edit_document_xlsx_disable_shared_workbook) | **POST** /convert/edit/xlsx/configuration/disable-shared-workbook | Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
43
44
  [**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
44
45
  [**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
45
46
  [**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
@@ -1997,6 +1998,60 @@ Name | Type | Description | Notes
1997
1998
 
1998
1999
 
1999
2000
 
2001
+ # **edit_document_xlsx_disable_shared_workbook**
2002
+ > DisableSharedWorkbookResponse edit_document_xlsx_disable_shared_workbook(input)
2003
+
2004
+ Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
2005
+
2006
+ Disable the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
2007
+
2008
+ ### Example
2009
+ ```ruby
2010
+ # load the gem
2011
+ require 'cloudmersive-convert-api-client'
2012
+ # setup authorization
2013
+ CloudmersiveConvertApiClient.configure do |config|
2014
+ # Configure API key authorization: Apikey
2015
+ config.api_key['Apikey'] = 'YOUR API KEY'
2016
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2017
+ #config.api_key_prefix['Apikey'] = 'Bearer'
2018
+ end
2019
+
2020
+ api_instance = CloudmersiveConvertApiClient::EditDocumentApi.new
2021
+
2022
+ input = CloudmersiveConvertApiClient::DisableSharedWorkbookRequest.new # DisableSharedWorkbookRequest | Document input request
2023
+
2024
+
2025
+ begin
2026
+ #Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
2027
+ result = api_instance.edit_document_xlsx_disable_shared_workbook(input)
2028
+ p result
2029
+ rescue CloudmersiveConvertApiClient::ApiError => e
2030
+ puts "Exception when calling EditDocumentApi->edit_document_xlsx_disable_shared_workbook: #{e}"
2031
+ end
2032
+ ```
2033
+
2034
+ ### Parameters
2035
+
2036
+ Name | Type | Description | Notes
2037
+ ------------- | ------------- | ------------- | -------------
2038
+ **input** | [**DisableSharedWorkbookRequest**](DisableSharedWorkbookRequest.md)| Document input request |
2039
+
2040
+ ### Return type
2041
+
2042
+ [**DisableSharedWorkbookResponse**](DisableSharedWorkbookResponse.md)
2043
+
2044
+ ### Authorization
2045
+
2046
+ [Apikey](../README.md#Apikey)
2047
+
2048
+ ### HTTP request headers
2049
+
2050
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
2051
+ - **Accept**: application/json, text/json, application/xml, text/xml
2052
+
2053
+
2054
+
2000
2055
  # **edit_document_xlsx_enable_shared_workbook**
2001
2056
  > EnableSharedWorkbookResponse edit_document_xlsx_enable_shared_workbook(input)
2002
2057
 
@@ -44,6 +44,8 @@ require 'cloudmersive-convert-api-client/models/delete_docx_table_row_range_resp
44
44
  require 'cloudmersive-convert-api-client/models/delete_docx_table_row_request'
45
45
  require 'cloudmersive-convert-api-client/models/delete_docx_table_row_response'
46
46
  require 'cloudmersive-convert-api-client/models/detect_line_endings_response'
47
+ require 'cloudmersive-convert-api-client/models/disable_shared_workbook_request'
48
+ require 'cloudmersive-convert-api-client/models/disable_shared_workbook_response'
47
49
  require 'cloudmersive-convert-api-client/models/document_validation_error'
48
50
  require 'cloudmersive-convert-api-client/models/document_validation_result'
49
51
  require 'cloudmersive-convert-api-client/models/docx_body'
@@ -2001,6 +2001,61 @@ module CloudmersiveConvertApiClient
2001
2001
  return data, status_code, headers
2002
2002
  end
2003
2003
 
2004
+ # Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
2005
+ # Disable 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 [DisableSharedWorkbookResponse]
2009
+ def edit_document_xlsx_disable_shared_workbook(input, opts = {})
2010
+ data, _status_code, _headers = edit_document_xlsx_disable_shared_workbook_with_http_info(input, opts)
2011
+ return data
2012
+ end
2013
+
2014
+ # Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
2015
+ # Disable 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<(DisableSharedWorkbookResponse, Fixnum, Hash)>] DisableSharedWorkbookResponse data, response status code and response headers
2019
+ def edit_document_xlsx_disable_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_disable_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_disable_shared_workbook"
2026
+ end
2027
+ # resource path
2028
+ local_var_path = "/convert/edit/xlsx/configuration/disable-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 => 'DisableSharedWorkbookResponse')
2053
+ if @api_client.config.debugging
2054
+ @api_client.config.logger.debug "API called: EditDocumentApi#edit_document_xlsx_disable_shared_workbook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2055
+ end
2056
+ return data, status_code, headers
2057
+ end
2058
+
2004
2059
  # Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
2005
2060
  # Enables the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
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 Disable Shared Workbook request
17
+ class DisableSharedWorkbookRequest
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 Disable Shared Workbook command
17
+ class DisableSharedWorkbookResponse
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
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = "1.7.0"
14
+ VERSION = "1.7.1"
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_disable_shared_workbook
468
+ # Disable Shared Workbook (legacy) in Excel XLSX spreadsheet
469
+ # Disable 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 [DisableSharedWorkbookResponse]
473
+ describe 'edit_document_xlsx_disable_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_enable_shared_workbook
468
480
  # Enable Shared Workbook (legacy) in Excel XLSX spreadsheet
469
481
  # Enables the Shared Workbook (legacy) mode in an Excel XLSX spreadsheet
@@ -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::DisableSharedWorkbookRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DisableSharedWorkbookRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DisableSharedWorkbookRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DisableSharedWorkbookRequest' do
31
+ it 'should create an instance of DisableSharedWorkbookRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DisableSharedWorkbookRequest)
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::DisableSharedWorkbookResponse
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DisableSharedWorkbookResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::DisableSharedWorkbookResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DisableSharedWorkbookResponse' do
31
+ it 'should create an instance of DisableSharedWorkbookResponse' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::DisableSharedWorkbookResponse)
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.7.0
4
+ version: 1.7.1
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-09 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -235,6 +235,8 @@ files:
235
235
  - "./docs/DeleteDocxTableRowRequest.md"
236
236
  - "./docs/DeleteDocxTableRowResponse.md"
237
237
  - "./docs/DetectLineEndingsResponse.md"
238
+ - "./docs/DisableSharedWorkbookRequest.md"
239
+ - "./docs/DisableSharedWorkbookResponse.md"
238
240
  - "./docs/DocumentValidationError.md"
239
241
  - "./docs/DocumentValidationResult.md"
240
242
  - "./docs/DocxBody.md"
@@ -455,6 +457,8 @@ files:
455
457
  - "./lib/cloudmersive-convert-api-client/models/delete_docx_table_row_request.rb"
456
458
  - "./lib/cloudmersive-convert-api-client/models/delete_docx_table_row_response.rb"
457
459
  - "./lib/cloudmersive-convert-api-client/models/detect_line_endings_response.rb"
460
+ - "./lib/cloudmersive-convert-api-client/models/disable_shared_workbook_request.rb"
461
+ - "./lib/cloudmersive-convert-api-client/models/disable_shared_workbook_response.rb"
458
462
  - "./lib/cloudmersive-convert-api-client/models/document_validation_error.rb"
459
463
  - "./lib/cloudmersive-convert-api-client/models/document_validation_result.rb"
460
464
  - "./lib/cloudmersive-convert-api-client/models/docx_body.rb"
@@ -665,6 +669,8 @@ files:
665
669
  - "./spec/models/delete_docx_table_row_request_spec.rb"
666
670
  - "./spec/models/delete_docx_table_row_response_spec.rb"
667
671
  - "./spec/models/detect_line_endings_response_spec.rb"
672
+ - "./spec/models/disable_shared_workbook_request_spec.rb"
673
+ - "./spec/models/disable_shared_workbook_response_spec.rb"
668
674
  - "./spec/models/document_validation_error_spec.rb"
669
675
  - "./spec/models/document_validation_result_spec.rb"
670
676
  - "./spec/models/docx_body_spec.rb"