cloudmersive-spam-detection-api-client 2.2.1 → 2.4.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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -11
  3. data/cloudmersive-spam-detection-api-client.gemspec +2 -2
  4. data/docs/SpamDetectionAdvancedFormField.md +9 -0
  5. data/docs/SpamDetectionAdvancedFormSubmissionRequest.md +11 -0
  6. data/docs/SpamDetectionAdvancedRequest.md +4 -0
  7. data/docs/SpamDetectionAdvancedResponse.md +6 -0
  8. data/docs/SpamDetectionApi.md +182 -8
  9. data/docs/SpamDetectionFormSubmissionAdvancedResponse.md +14 -0
  10. data/docs/SpamDetectionRequest.md +9 -0
  11. data/lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb +171 -7
  12. data/lib/cloudmersive-spam-detection-api-client/api_client.rb +1 -1
  13. data/lib/cloudmersive-spam-detection-api-client/api_error.rb +1 -1
  14. data/lib/cloudmersive-spam-detection-api-client/configuration.rb +1 -1
  15. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_field.rb +196 -0
  16. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_submission_request.rb +218 -0
  17. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb +45 -5
  18. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response.rb +65 -5
  19. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_form_submission_advanced_response.rb +246 -0
  20. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_request.rb +196 -0
  21. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_response.rb +1 -1
  22. data/lib/cloudmersive-spam-detection-api-client/version.rb +2 -2
  23. data/lib/cloudmersive-spam-detection-api-client.rb +5 -1
  24. data/spec/api/spam_detection_api_spec.rb +43 -4
  25. data/spec/api_client_spec.rb +1 -1
  26. data/spec/configuration_spec.rb +1 -1
  27. data/spec/models/spam_detection_advanced_form_field_spec.rb +47 -0
  28. data/spec/models/spam_detection_advanced_form_submission_request_spec.rb +59 -0
  29. data/spec/models/spam_detection_advanced_request_spec.rb +25 -1
  30. data/spec/models/spam_detection_advanced_response_spec.rb +37 -1
  31. data/spec/models/spam_detection_form_submission_advanced_response_spec.rb +77 -0
  32. data/spec/models/spam_detection_request_spec.rb +47 -0
  33. data/spec/models/spam_detection_response_spec.rb +1 -1
  34. data/spec/spec_helper.rb +1 -1
  35. metadata +15 -3
@@ -0,0 +1,246 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block spam 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 CloudmersiveSpamDetectionApiClient
16
+ # Result of detecting spam using AI
17
+ class SpamDetectionFormSubmissionAdvancedResponse
18
+ # True if the result is not spam (clean), and false otherwise
19
+ attr_accessor :clean_result
20
+
21
+ # Overall spam risk level between 0.0 and 1.0
22
+ attr_accessor :spam_risk_level
23
+
24
+ # True if the input text contains spam, false otherwise
25
+ attr_accessor :contains_spam
26
+
27
+ # True if the input text contains unsolicited sales, false otherwise
28
+ attr_accessor :contains_unsolicited_sales
29
+
30
+ # True if the input text contains promotional content, false otherwise
31
+ attr_accessor :contains_promotional_content
32
+
33
+ # True if the input text contains a phishing attempt, false otherwise
34
+ attr_accessor :contains_phishing_attempt
35
+
36
+ # Rationale for why the conclusion was formed
37
+ attr_accessor :analysis_rationale
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'clean_result' => :'CleanResult',
43
+ :'spam_risk_level' => :'SpamRiskLevel',
44
+ :'contains_spam' => :'ContainsSpam',
45
+ :'contains_unsolicited_sales' => :'ContainsUnsolicitedSales',
46
+ :'contains_promotional_content' => :'ContainsPromotionalContent',
47
+ :'contains_phishing_attempt' => :'ContainsPhishingAttempt',
48
+ :'analysis_rationale' => :'AnalysisRationale'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ :'clean_result' => :'BOOLEAN',
56
+ :'spam_risk_level' => :'Float',
57
+ :'contains_spam' => :'BOOLEAN',
58
+ :'contains_unsolicited_sales' => :'BOOLEAN',
59
+ :'contains_promotional_content' => :'BOOLEAN',
60
+ :'contains_phishing_attempt' => :'BOOLEAN',
61
+ :'analysis_rationale' => :'String'
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ return unless attributes.is_a?(Hash)
69
+
70
+ # convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
72
+
73
+ if attributes.has_key?(:'CleanResult')
74
+ self.clean_result = attributes[:'CleanResult']
75
+ end
76
+
77
+ if attributes.has_key?(:'SpamRiskLevel')
78
+ self.spam_risk_level = attributes[:'SpamRiskLevel']
79
+ end
80
+
81
+ if attributes.has_key?(:'ContainsSpam')
82
+ self.contains_spam = attributes[:'ContainsSpam']
83
+ end
84
+
85
+ if attributes.has_key?(:'ContainsUnsolicitedSales')
86
+ self.contains_unsolicited_sales = attributes[:'ContainsUnsolicitedSales']
87
+ end
88
+
89
+ if attributes.has_key?(:'ContainsPromotionalContent')
90
+ self.contains_promotional_content = attributes[:'ContainsPromotionalContent']
91
+ end
92
+
93
+ if attributes.has_key?(:'ContainsPhishingAttempt')
94
+ self.contains_phishing_attempt = attributes[:'ContainsPhishingAttempt']
95
+ end
96
+
97
+ if attributes.has_key?(:'AnalysisRationale')
98
+ self.analysis_rationale = attributes[:'AnalysisRationale']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ clean_result == o.clean_result &&
121
+ spam_risk_level == o.spam_risk_level &&
122
+ contains_spam == o.contains_spam &&
123
+ contains_unsolicited_sales == o.contains_unsolicited_sales &&
124
+ contains_promotional_content == o.contains_promotional_content &&
125
+ contains_phishing_attempt == o.contains_phishing_attempt &&
126
+ analysis_rationale == o.analysis_rationale
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Fixnum] Hash code
137
+ def hash
138
+ [clean_result, spam_risk_level, contains_spam, contains_unsolicited_sales, contains_promotional_content, contains_phishing_attempt, analysis_rationale].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ self.class.swagger_types.each_pair do |key, type|
147
+ if type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :DateTime
168
+ DateTime.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :BOOLEAN
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ temp_model = CloudmersiveSpamDetectionApiClient.const_get(type).new
199
+ temp_model.build_from_hash(value)
200
+ end
201
+ end
202
+
203
+ # Returns the string representation of the object
204
+ # @return [String] String presentation of the object
205
+ def to_s
206
+ to_hash.to_s
207
+ end
208
+
209
+ # to_body is an alias to to_hash (backward compatibility)
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_body
212
+ to_hash
213
+ end
214
+
215
+ # Returns the object in the form of hash
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_hash
218
+ hash = {}
219
+ self.class.attribute_map.each_pair do |attr, param|
220
+ value = self.send(attr)
221
+ next if value.nil?
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ # Outputs non-array value in the form of hash
228
+ # For object, use to_hash. Otherwise, just return the value
229
+ # @param [Object] value Any valid value
230
+ # @return [Hash] Returns the value in the form of hash
231
+ def _to_hash(value)
232
+ if value.is_a?(Array)
233
+ value.compact.map { |v| _to_hash(v) }
234
+ elsif value.is_a?(Hash)
235
+ {}.tap do |hash|
236
+ value.each { |k, v| hash[k] = _to_hash(v) }
237
+ end
238
+ elsif value.respond_to? :to_hash
239
+ value.to_hash
240
+ else
241
+ value
242
+ end
243
+ end
244
+
245
+ end
246
+ end
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block spam 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 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
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveSpamDetectionApiClient
14
- VERSION = '2.2.1'
14
+ VERSION = '2.4.0'
15
15
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -17,8 +17,12 @@ require 'cloudmersive-spam-detection-api-client/version'
17
17
  require 'cloudmersive-spam-detection-api-client/configuration'
