cloudmersive-spam-detection-api-client 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -7
  3. data/cloudmersive-spam-detection-api-client.gemspec +2 -2
  4. data/docs/SpamDetectionAdvancedRequest.md +5 -1
  5. data/docs/SpamDetectionAdvancedResponse.md +5 -1
  6. data/docs/SpamDetectionApi.md +59 -4
  7. data/docs/SpamDetectionRequest.md +9 -0
  8. data/docs/SpamDetectionResponse.md +8 -0
  9. data/lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb +53 -3
  10. data/lib/cloudmersive-spam-detection-api-client/api_client.rb +1 -1
  11. data/lib/cloudmersive-spam-detection-api-client/api_error.rb +1 -1
  12. data/lib/cloudmersive-spam-detection-api-client/configuration.rb +1 -1
  13. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb +49 -7
  14. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response.rb +49 -7
  15. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_request.rb +196 -0
  16. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_response.rb +186 -0
  17. data/lib/cloudmersive-spam-detection-api-client/version.rb +2 -2
  18. data/lib/cloudmersive-spam-detection-api-client.rb +3 -1
  19. data/spec/api/spam_detection_api_spec.rb +14 -2
  20. data/spec/api_client_spec.rb +1 -1
  21. data/spec/configuration_spec.rb +1 -1
  22. data/spec/models/spam_detection_advanced_request_spec.rb +25 -1
  23. data/spec/models/spam_detection_advanced_response_spec.rb +25 -1
  24. data/spec/models/spam_detection_request_spec.rb +47 -0
  25. data/spec/models/spam_detection_response_spec.rb +41 -0
  26. data/spec/spec_helper.rb +1 -1
  27. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d3f876a94ba37d340498e88c7a09e720fa277b8233cd087134497f8bcf90605
4
- data.tar.gz: f26d31ccbf73ada867ca4e85b22eb0946d3a2f6f3f2c86634285dc4ac1c9a5dd
3
+ metadata.gz: b6c35d673d893361bc3597ccae72552fedef2b936c40b228bc2bc1fd01a6b7a9
4
+ data.tar.gz: c1c41115fa8dfb2a7a1a07f6a14805ba8d32b519b8cad9f9b9b414aeba879c91
5
5
  SHA512:
6
- metadata.gz: 83f8591dd3989804c4ac1fd3800543f26e37480e593cef21b4ec77c34f45ae81ca64cc6b270e66196edf205285486ef0e21806352c7cf61ce2164c9ec652e82e
7
- data.tar.gz: 16a9a3d5cb7d960690def7b057ec968d2352a4624f869600ac45ceb55256d9ce06354dcb1ff519b27867070b4d887dec82d1a0fd7ed9114a8c0959ec59e0bf87
6
+ metadata.gz: 07b2200a1df7403389143d0a90982846d507e7a2125de4f1ed7bf443be625bd604e2a2cf59f679198099a6325eec9fe8e942e64f055ae7f73c1a9ef20fe1453d
7
+ data.tar.gz: 6615752fc301424a9ea5cf4cb18044ce5640e3038352ec74ff456118c9378ae67c077d9563abcc1c9aaeb6a6423e7ad43a083b7175caa6a8e6915206361dc316
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # cloudmersive-spam-detection-api-client
2
2
 
3
- CloudmersiveSpamDetectionApiClient - the Ruby gem for the phishingapi
3
+ CloudmersiveSpamDetectionApiClient - the Ruby gem for the spamapi
4
4
 
5
5
  Easily and directly scan and block phishing security threats.
6
6
 
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.0
10
+ - Package version: 2.3.0
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-spam-detection-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-spam-detection-api-client-2.2.0.gem
26
+ gem install ./cloudmersive-spam-detection-api-client-2.3.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.2.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.3.0.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-spam-detection-api-client', '~> 2.2.0'
34
+ gem 'cloudmersive-spam-detection-api-client', '~> 2.3.0'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -65,10 +65,11 @@ end
65
65
  api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
66
66
 
67
67
  opts = {
68
- body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest |
68
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
69
69
  }
70
70
 
71
71
  begin
72
+ #Perform advanced AI spam 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.
72
73
  result = api_instance.spam_detect_text_string_advanced_post(opts)
73
74
  p result
74
75
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -83,13 +84,16 @@ All URIs are relative to *https://localhost*
83
84
 
84
85
  Class | Method | HTTP request | Description
85
86
  ------------ | ------------- | ------------- | -------------
