cloudmersive-validate-api-client 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/README.md +171 -0
- data/Rakefile +8 -0
- data/cloudmersive-validate-api-client.gemspec +45 -0
- data/docs/AddressApi.md +497 -0
- data/docs/AddressGetServersResponse.md +9 -0
- data/docs/AddressVerifySyntaxOnlyResponse.md +11 -0
- data/docs/CheckResponse.md +8 -0
- data/docs/CountryDetails.md +11 -0
- data/docs/CountryListResult.md +9 -0
- data/docs/DomainApi.md +228 -0
- data/docs/EmailApi.md +173 -0
- data/docs/FirstNameValidationRequest.md +8 -0
- data/docs/FirstNameValidationResponse.md +9 -0
- data/docs/FullEmailValidationResponse.md +16 -0
- data/docs/FullNameValidationRequest.md +8 -0
- data/docs/FullNameValidationResponse.md +17 -0
- data/docs/GeolocateResponse.md +16 -0
- data/docs/GetGenderRequest.md +9 -0
- data/docs/GetGenderResponse.md +9 -0
- data/docs/GetTimezonesRequest.md +8 -0
- data/docs/GetTimezonesResponse.md +13 -0
- data/docs/IPAddressApi.md +63 -0
- data/docs/LastNameValidationRequest.md +8 -0
- data/docs/LastNameValidationResponse.md +9 -0
- data/docs/LeadEnrichmentApi.md +61 -0
- data/docs/LeadEnrichmentRequest.md +21 -0
- data/docs/LeadEnrichmentResponse.md +25 -0
- data/docs/NameApi.md +283 -0
- data/docs/ParseAddressRequest.md +9 -0
- data/docs/ParseAddressResponse.md +16 -0
- data/docs/PhoneNumberApi.md +63 -0
- data/docs/PhoneNumberValidateRequest.md +9 -0
- data/docs/PhoneNumberValidationResponse.md +15 -0
- data/docs/Timezone.md +10 -0
- data/docs/UserAgentApi.md +63 -0
- data/docs/UserAgentValidateRequest.md +8 -0
- data/docs/UserAgentValidateResponse.md +21 -0
- data/docs/ValidateAddressRequest.md +13 -0
- data/docs/ValidateAddressResponse.md +10 -0
- data/docs/ValidateCityRequest.md +11 -0
- data/docs/ValidateCityResponse.md +12 -0
- data/docs/ValidateCountryRequest.md +8 -0
- data/docs/ValidateCountryResponse.md +14 -0
- data/docs/ValidateIdentifierRequest.md +15 -0
- data/docs/ValidateIdentifierResponse.md +9 -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/docs/ValidateUrlRequestFull.md +8 -0
- data/docs/ValidateUrlRequestSyntaxOnly.md +8 -0
- data/docs/ValidateUrlResponseFull.md +12 -0
- data/docs/ValidateUrlResponseSyntaxOnly.md +9 -0
- data/docs/VatApi.md +63 -0
- data/docs/VatLookupRequest.md +8 -0
- data/docs/VatLookupResponse.md +19 -0
- data/docs/WhoisResponse.md +22 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-validate-api-client.rb +93 -0
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +501 -0
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +239 -0
- data/lib/cloudmersive-validate-api-client/api/email_api.rb +185 -0
- data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +77 -0
- data/lib/cloudmersive-validate-api-client/api/lead_enrichment_api.rb +75 -0
- data/lib/cloudmersive-validate-api-client/api/name_api.rb +293 -0
- data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +77 -0
- data/lib/cloudmersive-validate-api-client/api/user_agent_api.rb +77 -0
- data/lib/cloudmersive-validate-api-client/api/vat_api.rb +77 -0
- data/lib/cloudmersive-validate-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-validate-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-validate-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +198 -0
- data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/check_response.rb +186 -0
- 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 +186 -0
- data/lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +266 -0
- data/lib/cloudmersive-validate-api-client/models/full_name_validation_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/full_name_validation_response.rb +276 -0
- data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +266 -0
- data/lib/cloudmersive-validate-api-client/models/get_gender_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/get_gender_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/get_timezones_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/get_timezones_response.rb +238 -0
- data/lib/cloudmersive-validate-api-client/models/last_name_validation_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/last_name_validation_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/lead_enrichment_request.rb +316 -0
- data/lib/cloudmersive-validate-api-client/models/lead_enrichment_response.rb +356 -0
- data/lib/cloudmersive-validate-api-client/models/parse_address_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/parse_address_response.rb +266 -0
- data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +256 -0
- data/lib/cloudmersive-validate-api-client/models/timezone.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/user_agent_validate_response.rb +316 -0
- data/lib/cloudmersive-validate-api-client/models/validate_address_request.rb +236 -0
- data/lib/cloudmersive-validate-api-client/models/validate_address_response.rb +206 -0
- 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 +186 -0
- data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +248 -0
- data/lib/cloudmersive-validate-api-client/models/validate_identifier_request.rb +256 -0
- data/lib/cloudmersive-validate-api-client/models/validate_identifier_response.rb +196 -0
- 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 +186 -0
- data/lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/validate_url_response_full.rb +226 -0
- data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +295 -0
- data/lib/cloudmersive-validate-api-client/models/whois_response.rb +326 -0
- data/lib/cloudmersive-validate-api-client/version.rb +15 -0
- data/spec/api/address_api_spec.rb +142 -0
- data/spec/api/domain_api_spec.rb +83 -0
- data/spec/api/email_api_spec.rb +71 -0
- data/spec/api/ip_address_api_spec.rb +47 -0
- data/spec/api/lead_enrichment_api_spec.rb +46 -0
- data/spec/api/name_api_spec.rb +95 -0
- data/spec/api/phone_number_api_spec.rb +47 -0
- data/spec/api/user_agent_api_spec.rb +47 -0
- data/spec/api/vat_api_spec.rb +47 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/address_get_servers_response_spec.rb +47 -0
- data/spec/models/address_verify_syntax_only_response_spec.rb +59 -0
- data/spec/models/check_response_spec.rb +41 -0
- 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 +41 -0
- data/spec/models/first_name_validation_response_spec.rb +47 -0
- data/spec/models/full_email_validation_response_spec.rb +89 -0
- data/spec/models/full_name_validation_request_spec.rb +41 -0
- data/spec/models/full_name_validation_response_spec.rb +95 -0
- data/spec/models/geolocate_response_spec.rb +89 -0
- data/spec/models/get_gender_request_spec.rb +47 -0
- data/spec/models/get_gender_response_spec.rb +47 -0
- data/spec/models/get_timezones_request_spec.rb +41 -0
- data/spec/models/get_timezones_response_spec.rb +71 -0
- data/spec/models/last_name_validation_request_spec.rb +41 -0
- data/spec/models/last_name_validation_response_spec.rb +47 -0
- data/spec/models/lead_enrichment_request_spec.rb +119 -0
- data/spec/models/lead_enrichment_response_spec.rb +143 -0
- data/spec/models/parse_address_request_spec.rb +47 -0
- data/spec/models/parse_address_response_spec.rb +89 -0
- data/spec/models/phone_number_validate_request_spec.rb +47 -0
- data/spec/models/phone_number_validation_response_spec.rb +83 -0
- data/spec/models/timezone_spec.rb +53 -0
- data/spec/models/user_agent_validate_request_spec.rb +41 -0
- data/spec/models/user_agent_validate_response_spec.rb +119 -0
- data/spec/models/validate_address_request_spec.rb +71 -0
- data/spec/models/validate_address_response_spec.rb +53 -0
- 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 +41 -0
- data/spec/models/validate_country_response_spec.rb +77 -0
- data/spec/models/validate_identifier_request_spec.rb +83 -0
- data/spec/models/validate_identifier_response_spec.rb +47 -0
- 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 +41 -0
- data/spec/models/validate_url_request_syntax_only_spec.rb +41 -0
- data/spec/models/validate_url_response_full_spec.rb +65 -0
- data/spec/models/validate_url_response_syntax_only_spec.rb +47 -0
- data/spec/models/vat_lookup_request_spec.rb +41 -0
- data/spec/models/vat_lookup_response_spec.rb +107 -0
- data/spec/models/whois_response_spec.rb +125 -0
- data/spec/spec_helper.rb +111 -0
- metadata +177 -2
@@ -0,0 +1,75 @@
|
|
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 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveValidateApiClient
|
16
|
+
class LeadEnrichmentApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Enrich an input lead with additional fields of data
|
23
|
+
# @param request Input lead with known fields set, and unknown fields left blank (null)
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [LeadEnrichmentResponse]
|
26
|
+
def lead_enrichment_enrich_lead(request, opts = {})
|
27
|
+
data, _status_code, _headers = lead_enrichment_enrich_lead_with_http_info(request, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Enrich an input lead with additional fields of data
|
32
|
+
# @param request Input lead with known fields set, and unknown fields left blank (null)
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(LeadEnrichmentResponse, Fixnum, Hash)>] LeadEnrichmentResponse data, response status code and response headers
|
35
|
+
def lead_enrichment_enrich_lead_with_http_info(request, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: LeadEnrichmentApi.lead_enrichment_enrich_lead ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'request' is set
|
40
|
+
if @api_client.config.client_side_validation && request.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling LeadEnrichmentApi.lead_enrichment_enrich_lead"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/validate/lead-enrichment/lead/enrich'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = @api_client.object_to_http_body(request)
|
61
|
+
auth_names = ['Apikey']
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => 'LeadEnrichmentResponse')
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: LeadEnrichmentApi#lead_enrichment_enrich_lead\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,293 @@
|
|
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 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveValidateApiClient
|
16
|
+
class NameApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get the gender of a first name
|
23
|
+
# Determines the gender of a first name (given name)
|
24
|
+
# @param input Gender request information
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [GetGenderResponse]
|
27
|
+
def name_get_gender(input, opts = {})
|
28
|
+
data, _status_code, _headers = name_get_gender_with_http_info(input, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get the gender of a first name
|
33
|
+
# Determines the gender of a first name (given name)
|
34
|
+
# @param input Gender request information
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(GetGenderResponse, Fixnum, Hash)>] GetGenderResponse data, response status code and response headers
|
37
|
+
def name_get_gender_with_http_info(input, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: NameApi.name_get_gender ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'input' is set
|
42
|
+
if @api_client.config.client_side_validation && input.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling NameApi.name_get_gender"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/validate/name/get-gender'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = @api_client.object_to_http_body(input)
|
63
|
+
auth_names = ['Apikey']
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => 'GetGenderResponse')
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: NameApi#name_get_gender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
# Validate a code identifier
|
77
|
+
# Determines if the input name is a valid technical / code identifier. Configure input rules such as whether whitespace, hyphens, underscores, etc. are allowed. For example, a valid identifier might be \"helloWorld\" but not \"hello*World\".
|
78
|
+
# @param input Identifier validation request information
|
79
|
+
# @param [Hash] opts the optional parameters
|
80
|
+
# @return [ValidateIdentifierResponse]
|
81
|
+
def name_identifier(input, opts = {})
|
82
|
+
data, _status_code, _headers = name_identifier_with_http_info(input, opts)
|
83
|
+
data
|
84
|
+
end
|
85
|
+
|
86
|
+
# Validate a code identifier
|
87
|
+
# Determines if the input name is a valid technical / code identifier. Configure input rules such as whether whitespace, hyphens, underscores, etc. are allowed. For example, a valid identifier might be \"helloWorld\" but not \"hello*World\".
|
88
|
+
# @param input Identifier validation request information
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [Array<(ValidateIdentifierResponse, Fixnum, Hash)>] ValidateIdentifierResponse data, response status code and response headers
|
91
|
+
def name_identifier_with_http_info(input, opts = {})
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug 'Calling API: NameApi.name_identifier ...'
|
94
|
+
end
|
95
|
+
# verify the required parameter 'input' is set
|
96
|
+
if @api_client.config.client_side_validation && input.nil?
|
97
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling NameApi.name_identifier"
|
98
|
+
end
|
99
|
+
# resource path
|
100
|
+
local_var_path = '/validate/name/identifier'
|
101
|
+
|
102
|
+
# query parameters
|
103
|
+
query_params = {}
|
104
|
+
|
105
|
+
# header parameters
|
106
|
+
header_params = {}
|
107
|
+
# HTTP header 'Accept' (if needed)
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
109
|
+
# HTTP header 'Content-Type'
|
110
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
111
|
+
|
112
|
+
# form parameters
|
113
|
+
form_params = {}
|
114
|
+
|
115
|
+
# http body (model)
|
116
|
+
post_body = @api_client.object_to_http_body(input)
|
117
|
+
auth_names = ['Apikey']
|
118
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
119
|
+
:header_params => header_params,
|
120
|
+
:query_params => query_params,
|
121
|
+
:form_params => form_params,
|
122
|
+
:body => post_body,
|
123
|
+
:auth_names => auth_names,
|
124
|
+
:return_type => 'ValidateIdentifierResponse')
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug "API called: NameApi#name_identifier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
127
|
+
end
|
128
|
+
return data, status_code, headers
|
129
|
+
end
|
130
|
+
# Validate a first name
|
131
|
+
# Determines if a string is a valid first name (given name)
|
132
|
+
# @param input Validation request information
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @return [FirstNameValidationResponse]
|
135
|
+
def name_validate_first_name(input, opts = {})
|
136
|
+
data, _status_code, _headers = name_validate_first_name_with_http_info(input, opts)
|
137
|
+
data
|
138
|
+
end
|
139
|
+
|
140
|
+
# Validate a first name
|
141
|
+
# Determines if a string is a valid first name (given name)
|
142
|
+
# @param input Validation request information
|
143
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @return [Array<(FirstNameValidationResponse, Fixnum, Hash)>] FirstNameValidationResponse data, response status code and response headers
|
145
|
+
def name_validate_first_name_with_http_info(input, opts = {})
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug 'Calling API: NameApi.name_validate_first_name ...'
|
148
|
+
end
|
149
|
+
# verify the required parameter 'input' is set
|
150
|
+
if @api_client.config.client_side_validation && input.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling NameApi.name_validate_first_name"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/validate/name/first'
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
165
|
+
|
166
|
+
# form parameters
|
167
|
+
form_params = {}
|
168
|
+
|
169
|
+
# http body (model)
|
170
|
+
post_body = @api_client.object_to_http_body(input)
|
171
|
+
auth_names = ['Apikey']
|
172
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
173
|
+
:header_params => header_params,
|
174
|
+
:query_params => query_params,
|
175
|
+
:form_params => form_params,
|
176
|
+
:body => post_body,
|
177
|
+
:auth_names => auth_names,
|
178
|
+
:return_type => 'FirstNameValidationResponse')
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: NameApi#name_validate_first_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
184
|
+
# Parse and validate a full name
|
185
|
+
# Parses a full name string (e.g. \"Mr. Jon van der Waal Jr.\") into its component parts (and returns these component parts), and then validates whether it is a valid name string or not
|
186
|
+
# @param input Validation request information
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @return [FullNameValidationResponse]
|
189
|
+
def name_validate_full_name(input, opts = {})
|
190
|
+
data, _status_code, _headers = name_validate_full_name_with_http_info(input, opts)
|
191
|
+
data
|
192
|
+
end
|
193
|
+
|
194
|
+
# Parse and validate a full name
|
195
|
+
# Parses a full name string (e.g. \"Mr. Jon van der Waal Jr.\") into its component parts (and returns these component parts), and then validates whether it is a valid name string or not
|
196
|
+
# @param input Validation request information
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @return [Array<(FullNameValidationResponse, Fixnum, Hash)>] FullNameValidationResponse data, response status code and response headers
|
199
|
+
def name_validate_full_name_with_http_info(input, opts = {})
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug 'Calling API: NameApi.name_validate_full_name ...'
|
202
|
+
end
|
203
|
+
# verify the required parameter 'input' is set
|
204
|
+
if @api_client.config.client_side_validation && input.nil?
|
205
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling NameApi.name_validate_full_name"
|
206
|
+
end
|
207
|
+
# resource path
|
208
|
+
local_var_path = '/validate/name/full-name'
|
209
|
+
|
210
|
+
# query parameters
|
211
|
+
query_params = {}
|
212
|
+
|
213
|
+
# header parameters
|
214
|
+
header_params = {}
|
215
|
+
# HTTP header 'Accept' (if needed)
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
217
|
+
# HTTP header 'Content-Type'
|
218
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
219
|
+
|
220
|
+
# form parameters
|
221
|
+
form_params = {}
|
222
|
+
|
223
|
+
# http body (model)
|
224
|
+
post_body = @api_client.object_to_http_body(input)
|
225
|
+
auth_names = ['Apikey']
|
226
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
227
|
+
:header_params => header_params,
|
228
|
+
:query_params => query_params,
|
229
|
+
:form_params => form_params,
|
230
|
+
:body => post_body,
|
231
|
+
:auth_names => auth_names,
|
232
|
+
:return_type => 'FullNameValidationResponse')
|
233
|
+
if @api_client.config.debugging
|
234
|
+
@api_client.config.logger.debug "API called: NameApi#name_validate_full_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
235
|
+
end
|
236
|
+
return data, status_code, headers
|
237
|
+
end
|
238
|
+
# Validate a last name
|
239
|
+
# Determines if a string is a valid last name (surname)
|
240
|
+
# @param input Validation request information
|
241
|
+
# @param [Hash] opts the optional parameters
|
242
|
+
# @return [LastNameValidationResponse]
|
243
|
+
def name_validate_last_name(input, opts = {})
|
244
|
+
data, _status_code, _headers = name_validate_last_name_with_http_info(input, opts)
|
245
|
+
data
|
246
|
+
end
|
247
|
+
|
248
|
+
# Validate a last name
|
249
|
+
# Determines if a string is a valid last name (surname)
|
250
|
+
# @param input Validation request information
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [Array<(LastNameValidationResponse, Fixnum, Hash)>] LastNameValidationResponse data, response status code and response headers
|
253
|
+
def name_validate_last_name_with_http_info(input, opts = {})
|
254
|
+
if @api_client.config.debugging
|
255
|
+
@api_client.config.logger.debug 'Calling API: NameApi.name_validate_last_name ...'
|
256
|
+
end
|
257
|
+
# verify the required parameter 'input' is set
|
258
|
+
if @api_client.config.client_side_validation && input.nil?
|
259
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling NameApi.name_validate_last_name"
|
260
|
+
end
|
261
|
+
# resource path
|
262
|
+
local_var_path = '/validate/name/last'
|
263
|
+
|
264
|
+
# query parameters
|
265
|
+
query_params = {}
|
266
|
+
|
267
|
+
# header parameters
|
268
|
+
header_params = {}
|
269
|
+
# HTTP header 'Accept' (if needed)
|
270
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
271
|
+
# HTTP header 'Content-Type'
|
272
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
273
|
+
|
274
|
+
# form parameters
|
275
|
+
form_params = {}
|
276
|
+
|
277
|
+
# http body (model)
|
278
|
+
post_body = @api_client.object_to_http_body(input)
|
279
|
+
auth_names = ['Apikey']
|
280
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
281
|
+
:header_params => header_params,
|
282
|
+
:query_params => query_params,
|
283
|
+
:form_params => form_params,
|
284
|
+
:body => post_body,
|
285
|
+
:auth_names => auth_names,
|
286
|
+
:return_type => 'LastNameValidationResponse')
|
287
|
+
if @api_client.config.debugging
|
288
|
+
@api_client.config.logger.debug "API called: NameApi#name_validate_last_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
289
|
+
end
|
290
|
+
return data, status_code, headers
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
@@ -0,0 +1,77 @@
|
|
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 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveValidateApiClient
|
16
|
+
class PhoneNumberApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Validate phone number (basic)
|
23
|
+
# Validate a phone number by analyzing the syntax
|
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\".
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [PhoneNumberValidationResponse]
|
27
|
+
def phone_number_syntax_only(value, opts = {})
|
28
|
+
data, _status_code, _headers = phone_number_syntax_only_with_http_info(value, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Validate phone number (basic)
|
33
|
+
# Validate a phone number by analyzing the syntax
|
34
|
+
# @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\".
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(PhoneNumberValidationResponse, Fixnum, Hash)>] PhoneNumberValidationResponse data, response status code and response headers
|
37
|
+
def phone_number_syntax_only_with_http_info(value, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PhoneNumberApi.phone_number_syntax_only ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'value' is set
|
42
|
+
if @api_client.config.client_side_validation && value.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling PhoneNumberApi.phone_number_syntax_only"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/validate/phonenumber/basic'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = @api_client.object_to_http_body(value)
|
63
|
+
auth_names = ['Apikey']
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => 'PhoneNumberValidationResponse')
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: PhoneNumberApi#phone_number_syntax_only\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,77 @@
|
|
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 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveValidateApiClient
|
16
|
+
class UserAgentApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Parse an HTTP User-Agent string, identify robots
|
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.
|
24
|
+
# @param request Input parse request
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [UserAgentValidateResponse]
|
27
|
+
def user_agent_parse(request, opts = {})
|
28
|
+
data, _status_code, _headers = user_agent_parse_with_http_info(request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Parse an HTTP User-Agent string, identify robots
|
33
|
+
# 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.
|
34
|
+
# @param request Input parse request
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(UserAgentValidateResponse, Fixnum, Hash)>] UserAgentValidateResponse data, response status code and response headers
|
37
|
+
def user_agent_parse_with_http_info(request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: UserAgentApi.user_agent_parse ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'request' is set
|
42
|
+
if @api_client.config.client_side_validation && request.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling UserAgentApi.user_agent_parse"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/validate/useragent/parse'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = @api_client.object_to_http_body(request)
|
63
|
+
auth_names = ['Apikey']
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => 'UserAgentValidateResponse')
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: UserAgentApi#user_agent_parse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|