cloudmersive-convert-api-client 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff9ffb546ea02d639338b712f6303c8d5be21843a39b66d6fd3c77f198fad29d
4
- data.tar.gz: 33e8154c9155c9278a6aaddbe69bf2286681aa4d1b59180f7ed90bffbfa3e287
3
+ metadata.gz: 49113271d66197369c2b8d6f32f9d4a2094b8fa1bd0db28abaeeca6166304146
4
+ data.tar.gz: 768bc86ec2c068463516eec1a4a716ef60cd9fc6c87e0bb76a29fb14911ba994
5
5
  SHA512:
6
- metadata.gz: 5d06f1431223769adf83181ab97d2dbbc0c6f045e37456dfebc1918a6ded4c201d2f24843e76e63c6e44fb0ed9f67eb4175f22927ee445f021be42e6281d4bee
7
- data.tar.gz: 33a4556b551b8247e66cbc667cff26135ec095bf9e43f1485ebed6d5b3128befdb9fd317f29dc312b9804b8b05bd60935e58ca38f91986e38c25d52a97fdf848
6
+ metadata.gz: 3eb7d53ca4ba0f81d4a3abb3b6bca4e1604bda60879a0b2b227995acf94e94ac83f0215f5f691276b8bfecb6c6ea6c78f9eacea7ef872d33ee035f731f036abf
7
+ data.tar.gz: 8c046efc51762e86b5df18816d6027dc089788133252b4dc566a283c11cf8d1bd702caed47b7402a68e63fb0b98d5a27de38cf17833fa59cd4378f83d96c14bd
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: 2.1.6
10
+ - Package version: 2.1.7
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-2.1.6.gem
26
+ gem install ./cloudmersive-convert-api-client-2.1.7.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-convert-api-client-2.1.6.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-convert-api-client-2.1.7.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', '~> 2.1.6'
34
+ gem 'cloudmersive-convert-api-client', '~> 2.1.7'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -343,11 +343,13 @@ Class | Method | HTTP request | Description
343
343
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_txt_validation**](docs/ValidateDocumentApi.md#validate_document_txt_validation) | **POST** /convert/validate/txt | Validate an TXT file
344
344
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_xlsx_validation**](docs/ValidateDocumentApi.md#validate_document_xlsx_validation) | **POST** /convert/validate/xlsx | Validate a Excel document (XLSX)
345
345
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_xml_validation**](docs/ValidateDocumentApi.md#validate_document_xml_validation) | **POST** /convert/validate/xml | Validate an XML file
346
+ *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_xml_xxe_threat_validation**](docs/ValidateDocumentApi.md#validate_document_xml_xxe_threat_validation) | **POST** /convert/validate/xml/xxe-threats | Validate an XML file for XML External Entity (XXE) threats
346
347
  *CloudmersiveConvertApiClient::ValidateDocumentApi* | [**validate_document_zip_validation**](docs/ValidateDocumentApi.md#validate_document_zip_validation) | **POST** /convert/validate/zip | Validate a Zip Archive file (zip)
347
348
  *CloudmersiveConvertApiClient::ViewerToolsApi* | [**viewer_tools_create_simple**](docs/ViewerToolsApi.md#viewer_tools_create_simple) | **POST** /convert/viewer/create/web/simple | Create a web-based viewer
348
349
  *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_create**](docs/ZipArchiveApi.md#zip_archive_zip_create) | **POST** /convert/archive/zip/create | Compress files to create a new zip archive
349
350
  *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_create_advanced**](docs/ZipArchiveApi.md#zip_archive_zip_create_advanced) | **POST** /convert/archive/zip/create/advanced | Compress files and folders to create a new zip archive with advanced options
350
351
  *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_create_encrypted**](docs/ZipArchiveApi.md#zip_archive_zip_create_encrypted) | **POST** /convert/archive/zip/create/encrypted | Compress files to create a new, encrypted and password-protected zip archive
352
+ *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_create_quarantine**](docs/ZipArchiveApi.md#zip_archive_zip_create_quarantine) | **POST** /convert/archive/zip/create/quarantine | Create an encrypted zip file to quarantine a dangerous file
351
353
  *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_decrypt**](docs/ZipArchiveApi.md#zip_archive_zip_decrypt) | **POST** /convert/archive/zip/decrypt | Decrypt and remove password protection on a zip file
352
354
  *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_encrypt_advanced**](docs/ZipArchiveApi.md#zip_archive_zip_encrypt_advanced) | **POST** /convert/archive/zip/encrypt/advanced | Encrypt and password protect a zip file
353
355
  *CloudmersiveConvertApiClient::ZipArchiveApi* | [**zip_archive_zip_extract**](docs/ZipArchiveApi.md#zip_archive_zip_extract) | **POST** /convert/archive/zip/extract | Extract, decompress files and folders from a zip archive
@@ -599,6 +601,7 @@ Class | Method | HTTP request | Description
599
601
  - [CloudmersiveConvertApiClient::XmlRemoveWithXPathResult](docs/XmlRemoveWithXPathResult.md)
600
602
  - [CloudmersiveConvertApiClient::XmlReplaceWithXPathResult](docs/XmlReplaceWithXPathResult.md)
601
603
  - [CloudmersiveConvertApiClient::XmlSetValueWithXPathResult](docs/XmlSetValueWithXPathResult.md)
604
+ - [CloudmersiveConvertApiClient::XxeThreatDetectionResult](docs/XxeThreatDetectionResult.md)
602
605
  - [CloudmersiveConvertApiClient::ZipDirectory](docs/ZipDirectory.md)
603
606
  - [CloudmersiveConvertApiClient::ZipEncryptionAdvancedRequest](docs/ZipEncryptionAdvancedRequest.md)
604
607
  - [CloudmersiveConvertApiClient::ZipExtractResponse](docs/ZipExtractResponse.md)
@@ -24,6 +24,7 @@ Method | HTTP request | Description
24
24
  [**validate_document_txt_validation**](ValidateDocumentApi.md#validate_document_txt_validation) | **POST** /convert/validate/txt | Validate an TXT file
25
25
  [**validate_document_xlsx_validation**](ValidateDocumentApi.md#validate_document_xlsx_validation) | **POST** /convert/validate/xlsx | Validate a Excel document (XLSX)
26
26
  [**validate_document_xml_validation**](ValidateDocumentApi.md#validate_document_xml_validation) | **POST** /convert/validate/xml | Validate an XML file
27
+ [**validate_document_xml_xxe_threat_validation**](ValidateDocumentApi.md#validate_document_xml_xxe_threat_validation) | **POST** /convert/validate/xml/xxe-threats | Validate an XML file for XML External Entity (XXE) threats
27
28
  [**validate_document_zip_validation**](ValidateDocumentApi.md#validate_document_zip_validation) | **POST** /convert/validate/zip | Validate a Zip Archive file (zip)
28
29
 
29
30
 
@@ -1107,6 +1108,60 @@ Name | Type | Description | Notes
1107
1108
 
1108
1109
 
1109
1110
 
1111
+ # **validate_document_xml_xxe_threat_validation**
1112
+ > XxeThreatDetectionResult validate_document_xml_xxe_threat_validation(input_file)
1113
+
1114
+ Validate an XML file for XML External Entity (XXE) threats
1115
+
1116
+ Validate an XML document file for XML External Entity (XXE) threats; if the document is not valid, identifies the errors in the document. XXE threats are a type of threat that exploits vulnerabilities in the XML standard relating to external or local entity URIs in XML documents.
1117
+
1118
+ ### Example
1119
+ ```ruby
1120
+ # load the gem
1121
+ require 'cloudmersive-convert-api-client'
1122
+ # setup authorization
1123
+ CloudmersiveConvertApiClient.configure do |config|
1124
+ # Configure API key authorization: Apikey
1125
+ config.api_key['Apikey'] = 'YOUR API KEY'
1126
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1127
+ #config.api_key_prefix['Apikey'] = 'Bearer'
1128
+ end
1129
+
1130
+ api_instance = CloudmersiveConvertApiClient::ValidateDocumentApi.new
1131
+
1132
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
1133
+
1134
+
1135
+ begin
1136
+ #Validate an XML file for XML External Entity (XXE) threats
1137
+ result = api_instance.validate_document_xml_xxe_threat_validation(input_file)
1138
+ p result
1139
+ rescue CloudmersiveConvertApiClient::ApiError => e
1140
+ puts "Exception when calling ValidateDocumentApi->validate_document_xml_xxe_threat_validation: #{e}"
1141
+ end
1142
+ ```
1143
+
1144
+ ### Parameters
1145
+
1146
+ Name | Type | Description | Notes
1147
+ ------------- | ------------- | ------------- | -------------
1148
+ **input_file** | **File**| Input file to perform the operation on. |
1149
+
1150
+ ### Return type
1151
+
1152
+ [**XxeThreatDetectionResult**](XxeThreatDetectionResult.md)
1153
+
1154
+ ### Authorization
1155
+
1156
+ [Apikey](../README.md#Apikey)
1157
+
1158
+ ### HTTP request headers
1159
+
1160
+ - **Content-Type**: multipart/form-data
1161
+ - **Accept**: application/json, text/json, application/xml, text/xml
1162
+
1163
+
1164
+
1110
1165
  # **validate_document_zip_validation**
1111
1166
  > DocumentValidationResult validate_document_zip_validation(input_file)
1112
1167
 
@@ -0,0 +1,9 @@
1
+ # CloudmersiveConvertApiClient::XxeThreatDetectionResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **contains_xxe_threat** | **BOOLEAN** | True if the XML input contains XXE threats, false otherwise | [optional]
8
+
9
+
@@ -7,6 +7,7 @@ Method | HTTP request | Description
7
7
  [**zip_archive_zip_create**](ZipArchiveApi.md#zip_archive_zip_create) | **POST** /convert/archive/zip/create | Compress files to create a new zip archive
8
8
  [**zip_archive_zip_create_advanced**](ZipArchiveApi.md#zip_archive_zip_create_advanced) | **POST** /convert/archive/zip/create/advanced | Compress files and folders to create a new zip archive with advanced options
9
9
  [**zip_archive_zip_create_encrypted**](ZipArchiveApi.md#zip_archive_zip_create_encrypted) | **POST** /convert/archive/zip/create/encrypted | Compress files to create a new, encrypted and password-protected zip archive
10
+ [**zip_archive_zip_create_quarantine**](ZipArchiveApi.md#zip_archive_zip_create_quarantine) | **POST** /convert/archive/zip/create/quarantine | Create an encrypted zip file to quarantine a dangerous file
10
11
  [**zip_archive_zip_decrypt**](ZipArchiveApi.md#zip_archive_zip_decrypt) | **POST** /convert/archive/zip/decrypt | Decrypt and remove password protection on a zip file
11
12
  [**zip_archive_zip_encrypt_advanced**](ZipArchiveApi.md#zip_archive_zip_encrypt_advanced) | **POST** /convert/archive/zip/encrypt/advanced | Encrypt and password protect a zip file
12
13
  [**zip_archive_zip_extract**](ZipArchiveApi.md#zip_archive_zip_extract) | **POST** /convert/archive/zip/extract | Extract, decompress files and folders from a zip archive
@@ -219,6 +220,54 @@ Name | Type | Description | Notes
219
220
 
220
221
 
221
222
 
223
+ # **zip_archive_zip_create_quarantine**
224
+ > Object zip_archive_zip_create_quarantine
225
+
226
+ Create an encrypted zip file to quarantine a dangerous file
227
+
228
+ Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
229
+
230
+ ### Example
231
+ ```ruby
232
+ # load the gem
233
+ require 'cloudmersive-convert-api-client'
234
+ # setup authorization
235
+ CloudmersiveConvertApiClient.configure do |config|
236
+ # Configure API key authorization: Apikey
237
+ config.api_key['Apikey'] = 'YOUR API KEY'
238
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
239
+ #config.api_key_prefix['Apikey'] = 'Bearer'
240
+ end
241
+
242
+ api_instance = CloudmersiveConvertApiClient::ZipArchiveApi.new
243
+
244
+ begin
245
+ #Create an encrypted zip file to quarantine a dangerous file
246
+ result = api_instance.zip_archive_zip_create_quarantine
247
+ p result
248
+ rescue CloudmersiveConvertApiClient::ApiError => e
249
+ puts "Exception when calling ZipArchiveApi->zip_archive_zip_create_quarantine: #{e}"
250
+ end
251
+ ```
252
+
253
+ ### Parameters
254
+ This endpoint does not need any parameter.
255
+
256
+ ### Return type
257
+
258
+ **Object**
259
+
260
+ ### Authorization
261
+
262
+ [Apikey](../README.md#Apikey)
263
+
264
+ ### HTTP request headers
265
+
266
+ - **Content-Type**: Not defined
267
+ - **Accept**: application/octet-stream
268
+
269
+
270
+
222
271
  # **zip_archive_zip_decrypt**
223
272
  > Object zip_archive_zip_decrypt(input_file, zip_password)
224
273
 
@@ -261,6 +261,7 @@ require 'cloudmersive-convert-api-client/models/xml_remove_all_children_with_x_p
261
261
  require 'cloudmersive-convert-api-client/models/xml_remove_with_x_path_result'
262
262
  require 'cloudmersive-convert-api-client/models/xml_replace_with_x_path_result'
263
263
  require 'cloudmersive-convert-api-client/models/xml_set_value_with_x_path_result'
264
+ require 'cloudmersive-convert-api-client/models/xxe_threat_detection_result'
264
265
  require 'cloudmersive-convert-api-client/models/zip_directory'
265
266
  require 'cloudmersive-convert-api-client/models/zip_encryption_advanced_request'
266
267
  require 'cloudmersive-convert-api-client/models/zip_extract_response'
@@ -1119,6 +1119,61 @@ module CloudmersiveConvertApiClient
1119
1119
  end
1120
1120
  return data, status_code, headers
1121
1121
  end
1122
+ # Validate an XML file for XML External Entity (XXE) threats
1123
+ # Validate an XML document file for XML External Entity (XXE) threats; if the document is not valid, identifies the errors in the document. XXE threats are a type of threat that exploits vulnerabilities in the XML standard relating to external or local entity URIs in XML documents.
1124
+ # @param input_file Input file to perform the operation on.
1125
+ # @param [Hash] opts the optional parameters
1126
+ # @return [XxeThreatDetectionResult]
1127
+ def validate_document_xml_xxe_threat_validation(input_file, opts = {})
1128
+ data, _status_code, _headers = validate_document_xml_xxe_threat_validation_with_http_info(input_file, opts)
1129
+ data
1130
+ end
1131
+
1132
+ # Validate an XML file for XML External Entity (XXE) threats
1133
+ # Validate an XML document file for XML External Entity (XXE) threats; if the document is not valid, identifies the errors in the document. XXE threats are a type of threat that exploits vulnerabilities in the XML standard relating to external or local entity URIs in XML documents.
1134
+ # @param input_file Input file to perform the operation on.
1135
+ # @param [Hash] opts the optional parameters
1136
+ # @return [Array<(XxeThreatDetectionResult, Fixnum, Hash)>] XxeThreatDetectionResult data, response status code and response headers
1137
+ def validate_document_xml_xxe_threat_validation_with_http_info(input_file, opts = {})
1138
+ if @api_client.config.debugging
1139
+ @api_client.config.logger.debug 'Calling API: ValidateDocumentApi.validate_document_xml_xxe_threat_validation ...'
1140
+ end
1141
+ # verify the required parameter 'input_file' is set
1142
+ if @api_client.config.client_side_validation && input_file.nil?
1143
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_xml_xxe_threat_validation"
1144
+ end
1145
+ # resource path
1146
+ local_var_path = '/convert/validate/xml/xxe-threats'
1147
+
1148
+ # query parameters
1149
+ query_params = {}
1150
+
1151
+ # header parameters
1152
+ header_params = {}
1153
+ # HTTP header 'Accept' (if needed)
1154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
1155
+ # HTTP header 'Content-Type'
1156
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1157
+
1158
+ # form parameters
1159
+ form_params = {}
1160
+ form_params['inputFile'] = input_file
1161
+
1162
+ # http body (model)
1163
+ post_body = nil
1164
+ auth_names = ['Apikey']
1165
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1166
+ :header_params => header_params,
1167
+ :query_params => query_params,
1168
+ :form_params => form_params,
1169
+ :body => post_body,
1170
+ :auth_names => auth_names,
1171
+ :return_type => 'XxeThreatDetectionResult')
1172
+ if @api_client.config.debugging
1173
+ @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_xml_xxe_threat_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1174
+ end
1175
+ return data, status_code, headers
1176
+ end
1122
1177
  # Validate a Zip Archive file (zip)
1123
1178
  # Validate a Zip archive file (ZIP)
1124
1179
  # @param input_file Input file to perform the operation on.
@@ -247,6 +247,52 @@ module CloudmersiveConvertApiClient
247
247
  end
248
248
  return data, status_code, headers
249
249
  end
250
+ # Create an encrypted zip file to quarantine a dangerous file
251
+ # Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
252
+ # @param [Hash] opts the optional parameters
253
+ # @return [Object]
254
+ def zip_archive_zip_create_quarantine(opts = {})
255
+ data, _status_code, _headers = zip_archive_zip_create_quarantine_with_http_info(opts)
256
+ data
257
+ end
258
+
259
+ # Create an encrypted zip file to quarantine a dangerous file
260
+ # Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
261
+ # @param [Hash] opts the optional parameters
262
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
263
+ def zip_archive_zip_create_quarantine_with_http_info(opts = {})
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_create_quarantine ...'
266
+ end
267
+ # resource path
268
+ local_var_path = '/convert/archive/zip/create/quarantine'
269
+
270
+ # query parameters
271
+ query_params = {}
272
+
273
+ # header parameters
274
+ header_params = {}
275
+ # HTTP header 'Accept' (if needed)
276
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
277
+
278
+ # form parameters
279
+ form_params = {}
280
+
281
+ # http body (model)
282
+ post_body = nil
283
+ auth_names = ['Apikey']
284
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
285
+ :header_params => header_params,
286
+ :query_params => query_params,
287
+ :form_params => form_params,
288
+ :body => post_body,
289
+ :auth_names => auth_names,
290
+ :return_type => 'Object')
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create_quarantine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
293
+ end
294
+ return data, status_code, headers
295
+ end
250
296
  # Decrypt and remove password protection on a zip file
251
297
  # Decrypts and removes password protection from an encrypted zip file with the specified password
252
298
  # @param input_file Input file to perform the operation on.
@@ -0,0 +1,196 @@
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.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveConvertApiClient
16
+ # Result of performing an XXE threat detection operation
17
+ class XxeThreatDetectionResult
18
+ # True if the operation was successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # True if the XML input contains XXE threats, false otherwise
22
+ attr_accessor :contains_xxe_threat
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'contains_xxe_threat' => :'ContainsXxeThreat'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'contains_xxe_threat' => :'BOOLEAN'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'Successful')
49
+ self.successful = attributes[:'Successful']
50
+ end
51
+
52
+ if attributes.has_key?(:'ContainsXxeThreat')
53
+ self.contains_xxe_threat = attributes[:'ContainsXxeThreat']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ successful == o.successful &&
76
+ contains_xxe_threat == o.contains_xxe_threat
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [successful, contains_xxe_threat].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveConvertApiClient
14
- VERSION = '2.1.6'
14
+ VERSION = '2.1.7'
15
15
  end
@@ -272,6 +272,18 @@ describe 'ValidateDocumentApi' do
272
272
  end
273
273
  end
274
274
 
275
+ # unit tests for validate_document_xml_xxe_threat_validation
276
+ # Validate an XML file for XML External Entity (XXE) threats
277
+ # Validate an XML document file for XML External Entity (XXE) threats; if the document is not valid, identifies the errors in the document. XXE threats are a type of threat that exploits vulnerabilities in the XML standard relating to external or local entity URIs in XML documents.
278
+ # @param input_file Input file to perform the operation on.
279
+ # @param [Hash] opts the optional parameters
280
+ # @return [XxeThreatDetectionResult]
281
+ describe 'validate_document_xml_xxe_threat_validation test' do
282
+ it 'should work' do
283
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
284
+ end
285
+ end
286
+
275
287
  # unit tests for validate_document_zip_validation
276
288
  # Validate a Zip Archive file (zip)
277
289
  # Validate a Zip archive file (ZIP)
@@ -88,6 +88,17 @@ describe 'ZipArchiveApi' do
88
88
  end
89
89
  end
90
90
 
91
+ # unit tests for zip_archive_zip_create_quarantine
92
+ # Create an encrypted zip file to quarantine a dangerous file
93
+ # Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Object]
96
+ describe 'zip_archive_zip_create_quarantine test' do
97
+ it 'should work' do
98
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
99
+ end
100
+ end
101
+
91
102
  # unit tests for zip_archive_zip_decrypt
92
103
  # Decrypt and remove password protection on a zip file
93
104
  # Decrypts and removes password protection from an encrypted zip file with the specified password
@@ -0,0 +1,47 @@
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.4.14
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveConvertApiClient::XxeThreatDetectionResult
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'XxeThreatDetectionResult' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveConvertApiClient::XxeThreatDetectionResult.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of XxeThreatDetectionResult' do
31
+ it 'should create an instance of XxeThreatDetectionResult' do
32
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::XxeThreatDetectionResult)
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 "contains_xxe_threat"' 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
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: 2.1.6
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-14 00:00:00.000000000 Z
11
+ date: 2021-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -461,6 +461,7 @@ files:
461
461
  - "./docs/XmlRemoveWithXPathResult.md"
462
462
  - "./docs/XmlReplaceWithXPathResult.md"
463
463
  - "./docs/XmlSetValueWithXPathResult.md"
464
+ - "./docs/XxeThreatDetectionResult.md"
464
465
  - "./docs/ZipArchiveApi.md"
465
466
  - "./docs/ZipDirectory.md"
466
467
  - "./docs/ZipEncryptionAdvancedRequest.md"
@@ -731,6 +732,7 @@ files:
731
732
  - "./lib/cloudmersive-convert-api-client/models/xml_remove_with_x_path_result.rb"
732
733
  - "./lib/cloudmersive-convert-api-client/models/xml_replace_with_x_path_result.rb"
733
734
  - "./lib/cloudmersive-convert-api-client/models/xml_set_value_with_x_path_result.rb"
735
+ - "./lib/cloudmersive-convert-api-client/models/xxe_threat_detection_result.rb"
734
736
  - "./lib/cloudmersive-convert-api-client/models/zip_directory.rb"
735
737
  - "./lib/cloudmersive-convert-api-client/models/zip_encryption_advanced_request.rb"
736
738
  - "./lib/cloudmersive-convert-api-client/models/zip_extract_response.rb"
@@ -998,6 +1000,7 @@ files:
998
1000
  - "./spec/models/xml_remove_with_x_path_result_spec.rb"
999
1001
  - "./spec/models/xml_replace_with_x_path_result_spec.rb"
1000
1002
  - "./spec/models/xml_set_value_with_x_path_result_spec.rb"
1003
+ - "./spec/models/xxe_threat_detection_result_spec.rb"
1001
1004
  - "./spec/models/zip_directory_spec.rb"
1002
1005
  - "./spec/models/zip_encryption_advanced_request_spec.rb"
1003
1006
  - "./spec/models/zip_extract_response_spec.rb"