86
- *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_advanced_post**](docs/SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced |
87
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_advanced_post**](docs/SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced | Perform advanced AI spam 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.
88
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_post**](docs/SpamDetectionApi.md#spam_detect_text_string_post) | **POST** /spam/detect/text-string | Perform AI spam 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-75 API calls depending on model selected.
87
89
 
88
90
 
89
91
  ## Documentation for Models
90
92
 
91
93
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest](docs/SpamDetectionAdvancedRequest.md)
92
94
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedResponse](docs/SpamDetectionAdvancedResponse.md)
95
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionRequest](docs/SpamDetectionRequest.md)
96
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionResponse](docs/SpamDetectionResponse.md)
93
97
 
94
98
 
95
99
  ## Documentation for Authorization
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  =begin
4
- #phishingapi
4
+ #spamapi
5
5
 
6
6
  #Easily and directly scan and block phishing security threats.
7
7
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Cloudmersive"]
23
23
  s.email = [""]
24
- s.homepage = "https://www.cloudmersive.com/spam-api"
24
+ s.homepage = "https://cloudmersive.com/spam-detection-api"
25
25
  s.summary = "Scan content for spam."
26
26
  s.description = "Spam Detection API lets you scan content for spam using AI."
27
27
  s.license = 'Apache 2.0'
@@ -3,6 +3,10 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **input_string** | **String** | | [optional]
6
+ **input_string** | **String** | Input text string to detect spam against | [optional]
7
+ **model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
8
+ **allow_unsolicited_sales** | **BOOLEAN** | True if unsolicited sales should be allowed, false otherwise | [optional]
9
+ **allow_promotional_content** | **BOOLEAN** | True if promotional content should be allowed, false otherwise | [optional]
10
+ **allow_phishing** | **BOOLEAN** | True if phishing should be allowed, false otherwise | [optional]
7
11
 
8
12
 
@@ -3,6 +3,10 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **clean_result** | **BOOLEAN** | | [optional]
6
+ **clean_result** | **BOOLEAN** | True if the result is not spam (clean), and false otherwise | [optional]
7
+ **contains_spam** | **BOOLEAN** | True if the input text contains spam, false otherwise | [optional]
8
+ **contains_unsolicited_sales** | **BOOLEAN** | True if the input text contains unsolicited sales, false otherwise | [optional]
9
+ **contains_promotional_content** | **BOOLEAN** | True if the input text contains promotional content, false otherwise | [optional]
10
+ **contains_phishing_attempt** | **BOOLEAN** | True if the input text contains a phishing attempt, false otherwise | [optional]
7
11
 
8
12
 
