cloudmersive-phishing-detection-api-client 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/AdvancedEmailDetectionRequest.md +2 -1
- data/docs/AdvancedUrlDetectionRequest.md +9 -0
- data/docs/PhishingDetectionAdvancedRequest.md +9 -0
- data/docs/PhishingDetectionAdvancedResponse.md +1 -0
- data/docs/PhishingDetectionApi.md +56 -0
- data/docs/PhishingDetectionUrlAdvancedResponse.md +15 -0
- data/lib/cloudmersive-phishing-detection-api-client/api/phishing_detection_api.rb +51 -0
- data/lib/cloudmersive-phishing-detection-api-client/models/advanced_email_detection_request.rb +12 -1
- data/lib/cloudmersive-phishing-detection-api-client/models/advanced_url_detection_request.rb +196 -0
- data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_request.rb +94 -4
- data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_response.rb +11 -1
- data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_url_advanced_response.rb +256 -0
- data/lib/cloudmersive-phishing-detection-api-client/version.rb +1 -1
- data/lib/cloudmersive-phishing-detection-api-client.rb +2 -0
- data/spec/api/phishing_detection_api_spec.rb +12 -0
- data/spec/models/advanced_email_detection_request_spec.rb +6 -0
- data/spec/models/advanced_url_detection_request_spec.rb +47 -0
- data/spec/models/phishing_detection_advanced_request_spec.rb +54 -0
- data/spec/models/phishing_detection_advanced_response_spec.rb +6 -0
- data/spec/models/phishing_detection_url_advanced_response_spec.rb +83 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d09cb2566e6ef13fd750ea52942b7683cbbd4da4607681fb3f03e37e871f0b89
|
|
4
|
+
data.tar.gz: f0686bd696fc9b3e8233cbb89e008c875f214fd9e3f9f16f874b84c167667979
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5f0975e3527703e05ef19efbe872dfb58ee8ae48f56a75adae5b8640e9ce5339d27b2e472c8f1d9033851a8d929ebb92d2626532961900595ec647a319c1a9e
|
|
7
|
+
data.tar.gz: 2aa1472249ba3fb4ece7666304239ceeeecae553daacb98c8951e1c9d21b82dd1061772ba124c5a3099c01d6fb6b3f178927fc36e3380ce207e88e16d0a75b7e
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Easily and directly scan and block phishing security threats in input.
|
|
|
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.2.
|
|
10
|
+
- Package version: 2.2.2
|
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
@@ -23,15 +23,15 @@ gem build cloudmersive-phishing-detection-api-client.gemspec
|
|
|
23
23
|
Then either install the gem locally:
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
|
-
gem install ./cloudmersive-phishing-detection-api-client-2.2.
|
|
26
|
+
gem install ./cloudmersive-phishing-detection-api-client-2.2.2.gem
|
|
27
27
|
```
|
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.
|
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.2.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-phishing-detection-api-client', '~> 2.2.
|
|
34
|
+
gem 'cloudmersive-phishing-detection-api-client', '~> 2.2.2'
|
|
35
35
|
|
|
36
36
|
### Install from Git
|
|
37
37
|
|
|
@@ -88,15 +88,18 @@ Class | Method | HTTP request | Description
|
|
|
88
88
|
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_file_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_file_advanced_post) | **POST** /phishing/detect/file/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
89
89
|
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_file_post**](docs/PhishingDetectionApi.md#phishing_detect_file_post) | **POST** /phishing/detect/file | Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
|
90
90
|
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_text_string_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_text_string_advanced_post) | **POST** /phishing/detect/text-string/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
91
|
+
*CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_url_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_url_advanced_post) | **POST** /phishing/detect/url/advanced | Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
91
92
|
|
|
92
93
|
|
|
93
94
|
## Documentation for Models
|
|
94
95
|
|
|
95
96
|
- [CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest](docs/AdvancedEmailDetectionRequest.md)
|
|
97
|
+
- [CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest](docs/AdvancedUrlDetectionRequest.md)
|
|
96
98
|
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedRequest](docs/PhishingDetectionAdvancedRequest.md)
|
|
97
99
|
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedResponse](docs/PhishingDetectionAdvancedResponse.md)
|
|
98
100
|
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionEmailAdvancedResponse](docs/PhishingDetectionEmailAdvancedResponse.md)
|
|
99
101
|
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionResponse](docs/PhishingDetectionResponse.md)
|
|
102
|
+
- [CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse](docs/PhishingDetectionUrlAdvancedResponse.md)
|
|
100
103
|
|
|
101
104
|
|
|
102
105
|
## Documentation for Authorization
|
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**html_body** | **String** | Body of the email in HTML, or text | [optional]
|
|
10
10
|
**allow_low_reputation_senders** | **BOOLEAN** | Allow email from low reputation senders and domains | [optional]
|
|
11
11
|
**allow_sanctioned** | **BOOLEAN** | True to allow sanctioned countries and certain known sanctioned entities, false otherwise (default) | [optional]
|
|
12
|
-
**
|
|
12
|
+
**custom_policy_id** | **String** | Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
|
|
13
|
+
**input_email_file** | **String** | Optional: Input email file bytes (EML, PDF, etc.). If not provided, HtmlBody will be used instead. | [optional]
|
|
13
14
|
|
|
14
15
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**url** | **String** | URL to check for phishing | [optional]
|
|
7
|
+
**custom_policy_id** | **String** | Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
|
|
8
|
+
|
|
9
|
+
|
|
@@ -5,5 +5,14 @@ Name | Type | Description | Notes
|
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
6
|
**input_string** | **String** | Input text string to detect phishing against | [optional]
|
|
7
7
|
**model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
|
|
8
|
+
**custom_policy_id** | **String** | Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
|
|
9
|
+
**provide_analysis_rationale** | **BOOLEAN** | Optional: Set to true to include an analysis rationale in the response explaining why the content was or was not flagged. Default is true. | [optional]
|
|
10
|
+
**text_type** | **String** | Optional: Type of text being analyzed. Must be one of: \"Text Message\", \"User Message\", \"Sales Lead\", \"Email Message\", \"Support Case\", \"Other\". | [optional]
|
|
11
|
+
**from_name** | **String** | Optional: Name of the sender | [optional]
|
|
12
|
+
**to_name** | **String** | Optional: Name of the recipient | [optional]
|
|
13
|
+
**from_phone_number** | **String** | Optional: Phone number of the sender | [optional]
|
|
14
|
+
**to_phone_number** | **String** | Optional: Phone number of the recipient | [optional]
|
|
15
|
+
**from_email_address** | **String** | Optional: Email address of the sender | [optional]
|
|
16
|
+
**to_email_address** | **String** | Optional: Email address of the recipient | [optional]
|
|
8
17
|
|
|
9
18
|
|
|
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
|
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
6
|
**clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
|
|
7
7
|
**phishing_risk_level** | **Float** | Overall phishing risk level between 0.0 and 1.0 | [optional]
|
|
8
|
+
**confidence_level** | **Float** | Confidence level between 0.0 and 1.0 where values over 0.9 indicate high confidence | [optional]
|
|
8
9
|
**analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
|
|
9
10
|
|
|
10
11
|
|
|
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
|
8
8
|
[**phishing_detect_file_advanced_post**](PhishingDetectionApi.md#phishing_detect_file_advanced_post) | **POST** /phishing/detect/file/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
9
9
|
[**phishing_detect_file_post**](PhishingDetectionApi.md#phishing_detect_file_post) | **POST** /phishing/detect/file | Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
|
|
10
10
|
[**phishing_detect_text_string_advanced_post**](PhishingDetectionApi.md#phishing_detect_text_string_advanced_post) | **POST** /phishing/detect/text-string/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
11
|
+
[**phishing_detect_url_advanced_post**](PhishingDetectionApi.md#phishing_detect_url_advanced_post) | **POST** /phishing/detect/url/advanced | Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
# **phishing_detect_email_advanced_post**
|
|
@@ -84,6 +85,7 @@ api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
|
|
|
84
85
|
|
|
85
86
|
opts = {
|
|
86
87
|
model: 'Advanced', # String |
|
|
88
|
+
custom_policy_id: 'custom_policy_id_example', # String |
|
|
87
89
|
input_file: File.new('/path/to/file.txt') # File |
|
|
88
90
|
}
|
|
89
91
|
|
|
@@ -101,6 +103,7 @@ end
|
|
|
101
103
|
Name | Type | Description | Notes
|
|
102
104
|
------------- | ------------- | ------------- | -------------
|
|
103
105
|
**model** | **String**| | [optional] [default to Advanced]
|
|
106
|
+
**custom_policy_id** | **String**| | [optional]
|
|
104
107
|
**input_file** | **File**| | [optional]
|
|
105
108
|
|
|
106
109
|
### Return type
|
|
@@ -226,3 +229,56 @@ Name | Type | Description | Notes
|
|
|
226
229
|
|
|
227
230
|
|
|
228
231
|
|
|
232
|
+
# **phishing_detect_url_advanced_post**
|
|
233
|
+
> PhishingDetectionUrlAdvancedResponse phishing_detect_url_advanced_post(opts)
|
|
234
|
+
|
|
235
|
+
Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
236
|
+
|
|
237
|
+
### Example
|
|
238
|
+
```ruby
|
|
239
|
+
# load the gem
|
|
240
|
+
require 'cloudmersive-phishing-detection-api-client'
|
|
241
|
+
# setup authorization
|
|
242
|
+
CloudmersivePhishingDetectionApiClient.configure do |config|
|
|
243
|
+
# Configure API key authorization: Apikey
|
|
244
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
245
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
246
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
|
|
250
|
+
|
|
251
|
+
opts = {
|
|
252
|
+
body: CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest.new # AdvancedUrlDetectionRequest | URL phishing detection request
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
begin
|
|
256
|
+
#Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
257
|
+
result = api_instance.phishing_detect_url_advanced_post(opts)
|
|
258
|
+
p result
|
|
259
|
+
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
|
|
260
|
+
puts "Exception when calling PhishingDetectionApi->phishing_detect_url_advanced_post: #{e}"
|
|
261
|
+
end
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Parameters
|
|
265
|
+
|
|
266
|
+
Name | Type | Description | Notes
|
|
267
|
+
------------- | ------------- | ------------- | -------------
|
|
268
|
+
**body** | [**AdvancedUrlDetectionRequest**](AdvancedUrlDetectionRequest.md)| URL phishing detection request | [optional]
|
|
269
|
+
|
|
270
|
+
### Return type
|
|
271
|
+
|
|
272
|
+
[**PhishingDetectionUrlAdvancedResponse**](PhishingDetectionUrlAdvancedResponse.md)
|
|
273
|
+
|
|
274
|
+
### Authorization
|
|
275
|
+
|
|
276
|
+
[Apikey](../README.md#Apikey)
|
|
277
|
+
|
|
278
|
+
### HTTP request headers
|
|
279
|
+
|
|
280
|
+
- **Content-Type**: application/json, text/json, application/*+json
|
|
281
|
+
- **Accept**: text/plain, application/json, text/json
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
|
|
7
|
+
**phishing_risk_level** | **Float** | Overall phishing risk level between 0.0 and 1.0 | [optional]
|
|
8
|
+
**is_ssrf_threat** | **BOOLEAN** | True if the URL is an SSRF threat | [optional]
|
|
9
|
+
**contains_phishing** | **BOOLEAN** | True if the URL contains phishing threat risks, false otherwise | [optional]
|
|
10
|
+
**contains_unsolicited_sales** | **BOOLEAN** | True if the URL contains unsolicited sales, false otherwise | [optional]
|
|
11
|
+
**contains_promotional_content** | **BOOLEAN** | True if the URL contains promotional content, false otherwise | [optional]
|
|
12
|
+
**contains_phishing_attempt** | **BOOLEAN** | True if the URL contains a phishing attempt, false otherwise | [optional]
|
|
13
|
+
**analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
|
|
14
|
+
|
|
15
|
+
|
|
@@ -70,6 +70,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
70
70
|
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
71
71
|
# @param [Hash] opts the optional parameters
|
|
72
72
|
# @option opts [String] :model (default to Advanced)
|
|
73
|
+
# @option opts [String] :custom_policy_id
|
|
73
74
|
# @option opts [File] :input_file
|
|
74
75
|
# @return [PhishingDetectionAdvancedResponse]
|
|
75
76
|
def phishing_detect_file_advanced_post(opts = {})
|
|
@@ -80,6 +81,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
80
81
|
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
81
82
|
# @param [Hash] opts the optional parameters
|
|
82
83
|
# @option opts [String] :model
|
|
84
|
+
# @option opts [String] :custom_policy_id
|
|
83
85
|
# @option opts [File] :input_file
|
|
84
86
|
# @return [Array<(PhishingDetectionAdvancedResponse, Fixnum, Hash)>] PhishingDetectionAdvancedResponse data, response status code and response headers
|
|
85
87
|
def phishing_detect_file_advanced_post_with_http_info(opts = {})
|
|
@@ -99,6 +101,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
99
101
|
# HTTP header 'Content-Type'
|
|
100
102
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
101
103
|
header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
|
|
104
|
+
header_params[:'customPolicyId'] = opts[:'custom_policy_id'] if !opts[:'custom_policy_id'].nil?
|
|
102
105
|
|
|
103
106
|
# form parameters
|
|
104
107
|
form_params = {}
|
|
@@ -219,5 +222,53 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
219
222
|
end
|
|
220
223
|
return data, status_code, headers
|
|
221
224
|
end
|
|
225
|
+
# Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @option opts [AdvancedUrlDetectionRequest] :body URL phishing detection request
|
|
228
|
+
# @return [PhishingDetectionUrlAdvancedResponse]
|
|
229
|
+
def phishing_detect_url_advanced_post(opts = {})
|
|
230
|
+
data, _status_code, _headers = phishing_detect_url_advanced_post_with_http_info(opts)
|
|
231
|
+
data
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @option opts [AdvancedUrlDetectionRequest] :body URL phishing detection request
|
|
237
|
+
# @return [Array<(PhishingDetectionUrlAdvancedResponse, Fixnum, Hash)>] PhishingDetectionUrlAdvancedResponse data, response status code and response headers
|
|
238
|
+
def phishing_detect_url_advanced_post_with_http_info(opts = {})
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_url_advanced_post ...'
|
|
241
|
+
end
|
|
242
|
+
# resource path
|
|
243
|
+
local_var_path = '/phishing/detect/url/advanced'
|
|
244
|
+
|
|
245
|
+
# query parameters
|
|
246
|
+
query_params = {}
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = {}
|
|
250
|
+
# HTTP header 'Accept' (if needed)
|
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
252
|
+
# HTTP header 'Content-Type'
|
|
253
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
254
|
+
|
|
255
|
+
# form parameters
|
|
256
|
+
form_params = {}
|
|
257
|
+
|
|
258
|
+
# http body (model)
|
|
259
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
260
|
+
auth_names = ['Apikey']
|
|
261
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
262
|
+
:header_params => header_params,
|
|
263
|
+
:query_params => query_params,
|
|
264
|
+
:form_params => form_params,
|
|
265
|
+
:body => post_body,
|
|
266
|
+
:auth_names => auth_names,
|
|
267
|
+
:return_type => 'PhishingDetectionUrlAdvancedResponse')
|
|
268
|
+
if @api_client.config.debugging
|
|
269
|
+
@api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_url_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
270
|
+
end
|
|
271
|
+
return data, status_code, headers
|
|
272
|
+
end
|
|
222
273
|
end
|
|
223
274
|
end
|
data/lib/cloudmersive-phishing-detection-api-client/models/advanced_email_detection_request.rb
CHANGED
|
@@ -33,6 +33,10 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
33
33
|
# True to allow sanctioned countries and certain known sanctioned entities, false otherwise (default)
|
|
34
34
|
attr_accessor :allow_sanctioned
|
|
35
35
|
|
|
36
|
+
# Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
|
|
37
|
+
attr_accessor :custom_policy_id
|
|
38
|
+
|
|
39
|
+
# Optional: Input email file bytes (EML, PDF, etc.). If not provided, HtmlBody will be used instead.
|
|
36
40
|
attr_accessor :input_email_file
|
|
37
41
|
|
|
38
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -44,6 +48,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
44
48
|
:'html_body' => :'HtmlBody',
|
|
45
49
|
:'allow_low_reputation_senders' => :'AllowLowReputationSenders',
|
|
46
50
|
:'allow_sanctioned' => :'AllowSanctioned',
|
|
51
|
+
:'custom_policy_id' => :'CustomPolicyID',
|
|
47
52
|
:'input_email_file' => :'InputEmailFile'
|
|
48
53
|
}
|
|
49
54
|
end
|
|
@@ -57,6 +62,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
57
62
|
:'html_body' => :'String',
|
|
58
63
|
:'allow_low_reputation_senders' => :'BOOLEAN',
|
|
59
64
|
:'allow_sanctioned' => :'BOOLEAN',
|
|
65
|
+
:'custom_policy_id' => :'String',
|
|
60
66
|
:'input_email_file' => :'String'
|
|
61
67
|
}
|
|
62
68
|
end
|
|
@@ -93,6 +99,10 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
93
99
|
self.allow_sanctioned = attributes[:'AllowSanctioned']
|
|
94
100
|
end
|
|
95
101
|
|
|
102
|
+
if attributes.has_key?(:'CustomPolicyID')
|
|
103
|
+
self.custom_policy_id = attributes[:'CustomPolicyID']
|
|
104
|
+
end
|
|
105
|
+
|
|
96
106
|
if attributes.has_key?(:'InputEmailFile')
|
|
97
107
|
self.input_email_file = attributes[:'InputEmailFile']
|
|
98
108
|
end
|
|
@@ -137,6 +147,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
137
147
|
html_body == o.html_body &&
|
|
138
148
|
allow_low_reputation_senders == o.allow_low_reputation_senders &&
|
|
139
149
|
allow_sanctioned == o.allow_sanctioned &&
|
|
150
|
+
custom_policy_id == o.custom_policy_id &&
|
|
140
151
|
input_email_file == o.input_email_file
|
|
141
152
|
end
|
|
142
153
|
|
|
@@ -149,7 +160,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
149
160
|
# Calculates hash code according to all attributes.
|
|
150
161
|
# @return [Fixnum] Hash code
|
|
151
162
|
def hash
|
|
152
|
-
[from_email_address, to_email_address, subject, html_body, allow_low_reputation_senders, allow_sanctioned, input_email_file].hash
|
|
163
|
+
[from_email_address, to_email_address, subject, html_body, allow_low_reputation_senders, allow_sanctioned, custom_policy_id, input_email_file].hash
|
|
153
164
|
end
|
|
154
165
|
|
|
155
166
|
# Builds the object from hash
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#phishingapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and block phishing security threats in input.
|
|
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 CloudmersivePhishingDetectionApiClient
|
|
16
|
+
# Request to detect phishing from a URL
|
|
17
|
+
class AdvancedUrlDetectionRequest
|
|
18
|
+
# URL to check for phishing
|
|
19
|
+
attr_accessor :url
|
|
20
|
+
|
|
21
|
+
# Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
|
|
22
|
+
attr_accessor :custom_policy_id
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'url' => :'Url',
|
|
28
|
+
:'custom_policy_id' => :'CustomPolicyID'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.swagger_types
|
|
34
|
+
{
|
|
35
|
+
:'url' => :'String',
|
|
36
|
+
:'custom_policy_id' => :'String'
|
|
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?(:'Url')
|
|
49
|
+
self.url = attributes[:'Url']
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
if attributes.has_key?(:'CustomPolicyID')
|
|
53
|
+
self.custom_policy_id = attributes[:'CustomPolicyID']
|
|
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
|
+
url == o.url &&
|
|
76
|
+
custom_policy_id == o.custom_policy_id
|
|
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
|
+
[url, custom_policy_id].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 = CloudmersivePhishingDetectionApiClient.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
|
data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_request.rb
CHANGED
|
@@ -21,11 +21,47 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
21
21
|
# Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
|
|
22
22
|
attr_accessor :model
|
|
23
23
|
|
|
24
|
+
# Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
|
|
25
|
+
attr_accessor :custom_policy_id
|
|
26
|
+
|
|
27
|
+
# Optional: Set to true to include an analysis rationale in the response explaining why the content was or was not flagged. Default is true.
|
|
28
|
+
attr_accessor :provide_analysis_rationale
|
|
29
|
+
|
|
30
|
+
# Optional: Type of text being analyzed. Must be one of: \"Text Message\", \"User Message\", \"Sales Lead\", \"Email Message\", \"Support Case\", \"Other\".
|
|
31
|
+
attr_accessor :text_type
|
|
32
|
+
|
|
33
|
+
# Optional: Name of the sender
|
|
34
|
+
attr_accessor :from_name
|
|
35
|
+
|
|
36
|
+
# Optional: Name of the recipient
|
|
37
|
+
attr_accessor :to_name
|
|
38
|
+
|
|
39
|
+
# Optional: Phone number of the sender
|
|
40
|
+
attr_accessor :from_phone_number
|
|
41
|
+
|
|
42
|
+
# Optional: Phone number of the recipient
|
|
43
|
+
attr_accessor :to_phone_number
|
|
44
|
+
|
|
45
|
+
# Optional: Email address of the sender
|
|
46
|
+
attr_accessor :from_email_address
|
|
47
|
+
|
|
48
|
+
# Optional: Email address of the recipient
|
|
49
|
+
attr_accessor :to_email_address
|
|
50
|
+
|
|
24
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
52
|
def self.attribute_map
|
|
26
53
|
{
|
|
27
54
|
:'input_string' => :'InputString',
|
|
28
|
-
:'model' => :'Model'
|
|
55
|
+
:'model' => :'Model',
|
|
56
|
+
:'custom_policy_id' => :'CustomPolicyID',
|
|
57
|
+
:'provide_analysis_rationale' => :'ProvideAnalysisRationale',
|
|
58
|
+
:'text_type' => :'TextType',
|
|
59
|
+
:'from_name' => :'FromName',
|
|
60
|
+
:'to_name' => :'ToName',
|
|
61
|
+
:'from_phone_number' => :'FromPhoneNumber',
|
|
62
|
+
:'to_phone_number' => :'ToPhoneNumber',
|
|
63
|
+
:'from_email_address' => :'FromEmailAddress',
|
|
64
|
+
:'to_email_address' => :'ToEmailAddress'
|
|
29
65
|
}
|
|
30
66
|
end
|
|
31
67
|
|
|
@@ -33,7 +69,16 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
33
69
|
def self.swagger_types
|
|
34
70
|
{
|
|
35
71
|
:'input_string' => :'String',
|
|
36
|
-
:'model' => :'String'
|
|
72
|
+
:'model' => :'String',
|
|
73
|
+
:'custom_policy_id' => :'String',
|
|
74
|
+
:'provide_analysis_rationale' => :'BOOLEAN',
|
|
75
|
+
:'text_type' => :'String',
|
|
76
|
+
:'from_name' => :'String',
|
|
77
|
+
:'to_name' => :'String',
|
|
78
|
+
:'from_phone_number' => :'String',
|
|
79
|
+
:'to_phone_number' => :'String',
|
|
80
|
+
:'from_email_address' => :'String',
|
|
81
|
+
:'to_email_address' => :'String'
|
|
37
82
|
}
|
|
38
83
|
end
|
|
39
84
|
|
|
@@ -52,6 +97,42 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
52
97
|
if attributes.has_key?(:'Model')
|
|
53
98
|
self.model = attributes[:'Model']
|
|
54
99
|
end
|
|
100
|
+
|
|
101
|
+
if attributes.has_key?(:'CustomPolicyID')
|
|
102
|
+
self.custom_policy_id = attributes[:'CustomPolicyID']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.has_key?(:'ProvideAnalysisRationale')
|
|
106
|
+
self.provide_analysis_rationale = attributes[:'ProvideAnalysisRationale']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.has_key?(:'TextType')
|
|
110
|
+
self.text_type = attributes[:'TextType']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.has_key?(:'FromName')
|
|
114
|
+
self.from_name = attributes[:'FromName']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.has_key?(:'ToName')
|
|
118
|
+
self.to_name = attributes[:'ToName']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.has_key?(:'FromPhoneNumber')
|
|
122
|
+
self.from_phone_number = attributes[:'FromPhoneNumber']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.has_key?(:'ToPhoneNumber')
|
|
126
|
+
self.to_phone_number = attributes[:'ToPhoneNumber']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.has_key?(:'FromEmailAddress')
|
|
130
|
+
self.from_email_address = attributes[:'FromEmailAddress']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.has_key?(:'ToEmailAddress')
|
|
134
|
+
self.to_email_address = attributes[:'ToEmailAddress']
|
|
135
|
+
end
|
|
55
136
|
end
|
|
56
137
|
|
|
57
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -73,7 +154,16 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
73
154
|
return true if self.equal?(o)
|
|
74
155
|
self.class == o.class &&
|
|
75
156
|
input_string == o.input_string &&
|
|
76
|
-
model == o.model
|
|
157
|
+
model == o.model &&
|
|
158
|
+
custom_policy_id == o.custom_policy_id &&
|
|
159
|
+
provide_analysis_rationale == o.provide_analysis_rationale &&
|
|
160
|
+
text_type == o.text_type &&
|
|
161
|
+
from_name == o.from_name &&
|
|
162
|
+
to_name == o.to_name &&
|
|
163
|
+
from_phone_number == o.from_phone_number &&
|
|
164
|
+
to_phone_number == o.to_phone_number &&
|
|
165
|
+
from_email_address == o.from_email_address &&
|
|
166
|
+
to_email_address == o.to_email_address
|
|
77
167
|
end
|
|
78
168
|
|
|
79
169
|
# @see the `==` method
|
|
@@ -85,7 +175,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
85
175
|
# Calculates hash code according to all attributes.
|
|
86
176
|
# @return [Fixnum] Hash code
|
|
87
177
|
def hash
|
|
88
|
-
[input_string, model].hash
|
|
178
|
+
[input_string, model, custom_policy_id, provide_analysis_rationale, text_type, from_name, to_name, from_phone_number, to_phone_number, from_email_address, to_email_address].hash
|
|
89
179
|
end
|
|
90
180
|
|
|
91
181
|
# Builds the object from hash
|
data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_response.rb
CHANGED
|
@@ -21,6 +21,9 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
21
21
|
# Overall phishing risk level between 0.0 and 1.0
|
|
22
22
|
attr_accessor :phishing_risk_level
|
|
23
23
|
|
|
24
|
+
# Confidence level between 0.0 and 1.0 where values over 0.9 indicate high confidence
|
|
25
|
+
attr_accessor :confidence_level
|
|
26
|
+
|
|
24
27
|
# Rationale for why the conclusion was formed
|
|
25
28
|
attr_accessor :analysis_rationale
|
|
26
29
|
|
|
@@ -29,6 +32,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
29
32
|
{
|
|
30
33
|
:'clean_result' => :'CleanResult',
|
|
31
34
|
:'phishing_risk_level' => :'PhishingRiskLevel',
|
|
35
|
+
:'confidence_level' => :'ConfidenceLevel',
|
|
32
36
|
:'analysis_rationale' => :'AnalysisRationale'
|
|
33
37
|
}
|
|
34
38
|
end
|
|
@@ -38,6 +42,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
38
42
|
{
|
|
39
43
|
:'clean_result' => :'BOOLEAN',
|
|
40
44
|
:'phishing_risk_level' => :'Float',
|
|
45
|
+
:'confidence_level' => :'Float',
|
|
41
46
|
:'analysis_rationale' => :'String'
|
|
42
47
|
}
|
|
43
48
|
end
|
|
@@ -58,6 +63,10 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
58
63
|
self.phishing_risk_level = attributes[:'PhishingRiskLevel']
|
|
59
64
|
end
|
|
60
65
|
|
|
66
|
+
if attributes.has_key?(:'ConfidenceLevel')
|
|
67
|
+
self.confidence_level = attributes[:'ConfidenceLevel']
|
|
68
|
+
end
|
|
69
|
+
|
|
61
70
|
if attributes.has_key?(:'AnalysisRationale')
|
|
62
71
|
self.analysis_rationale = attributes[:'AnalysisRationale']
|
|
63
72
|
end
|
|
@@ -83,6 +92,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
83
92
|
self.class == o.class &&
|
|
84
93
|
clean_result == o.clean_result &&
|
|
85
94
|
phishing_risk_level == o.phishing_risk_level &&
|
|
95
|
+
confidence_level == o.confidence_level &&
|
|
86
96
|
analysis_rationale == o.analysis_rationale
|
|
87
97
|
end
|
|
88
98
|
|
|
@@ -95,7 +105,7 @@ module CloudmersivePhishingDetectionApiClient
|
|
|
95
105
|
# Calculates hash code according to all attributes.
|
|
96
106
|
# @return [Fixnum] Hash code
|
|
97
107
|
def hash
|
|
98
|
-
[clean_result, phishing_risk_level, analysis_rationale].hash
|
|
108
|
+
[clean_result, phishing_risk_level, confidence_level, analysis_rationale].hash
|
|
99
109
|
end
|
|
100
110
|
|
|
101
111
|
# Builds the object from hash
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#phishingapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and block phishing security threats in input.
|
|
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 CloudmersivePhishingDetectionApiClient
|
|
16
|
+
# Result of detecting phishing from a URL using AI
|
|
17
|
+
class PhishingDetectionUrlAdvancedResponse
|
|
18
|
+
# True if the result is not phishing (clean), and false otherwise
|
|
19
|
+
attr_accessor :clean_result
|
|
20
|
+
|
|
21
|
+
# Overall phishing risk level between 0.0 and 1.0
|
|
22
|
+
attr_accessor :phishing_risk_level
|
|
23
|
+
|
|
24
|
+
# True if the URL is an SSRF threat
|
|
25
|
+
attr_accessor :is_ssrf_threat
|
|
26
|
+
|
|
27
|
+
# True if the URL contains phishing threat risks, false otherwise
|
|
28
|
+
attr_accessor :contains_phishing
|
|
29
|
+
|
|
30
|
+
# True if the URL contains unsolicited sales, false otherwise
|
|
31
|
+
attr_accessor :contains_unsolicited_sales
|
|
32
|
+
|
|
33
|
+
# True if the URL contains promotional content, false otherwise
|
|
34
|
+
attr_accessor :contains_promotional_content
|
|
35
|
+
|
|
36
|
+
# True if the URL contains a phishing attempt, false otherwise
|
|
37
|
+
attr_accessor :contains_phishing_attempt
|
|
38
|
+
|
|
39
|
+
# Rationale for why the conclusion was formed
|
|
40
|
+
attr_accessor :analysis_rationale
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'clean_result' => :'CleanResult',
|
|
46
|
+
:'phishing_risk_level' => :'PhishingRiskLevel',
|
|
47
|
+
:'is_ssrf_threat' => :'IsSsrfThreat',
|
|
48
|
+
:'contains_phishing' => :'ContainsPhishing',
|
|
49
|
+
:'contains_unsolicited_sales' => :'ContainsUnsolicitedSales',
|
|
50
|
+
:'contains_promotional_content' => :'ContainsPromotionalContent',
|
|
51
|
+
:'contains_phishing_attempt' => :'ContainsPhishingAttempt',
|
|
52
|
+
:'analysis_rationale' => :'AnalysisRationale'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.swagger_types
|
|
58
|
+
{
|
|
59
|
+
:'clean_result' => :'BOOLEAN',
|
|
60
|
+
:'phishing_risk_level' => :'Float',
|
|
61
|
+
:'is_ssrf_threat' => :'BOOLEAN',
|
|
62
|
+
:'contains_phishing' => :'BOOLEAN',
|
|
63
|
+
:'contains_unsolicited_sales' => :'BOOLEAN',
|
|
64
|
+
:'contains_promotional_content' => :'BOOLEAN',
|
|
65
|
+
:'contains_phishing_attempt' => :'BOOLEAN',
|
|
66
|
+
:'analysis_rationale' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
return unless attributes.is_a?(Hash)
|
|
74
|
+
|
|
75
|
+
# convert string to symbol for hash key
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'CleanResult')
|
|
79
|
+
self.clean_result = attributes[:'CleanResult']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.has_key?(:'PhishingRiskLevel')
|
|
83
|
+
self.phishing_risk_level = attributes[:'PhishingRiskLevel']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.has_key?(:'IsSsrfThreat')
|
|
87
|
+
self.is_ssrf_threat = attributes[:'IsSsrfThreat']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.has_key?(:'ContainsPhishing')
|
|
91
|
+
self.contains_phishing = attributes[:'ContainsPhishing']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.has_key?(:'ContainsUnsolicitedSales')
|
|
95
|
+
self.contains_unsolicited_sales = attributes[:'ContainsUnsolicitedSales']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.has_key?(:'ContainsPromotionalContent')
|
|
99
|
+
self.contains_promotional_content = attributes[:'ContainsPromotionalContent']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.has_key?(:'ContainsPhishingAttempt')
|
|
103
|
+
self.contains_phishing_attempt = attributes[:'ContainsPhishingAttempt']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'AnalysisRationale')
|
|
107
|
+
self.analysis_rationale = attributes[:'AnalysisRationale']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Checks equality by comparing each attribute.
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def ==(o)
|
|
127
|
+
return true if self.equal?(o)
|
|
128
|
+
self.class == o.class &&
|
|
129
|
+
clean_result == o.clean_result &&
|
|
130
|
+
phishing_risk_level == o.phishing_risk_level &&
|
|
131
|
+
is_ssrf_threat == o.is_ssrf_threat &&
|
|
132
|
+
contains_phishing == o.contains_phishing &&
|
|
133
|
+
contains_unsolicited_sales == o.contains_unsolicited_sales &&
|
|
134
|
+
contains_promotional_content == o.contains_promotional_content &&
|
|
135
|
+
contains_phishing_attempt == o.contains_phishing_attempt &&
|
|
136
|
+
analysis_rationale == o.analysis_rationale
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Fixnum] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[clean_result, phishing_risk_level, is_ssrf_threat, contains_phishing, contains_unsolicited_sales, contains_promotional_content, contains_phishing_attempt, analysis_rationale].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
157
|
+
if type =~ /\AArray<(.*)>/i
|
|
158
|
+
# check to ensure the input is an array given that the attribute
|
|
159
|
+
# is documented as an array but the input is not
|
|
160
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
161
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
162
|
+
end
|
|
163
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
164
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
165
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
self
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Deserializes the data based on type
|
|
172
|
+
# @param string type Data type
|
|
173
|
+
# @param string value Value to be deserialized
|
|
174
|
+
# @return [Object] Deserialized data
|
|
175
|
+
def _deserialize(type, value)
|
|
176
|
+
case type.to_sym
|
|
177
|
+
when :DateTime
|
|
178
|
+
DateTime.parse(value)
|
|
179
|
+
when :Date
|
|
180
|
+
Date.parse(value)
|
|
181
|
+
when :String
|
|
182
|
+
value.to_s
|
|
183
|
+
when :Integer
|
|
184
|
+
value.to_i
|
|
185
|
+
when :Float
|
|
186
|
+
value.to_f
|
|
187
|
+
when :BOOLEAN
|
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
189
|
+
true
|
|
190
|
+
else
|
|
191
|
+
false
|
|
192
|
+
end
|
|
193
|
+
when :Object
|
|
194
|
+
# generic object (usually a Hash), return directly
|
|
195
|
+
value
|
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each do |k, v|
|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
else # model
|
|
208
|
+
temp_model = CloudmersivePhishingDetectionApiClient.const_get(type).new
|
|
209
|
+
temp_model.build_from_hash(value)
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the string representation of the object
|
|
214
|
+
# @return [String] String presentation of the object
|
|
215
|
+
def to_s
|
|
216
|
+
to_hash.to_s
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_body
|
|
222
|
+
to_hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Returns the object in the form of hash
|
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
|
227
|
+
def to_hash
|
|
228
|
+
hash = {}
|
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
230
|
+
value = self.send(attr)
|
|
231
|
+
next if value.nil?
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Outputs non-array value in the form of hash
|
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
+
# @param [Object] value Any valid value
|
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
|
241
|
+
def _to_hash(value)
|
|
242
|
+
if value.is_a?(Array)
|
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
|
244
|
+
elsif value.is_a?(Hash)
|
|
245
|
+
{}.tap do |hash|
|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
+
end
|
|
248
|
+
elsif value.respond_to? :to_hash
|
|
249
|
+
value.to_hash
|
|
250
|
+
else
|
|
251
|
+
value
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
end
|
|
@@ -18,10 +18,12 @@ require 'cloudmersive-phishing-detection-api-client/configuration'
|
|
|
18
18
|
|
|
19
19
|
# Models
|
|
20
20
|
require 'cloudmersive-phishing-detection-api-client/models/advanced_email_detection_request'
|
|
21
|
+
require 'cloudmersive-phishing-detection-api-client/models/advanced_url_detection_request'
|
|
21
22
|
require 'cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_request'
|
|
22
23
|
require 'cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_response'
|
|
23
24
|
require 'cloudmersive-phishing-detection-api-client/models/phishing_detection_email_advanced_response'
|
|
24
25
|
require 'cloudmersive-phishing-detection-api-client/models/phishing_detection_response'
|
|
26
|
+
require 'cloudmersive-phishing-detection-api-client/models/phishing_detection_url_advanced_response'
|
|
25
27
|
|
|
26
28
|
# APIs
|
|
27
29
|
require 'cloudmersive-phishing-detection-api-client/api/phishing_detection_api'
|
|
@@ -47,6 +47,7 @@ describe 'PhishingDetectionApi' do
|
|
|
47
47
|
# Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
|
|
48
48
|
# @param [Hash] opts the optional parameters
|
|
49
49
|
# @option opts [String] :model
|
|
50
|
+
# @option opts [String] :custom_policy_id
|
|
50
51
|
# @option opts [File] :input_file
|
|
51
52
|
# @return [PhishingDetectionAdvancedResponse]
|
|
52
53
|
describe 'phishing_detect_file_advanced_post test' do
|
|
@@ -78,4 +79,15 @@ describe 'PhishingDetectionApi' do
|
|
|
78
79
|
end
|
|
79
80
|
end
|
|
80
81
|
|
|
82
|
+
# unit tests for phishing_detect_url_advanced_post
|
|
83
|
+
# Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
|
|
84
|
+
# @param [Hash] opts the optional parameters
|
|
85
|
+
# @option opts [AdvancedUrlDetectionRequest] :body URL phishing detection request
|
|
86
|
+
# @return [PhishingDetectionUrlAdvancedResponse]
|
|
87
|
+
describe 'phishing_detect_url_advanced_post test' do
|
|
88
|
+
it 'should work' do
|
|
89
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
81
93
|
end
|
|
@@ -68,6 +68,12 @@ describe 'AdvancedEmailDetectionRequest' do
|
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
describe 'test attribute "custom_policy_id"' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
71
77
|
describe 'test attribute "input_email_file"' do
|
|
72
78
|
it 'should work' do
|
|
73
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#phishingapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and block phishing security threats in input.
|
|
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 CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest
|
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'AdvancedUrlDetectionRequest' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of AdvancedUrlDetectionRequest' do
|
|
31
|
+
it 'should create an instance of AdvancedUrlDetectionRequest' do
|
|
32
|
+
expect(@instance).to be_instance_of(CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "url"' 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 "custom_policy_id"' 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
|
|
@@ -44,4 +44,58 @@ describe 'PhishingDetectionAdvancedRequest' do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
describe 'test attribute "custom_policy_id"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
describe 'test attribute "provide_analysis_rationale"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe 'test attribute "text_type"' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "from_name"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
describe 'test attribute "to_name"' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
describe 'test attribute "from_phone_number"' do
|
|
78
|
+
it 'should work' do
|
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
describe 'test attribute "to_phone_number"' do
|
|
84
|
+
it 'should work' do
|
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
describe 'test attribute "from_email_address"' do
|
|
90
|
+
it 'should work' do
|
|
91
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
describe 'test attribute "to_email_address"' do
|
|
96
|
+
it 'should work' do
|
|
97
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
47
101
|
end
|
|
@@ -44,6 +44,12 @@ describe 'PhishingDetectionAdvancedResponse' do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
describe 'test attribute "confidence_level"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
47
53
|
describe 'test attribute "analysis_rationale"' do
|
|
48
54
|
it 'should work' do
|
|
49
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#phishingapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and block phishing security threats in input.
|
|
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 CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse
|
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe 'PhishingDetectionUrlAdvancedResponse' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of PhishingDetectionUrlAdvancedResponse' do
|
|
31
|
+
it 'should create an instance of PhishingDetectionUrlAdvancedResponse' do
|
|
32
|
+
expect(@instance).to be_instance_of(CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "clean_result"' 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 "phishing_risk_level"' 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
|
+
describe 'test attribute "is_ssrf_threat"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
describe 'test attribute "contains_phishing"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe 'test attribute "contains_unsolicited_sales"' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "contains_promotional_content"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
describe 'test attribute "contains_phishing_attempt"' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
describe 'test attribute "analysis_rationale"' do
|
|
78
|
+
it 'should work' do
|
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudmersive-phishing-detection-api-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cloudmersive
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -203,11 +203,13 @@ files:
|
|
|
203
203
|
- "./Rakefile"
|
|
204
204
|
- "./cloudmersive-phishing-detection-api-client.gemspec"
|
|
205
205
|
- "./docs/AdvancedEmailDetectionRequest.md"
|
|
206
|
+
- "./docs/AdvancedUrlDetectionRequest.md"
|
|
206
207
|
- "./docs/PhishingDetectionAdvancedRequest.md"
|
|
207
208
|
- "./docs/PhishingDetectionAdvancedResponse.md"
|
|
208
209
|
- "./docs/PhishingDetectionApi.md"
|
|
209
210
|
- "./docs/PhishingDetectionEmailAdvancedResponse.md"
|
|
210
211
|
- "./docs/PhishingDetectionResponse.md"
|
|
212
|
+
- "./docs/PhishingDetectionUrlAdvancedResponse.md"
|
|
211
213
|
- "./git_push.sh"
|
|
212
214
|
- "./lib/cloudmersive-phishing-detection-api-client.rb"
|
|
213
215
|
- "./lib/cloudmersive-phishing-detection-api-client/api/phishing_detection_api.rb"
|
|
@@ -215,19 +217,23 @@ files:
|
|
|
215
217
|
- "./lib/cloudmersive-phishing-detection-api-client/api_error.rb"
|
|
216
218
|
- "./lib/cloudmersive-phishing-detection-api-client/configuration.rb"
|
|
217
219
|
- "./lib/cloudmersive-phishing-detection-api-client/models/advanced_email_detection_request.rb"
|
|
220
|
+
- "./lib/cloudmersive-phishing-detection-api-client/models/advanced_url_detection_request.rb"
|
|
218
221
|
- "./lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_request.rb"
|
|
219
222
|
- "./lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_response.rb"
|
|
220
223
|
- "./lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_email_advanced_response.rb"
|
|
221
224
|
- "./lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_response.rb"
|
|
225
|
+
- "./lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_url_advanced_response.rb"
|
|
222
226
|
- "./lib/cloudmersive-phishing-detection-api-client/version.rb"
|
|
223
227
|
- "./spec/api/phishing_detection_api_spec.rb"
|
|
224
228
|
- "./spec/api_client_spec.rb"
|
|
225
229
|
- "./spec/configuration_spec.rb"
|
|
226
230
|
- "./spec/models/advanced_email_detection_request_spec.rb"
|
|
231
|
+
- "./spec/models/advanced_url_detection_request_spec.rb"
|
|
227
232
|
- "./spec/models/phishing_detection_advanced_request_spec.rb"
|
|
228
233
|
- "./spec/models/phishing_detection_advanced_response_spec.rb"
|
|
229
234
|
- "./spec/models/phishing_detection_email_advanced_response_spec.rb"
|
|
230
235
|
- "./spec/models/phishing_detection_response_spec.rb"
|
|
236
|
+
- "./spec/models/phishing_detection_url_advanced_response_spec.rb"
|
|
231
237
|
- "./spec/spec_helper.rb"
|
|
232
238
|
homepage: https://www.cloudmersive.com/phishing-api
|
|
233
239
|
licenses:
|