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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42848aae92bdab856adfb954183ca89a7c93d0bafc089573773e1dd6bf048f2e
|
4
|
+
data.tar.gz: af8fd461ed08f4a2c34d5a159fef97dc620c52b335d5f7a1161edf492d67aea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99104ecbd0706950be75bf090b5585a0286f27001f150c938cb3b003e7a68f59546b29b6e80fcdc866e0c386092786cae8ddd91cdfd2b4721ba1954592262b88
|
7
|
+
data.tar.gz: 86212991b792a4523abc09705b99b705f60fe453d0732310c533dea7b979a7983993e4f7332c098a8bf99259b3dcb31451bf8dc75ca47e45aea37634b25738d1
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
# cloudmersive-validate-api-client
|
2
|
+
|
3
|
+
CloudmersiveValidateApiClient - the Ruby gem for the validateapi
|
4
|
+
|
5
|
+
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.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 2.0.4
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build cloudmersive-validate-api-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./cloudmersive-validate-api-client-2.0.4.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-validate-api-client-2.0.4.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'cloudmersive-validate-api-client', '~> 2.0.4'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'cloudmersive-validate-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'cloudmersive-validate-api-client'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
CloudmersiveValidateApiClient.configure do |config|
|
59
|
+
# Configure API key authorization: Apikey
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
|
+
end
|
64
|
+
|
65
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
66
|
+
|
67
|
+
input = CloudmersiveValidateApiClient::ValidateCountryRequest.new # ValidateCountryRequest | Input request
|
68
|
+
|
69
|
+
|
70
|
+
begin
|
71
|
+
#Check if a country is a member of the European Union (EU)
|
72
|
+
result = api_instance.address_check_eu_membership(input)
|
73
|
+
p result
|
74
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
75
|
+
puts "Exception when calling AddressApi->address_check_eu_membership: #{e}"
|
76
|
+
end
|
77
|
+
|
78
|
+
```
|
79
|
+
|
80
|
+
## Documentation for API Endpoints
|
81
|
+
|
82
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
83
|
+
|
84
|
+
Class | Method | HTTP request | Description
|
85
|
+
------------ | ------------- | ------------- | -------------
|
86
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_check_eu_membership**](docs/AddressApi.md#address_check_eu_membership) | **POST** /validate/address/country/check-eu-membership | Check if a country is a member of the European Union (EU)
|
87
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_country**](docs/AddressApi.md#address_country) | **POST** /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name
|
88
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_country_list**](docs/AddressApi.md#address_country_list) | **POST** /validate/address/country/list | Get a list of ISO 3166-1 countries
|
89
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_get_timezone**](docs/AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
|
90
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_parse_string**](docs/AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
|
91
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_address**](docs/AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
|
92
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_city**](docs/AddressApi.md#address_validate_city) | **POST** /validate/address/city | Validate a City and State/Province combination, get location information about it
|
93
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_postal_code**](docs/AddressApi.md#address_validate_postal_code) | **POST** /validate/address/postal-code | Validate a postal code, get location information about it
|
94
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_state**](docs/AddressApi.md#address_validate_state) | **POST** /validate/address/state | Validate a state or province, name or abbreviation, get location information about it
|
95
|
+
*CloudmersiveValidateApiClient::DomainApi* | [**domain_check**](docs/DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
|
96
|
+
*CloudmersiveValidateApiClient::DomainApi* | [**domain_post**](docs/DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
|
97
|
+
*CloudmersiveValidateApiClient::DomainApi* | [**domain_url_full**](docs/DomainApi.md#domain_url_full) | **POST** /validate/domain/url/full | Validate a URL fully
|
98
|
+
*CloudmersiveValidateApiClient::DomainApi* | [**domain_url_syntax_only**](docs/DomainApi.md#domain_url_syntax_only) | **POST** /validate/domain/url/syntax-only | Validate a URL syntactically
|
99
|
+
*CloudmersiveValidateApiClient::EmailApi* | [**email_address_get_servers**](docs/EmailApi.md#email_address_get_servers) | **POST** /validate/email/address/servers | Partially check whether an email address is valid
|
100
|
+
*CloudmersiveValidateApiClient::EmailApi* | [**email_full_validation**](docs/EmailApi.md#email_full_validation) | **POST** /validate/email/address/full | Fully validate an email address
|
101
|
+
*CloudmersiveValidateApiClient::EmailApi* | [**email_post**](docs/EmailApi.md#email_post) | **POST** /validate/email/address/syntaxOnly | Validate email adddress for syntactic correctness only
|
102
|
+
*CloudmersiveValidateApiClient::IPAddressApi* | [**i_p_address_post**](docs/IPAddressApi.md#i_p_address_post) | **POST** /validate/ip/geolocate | Geolocate an IP address
|
103
|
+
*CloudmersiveValidateApiClient::LeadEnrichmentApi* | [**lead_enrichment_enrich_lead**](docs/LeadEnrichmentApi.md#lead_enrichment_enrich_lead) | **POST** /validate/lead-enrichment/lead/enrich | Enrich an input lead with additional fields of data
|
104
|
+
*CloudmersiveValidateApiClient::NameApi* | [**name_get_gender**](docs/NameApi.md#name_get_gender) | **POST** /validate/name/get-gender | Get the gender of a first name
|
105
|
+
*CloudmersiveValidateApiClient::NameApi* | [**name_identifier**](docs/NameApi.md#name_identifier) | **POST** /validate/name/identifier | Validate a code identifier
|
106
|
+
*CloudmersiveValidateApiClient::NameApi* | [**name_validate_first_name**](docs/NameApi.md#name_validate_first_name) | **POST** /validate/name/first | Validate a first name
|
107
|
+
*CloudmersiveValidateApiClient::NameApi* | [**name_validate_full_name**](docs/NameApi.md#name_validate_full_name) | **POST** /validate/name/full-name | Parse and validate a full name
|
108
|
+
*CloudmersiveValidateApiClient::NameApi* | [**name_validate_last_name**](docs/NameApi.md#name_validate_last_name) | **POST** /validate/name/last | Validate a last name
|
109
|
+
*CloudmersiveValidateApiClient::PhoneNumberApi* | [**phone_number_syntax_only**](docs/PhoneNumberApi.md#phone_number_syntax_only) | **POST** /validate/phonenumber/basic | Validate phone number (basic)
|
110
|
+
*CloudmersiveValidateApiClient::UserAgentApi* | [**user_agent_parse**](docs/UserAgentApi.md#user_agent_parse) | **POST** /validate/useragent/parse | Parse an HTTP User-Agent string, identify robots
|
111
|
+
*CloudmersiveValidateApiClient::VatApi* | [**vat_vat_lookup**](docs/VatApi.md#vat_vat_lookup) | **POST** /validate/vat/lookup | Validate a VAT number
|
112
|
+
|
113
|
+
|
114
|
+
## Documentation for Models
|
115
|
+
|
116
|
+
- [CloudmersiveValidateApiClient::AddressGetServersResponse](docs/AddressGetServersResponse.md)
|
117
|
+
- [CloudmersiveValidateApiClient::AddressVerifySyntaxOnlyResponse](docs/AddressVerifySyntaxOnlyResponse.md)
|
118
|
+
- [CloudmersiveValidateApiClient::CheckResponse](docs/CheckResponse.md)
|
119
|
+
- [CloudmersiveValidateApiClient::CountryDetails](docs/CountryDetails.md)
|
120
|
+
- [CloudmersiveValidateApiClient::CountryListResult](docs/CountryListResult.md)
|
121
|
+
- [CloudmersiveValidateApiClient::FirstNameValidationRequest](docs/FirstNameValidationRequest.md)
|
122
|
+
- [CloudmersiveValidateApiClient::FirstNameValidationResponse](docs/FirstNameValidationResponse.md)
|
123
|
+
- [CloudmersiveValidateApiClient::FullEmailValidationResponse](docs/FullEmailValidationResponse.md)
|
124
|
+
- [CloudmersiveValidateApiClient::FullNameValidationRequest](docs/FullNameValidationRequest.md)
|
125
|
+
- [CloudmersiveValidateApiClient::FullNameValidationResponse](docs/FullNameValidationResponse.md)
|
126
|
+
- [CloudmersiveValidateApiClient::GeolocateResponse](docs/GeolocateResponse.md)
|
127
|
+
- [CloudmersiveValidateApiClient::GetGenderRequest](docs/GetGenderRequest.md)
|
128
|
+
- [CloudmersiveValidateApiClient::GetGenderResponse](docs/GetGenderResponse.md)
|
129
|
+
- [CloudmersiveValidateApiClient::GetTimezonesRequest](docs/GetTimezonesRequest.md)
|
130
|
+
- [CloudmersiveValidateApiClient::GetTimezonesResponse](docs/GetTimezonesResponse.md)
|
131
|
+
- [CloudmersiveValidateApiClient::LastNameValidationRequest](docs/LastNameValidationRequest.md)
|
132
|
+
- [CloudmersiveValidateApiClient::LastNameValidationResponse](docs/LastNameValidationResponse.md)
|
133
|
+
- [CloudmersiveValidateApiClient::LeadEnrichmentRequest](docs/LeadEnrichmentRequest.md)
|
134
|
+
- [CloudmersiveValidateApiClient::LeadEnrichmentResponse](docs/LeadEnrichmentResponse.md)
|
135
|
+
- [CloudmersiveValidateApiClient::ParseAddressRequest](docs/ParseAddressRequest.md)
|
136
|
+
- [CloudmersiveValidateApiClient::ParseAddressResponse](docs/ParseAddressResponse.md)
|
137
|
+
- [CloudmersiveValidateApiClient::PhoneNumberValidateRequest](docs/PhoneNumberValidateRequest.md)
|
138
|
+
- [CloudmersiveValidateApiClient::PhoneNumberValidationResponse](docs/PhoneNumberValidationResponse.md)
|
139
|
+
- [CloudmersiveValidateApiClient::Timezone](docs/Timezone.md)
|
140
|
+
- [CloudmersiveValidateApiClient::UserAgentValidateRequest](docs/UserAgentValidateRequest.md)
|
141
|
+
- [CloudmersiveValidateApiClient::UserAgentValidateResponse](docs/UserAgentValidateResponse.md)
|
142
|
+
- [CloudmersiveValidateApiClient::ValidateAddressRequest](docs/ValidateAddressRequest.md)
|
143
|
+
- [CloudmersiveValidateApiClient::ValidateAddressResponse](docs/ValidateAddressResponse.md)
|
144
|
+
- [CloudmersiveValidateApiClient::ValidateCityRequest](docs/ValidateCityRequest.md)
|
145
|
+
- [CloudmersiveValidateApiClient::ValidateCityResponse](docs/ValidateCityResponse.md)
|
146
|
+
- [CloudmersiveValidateApiClient::ValidateCountryRequest](docs/ValidateCountryRequest.md)
|
147
|
+
- [CloudmersiveValidateApiClient::ValidateCountryResponse](docs/ValidateCountryResponse.md)
|
148
|
+
- [CloudmersiveValidateApiClient::ValidateIdentifierRequest](docs/ValidateIdentifierRequest.md)
|
149
|
+
- [CloudmersiveValidateApiClient::ValidateIdentifierResponse](docs/ValidateIdentifierResponse.md)
|
150
|
+
- [CloudmersiveValidateApiClient::ValidatePostalCodeRequest](docs/ValidatePostalCodeRequest.md)
|
151
|
+
- [CloudmersiveValidateApiClient::ValidatePostalCodeResponse](docs/ValidatePostalCodeResponse.md)
|
152
|
+
- [CloudmersiveValidateApiClient::ValidateStateRequest](docs/ValidateStateRequest.md)
|
153
|
+
- [CloudmersiveValidateApiClient::ValidateStateResponse](docs/ValidateStateResponse.md)
|
154
|
+
- [CloudmersiveValidateApiClient::ValidateUrlRequestFull](docs/ValidateUrlRequestFull.md)
|
155
|
+
- [CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly](docs/ValidateUrlRequestSyntaxOnly.md)
|
156
|
+
- [CloudmersiveValidateApiClient::ValidateUrlResponseFull](docs/ValidateUrlResponseFull.md)
|
157
|
+
- [CloudmersiveValidateApiClient::ValidateUrlResponseSyntaxOnly](docs/ValidateUrlResponseSyntaxOnly.md)
|
158
|
+
- [CloudmersiveValidateApiClient::VatLookupRequest](docs/VatLookupRequest.md)
|
159
|
+
- [CloudmersiveValidateApiClient::VatLookupResponse](docs/VatLookupResponse.md)
|
160
|
+
- [CloudmersiveValidateApiClient::WhoisResponse](docs/WhoisResponse.md)
|
161
|
+
|
162
|
+
|
163
|
+
## Documentation for Authorization
|
164
|
+
|
165
|
+
|
166
|
+
### Apikey
|
167
|
+
|
168
|
+
- **Type**: API key
|
169
|
+
- **API key parameter name**: Apikey
|
170
|
+
- **Location**: HTTP header
|
171
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#validateapi
|
5
|
+
|
6
|
+
#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.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.14
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "cloudmersive-validate-api-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "cloudmersive-validate-api-client"
|
20
|
+
s.version = CloudmersiveValidateApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cloudmersive"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://www.cloudmersive.com/validate-api"
|
25
|
+
s.summary = "Validate key business data thoroughly."
|
26
|
+
s.description = "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."
|
27
|
+
s.license = 'Apache 2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = Dir['./**/*']
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
data/docs/AddressApi.md
ADDED
@@ -0,0 +1,497 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::AddressApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**address_check_eu_membership**](AddressApi.md#address_check_eu_membership) | **POST** /validate/address/country/check-eu-membership | Check if a country is a member of the European Union (EU)
|
8
|
+
[**address_country**](AddressApi.md#address_country) | **POST** /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name
|
9
|
+
[**address_country_list**](AddressApi.md#address_country_list) | **POST** /validate/address/country/list | Get a list of ISO 3166-1 countries
|
10
|
+
[**address_get_timezone**](AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
|
11
|
+
[**address_parse_string**](AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
|
12
|
+
[**address_validate_address**](AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
|
13
|
+
[**address_validate_city**](AddressApi.md#address_validate_city) | **POST** /validate/address/city | Validate a City and State/Province combination, get location information about it
|
14
|
+
[**address_validate_postal_code**](AddressApi.md#address_validate_postal_code) | **POST** /validate/address/postal-code | Validate a postal code, get location information about it
|
15
|
+
[**address_validate_state**](AddressApi.md#address_validate_state) | **POST** /validate/address/state | Validate a state or province, name or abbreviation, get location information about it
|
16
|
+
|
17
|
+
|
18
|
+
# **address_check_eu_membership**
|
19
|
+
> ValidateCountryResponse address_check_eu_membership(input)
|
20
|
+
|
21
|
+
Check if a country is a member of the European Union (EU)
|
22
|
+
|
23
|
+
Checks if the input country is a member of the European Union or not.
|
24
|
+
|
25
|
+
### Example
|
26
|
+
```ruby
|
27
|
+
# load the gem
|
28
|
+
require 'cloudmersive-validate-api-client'
|
29
|
+
# setup authorization
|
30
|
+
CloudmersiveValidateApiClient.configure do |config|
|
31
|
+
# Configure API key authorization: Apikey
|
32
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
33
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
34
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
35
|
+
end
|
36
|
+
|
37
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
38
|
+
|
39
|
+
input = CloudmersiveValidateApiClient::ValidateCountryRequest.new # ValidateCountryRequest | Input request
|
40
|
+
|
41
|
+
|
42
|
+
begin
|
43
|
+
#Check if a country is a member of the European Union (EU)
|
44
|
+
result = api_instance.address_check_eu_membership(input)
|
45
|
+
p result
|
46
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
47
|
+
puts "Exception when calling AddressApi->address_check_eu_membership: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
### Parameters
|
52
|
+
|
53
|
+
Name | Type | Description | Notes
|
54
|
+
------------- | ------------- | ------------- | -------------
|
55
|
+
**input** | [**ValidateCountryRequest**](ValidateCountryRequest.md)| Input request |
|
56
|
+
|
57
|
+
### Return type
|
58
|
+
|
59
|
+
[**ValidateCountryResponse**](ValidateCountryResponse.md)
|
60
|
+
|
61
|
+
### Authorization
|
62
|
+
|
63
|
+
[Apikey](../README.md#Apikey)
|
64
|
+
|
65
|
+
### HTTP request headers
|
66
|
+
|
67
|
+
- **Content-Type**: application/json, text/json
|
68
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
# **address_country**
|
73
|
+
> ValidateCountryResponse address_country(input)
|
74
|
+
|
75
|
+
Validate and normalize country information, return ISO 3166-1 country codes and country name
|
76
|
+
|
77
|
+
Validates and normalizes country information, and returns key information about a country, as well as whether it is a member of the European Union. Also returns distinct time zones in the country.
|
78
|
+
|
79
|
+
### Example
|
80
|
+
```ruby
|
81
|
+
# load the gem
|
82
|
+
require 'cloudmersive-validate-api-client'
|
83
|
+
# setup authorization
|
84
|
+
CloudmersiveValidateApiClient.configure do |config|
|
85
|
+
# Configure API key authorization: Apikey
|
86
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
87
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
88
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
89
|
+
end
|
90
|
+
|
91
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
92
|
+
|
93
|
+
input = CloudmersiveValidateApiClient::ValidateCountryRequest.new # ValidateCountryRequest | Input request
|
94
|
+
|
95
|
+
|
96
|
+
begin
|
97
|
+
#Validate and normalize country information, return ISO 3166-1 country codes and country name
|
98
|
+
result = api_instance.address_country(input)
|
99
|
+
p result
|
100
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
101
|
+
puts "Exception when calling AddressApi->address_country: #{e}"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
### Parameters
|
106
|
+
|
107
|
+
Name | Type | Description | Notes
|
108
|
+
------------- | ------------- | ------------- | -------------
|
109
|
+
**input** | [**ValidateCountryRequest**](ValidateCountryRequest.md)| Input request |
|
110
|
+
|
111
|
+
### Return type
|
112
|
+
|
113
|
+
[**ValidateCountryResponse**](ValidateCountryResponse.md)
|
114
|
+
|
115
|
+
### Authorization
|
116
|
+
|
117
|
+
[Apikey](../README.md#Apikey)
|
118
|
+
|
119
|
+
### HTTP request headers
|
120
|
+
|
121
|
+
- **Content-Type**: application/json, text/json
|
122
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
# **address_country_list**
|
127
|
+
> CountryListResult address_country_list
|
128
|
+
|
129
|
+
Get a list of ISO 3166-1 countries
|
130
|
+
|
131
|
+
Enumerates the list of ISO 3166-1 countries, including name, country codes, and more.
|
132
|
+
|
133
|
+
### Example
|
134
|
+
```ruby
|
135
|
+
# load the gem
|
136
|
+
require 'cloudmersive-validate-api-client'
|
137
|
+
# setup authorization
|
138
|
+
CloudmersiveValidateApiClient.configure do |config|
|
139
|
+
# Configure API key authorization: Apikey
|
140
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
141
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
142
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
143
|
+
end
|
144
|
+
|
145
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
146
|
+
|
147
|
+
begin
|
148
|
+
#Get a list of ISO 3166-1 countries
|
149
|
+
result = api_instance.address_country_list
|
150
|
+
p result
|
151
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
152
|
+
puts "Exception when calling AddressApi->address_country_list: #{e}"
|
153
|
+
end
|
154
|
+
```
|
155
|
+
|
156
|
+
### Parameters
|
157
|
+
This endpoint does not need any parameter.
|
158
|
+
|
159
|
+
### Return type
|
160
|
+
|
161
|
+
[**CountryListResult**](CountryListResult.md)
|
162
|
+
|
163
|
+
### Authorization
|
164
|
+
|
165
|
+
[Apikey](../README.md#Apikey)
|
166
|
+
|
167
|
+
### HTTP request headers
|
168
|
+
|
169
|
+
- **Content-Type**: Not defined
|
170
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
# **address_get_timezone**
|
175
|
+
> GetTimezonesResponse address_get_timezone(input)
|
176
|
+
|
177
|
+
Gets IANA/Olsen time zones for a country
|
178
|
+
|
179
|
+
Gets the IANA/Olsen time zones for a country.
|
180
|
+
|
181
|
+
### Example
|
182
|
+
```ruby
|
183
|
+
# load the gem
|
184
|
+
require 'cloudmersive-validate-api-client'
|
185
|
+
# setup authorization
|
186
|
+
CloudmersiveValidateApiClient.configure do |config|
|
187
|
+
# Configure API key authorization: Apikey
|
188
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
189
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
190
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
191
|
+
end
|
192
|
+
|
193
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
194
|
+
|
195
|
+
input = CloudmersiveValidateApiClient::GetTimezonesRequest.new # GetTimezonesRequest | Input request
|
196
|
+
|
197
|
+
|
198
|
+
begin
|
199
|
+
#Gets IANA/Olsen time zones for a country
|
200
|
+
result = api_instance.address_get_timezone(input)
|
201
|
+
p result
|
202
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
203
|
+
puts "Exception when calling AddressApi->address_get_timezone: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
### Parameters
|
208
|
+
|
209
|
+
Name | Type | Description | Notes
|
210
|
+
------------- | ------------- | ------------- | -------------
|
211
|
+
**input** | [**GetTimezonesRequest**](GetTimezonesRequest.md)| Input request |
|
212
|
+
|
213
|
+
### Return type
|
214
|
+
|
215
|
+
[**GetTimezonesResponse**](GetTimezonesResponse.md)
|
216
|
+
|
217
|
+
### Authorization
|
218
|
+
|
219
|
+
[Apikey](../README.md#Apikey)
|
220
|
+
|
221
|
+
### HTTP request headers
|
222
|
+
|
223
|
+
- **Content-Type**: application/json, text/json
|
224
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
# **address_parse_string**
|
229
|
+
> ParseAddressResponse address_parse_string(input)
|
230
|
+
|
231
|
+
Parse an unstructured input text string into an international, formatted address
|
232
|
+
|
233
|
+
Uses machine learning and Natural Language Processing (NLP) to handle a wide array of cases, including non-standard and unstructured address strings across a wide array of countries and address formatting norms.
|
234
|
+
|
235
|
+
### Example
|
236
|
+
```ruby
|
237
|
+
# load the gem
|
238
|
+
require 'cloudmersive-validate-api-client'
|
239
|
+
# setup authorization
|
240
|
+
CloudmersiveValidateApiClient.configure do |config|
|
241
|
+
# Configure API key authorization: Apikey
|
242
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
243
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
244
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
245
|
+
end
|
246
|
+
|
247
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
248
|
+
|
249
|
+
input = CloudmersiveValidateApiClient::ParseAddressRequest.new # ParseAddressRequest | Input parse request
|
250
|
+
|
251
|
+
|
252
|
+
begin
|
253
|
+
#Parse an unstructured input text string into an international, formatted address
|
254
|
+
result = api_instance.address_parse_string(input)
|
255
|
+
p result
|
256
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
257
|
+
puts "Exception when calling AddressApi->address_parse_string: #{e}"
|
258
|
+
end
|
259
|
+
```
|
260
|
+
|
261
|
+
### Parameters
|
262
|
+
|
263
|
+
Name | Type | Description | Notes
|
264
|
+
------------- | ------------- | ------------- | -------------
|
265
|
+
**input** | [**ParseAddressRequest**](ParseAddressRequest.md)| Input parse request |
|
266
|
+
|
267
|
+
### Return type
|
268
|
+
|
269
|
+
[**ParseAddressResponse**](ParseAddressResponse.md)
|
270
|
+
|
271
|
+
### Authorization
|
272
|
+
|
273
|
+
[Apikey](../README.md#Apikey)
|
274
|
+
|
275
|
+
### HTTP request headers
|
276
|
+
|
277
|
+
- **Content-Type**: application/json, text/json
|
278
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
# **address_validate_address**
|
283
|
+
> ValidateAddressResponse address_validate_address(input)
|
284
|
+
|
285
|
+
Validate a street address
|
286
|
+
|
287
|
+
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.
|
288
|
+
|
289
|
+
### Example
|
290
|
+
```ruby
|
291
|
+
# load the gem
|
292
|
+
require 'cloudmersive-validate-api-client'
|
293
|
+
# setup authorization
|
294
|
+
CloudmersiveValidateApiClient.configure do |config|
|
295
|
+
# Configure API key authorization: Apikey
|
296
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
297
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
298
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
299
|
+
end
|
300
|
+
|
301
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
302
|
+
|
303
|
+
input = CloudmersiveValidateApiClient::ValidateAddressRequest.new # ValidateAddressRequest | Input parse request
|
304
|
+
|
305
|
+
|
306
|
+
begin
|
307
|
+
#Validate a street address
|
308
|
+
result = api_instance.address_validate_address(input)
|
309
|
+
p result
|
310
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
311
|
+
puts "Exception when calling AddressApi->address_validate_address: #{e}"
|
312
|
+
end
|
313
|
+
```
|
314
|
+
|
315
|
+
### Parameters
|
316
|
+
|
317
|
+
Name | Type | Description | Notes
|
318
|
+
------------- | ------------- | ------------- | -------------
|
319
|
+
**input** | [**ValidateAddressRequest**](ValidateAddressRequest.md)| Input parse request |
|
320
|
+
|
321
|
+
### Return type
|
322
|
+
|
323
|
+
[**ValidateAddressResponse**](ValidateAddressResponse.md)
|
324
|
+
|
325
|
+
### Authorization
|
326
|
+
|
327
|
+
[Apikey](../README.md#Apikey)
|
328
|
+
|
329
|
+
### HTTP request headers
|
330
|
+
|
331
|
+
- **Content-Type**: application/json, text/json
|
332
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
# **address_validate_city**
|
337
|
+
> ValidateCityResponse address_validate_city(input)
|
338
|
+
|
339
|
+
Validate a City and State/Province combination, get location information about it
|
340
|
+
|
341
|
+
Checks if the input city and state name or code is valid, and returns information about it such as normalized City name, State name and more.
|
342
|
+
|
343
|
+
### Example
|
344
|
+
```ruby
|
345
|
+
# load the gem
|
346
|
+
require 'cloudmersive-validate-api-client'
|
347
|
+
# setup authorization
|
348
|
+
CloudmersiveValidateApiClient.configure do |config|
|
349
|
+
# Configure API key authorization: Apikey
|
350
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
351
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
352
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
353
|
+
end
|
354
|
+
|
355
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
356
|
+
|
357
|
+
input = CloudmersiveValidateApiClient::ValidateCityRequest.new # ValidateCityRequest | Input parse request
|
358
|
+
|
359
|
+
|
360
|
+
begin
|
361
|
+
#Validate a City and State/Province combination, get location information about it
|
362
|
+
result = api_instance.address_validate_city(input)
|
363
|
+
p result
|
364
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
365
|
+
puts "Exception when calling AddressApi->address_validate_city: #{e}"
|
366
|
+
end
|
367
|
+
```
|
368
|
+
|
369
|
+
### Parameters
|
370
|
+
|
371
|
+
Name | Type | Description | Notes
|
372
|
+
------------- | ------------- | ------------- | -------------
|
373
|
+
**input** | [**ValidateCityRequest**](ValidateCityRequest.md)| Input parse request |
|
374
|
+
|
375
|
+
### Return type
|
376
|
+
|
377
|
+
[**ValidateCityResponse**](ValidateCityResponse.md)
|
378
|
+
|
379
|
+
### Authorization
|
380
|
+
|
381
|
+
[Apikey](../README.md#Apikey)
|
382
|
+
|
383
|
+
### HTTP request headers
|
384
|
+
|
385
|
+
- **Content-Type**: application/json, text/json
|
386
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
# **address_validate_postal_code**
|
391
|
+
> ValidatePostalCodeResponse address_validate_postal_code(input)
|
392
|
+
|
393
|
+
Validate a postal code, get location information about it
|
394
|
+
|
395
|
+
Checks if the input postal code is valid, and returns information about it such as City, State and more.
|
396
|
+
|
397
|
+
### Example
|
398
|
+
```ruby
|
399
|
+
# load the gem
|
400
|
+
require 'cloudmersive-validate-api-client'
|
401
|
+
# setup authorization
|
402
|
+
CloudmersiveValidateApiClient.configure do |config|
|
403
|
+
# Configure API key authorization: Apikey
|
404
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
405
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
406
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
407
|
+
end
|
408
|
+
|
409
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
410
|
+
|
411
|
+
input = CloudmersiveValidateApiClient::ValidatePostalCodeRequest.new # ValidatePostalCodeRequest | Input parse request
|
412
|
+
|
413
|
+
|
414
|
+
begin
|
415
|
+
#Validate a postal code, get location information about it
|
416
|
+
result = api_instance.address_validate_postal_code(input)
|
417
|
+
p result
|
418
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
419
|
+
puts "Exception when calling AddressApi->address_validate_postal_code: #{e}"
|
420
|
+
end
|
421
|
+
```
|
422
|
+
|
423
|
+
### Parameters
|
424
|
+
|
425
|
+
Name | Type | Description | Notes
|
426
|
+
------------- | ------------- | ------------- | -------------
|
427
|
+
**input** | [**ValidatePostalCodeRequest**](ValidatePostalCodeRequest.md)| Input parse request |
|
428
|
+
|
429
|
+
### Return type
|
430
|
+
|
431
|
+
[**ValidatePostalCodeResponse**](ValidatePostalCodeResponse.md)
|
432
|
+
|
433
|
+
### Authorization
|
434
|
+
|
435
|
+
[Apikey](../README.md#Apikey)
|
436
|
+
|
437
|
+
### HTTP request headers
|
438
|
+
|
439
|
+
- **Content-Type**: application/json, text/json
|
440
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
# **address_validate_state**
|
445
|
+
> ValidateStateResponse address_validate_state(input)
|
446
|
+
|
447
|
+
Validate a state or province, name or abbreviation, get location information about it
|
448
|
+
|
449
|
+
Checks if the input state name or code is valid, and returns information about it such as normalized State name and more.
|
450
|
+
|
451
|
+
### Example
|
452
|
+
```ruby
|
453
|
+
# load the gem
|
454
|
+
require 'cloudmersive-validate-api-client'
|
455
|
+
# setup authorization
|
456
|
+
CloudmersiveValidateApiClient.configure do |config|
|
457
|
+
# Configure API key authorization: Apikey
|
458
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
459
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
460
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
461
|
+
end
|
462
|
+
|
463
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
464
|
+
|
465
|
+
input = CloudmersiveValidateApiClient::ValidateStateRequest.new # ValidateStateRequest | Input parse request
|
466
|
+
|
467
|
+
|
468
|
+
begin
|
469
|
+
#Validate a state or province, name or abbreviation, get location information about it
|
470
|
+
result = api_instance.address_validate_state(input)
|
471
|
+
p result
|
472
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
473
|
+
puts "Exception when calling AddressApi->address_validate_state: #{e}"
|
474
|
+
end
|
475
|
+
```
|
476
|
+
|
477
|
+
### Parameters
|
478
|
+
|
479
|
+
Name | Type | Description | Notes
|
480
|
+
------------- | ------------- | ------------- | -------------
|
481
|
+
**input** | [**ValidateStateRequest**](ValidateStateRequest.md)| Input parse request |
|
482
|
+
|
483
|
+
### Return type
|
484
|
+
|
485
|
+
[**ValidateStateResponse**](ValidateStateResponse.md)
|
486
|
+
|
487
|
+
### Authorization
|
488
|
+
|
489
|
+
[Apikey](../README.md#Apikey)
|
490
|
+
|
491
|
+
### HTTP request headers
|
492
|
+
|
493
|
+
- **Content-Type**: application/json, text/json
|
494
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
495
|
+
|
496
|
+
|
497
|
+
|