@@ -4,13 +4,14 @@ All URIs are relative to *https://localhost*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**spam_detect_text_string_advanced_post**](SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced |
7
+ [**spam_detect_text_string_advanced_post**](SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced | Perform advanced AI spam 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.
8
+ [**spam_detect_text_string_post**](SpamDetectionApi.md#spam_detect_text_string_post) | **POST** /spam/detect/text-string | Perform AI spam 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-75 API calls depending on model selected.
8
9
 
9
10
 
10
11
  # **spam_detect_text_string_advanced_post**
11
12
  > SpamDetectionAdvancedResponse spam_detect_text_string_advanced_post(opts)
12
13
 
13
-
14
+ Perform advanced AI spam 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.
14
15
 
15
16
  ### Example
16
17
  ```ruby
@@ -27,10 +28,11 @@ end
27
28
  api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
28
29
 
29
30
  opts = {
30
- body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest |
31
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
31
32
  }
32
33
 
33
34
  begin
35
+ #Perform advanced AI spam 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.
34
36
  result = api_instance.spam_detect_text_string_advanced_post(opts)
35
37
  p result
36
38
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -42,7 +44,7 @@ end
42
44
 
43
45
  Name | Type | Description | Notes
44
46
  ------------- | ------------- | ------------- | -------------
45
- **body** | [**SpamDetectionAdvancedRequest**](SpamDetectionAdvancedRequest.md)| | [optional]
47
+ **body** | [**SpamDetectionAdvancedRequest**](SpamDetectionAdvancedRequest.md)| Spam detection request | [optional]
46
48
 
47
49
  ### Return type
48
50
 
@@ -59,3 +61,56 @@ Name | Type | Description | Notes
59
61
 
60
62
 
61
63
 
64
+ # **spam_detect_text_string_post**
65
+ > SpamDetectionResponse spam_detect_text_string_post(opts)
66
+
67
+ Perform AI spam 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-75 API calls depending on model selected.
68
+
69
+ ### Example
70
+ ```ruby
71
+ # load the gem
72
+ require 'cloudmersive-spam-detection-api-client'
73
+ # setup authorization
74
+ CloudmersiveSpamDetectionApiClient.configure do |config|
75
+ # Configure API key authorization: Apikey
76
+ config.api_key['Apikey'] = 'YOUR API KEY'
77
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
78
+ #config.api_key_prefix['Apikey'] = 'Bearer'
79
+ end
80
+
81
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
82
+
83
+ opts = {
84
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionRequest.new # SpamDetectionRequest | Spam detection request
85
+ }
86
+
87
+ begin
88
+ #Perform AI spam 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-75 API calls depending on model selected.
89
+ result = api_instance.spam_detect_text_string_post(opts)
90
+ p result
91
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
92
+ puts "Exception when calling SpamDetectionApi->spam_detect_text_string_post: #{e}"
93
+ end
94
+ ```
95
+
96
+ ### Parameters
97
+
98
+ Name | Type | Description | Notes
99
+ ------------- | ------------- | ------------- | -------------
100
+ **body** | [**SpamDetectionRequest**](SpamDetectionRequest.md)| Spam detection request | [optional]
101
+
102
+ ### Return type
103
+
104
+ [**SpamDetectionResponse**](SpamDetectionResponse.md)
105
+
106
+ ### Authorization
107
+
108
+ [Apikey](../README.md#Apikey)
109
+
110
+ ### HTTP request headers
111
+
112
+ - **Content-Type**: application/json, text/json, application/*+json
113
+ - **Accept**: text/plain, application/json, text/json
114
+
115
+
116
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_string** | **String** | Input text string to detect spam against | [optional]
7
+ **model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the result is not spam (clean), and false otherwise | [optional]
7
+
8
+
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -19,16 +19,18 @@ module CloudmersiveSpamDetectionApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Perform advanced AI spam 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.
22
23
  # @param [Hash] opts the optional parameters
23
- # @option opts [SpamDetectionAdvancedRequest] :body
24
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
24
25
  # @return [SpamDetectionAdvancedResponse]
25
26
  def spam_detect_text_string_advanced_post(opts = {})
26
27
  data, _status_code, _headers = spam_detect_text_string_advanced_post_with_http_info(opts)
27
28
  data
28
29
  end
29
30
 
31
+ # Perform advanced AI spam 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.
30
32
  # @param [Hash] opts the optional parameters
31
- # @option opts [SpamDetectionAdvancedRequest] :body
33
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
32
34
  # @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
33
35
  def spam_detect_text_string_advanced_post_with_http_info(opts = {})
34
36
  if @api_client.config.debugging
@@ -65,5 +67,53 @@ module CloudmersiveSpamDetectionApiClient
65
67
  end
66
68
  return data, status_code, headers
67
69
  end
70
+ # Perform AI spam 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-75 API calls depending on model selected.
71
+ # @param [Hash] opts the optional parameters
72
+ # @option opts [SpamDetectionRequest] :body Spam detection request
73
+ # @return [SpamDetectionResponse]
74
+ def spam_detect_text_string_post(opts = {})
75
+ data, _status_code, _headers = spam_detect_text_string_post_with_http_info(opts)
76
+ data
77
+ end
78
+
79
+ # Perform AI spam 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-75 API calls depending on model selected.
80
+ # @param [Hash] opts the optional parameters
81
+ # @option opts [SpamDetectionRequest] :body Spam detection request
82
+ # @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
83
+ def spam_detect_text_string_post_with_http_info(opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_text_string_post ...'
86
+ end
87
+ # resource path
88
+ local_var_path = '/spam/detect/text-string'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+
103
+ # http body (model)
104
+ post_body = @api_client.object_to_http_body(opts[:'body'])
105
+ auth_names = ['Apikey']
106
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
107
+ :header_params => header_params,
108
+ :query_params => query_params,
109
+ :form_params => form_params,
110
+ :body => post_body,
111
+ :auth_names => auth_names,
112
+ :return_type => 'SpamDetectionResponse')
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_text_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ return data, status_code, headers
117
+ end
68
118
  end
69
119
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -13,20 +13,42 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveSpamDetectionApiClient
16
+ # AI advanced spam detection request
16
17
  class SpamDetectionAdvancedRequest
18
+ # Input text string to detect spam against
17
19
  attr_accessor :input_string
18
20
 
21
+ # Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
22
+ attr_accessor :model
23
+
24
+ # True if unsolicited sales should be allowed, false otherwise
25
+ attr_accessor :allow_unsolicited_sales
26
+
27
+ # True if promotional content should be allowed, false otherwise
28
+ attr_accessor :allow_promotional_content
29
+
30
+ # True if phishing should be allowed, false otherwise
31
+ attr_accessor :allow_phishing
32
+
19
33
  # Attribute mapping from ruby-style variable name to JSON key.
20
34
  def self.attribute_map
21
35
  {
22
- :'input_string' => :'inputString'
36
+ :'input_string' => :'InputString',
37
+ :'model' => :'Model',
38
+ :'allow_unsolicited_sales' => :'AllowUnsolicitedSales',
39
+ :'allow_promotional_content' => :'AllowPromotionalContent',
40
+ :'allow_phishing' => :'AllowPhishing'
23
41
  }
24
42
  end
25
43
 
26
44
  # Attribute type mapping.
27
45
  def self.swagger_types
28
46
  {
29
- :'input_string' => :'String'
47
+ :'input_string' => :'String',
48
+ :'model' => :'String',
49
+ :'allow_unsolicited_sales' => :'BOOLEAN',
50
+ :'allow_promotional_content' => :'BOOLEAN',
51
+ :'allow_phishing' => :'BOOLEAN'
30
52
  }
31
53
  end
32
54
 
@@ -38,8 +60,24 @@ module CloudmersiveSpamDetectionApiClient
38
60
  # convert string to symbol for hash key
39
61
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
62
 
41
- if attributes.has_key?(:'inputString')
42
- self.input_string = attributes[:'inputString']
63
+ if attributes.has_key?(:'InputString')
64
+ self.input_string = attributes[:'InputString']
65
+ end
66
+
67
+ if attributes.has_key?(:'Model')
68
+ self.model = attributes[:'Model']
69
+ end
70
+
71
+ if attributes.has_key?(:'AllowUnsolicitedSales')
72
+ self.allow_unsolicited_sales = attributes[:'AllowUnsolicitedSales']
73
+ end
74
+
75
+ if attributes.has_key?(:'AllowPromotionalContent')
76
+ self.allow_promotional_content = attributes[:'AllowPromotionalContent']
77
+ end
78
+
79
+ if attributes.has_key?(:'AllowPhishing')
80
+ self.allow_phishing = attributes[:'AllowPhishing']
43
81
  end
44
82
  end
45
83
 
@@ -61,7 +99,11 @@ module CloudmersiveSpamDetectionApiClient
61
99
  def ==(o)
62
100
  return true if self.equal?(o)
63
101
  self.class == o.class &&
64
- input_string == o.input_string
102
+ input_string == o.input_string &&
103
+ model == o.model &&
104
+ allow_unsolicited_sales == o.allow_unsolicited_sales &&
105
+ allow_promotional_content == o.allow_promotional_content &&
106
+ allow_phishing == o.allow_phishing
65
107
  end
66
108
 
67
109
  # @see the `==` method
@@ -73,7 +115,7 @@ module CloudmersiveSpamDetectionApiClient
73
115
  # Calculates hash code according to all attributes.
74
116
  # @return [Fixnum] Hash code
75
117
  def hash
76
- [input_string].hash
118
+ [input_string, model, allow_unsolicited_sales, allow_promotional_content, allow_phishing].hash
77
119
  end
78
120
 
79
121
  # Builds the object from hash
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -13,20 +13,42 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveSpamDetectionApiClient
16
+ # Result of detecting spam using AI
16
17
  class SpamDetectionAdvancedResponse
18
+ # True if the result is not spam (clean), and false otherwise
17
19
  attr_accessor :clean_result
18
20
 
21
+ # True if the input text contains spam, false otherwise
22
+ attr_accessor :contains_spam
23
+
24
+ # True if the input text contains unsolicited sales, false otherwise
25
+ attr_accessor :contains_unsolicited_sales
26
+
27
+ # True if the input text contains promotional content, false otherwise
28
+ attr_accessor :contains_promotional_content
29
+
30
+ # True if the input text contains a phishing attempt, false otherwise
31
+ attr_accessor :contains_phishing_attempt
32
+
19
33
  # Attribute mapping from ruby-style variable name to JSON key.
20
34
  def self.attribute_map
21
35
  {
22
- :'clean_result' => :'cleanResult'
36
+ :'clean_result' => :'CleanResult',
37
+ :'contains_spam' => :'ContainsSpam',
38
+ :'contains_unsolicited_sales' => :'ContainsUnsolicitedSales',
39
+ :'contains_promotional_content' => :'ContainsPromotionalContent',
40
+ :'contains_phishing_attempt' => :'ContainsPhishingAttempt'
23
41
  }
24
42
  end
25
43
 
26
44
  # Attribute type mapping.
27
45
  def self.swagger_types
28
46
  {
29
- :'clean_result' => :'BOOLEAN'
47
+ :'clean_result' => :'BOOLEAN',
48
+ :'contains_spam' => :'BOOLEAN',
49
+ :'contains_unsolicited_sales' => :'BOOLEAN',
50
+ :'contains_promotional_content' => :'BOOLEAN',
51
+ :'contains_phishing_attempt' => :'BOOLEAN'
30
52
  }
31
53
  end
32
54
 
@@ -38,8 +60,24 @@ module CloudmersiveSpamDetectionApiClient
38
60
  # convert string to symbol for hash key
39
61
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
62
 
41
- if attributes.has_key?(:'cleanResult')
42
- self.clean_result = attributes[:'cleanResult']
63
+ if attributes.has_key?(:'CleanResult')
64
+ self.clean_result = attributes[:'CleanResult']
65
+ end
66
+
67
+ if attributes.has_key?(:'ContainsSpam')
68
+ self.contains_spam = attributes[:'ContainsSpam']
69
+ end
70
+
71
+ if attributes.has_key?(:'ContainsUnsolicitedSales')
72
+ self.contains_unsolicited_sales = attributes[:'ContainsUnsolicitedSales']
73
+ end
74
+
75
+ if attributes.has_key?(:'ContainsPromotionalContent')
76
+ self.contains_promotional_content = attributes[:'ContainsPromotionalContent']
77
+ end
78
+
79
+ if attributes.has_key?(:'ContainsPhishingAttempt')
80
+ self.contains_phishing_attempt = attributes[:'ContainsPhishingAttempt']
43
81
  end
44
82
  end
45
83
 
@@ -61,7 +99,11 @@ module CloudmersiveSpamDetectionApiClient
61
99
  def ==(o)
62
100
  return true if self.equal?(o)
63
101
  self.class == o.class &&
64
- clean_result == o.clean_result
102
+ clean_result == o.clean_result &&
103
+ contains_spam == o.contains_spam &&
104
+ contains_unsolicited_sales == o.contains_unsolicited_sales &&
105
+ contains_promotional_content == o.contains_promotional_content &&
106
+ contains_phishing_attempt == o.contains_phishing_attempt
65
107
  end
66
108
 
67
109
  # @see the `==` method
@@ -73,7 +115,7 @@ module CloudmersiveSpamDetectionApiClient
73
115
  # Calculates hash code according to all attributes.
74
116
  # @return [Fixnum] Hash code
75
117
  def hash
76
- [clean_result].hash
118
+ [clean_result, contains_spam, contains_unsolicited_sales, contains_promotional_content, contains_phishing_attempt].hash
77
119
  end
78
120
 
79
121
  # Builds the object from hash
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block phishing security threats.
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 CloudmersiveSpamDetectionApiClient
16
+ # AI spam detection request
17
+ class SpamDetectionRequest
18
+ # Input text string to detect spam against
19
+ attr_accessor :input_string
20
+
21
+ # Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
22
+ attr_accessor :model
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'input_string' => :'InputString',
28
+ :'model' => :'Model'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'input_string' => :'String',
36
+ :'model' => :'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?(:'InputString')
49
+ self.input_string = attributes[:'InputString']
50
+ end
51
+
52
+ if attributes.has_key?(:'Model')
53
+ self.model = attributes[:'Model']
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
+ input_string == o.input_string &&
76
+ model == o.model
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
+ [input_string, model].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 = CloudmersiveSpamDetectionApiClient.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
@@ -0,0 +1,186 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block phishing security threats.
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 CloudmersiveSpamDetectionApiClient
16
+ # Result of detecting spam using AI
17
+ class SpamDetectionResponse
18
+ # True if the result is not spam (clean), and false otherwise
19
+ attr_accessor :clean_result
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'clean_result' => :'CleanResult'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'clean_result' => :'BOOLEAN'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
+
43
+ if attributes.has_key?(:'CleanResult')
44
+ self.clean_result = attributes[:'CleanResult']
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ clean_result == o.clean_result
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [clean_result].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = CloudmersiveSpamDetectionApiClient.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveSpamDetectionApiClient
14
- VERSION = '2.2.0'
14
+ VERSION = '2.3.0'
15
15
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -19,6 +19,8 @@ require 'cloudmersive-spam-detection-api-client/configuration'
19
19
  # Models
20
20
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request'
21
21
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response'
22
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_request'
23
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_response'
22
24
 
23
25
  # APIs
24
26
  require 'cloudmersive-spam-detection-api-client/api/spam_detection_api'
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -33,8 +33,9 @@ describe 'SpamDetectionApi' do
33
33
  end
34
34
 
35
35
  # unit tests for spam_detect_text_string_advanced_post
36
+ # Perform advanced AI spam 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.
36
37
  # @param [Hash] opts the optional parameters
37
- # @option opts [SpamDetectionAdvancedRequest] :body
38
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
38
39
  # @return [SpamDetectionAdvancedResponse]
39
40
  describe 'spam_detect_text_string_advanced_post test' do
40
41
  it 'should work' do
@@ -42,4 +43,15 @@ describe 'SpamDetectionApi' do
42
43
  end
43
44
  end
44
45
 
46
+ # unit tests for spam_detect_text_string_post
47
+ # Perform AI spam 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-75 API calls depending on model selected.
48
+ # @param [Hash] opts the optional parameters
49
+ # @option opts [SpamDetectionRequest] :body Spam detection request
50
+ # @return [SpamDetectionResponse]
51
+ describe 'spam_detect_text_string_post test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
45
57
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -38,4 +38,28 @@ describe 'SpamDetectionAdvancedRequest' do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'test attribute "model"' 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 "allow_unsolicited_sales"' 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 "allow_promotional_content"' 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 "allow_phishing"' 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
+
41
65
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -38,4 +38,28 @@ describe 'SpamDetectionAdvancedResponse' do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'test attribute "contains_spam"' 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 "contains_unsolicited_sales"' 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_promotional_content"' 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_phishing_attempt"' 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
+
41
65
  end
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block phishing security threats.
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 CloudmersiveSpamDetectionApiClient::SpamDetectionRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'SpamDetectionRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveSpamDetectionApiClient::SpamDetectionRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SpamDetectionRequest' do
31
+ it 'should create an instance of SpamDetectionRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveSpamDetectionApiClient::SpamDetectionRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "input_string"' 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 "model"' 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
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block phishing security threats.
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 CloudmersiveSpamDetectionApiClient::SpamDetectionResponse
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'SpamDetectionResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveSpamDetectionApiClient::SpamDetectionResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SpamDetectionResponse' do
31
+ it 'should create an instance of SpamDetectionResponse' do
32
+ expect(@instance).to be_instance_of(CloudmersiveSpamDetectionApiClient::SpamDetectionResponse)
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
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-spam-detection-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2025-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -204,6 +204,8 @@ files:
204
204
  - "./docs/SpamDetectionAdvancedRequest.md"
205
205
  - "./docs/SpamDetectionAdvancedResponse.md"
206
206
  - "./docs/SpamDetectionApi.md"
207
+ - "./docs/SpamDetectionRequest.md"
208
+ - "./docs/SpamDetectionResponse.md"
207
209
  - "./git_push.sh"
208
210
  - "./lib/cloudmersive-spam-detection-api-client.rb"
209
211
  - "./lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb"
@@ -212,14 +214,18 @@ files:
212
214
  - "./lib/cloudmersive-spam-detection-api-client/configuration.rb"
213
215
  - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb"
214
216
  - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response.rb"
217
+ - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_request.rb"
218
+ - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_response.rb"
215
219
  - "./lib/cloudmersive-spam-detection-api-client/version.rb"
216
220
  - "./spec/api/spam_detection_api_spec.rb"
217
221
  - "./spec/api_client_spec.rb"
218
222
  - "./spec/configuration_spec.rb"
219
223
  - "./spec/models/spam_detection_advanced_request_spec.rb"
220
224
  - "./spec/models/spam_detection_advanced_response_spec.rb"
225
+ - "./spec/models/spam_detection_request_spec.rb"
226
+ - "./spec/models/spam_detection_response_spec.rb"
221
227
  - "./spec/spec_helper.rb"
222
- homepage: https://www.cloudmersive.com/spam-api
228
+ homepage: https://cloudmersive.com/spam-detection-api
223
229
  licenses:
224
230
  - Apache 2.0
225
231
  metadata: {}