cloudmersive-validate-api-client 2.0.6 → 2.1.1
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 +17 -4
- data/docs/AddressApi.md +220 -0
- data/docs/CountryDetails.md +5 -0
- data/docs/DomainApi.md +55 -0
- data/docs/DomainQualityResponse.md +8 -0
- data/docs/GeolocateStreetAddressResponse.md +13 -0
- data/docs/IPAddressApi.md +55 -0
- data/docs/ReverseGeocodeAddressRequest.md +9 -0
- data/docs/ReverseGeocodeAddressResponse.md +14 -0
- data/docs/TextInputApi.md +118 -0
- data/docs/ValidateCountryResponse.md +5 -0
- data/docs/XssProtectionResult.md +11 -0
- data/lib/cloudmersive-validate-api-client.rb +6 -0
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +216 -0
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +54 -0
- data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +54 -0
- data/lib/cloudmersive-validate-api-client/api/text_input_api.rb +131 -0
- data/lib/cloudmersive-validate-api-client/models/country_details.rb +54 -4
- data/lib/cloudmersive-validate-api-client/models/domain_quality_response.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/geolocate_street_address_response.rb +236 -0
- data/lib/cloudmersive-validate-api-client/models/reverse_geocode_address_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/reverse_geocode_address_response.rb +246 -0
- data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +54 -4
- data/lib/cloudmersive-validate-api-client/models/xss_protection_result.rb +216 -0
- data/lib/cloudmersive-validate-api-client/version.rb +1 -1
- data/spec/api/address_api_spec.rb +48 -0
- data/spec/api/domain_api_spec.rb +12 -0
- data/spec/api/ip_address_api_spec.rb +12 -0
- data/spec/api/text_input_api_spec.rb +59 -0
- data/spec/models/country_details_spec.rb +30 -0
- data/spec/models/domain_quality_response_spec.rb +41 -0
- data/spec/models/geolocate_street_address_response_spec.rb +71 -0
- data/spec/models/reverse_geocode_address_request_spec.rb +47 -0
- data/spec/models/reverse_geocode_address_response_spec.rb +77 -0
- data/spec/models/validate_country_response_spec.rb +30 -0
- data/spec/models/xss_protection_result_spec.rb +59 -0
- metadata +20 -2
|
@@ -36,6 +36,21 @@ module CloudmersiveValidateApiClient
|
|
|
36
36
|
# Time zones (IANA/Olsen) in the country
|
|
37
37
|
attr_accessor :timezones
|
|
38
38
|
|
|
39
|
+
# ISO 4217 currency three-letter code associated with the country
|
|
40
|
+
attr_accessor :iso_currency_code
|
|
41
|
+
|
|
42
|
+
# Symbol associated with the currency
|
|
43
|
+
attr_accessor :currency_symbol
|
|
44
|
+
|
|
45
|
+
# Full name of the currency
|
|
46
|
+
attr_accessor :currency_english_name
|
|
47
|
+
|
|
48
|
+
# Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania
|
|
49
|
+
attr_accessor :region
|
|
50
|
+
|
|
51
|
+
# Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean,
|
|
52
|
+
attr_accessor :subregion
|
|
53
|
+
|
|
39
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
55
|
def self.attribute_map
|
|
41
56
|
{
|
|
@@ -45,7 +60,12 @@ module CloudmersiveValidateApiClient
|
|
|
45
60
|
:'fips_two_letter_code' => :'FIPSTwoLetterCode',
|
|
46
61
|
:'three_letter_code' => :'ThreeLetterCode',
|
|
47
62
|
:'is_european_union_member' => :'IsEuropeanUnionMember',
|
|
48
|
-
:'timezones' => :'Timezones'
|
|
63
|
+
:'timezones' => :'Timezones',
|
|
64
|
+
:'iso_currency_code' => :'ISOCurrencyCode',
|
|
65
|
+
:'currency_symbol' => :'CurrencySymbol',
|
|
66
|
+
:'currency_english_name' => :'CurrencyEnglishName',
|
|
67
|
+
:'region' => :'Region',
|
|
68
|
+
:'subregion' => :'Subregion'
|
|
49
69
|
}
|
|
50
70
|
end
|
|
51
71
|
|
|
@@ -58,7 +78,12 @@ module CloudmersiveValidateApiClient
|
|
|
58
78
|
:'fips_two_letter_code' => :'String',
|
|
59
79
|
:'three_letter_code' => :'String',
|
|
60
80
|
:'is_european_union_member' => :'BOOLEAN',
|
|
61
|
-
:'timezones' => :'Array<Timezone>'
|
|
81
|
+
:'timezones' => :'Array<Timezone>',
|
|
82
|
+
:'iso_currency_code' => :'String',
|
|
83
|
+
:'currency_symbol' => :'String',
|
|
84
|
+
:'currency_english_name' => :'String',
|
|
85
|
+
:'region' => :'String',
|
|
86
|
+
:'subregion' => :'String'
|
|
62
87
|
}
|
|
63
88
|
end
|
|
64
89
|
|
|
@@ -99,6 +124,26 @@ module CloudmersiveValidateApiClient
|
|
|
99
124
|
self.timezones = value
|
|
100
125
|
end
|
|
101
126
|
end
|
|
127
|
+
|
|
128
|
+
if attributes.has_key?(:'ISOCurrencyCode')
|
|
129
|
+
self.iso_currency_code = attributes[:'ISOCurrencyCode']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.has_key?(:'CurrencySymbol')
|
|
133
|
+
self.currency_symbol = attributes[:'CurrencySymbol']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.has_key?(:'CurrencyEnglishName')
|
|
137
|
+
self.currency_english_name = attributes[:'CurrencyEnglishName']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.has_key?(:'Region')
|
|
141
|
+
self.region = attributes[:'Region']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.has_key?(:'Subregion')
|
|
145
|
+
self.subregion = attributes[:'Subregion']
|
|
146
|
+
end
|
|
102
147
|
end
|
|
103
148
|
|
|
104
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -125,7 +170,12 @@ module CloudmersiveValidateApiClient
|
|
|
125
170
|
fips_two_letter_code == o.fips_two_letter_code &&
|
|
126
171
|
three_letter_code == o.three_letter_code &&
|
|
127
172
|
is_european_union_member == o.is_european_union_member &&
|
|
128
|
-
timezones == o.timezones
|
|
173
|
+
timezones == o.timezones &&
|
|
174
|
+
iso_currency_code == o.iso_currency_code &&
|
|
175
|
+
currency_symbol == o.currency_symbol &&
|
|
176
|
+
currency_english_name == o.currency_english_name &&
|
|
177
|
+
region == o.region &&
|
|
178
|
+
subregion == o.subregion
|
|
129
179
|
end
|
|
130
180
|
|
|
131
181
|
# @see the `==` method
|
|
@@ -137,7 +187,7 @@ module CloudmersiveValidateApiClient
|
|
|
137
187
|
# Calculates hash code according to all attributes.
|
|
138
188
|
# @return [Fixnum] Hash code
|
|
139
189
|
def hash
|
|
140
|
-
[successful, country_full_name, iso_two_letter_code, fips_two_letter_code, three_letter_code, is_european_union_member, timezones].hash
|
|
190
|
+
[successful, country_full_name, iso_two_letter_code, fips_two_letter_code, three_letter_code, is_european_union_member, timezones, iso_currency_code, currency_symbol, currency_english_name, region, subregion].hash
|
|
141
191
|
end
|
|
142
192
|
|
|
143
193
|
# Builds the object from hash
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#validateapi
|
|
3
|
+
|
|
4
|
+
#The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
|
|
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 CloudmersiveValidateApiClient
|
|
16
|
+
# Result of performing an XSS protection operation
|
|
17
|
+
class XssProtectionResult
|
|
18
|
+
# True if the operation was successful, false otherwise
|
|
19
|
+
attr_accessor :successful
|
|
20
|
+
|
|
21
|
+
# True if the input contained XSS scripting, false otherwise
|
|
22
|
+
attr_accessor :contained_xss
|
|
23
|
+
|
|
24
|
+
# Original input string
|
|
25
|
+
attr_accessor :original_input
|
|
26
|
+
|
|
27
|
+
# Normalized string result, with XSS removed
|
|
28
|
+
attr_accessor :normalized_result
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'successful' => :'Successful',
|
|
34
|
+
:'contained_xss' => :'ContainedXss',
|
|
35
|
+
:'original_input' => :'OriginalInput',
|
|
36
|
+
:'normalized_result' => :'NormalizedResult'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.swagger_types
|
|
42
|
+
{
|
|
43
|
+
:'successful' => :'BOOLEAN',
|
|
44
|
+
:'contained_xss' => :'BOOLEAN',
|
|
45
|
+
:'original_input' => :'String',
|
|
46
|
+
:'normalized_result' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
57
|
+
|
|
58
|
+
if attributes.has_key?(:'Successful')
|
|
59
|
+
self.successful = attributes[:'Successful']
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if attributes.has_key?(:'ContainedXss')
|
|
63
|
+
self.contained_xss = attributes[:'ContainedXss']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if attributes.has_key?(:'OriginalInput')
|
|
67
|
+
self.original_input = attributes[:'OriginalInput']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.has_key?(:'NormalizedResult')
|
|
71
|
+
self.normalized_result = attributes[:'NormalizedResult']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
successful == o.successful &&
|
|
94
|
+
contained_xss == o.contained_xss &&
|
|
95
|
+
original_input == o.original_input &&
|
|
96
|
+
normalized_result == o.normalized_result
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @see the `==` method
|
|
100
|
+
# @param [Object] Object to be compared
|
|
101
|
+
def eql?(o)
|
|
102
|
+
self == o
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Fixnum] Hash code
|
|
107
|
+
def hash
|
|
108
|
+
[successful, contained_xss, original_input, normalized_result].hash
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Builds the object from hash
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
# @return [Object] Returns the model itself
|
|
114
|
+
def build_from_hash(attributes)
|
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
|
116
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Deserializes the data based on type
|
|
132
|
+
# @param string type Data type
|
|
133
|
+
# @param string value Value to be deserialized
|
|
134
|
+
# @return [Object] Deserialized data
|
|
135
|
+
def _deserialize(type, value)
|
|
136
|
+
case type.to_sym
|
|
137
|
+
when :DateTime
|
|
138
|
+
DateTime.parse(value)
|
|
139
|
+
when :Date
|
|
140
|
+
Date.parse(value)
|
|
141
|
+
when :String
|
|
142
|
+
value.to_s
|
|
143
|
+
when :Integer
|
|
144
|
+
value.to_i
|
|
145
|
+
when :Float
|
|
146
|
+
value.to_f
|
|
147
|
+
when :BOOLEAN
|
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
+
true
|
|
150
|
+
else
|
|
151
|
+
false
|
|
152
|
+
end
|
|
153
|
+
when :Object
|
|
154
|
+
# generic object (usually a Hash), return directly
|
|
155
|
+
value
|
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
|
162
|
+
{}.tap do |hash|
|
|
163
|
+
value.each do |k, v|
|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
else # model
|
|
168
|
+
temp_model = CloudmersiveValidateApiClient.const_get(type).new
|
|
169
|
+
temp_model.build_from_hash(value)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the string representation of the object
|
|
174
|
+
# @return [String] String presentation of the object
|
|
175
|
+
def to_s
|
|
176
|
+
to_hash.to_s
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
|
181
|
+
def to_body
|
|
182
|
+
to_hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the object in the form of hash
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_hash
|
|
188
|
+
hash = {}
|
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
190
|
+
value = self.send(attr)
|
|
191
|
+
next if value.nil?
|
|
192
|
+
hash[param] = _to_hash(value)
|
|
193
|
+
end
|
|
194
|
+
hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Outputs non-array value in the form of hash
|
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
199
|
+
# @param [Object] value Any valid value
|
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
|
201
|
+
def _to_hash(value)
|
|
202
|
+
if value.is_a?(Array)
|
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
|
204
|
+
elsif value.is_a?(Hash)
|
|
205
|
+
{}.tap do |hash|
|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
207
|
+
end
|
|
208
|
+
elsif value.respond_to? :to_hash
|
|
209
|
+
value.to_hash
|
|
210
|
+
else
|
|
211
|
+
value
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
end
|
|
216
|
+
end
|
|
@@ -67,6 +67,42 @@ describe 'AddressApi' do
|
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
# unit tests for address_geocode
|
|
71
|
+
# Geocode a street address into latitude and longitude
|
|
72
|
+
# Geocodes a street address into latitude and longitude.
|
|
73
|
+
# @param input Input parse request
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @return [ValidateAddressResponse]
|
|
76
|
+
describe 'address_geocode test' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# unit tests for address_get_country_currency
|
|
83
|
+
# Get the currency of the input country
|
|
84
|
+
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
|
85
|
+
# @param input Input request
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [ValidateCountryResponse]
|
|
88
|
+
describe 'address_get_country_currency test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# unit tests for address_get_country_region
|
|
95
|
+
# Get the region, subregion and continent of the country
|
|
96
|
+
# Gets the continent information including region and subregion for the input country.
|
|
97
|
+
# @param input Input request
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [ValidateCountryResponse]
|
|
100
|
+
describe 'address_get_country_region test' do
|
|
101
|
+
it 'should work' do
|
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
70
106
|
# unit tests for address_get_timezone
|
|
71
107
|
# Gets IANA/Olsen time zones for a country
|
|
72
108
|
# Gets the IANA/Olsen time zones for a country.
|
|
@@ -91,6 +127,18 @@ describe 'AddressApi' do
|
|
|
91
127
|
end
|
|
92
128
|
end
|
|
93
129
|
|
|
130
|
+
# unit tests for address_reverse_geocode_address
|
|
131
|
+
# Reverse geocode a lattitude and longitude into an address
|
|
132
|
+
# Converts lattitude and longitude coordinates into an address through reverse-geocoding.
|
|
133
|
+
# @param input Input reverse geocoding request
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @return [ReverseGeocodeAddressResponse]
|
|
136
|
+
describe 'address_reverse_geocode_address test' do
|
|
137
|
+
it 'should work' do
|
|
138
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
94
142
|
# unit tests for address_validate_address
|
|
95
143
|
# Validate a street address
|
|
96
144
|
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
|
data/spec/api/domain_api_spec.rb
CHANGED
|
@@ -56,6 +56,18 @@ describe 'DomainApi' do
|
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
# unit tests for domain_quality_score
|
|
60
|
+
# Validate a domain name's quality score
|
|
61
|
+
# Check the quality of a domain name. Supports over 9 million domain names. Higher quality scores indicate more trust and authority in the domain name, with values ranging from 0.0 (low quality) to 10.0 (maximum quality).
|
|
62
|
+
# @param domain Domain name to check, for example \"cloudmersive.com\".
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [DomainQualityResponse]
|
|
65
|
+
describe 'domain_quality_score test' 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
|
+
|
|
59
71
|
# unit tests for domain_url_full
|
|
60
72
|
# Validate a URL fully
|
|
61
73
|
# Validate whether a URL is syntactically valid (does not check endpoint for validity), whether it exists, and whether the endpoint is up and passes virus scan checks. Accepts various types of input and produces a well-formed URL as output.
|
|
@@ -32,6 +32,18 @@ describe 'IPAddressApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for i_p_address_geolocate_street_address
|
|
36
|
+
# Geolocate an IP address to a street address
|
|
37
|
+
# Identify an IP address's street address. Useful for security and UX applications.
|
|
38
|
+
# @param value IP address to geolocate, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [GeolocateStreetAddressResponse]
|
|
41
|
+
describe 'i_p_address_geolocate_street_address test' 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
|
+
|
|
35
47
|
# unit tests for i_p_address_is_threat
|
|
36
48
|
# Check if IP address is a known threat
|
|
37
49
|
# Check if the input IP address is a known threat IP address. Checks against known bad IPs, botnets, compromised servers, and other lists of threats.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#validateapi
|
|
3
|
+
|
|
4
|
+
#The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
|
|
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
|
+
|
|
16
|
+
# Unit tests for CloudmersiveValidateApiClient::TextInputApi
|
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'TextInputApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@instance = CloudmersiveValidateApiClient::TextInputApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of TextInputApi' do
|
|
30
|
+
it 'should create an instance of TextInputApi' do
|
|
31
|
+
expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::TextInputApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for text_input_check_xss
|
|
36
|
+
# Check text input for Cross-Site-Scripting (XSS) attacks
|
|
37
|
+
# Detects XSS (Cross-Site-Scripting) attacks from text input.
|
|
38
|
+
# @param value User-facing text input.
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [XssProtectionResult]
|
|
41
|
+
describe 'text_input_check_xss test' 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
|
+
# unit tests for text_input_protect_xss
|
|
48
|
+
# Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
|
|
49
|
+
# Detects and removes XSS (Cross-Site-Scripting) attacks from text input through normalization. Returns the normalized result, as well as information on whether the original input contained an XSS risk.
|
|
50
|
+
# @param value User-facing text input.
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [XssProtectionResult]
|
|
53
|
+
describe 'text_input_protect_xss test' 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
|