cloudmersive-validate-api-client 1.4.2 → 2.0.5
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/Gemfile +1 -1
- data/README.md +22 -7
- data/cloudmersive-validate-api-client.gemspec +3 -3
- data/docs/AddressApi.md +270 -1
- data/docs/CountryDetails.md +11 -0
- data/docs/CountryListResult.md +9 -0
- data/docs/DomainApi.md +2 -2
- data/docs/EmailApi.md +3 -3
- data/docs/IPAddressApi.md +56 -1
- data/docs/TorNodeResponse.md +8 -0
- data/docs/ValidateCityRequest.md +11 -0
- data/docs/ValidateCityResponse.md +12 -0
- data/docs/ValidateCountryResponse.md +1 -0
- data/docs/ValidatePostalCodeRequest.md +10 -0
- data/docs/ValidatePostalCodeResponse.md +12 -0
- data/docs/ValidateStateRequest.md +10 -0
- data/docs/ValidateStateResponse.md +11 -0
- data/lib/cloudmersive-validate-api-client.rb +10 -1
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +276 -18
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +14 -18
- data/lib/cloudmersive-validate-api-client/api/email_api.rb +11 -14
- data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +58 -5
- data/lib/cloudmersive-validate-api-client/api/lead_enrichment_api.rb +5 -8
- data/lib/cloudmersive-validate-api-client/api/name_api.rb +17 -22
- data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +5 -6
- data/lib/cloudmersive-validate-api-client/api/user_agent_api.rb +5 -6
- data/lib/cloudmersive-validate-api-client/api/vat_api.rb +5 -6
- data/lib/cloudmersive-validate-api-client/api_client.rb +11 -9
- data/lib/cloudmersive-validate-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-validate-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/check_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/country_details.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/country_list_result.rb +198 -0
- data/lib/cloudmersive-validate-api-client/models/first_name_validation_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/full_name_validation_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/full_name_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_gender_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_gender_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_timezones_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_timezones_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/last_name_validation_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/last_name_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/lead_enrichment_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/lead_enrichment_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/parse_address_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/parse_address_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/timezone.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/tor_node_response.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/user_agent_validate_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_address_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_address_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_city_request.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/validate_city_response.rb +226 -0
- data/lib/cloudmersive-validate-api-client/models/validate_country_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +18 -11
- data/lib/cloudmersive-validate-api-client/models/validate_identifier_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_identifier_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_postal_code_request.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/validate_postal_code_response.rb +226 -0
- data/lib/cloudmersive-validate-api-client/models/validate_state_request.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/validate_state_response.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/validate_url_request_full.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_url_response_full.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +7 -11
- data/lib/cloudmersive-validate-api-client/models/whois_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/version.rb +2 -2
- data/spec/api/address_api_spec.rb +65 -6
- data/spec/api/domain_api_spec.rb +5 -5
- data/spec/api/email_api_spec.rb +4 -4
- data/spec/api/ip_address_api_spec.rb +14 -2
- data/spec/api/lead_enrichment_api_spec.rb +2 -3
- data/spec/api/name_api_spec.rb +6 -6
- data/spec/api/phone_number_api_spec.rb +2 -2
- data/spec/api/user_agent_api_spec.rb +2 -2
- data/spec/api/vat_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +52 -35
- data/spec/configuration_spec.rb +9 -9
- data/spec/models/address_get_servers_response_spec.rb +3 -4
- data/spec/models/address_verify_syntax_only_response_spec.rb +5 -6
- data/spec/models/check_response_spec.rb +2 -3
- data/spec/models/country_details_spec.rb +59 -0
- data/spec/models/country_list_result_spec.rb +47 -0
- data/spec/models/first_name_validation_request_spec.rb +2 -3
- data/spec/models/first_name_validation_response_spec.rb +3 -4
- data/spec/models/full_email_validation_response_spec.rb +10 -11
- data/spec/models/full_name_validation_request_spec.rb +2 -3
- data/spec/models/full_name_validation_response_spec.rb +11 -12
- data/spec/models/geolocate_response_spec.rb +10 -11
- data/spec/models/get_gender_request_spec.rb +3 -4
- data/spec/models/get_gender_response_spec.rb +3 -4
- data/spec/models/get_timezones_request_spec.rb +2 -3
- data/spec/models/get_timezones_response_spec.rb +7 -8
- data/spec/models/last_name_validation_request_spec.rb +2 -3
- data/spec/models/last_name_validation_response_spec.rb +3 -4
- data/spec/models/lead_enrichment_request_spec.rb +15 -16
- data/spec/models/lead_enrichment_response_spec.rb +19 -20
- data/spec/models/parse_address_request_spec.rb +3 -4
- data/spec/models/parse_address_response_spec.rb +10 -11
- data/spec/models/phone_number_validate_request_spec.rb +3 -4
- data/spec/models/phone_number_validation_response_spec.rb +9 -10
- data/spec/models/timezone_spec.rb +4 -5
- data/spec/models/tor_node_response_spec.rb +41 -0
- data/spec/models/user_agent_validate_request_spec.rb +2 -3
- data/spec/models/user_agent_validate_response_spec.rb +15 -16
- data/spec/models/validate_address_request_spec.rb +7 -8
- data/spec/models/validate_address_response_spec.rb +4 -5
- data/spec/models/validate_city_request_spec.rb +59 -0
- data/spec/models/validate_city_response_spec.rb +65 -0
- data/spec/models/validate_country_request_spec.rb +2 -3
- data/spec/models/validate_country_response_spec.rb +13 -8
- data/spec/models/validate_identifier_request_spec.rb +9 -10
- data/spec/models/validate_identifier_response_spec.rb +3 -4
- data/spec/models/validate_postal_code_request_spec.rb +53 -0
- data/spec/models/validate_postal_code_response_spec.rb +65 -0
- data/spec/models/validate_state_request_spec.rb +53 -0
- data/spec/models/validate_state_response_spec.rb +59 -0
- data/spec/models/validate_url_request_full_spec.rb +2 -3
- data/spec/models/validate_url_request_syntax_only_spec.rb +2 -3
- data/spec/models/validate_url_response_full_spec.rb +6 -7
- data/spec/models/validate_url_response_syntax_only_spec.rb +3 -4
- data/spec/models/vat_lookup_request_spec.rb +2 -3
- data/spec/models/vat_lookup_response_spec.rb +13 -14
- data/spec/models/whois_response_spec.rb +16 -17
- data/spec/spec_helper.rb +1 -1
- metadata +29 -2
@@ -6,11 +6,11 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
15
|
module CloudmersiveValidateApiClient
|
16
16
|
class PhoneNumberApi
|
@@ -19,7 +19,6 @@ module CloudmersiveValidateApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Validate phone number (basic)
|
24
23
|
# Validate a phone number by analyzing the syntax
|
25
24
|
# @param value Phone number to validate in a PhoneNumberValidateRequest object. Try a phone number such as \"1.800.463.3339\", and either leave DefaultCountryCode blank or use \"US\".
|
@@ -27,7 +26,7 @@ module CloudmersiveValidateApiClient
|
|
27
26
|
# @return [PhoneNumberValidationResponse]
|
28
27
|
def phone_number_syntax_only(value, opts = {})
|
29
28
|
data, _status_code, _headers = phone_number_syntax_only_with_http_info(value, opts)
|
30
|
-
|
29
|
+
data
|
31
30
|
end
|
32
31
|
|
33
32
|
# Validate phone number (basic)
|
@@ -37,14 +36,14 @@ module CloudmersiveValidateApiClient
|
|
37
36
|
# @return [Array<(PhoneNumberValidationResponse, Fixnum, Hash)>] PhoneNumberValidationResponse data, response status code and response headers
|
38
37
|
def phone_number_syntax_only_with_http_info(value, opts = {})
|
39
38
|
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug
|
39
|
+
@api_client.config.logger.debug 'Calling API: PhoneNumberApi.phone_number_syntax_only ...'
|
41
40
|
end
|
42
41
|
# verify the required parameter 'value' is set
|
43
42
|
if @api_client.config.client_side_validation && value.nil?
|
44
43
|
fail ArgumentError, "Missing the required parameter 'value' when calling PhoneNumberApi.phone_number_syntax_only"
|
45
44
|
end
|
46
45
|
# resource path
|
47
|
-
local_var_path =
|
46
|
+
local_var_path = '/validate/phonenumber/basic'
|
48
47
|
|
49
48
|
# query parameters
|
50
49
|
query_params = {}
|
@@ -6,11 +6,11 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
15
|
module CloudmersiveValidateApiClient
|
16
16
|
class UserAgentApi
|
@@ -19,7 +19,6 @@ module CloudmersiveValidateApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Parse an HTTP User-Agent string, identify robots
|
24
23
|
# Uses a parsing system and database to parse the User-Agent into its structured component parts, such as Browser, Browser Version, Browser Engine, Operating System, and importantly, Robot identification.
|
25
24
|
# @param request Input parse request
|
@@ -27,7 +26,7 @@ module CloudmersiveValidateApiClient
|
|
27
26
|
# @return [UserAgentValidateResponse]
|
28
27
|
def user_agent_parse(request, opts = {})
|
29
28
|
data, _status_code, _headers = user_agent_parse_with_http_info(request, opts)
|
30
|
-
|
29
|
+
data
|
31
30
|
end
|
32
31
|
|
33
32
|
# Parse an HTTP User-Agent string, identify robots
|
@@ -37,14 +36,14 @@ module CloudmersiveValidateApiClient
|
|
37
36
|
# @return [Array<(UserAgentValidateResponse, Fixnum, Hash)>] UserAgentValidateResponse data, response status code and response headers
|
38
37
|
def user_agent_parse_with_http_info(request, opts = {})
|
39
38
|
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug
|
39
|
+
@api_client.config.logger.debug 'Calling API: UserAgentApi.user_agent_parse ...'
|
41
40
|
end
|
42
41
|
# verify the required parameter 'request' is set
|
43
42
|
if @api_client.config.client_side_validation && request.nil?
|
44
43
|
fail ArgumentError, "Missing the required parameter 'request' when calling UserAgentApi.user_agent_parse"
|
45
44
|
end
|
46
45
|
# resource path
|
47
|
-
local_var_path =
|
46
|
+
local_var_path = '/validate/useragent/parse'
|
48
47
|
|
49
48
|
# query parameters
|
50
49
|
query_params = {}
|
@@ -6,11 +6,11 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
15
|
module CloudmersiveValidateApiClient
|
16
16
|
class VatApi
|
@@ -19,7 +19,6 @@ module CloudmersiveValidateApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Validate a VAT number
|
24
23
|
# Checks if a VAT code is valid, and if it is, returns more information about it. The first two letters of the VAT number must be letters that indicate the country, such as LU20260743. Possible country codes include Austria (AT), Belgium (BE), Bulgaria (BG), Cyprus (CY), Czech Republic (CZ), Germany (DE), Denmark (DK), Estonia (EE), Greece (EL), Spain (ES), Finland (FI), France (FR), United Kingdom (GB), Croatia (HR), Hungary (HU), Ireland (IE), Italy (IT), Lithuania (LT), Luxembourg (LU), Latvia (LV), Malta (MT), The Netherlands (NL), Poland (PL), Portugal (PT), Romania (RO), Sweden (SE), Slovenia (SI), Slovakia (SK).
|
25
24
|
# @param input Input VAT code
|
@@ -27,7 +26,7 @@ module CloudmersiveValidateApiClient
|
|
27
26
|
# @return [VatLookupResponse]
|
28
27
|
def vat_vat_lookup(input, opts = {})
|
29
28
|
data, _status_code, _headers = vat_vat_lookup_with_http_info(input, opts)
|
30
|
-
|
29
|
+
data
|
31
30
|
end
|
32
31
|
|
33
32
|
# Validate a VAT number
|
@@ -37,14 +36,14 @@ module CloudmersiveValidateApiClient
|
|
37
36
|
# @return [Array<(VatLookupResponse, Fixnum, Hash)>] VatLookupResponse data, response status code and response headers
|
38
37
|
def vat_vat_lookup_with_http_info(input, opts = {})
|
39
38
|
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug
|
39
|
+
@api_client.config.logger.debug 'Calling API: VatApi.vat_vat_lookup ...'
|
41
40
|
end
|
42
41
|
# verify the required parameter 'input' is set
|
43
42
|
if @api_client.config.client_side_validation && input.nil?
|
44
43
|
fail ArgumentError, "Missing the required parameter 'input' when calling VatApi.vat_vat_lookup"
|
45
44
|
end
|
46
45
|
# resource path
|
47
|
-
local_var_path =
|
46
|
+
local_var_path = '/validate/vat/lookup'
|
48
47
|
|
49
48
|
# query parameters
|
50
49
|
query_params = {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,7 +33,7 @@ module CloudmersiveValidateApiClient
|
|
33
33
|
@config = config
|
34
34
|
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
35
35
|
@default_headers = {
|
36
|
-
'Content-Type' =>
|
36
|
+
'Content-Type' => 'application/json',
|
37
37
|
'User-Agent' => @user_agent
|
38
38
|
}
|
39
39
|
end
|
@@ -112,6 +112,8 @@ module CloudmersiveValidateApiClient
|
|
112
112
|
:verbose => @config.debugging
|
113
113
|
}
|
114
114
|
|
115
|
+
req_opts.merge!(multipart: true) if header_params['Content-Type'].start_with? "multipart/"
|
116
|
+
|
115
117
|
# set custom cert, if provided
|
116
118
|
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
117
119
|
|
@@ -137,7 +139,7 @@ module CloudmersiveValidateApiClient
|
|
137
139
|
# @param [String] mime MIME
|
138
140
|
# @return [Boolean] True if the MIME is application/json
|
139
141
|
def json_mime?(mime)
|
140
|
-
|
142
|
+
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
141
143
|
end
|
142
144
|
|
143
145
|
# Deserialize the response to the given return type.
|
@@ -201,12 +203,12 @@ module CloudmersiveValidateApiClient
|
|
201
203
|
when /\AArray<(.+)>\z/
|
202
204
|
# e.g. Array<Pet>
|
203
205
|
sub_type = $1
|
204
|
-
data.map {|item| convert_to_type(item, sub_type) }
|
206
|
+
data.map { |item| convert_to_type(item, sub_type) }
|
205
207
|
when /\AHash\<String, (.+)\>\z/
|
206
208
|
# e.g. Hash<String, Integer>
|
207
209
|
sub_type = $1
|
208
210
|
{}.tap do |hash|
|
209
|
-
data.each {|k, v| hash[k] = convert_to_type(v, sub_type) }
|
211
|
+
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
210
212
|
end
|
211
213
|
else
|
212
214
|
# models, e.g. Pet
|
@@ -228,7 +230,7 @@ module CloudmersiveValidateApiClient
|
|
228
230
|
encoding = nil
|
229
231
|
request.on_headers do |response|
|
230
232
|
content_disposition = response.headers['Content-Disposition']
|
231
|
-
if content_disposition
|
233
|
+
if content_disposition && content_disposition =~ /filename=/i
|
232
234
|
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
233
235
|
prefix = sanitize_filename(filename)
|
234
236
|
else
|
@@ -327,7 +329,7 @@ module CloudmersiveValidateApiClient
|
|
327
329
|
return nil if accepts.nil? || accepts.empty?
|
328
330
|
# use JSON when present, otherwise use all of the provided
|
329
331
|
json_accept = accepts.find { |s| json_mime?(s) }
|
330
|
-
|
332
|
+
json_accept || accepts.join(',')
|
331
333
|
end
|
332
334
|
|
333
335
|
# Return Content-Type header based on an array of content types provided.
|
@@ -338,7 +340,7 @@ module CloudmersiveValidateApiClient
|
|
338
340
|
return 'application/json' if content_types.nil? || content_types.empty?
|
339
341
|
# use JSON when present, otherwise use the first one
|
340
342
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
341
|
-
|
343
|
+
json_content_type || content_types.first
|
342
344
|
end
|
343
345
|
|
344
346
|
# Convert object (array, hash, object, etc) to JSON string.
|
@@ -348,7 +350,7 @@ module CloudmersiveValidateApiClient
|
|
348
350
|
return model if model.nil? || model.is_a?(String)
|
349
351
|
local_body = nil
|
350
352
|
if model.is_a?(Array)
|
351
|
-
local_body = model.map{|m| object_to_hash(m) }
|
353
|
+
local_body = model.map { |m| object_to_hash(m) }
|
352
354
|
else
|
353
355
|
local_body = object_to_hash(model)
|
354
356
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -170,7 +170,7 @@ module CloudmersiveValidateApiClient
|
|
170
170
|
def base_path=(base_path)
|
171
171
|
# Add leading and trailing slashes to base_path
|
172
172
|
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
173
|
-
@base_path =
|
173
|
+
@base_path = '' if @base_path == '/'
|
174
174
|
end
|
175
175
|
|
176
176
|
def base_url
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,7 +21,6 @@ module CloudmersiveValidateApiClient
|
|
21
21
|
# Email servers for this email address
|
22
22
|
attr_accessor :servers
|
23
23
|
|
24
|
-
|
25
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
25
|
def self.attribute_map
|
27
26
|
{
|
@@ -44,7 +43,7 @@ module CloudmersiveValidateApiClient
|
|
44
43
|
return unless attributes.is_a?(Hash)
|
45
44
|
|
46
45
|
# convert string to symbol for hash key
|
47
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
47
|
|
49
48
|
if attributes.has_key?(:'Success')
|
50
49
|
self.success = attributes[:'Success']
|
@@ -55,20 +54,19 @@ module CloudmersiveValidateApiClient
|
|
55
54
|
self.servers = value
|
56
55
|
end
|
57
56
|
end
|
58
|
-
|
59
57
|
end
|
60
58
|
|
61
59
|
# Show invalid properties with the reasons. Usually used together with valid?
|
62
60
|
# @return Array for valid properties with the reasons
|
63
61
|
def list_invalid_properties
|
64
62
|
invalid_properties = Array.new
|
65
|
-
|
63
|
+
invalid_properties
|
66
64
|
end
|
67
65
|
|
68
66
|
# Check to see if the all the properties in the model are valid
|
69
67
|
# @return true if the model is valid
|
70
68
|
def valid?
|
71
|
-
|
69
|
+
true
|
72
70
|
end
|
73
71
|
|
74
72
|
# Checks equality by comparing each attribute.
|
@@ -99,10 +97,10 @@ module CloudmersiveValidateApiClient
|
|
99
97
|
return nil unless attributes.is_a?(Hash)
|
100
98
|
self.class.swagger_types.each_pair do |key, type|
|
101
99
|
if type =~ /\AArray<(.*)>/i
|
102
|
-
# check to ensure the input is an array given that the
|
100
|
+
# check to ensure the input is an array given that the attribute
|
103
101
|
# is documented as an array but the input is not
|
104
102
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
105
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
103
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
106
104
|
end
|
107
105
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
108
106
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -184,7 +182,7 @@ module CloudmersiveValidateApiClient
|
|
184
182
|
# @return [Hash] Returns the value in the form of hash
|
185
183
|
def _to_hash(value)
|
186
184
|
if value.is_a?(Array)
|
187
|
-
value.compact.map{ |v| _to_hash(v) }
|
185
|
+
value.compact.map { |v| _to_hash(v) }
|
188
186
|
elsif value.is_a?(Hash)
|
189
187
|
{}.tap do |hash|
|
190
188
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -197,5 +195,4 @@ module CloudmersiveValidateApiClient
|
|
197
195
|
end
|
198
196
|
|
199
197
|
end
|
200
|
-
|
201
198
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -27,7 +27,6 @@ module CloudmersiveValidateApiClient
|
|
27
27
|
# True if the email address is a disposable email address, false otherwise; these disposable providers are not typically used to receive email and so will have a low likelihood of opening mail sent there.
|
28
28
|
attr_accessor :is_disposable
|
29
29
|
|
30
|
-
|
31
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
31
|
def self.attribute_map
|
33
32
|
{
|
@@ -54,7 +53,7 @@ module CloudmersiveValidateApiClient
|
|
54
53
|
return unless attributes.is_a?(Hash)
|
55
54
|
|
56
55
|
# convert string to symbol for hash key
|
57
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
57
|
|
59
58
|
if attributes.has_key?(:'ValidAddress')
|
60
59
|
self.valid_address = attributes[:'ValidAddress']
|
@@ -71,20 +70,19 @@ module CloudmersiveValidateApiClient
|
|
71
70
|
if attributes.has_key?(:'IsDisposable')
|
72
71
|
self.is_disposable = attributes[:'IsDisposable']
|
73
72
|
end
|
74
|
-
|
75
73
|
end
|
76
74
|
|
77
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
78
76
|
# @return Array for valid properties with the reasons
|
79
77
|
def list_invalid_properties
|
80
78
|
invalid_properties = Array.new
|
81
|
-
|
79
|
+
invalid_properties
|
82
80
|
end
|
83
81
|
|
84
82
|
# Check to see if the all the properties in the model are valid
|
85
83
|
# @return true if the model is valid
|
86
84
|
def valid?
|
87
|
-
|
85
|
+
true
|
88
86
|
end
|
89
87
|
|
90
88
|
# Checks equality by comparing each attribute.
|
@@ -117,10 +115,10 @@ module CloudmersiveValidateApiClient
|
|
117
115
|
return nil unless attributes.is_a?(Hash)
|
118
116
|
self.class.swagger_types.each_pair do |key, type|
|
119
117
|
if type =~ /\AArray<(.*)>/i
|
120
|
-
# check to ensure the input is an array given that the
|
118
|
+
# check to ensure the input is an array given that the attribute
|
121
119
|
# is documented as an array but the input is not
|
122
120
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
123
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
124
122
|
end
|
125
123
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
126
124
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -202,7 +200,7 @@ module CloudmersiveValidateApiClient
|
|
202
200
|
# @return [Hash] Returns the value in the form of hash
|
203
201
|
def _to_hash(value)
|
204
202
|
if value.is_a?(Array)
|
205
|
-
value.compact.map{ |v| _to_hash(v) }
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
206
204
|
elsif value.is_a?(Hash)
|
207
205
|
{}.tap do |hash|
|
208
206
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -215,5 +213,4 @@ module CloudmersiveValidateApiClient
|
|
215
213
|
end
|
216
214
|
|
217
215
|
end
|
218
|
-
|
219
216
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,7 +18,6 @@ module CloudmersiveValidateApiClient
|
|
18
18
|
# True if the domain name was valid, false if it is not
|
19
19
|
attr_accessor :valid_domain
|
20
20
|
|
21
|
-
|
22
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
22
|
def self.attribute_map
|
24
23
|
{
|
@@ -39,25 +38,24 @@ module CloudmersiveValidateApiClient
|
|
39
38
|
return unless attributes.is_a?(Hash)
|
40
39
|
|
41
40
|
# convert string to symbol for hash key
|
42
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
43
42
|
|
44
43
|
if attributes.has_key?(:'ValidDomain')
|
45
44
|
self.valid_domain = attributes[:'ValidDomain']
|
46
45
|
end
|
47
|
-
|
48
46
|
end
|
49
47
|
|
50
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
51
49
|
# @return Array for valid properties with the reasons
|
52
50
|
def list_invalid_properties
|
53
51
|
invalid_properties = Array.new
|
54
|
-
|
52
|
+
invalid_properties
|
55
53
|
end
|
56
54
|
|
57
55
|
# Check to see if the all the properties in the model are valid
|
58
56
|
# @return true if the model is valid
|
59
57
|
def valid?
|
60
|
-
|
58
|
+
true
|
61
59
|
end
|
62
60
|
|
63
61
|
# Checks equality by comparing each attribute.
|
@@ -87,10 +85,10 @@ module CloudmersiveValidateApiClient
|
|
87
85
|
return nil unless attributes.is_a?(Hash)
|
88
86
|
self.class.swagger_types.each_pair do |key, type|
|
89
87
|
if type =~ /\AArray<(.*)>/i
|
90
|
-
# check to ensure the input is an array given that the
|
88
|
+
# check to ensure the input is an array given that the attribute
|
91
89
|
# is documented as an array but the input is not
|
92
90
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
93
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
94
92
|
end
|
95
93
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
96
94
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -172,7 +170,7 @@ module CloudmersiveValidateApiClient
|
|
172
170
|
# @return [Hash] Returns the value in the form of hash
|
173
171
|
def _to_hash(value)
|
174
172
|
if value.is_a?(Array)
|
175
|
-
value.compact.map{ |v| _to_hash(v) }
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
176
174
|
elsif value.is_a?(Hash)
|
177
175
|
{}.tap do |hash|
|
178
176
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -185,5 +183,4 @@ module CloudmersiveValidateApiClient
|
|
185
183
|
end
|
186
184
|
|
187
185
|
end
|
188
|
-
|
189
186
|
end
|