18
18
 
19
19
  # Models
20
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_field'
21
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_submission_request'
20
22
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request'
21
23
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response'
24
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_form_submission_advanced_response'
25
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_request'
22
26
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_response'
23
27
 
24
28
  # APIs
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -32,8 +32,47 @@ describe 'SpamDetectionApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for spam_detect_file_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.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
39
+ # @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
40
+ # @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise
41
+ # @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise
42
+ # @option opts [BOOLEAN] :allow_promotional_content True if promotional content should be allowed, false otherwise
43
+ # @option opts [File] :input_file
44
+ # @return [SpamDetectionAdvancedResponse]
45
+ describe 'spam_detect_file_advanced_post test' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ # unit tests for spam_detect_file_post
52
+ # Perform AI spam 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 spam, phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
53
+ # @param [Hash] opts the optional parameters
54
+ # @option opts [String] :model Model to use; default setting is Advanced
55
+ # @option opts [File] :input_file
56
+ # @return [SpamDetectionResponse]
57
+ describe 'spam_detect_file_post test' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
63
+ # unit tests for spam_detect_form_submission_advanced_post
64
+ # Perform advanced AI spam detection and classification against a form submission. Analyzes form 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.
65
+ # @param [Hash] opts the optional parameters
66
+ # @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
67
+ # @return [SpamDetectionFormSubmissionAdvancedResponse]
68
+ describe 'spam_detect_form_submission_advanced_post test' do
69
+ it 'should work' do
70
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
+ end
72
+ end
73
+
35
74
  # 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.
75
+ # 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.
37
76
  # @param [Hash] opts the optional parameters
38
77
  # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
39
78
  # @return [SpamDetectionAdvancedResponse]
@@ -44,9 +83,9 @@ describe 'SpamDetectionApi' do
44
83
  end
45
84
 
46
85
  # 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.
86
+ # 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
87
  # @param [Hash] opts the optional parameters
49
- # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
88
+ # @option opts [SpamDetectionRequest] :body Spam detection request
50
89
  # @return [SpamDetectionResponse]
51
90
  describe 'spam_detect_text_string_post test' do
52
91
  it 'should work' do
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block spam 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 CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormField
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'SpamDetectionAdvancedFormField' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormField.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SpamDetectionAdvancedFormField' do
31
+ it 'should create an instance of SpamDetectionAdvancedFormField' do
32
+ expect(@instance).to be_instance_of(CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormField)
33
+ end
34
+ end
35
+ describe 'test attribute "field_title"' 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 "field_value"' 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,59 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block spam 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 CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'SpamDetectionAdvancedFormSubmissionRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SpamDetectionAdvancedFormSubmissionRequest' do
31
+ it 'should create an instance of SpamDetectionAdvancedFormSubmissionRequest' do
32
+ expect(@instance).to be_instance_of(CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "input_form_fields"' 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 "allow_unsolicited_sales"' 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_promotional_content"' 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_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
+ end