cloudmersive-validate-api-client 2.0.2 → 2.0.7
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 +176 -0
- data/Rakefile +8 -0
- data/cloudmersive-validate-api-client.gemspec +45 -0
- data/docs/AddressApi.md +552 -0
- data/docs/AddressGetServersResponse.md +9 -0
- data/docs/AddressVerifySyntaxOnlyResponse.md +11 -0
- data/docs/CheckResponse.md +8 -0
- data/docs/CountryDetails.md +14 -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 +173 -0
- data/docs/IPThreatResponse.md +9 -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/TorNodeResponse.md +8 -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 +17 -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 +95 -0
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +555 -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 +185 -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 +246 -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/ip_threat_response.rb +196 -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/tor_node_response.rb +186 -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 +278 -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 +154 -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 +71 -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 +77 -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/ip_threat_response_spec.rb +47 -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/tor_node_response_spec.rb +41 -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 +95 -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 +184 -3
@@ -0,0 +1,555 @@
|
|
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 AddressApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Check if a country is a member of the European Union (EU)
|
23
|
+
# Checks if the input country is a member of the European Union or not.
|
24
|
+
# @param input Input request
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ValidateCountryResponse]
|
27
|
+
def address_check_eu_membership(input, opts = {})
|
28
|
+
data, _status_code, _headers = address_check_eu_membership_with_http_info(input, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Check if a country is a member of the European Union (EU)
|
33
|
+
# Checks if the input country is a member of the European Union or not.
|
34
|
+
# @param input Input request
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ValidateCountryResponse, Fixnum, Hash)>] ValidateCountryResponse data, response status code and response headers
|
37
|
+
def address_check_eu_membership_with_http_info(input, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_check_eu_membership ...'
|
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 AddressApi.address_check_eu_membership"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/validate/address/country/check-eu-membership'
|
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 => 'ValidateCountryResponse')
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: AddressApi#address_check_eu_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
76
|
+
# Validate and normalize country information, return ISO 3166-1 country codes and country name
|
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
|
+
# @param input Input request
|
79
|
+
# @param [Hash] opts the optional parameters
|
80
|
+
# @return [ValidateCountryResponse]
|
81
|
+
def address_country(input, opts = {})
|
82
|
+
data, _status_code, _headers = address_country_with_http_info(input, opts)
|
83
|
+
data
|
84
|
+
end
|
85
|
+
|
86
|
+
# Validate and normalize country information, return ISO 3166-1 country codes and country name
|
87
|
+
# 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.
|
88
|
+
# @param input Input request
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [Array<(ValidateCountryResponse, Fixnum, Hash)>] ValidateCountryResponse data, response status code and response headers
|
91
|
+
def address_country_with_http_info(input, opts = {})
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_country ...'
|
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 AddressApi.address_country"
|
98
|
+
end
|
99
|
+
# resource path
|
100
|
+
local_var_path = '/validate/address/country'
|
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 => 'ValidateCountryResponse')
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug "API called: AddressApi#address_country\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
127
|
+
end
|
128
|
+
return data, status_code, headers
|
129
|
+
end
|
130
|
+
# Get a list of ISO 3166-1 countries
|
131
|
+
# Enumerates the list of ISO 3166-1 countries, including name, country codes, and more.
|
132
|
+
# @param [Hash] opts the optional parameters
|
133
|
+
# @return [CountryListResult]
|
134
|
+
def address_country_list(opts = {})
|
135
|
+
data, _status_code, _headers = address_country_list_with_http_info(opts)
|
136
|
+
data
|
137
|
+
end
|
138
|
+
|
139
|
+
# Get a list of ISO 3166-1 countries
|
140
|
+
# Enumerates the list of ISO 3166-1 countries, including name, country codes, and more.
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [Array<(CountryListResult, Fixnum, Hash)>] CountryListResult data, response status code and response headers
|
143
|
+
def address_country_list_with_http_info(opts = {})
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_country_list ...'
|
146
|
+
end
|
147
|
+
# resource path
|
148
|
+
local_var_path = '/validate/address/country/list'
|
149
|
+
|
150
|
+
# query parameters
|
151
|
+
query_params = {}
|
152
|
+
|
153
|
+
# header parameters
|
154
|
+
header_params = {}
|
155
|
+
# HTTP header 'Accept' (if needed)
|
156
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
157
|
+
|
158
|
+
# form parameters
|
159
|
+
form_params = {}
|
160
|
+
|
161
|
+
# http body (model)
|
162
|
+
post_body = nil
|
163
|
+
auth_names = ['Apikey']
|
164
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
165
|
+
:header_params => header_params,
|
166
|
+
:query_params => query_params,
|
167
|
+
:form_params => form_params,
|
168
|
+
:body => post_body,
|
169
|
+
:auth_names => auth_names,
|
170
|
+
:return_type => 'CountryListResult')
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug "API called: AddressApi#address_country_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
173
|
+
end
|
174
|
+
return data, status_code, headers
|
175
|
+
end
|
176
|
+
# Get the currency of the input country
|
177
|
+
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
178
|
+
# @param input Input request
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @return [ValidateCountryResponse]
|
181
|
+
def address_get_country_currency(input, opts = {})
|
182
|
+
data, _status_code, _headers = address_get_country_currency_with_http_info(input, opts)
|
183
|
+
data
|
184
|
+
end
|
185
|
+
|
186
|
+
# Get the currency of the input country
|
187
|
+
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
188
|
+
# @param input Input request
|
189
|
+
# @param [Hash] opts the optional parameters
|
190
|
+
# @return [Array<(ValidateCountryResponse, Fixnum, Hash)>] ValidateCountryResponse data, response status code and response headers
|
191
|
+
def address_get_country_currency_with_http_info(input, opts = {})
|
192
|
+
if @api_client.config.debugging
|
193
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_get_country_currency ...'
|
194
|
+
end
|
195
|
+
# verify the required parameter 'input' is set
|
196
|
+
if @api_client.config.client_side_validation && input.nil?
|
197
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_country_currency"
|
198
|
+
end
|
199
|
+
# resource path
|
200
|
+
local_var_path = '/validate/address/country/get-currency'
|
201
|
+
|
202
|
+
# query parameters
|
203
|
+
query_params = {}
|
204
|
+
|
205
|
+
# header parameters
|
206
|
+
header_params = {}
|
207
|
+
# HTTP header 'Accept' (if needed)
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
209
|
+
# HTTP header 'Content-Type'
|
210
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
211
|
+
|
212
|
+
# form parameters
|
213
|
+
form_params = {}
|
214
|
+
|
215
|
+
# http body (model)
|
216
|
+
post_body = @api_client.object_to_http_body(input)
|
217
|
+
auth_names = ['Apikey']
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
219
|
+
:header_params => header_params,
|
220
|
+
:query_params => query_params,
|
221
|
+
:form_params => form_params,
|
222
|
+
:body => post_body,
|
223
|
+
:auth_names => auth_names,
|
224
|
+
:return_type => 'ValidateCountryResponse')
|
225
|
+
if @api_client.config.debugging
|
226
|
+
@api_client.config.logger.debug "API called: AddressApi#address_get_country_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
227
|
+
end
|
228
|
+
return data, status_code, headers
|
229
|
+
end
|
230
|
+
# Gets IANA/Olsen time zones for a country
|
231
|
+
# Gets the IANA/Olsen time zones for a country.
|
232
|
+
# @param input Input request
|
233
|
+
# @param [Hash] opts the optional parameters
|
234
|
+
# @return [GetTimezonesResponse]
|
235
|
+
def address_get_timezone(input, opts = {})
|
236
|
+
data, _status_code, _headers = address_get_timezone_with_http_info(input, opts)
|
237
|
+
data
|
238
|
+
end
|
239
|
+
|
240
|
+
# Gets IANA/Olsen time zones for a country
|
241
|
+
# Gets the IANA/Olsen time zones for a country.
|
242
|
+
# @param input Input request
|
243
|
+
# @param [Hash] opts the optional parameters
|
244
|
+
# @return [Array<(GetTimezonesResponse, Fixnum, Hash)>] GetTimezonesResponse data, response status code and response headers
|
245
|
+
def address_get_timezone_with_http_info(input, opts = {})
|
246
|
+
if @api_client.config.debugging
|
247
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_get_timezone ...'
|
248
|
+
end
|
249
|
+
# verify the required parameter 'input' is set
|
250
|
+
if @api_client.config.client_side_validation && input.nil?
|
251
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_timezone"
|
252
|
+
end
|
253
|
+
# resource path
|
254
|
+
local_var_path = '/validate/address/country/get-timezones'
|
255
|
+
|
256
|
+
# query parameters
|
257
|
+
query_params = {}
|
258
|
+
|
259
|
+
# header parameters
|
260
|
+
header_params = {}
|
261
|
+
# HTTP header 'Accept' (if needed)
|
262
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
263
|
+
# HTTP header 'Content-Type'
|
264
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
265
|
+
|
266
|
+
# form parameters
|
267
|
+
form_params = {}
|
268
|
+
|
269
|
+
# http body (model)
|
270
|
+
post_body = @api_client.object_to_http_body(input)
|
271
|
+
auth_names = ['Apikey']
|
272
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
273
|
+
:header_params => header_params,
|
274
|
+
:query_params => query_params,
|
275
|
+
:form_params => form_params,
|
276
|
+
:body => post_body,
|
277
|
+
:auth_names => auth_names,
|
278
|
+
:return_type => 'GetTimezonesResponse')
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "API called: AddressApi#address_get_timezone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
281
|
+
end
|
282
|
+
return data, status_code, headers
|
283
|
+
end
|
284
|
+
# Parse an unstructured input text string into an international, formatted address
|
285
|
+
# 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.
|
286
|
+
# @param input Input parse request
|
287
|
+
# @param [Hash] opts the optional parameters
|
288
|
+
# @return [ParseAddressResponse]
|
289
|
+
def address_parse_string(input, opts = {})
|
290
|
+
data, _status_code, _headers = address_parse_string_with_http_info(input, opts)
|
291
|
+
data
|
292
|
+
end
|
293
|
+
|
294
|
+
# Parse an unstructured input text string into an international, formatted address
|
295
|
+
# 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.
|
296
|
+
# @param input Input parse request
|
297
|
+
# @param [Hash] opts the optional parameters
|
298
|
+
# @return [Array<(ParseAddressResponse, Fixnum, Hash)>] ParseAddressResponse data, response status code and response headers
|
299
|
+
def address_parse_string_with_http_info(input, opts = {})
|
300
|
+
if @api_client.config.debugging
|
301
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_parse_string ...'
|
302
|
+
end
|
303
|
+
# verify the required parameter 'input' is set
|
304
|
+
if @api_client.config.client_side_validation && input.nil?
|
305
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_parse_string"
|
306
|
+
end
|
307
|
+
# resource path
|
308
|
+
local_var_path = '/validate/address/parse'
|
309
|
+
|
310
|
+
# query parameters
|
311
|
+
query_params = {}
|
312
|
+
|
313
|
+
# header parameters
|
314
|
+
header_params = {}
|
315
|
+
# HTTP header 'Accept' (if needed)
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
317
|
+
# HTTP header 'Content-Type'
|
318
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
319
|
+
|
320
|
+
# form parameters
|
321
|
+
form_params = {}
|
322
|
+
|
323
|
+
# http body (model)
|
324
|
+
post_body = @api_client.object_to_http_body(input)
|
325
|
+
auth_names = ['Apikey']
|
326
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
327
|
+
:header_params => header_params,
|
328
|
+
:query_params => query_params,
|
329
|
+
:form_params => form_params,
|
330
|
+
:body => post_body,
|
331
|
+
:auth_names => auth_names,
|
332
|
+
:return_type => 'ParseAddressResponse')
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug "API called: AddressApi#address_parse_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
|
+
end
|
336
|
+
return data, status_code, headers
|
337
|
+
end
|
338
|
+
# Validate a street address
|
339
|
+
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
|
340
|
+
# @param input Input parse request
|
341
|
+
# @param [Hash] opts the optional parameters
|
342
|
+
# @return [ValidateAddressResponse]
|
343
|
+
def address_validate_address(input, opts = {})
|
344
|
+
data, _status_code, _headers = address_validate_address_with_http_info(input, opts)
|
345
|
+
data
|
346
|
+
end
|
347
|
+
|
348
|
+
# Validate a street address
|
349
|
+
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
|
350
|
+
# @param input Input parse request
|
351
|
+
# @param [Hash] opts the optional parameters
|
352
|
+
# @return [Array<(ValidateAddressResponse, Fixnum, Hash)>] ValidateAddressResponse data, response status code and response headers
|
353
|
+
def address_validate_address_with_http_info(input, opts = {})
|
354
|
+
if @api_client.config.debugging
|
355
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_validate_address ...'
|
356
|
+
end
|
357
|
+
# verify the required parameter 'input' is set
|
358
|
+
if @api_client.config.client_side_validation && input.nil?
|
359
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_address"
|
360
|
+
end
|
361
|
+
# resource path
|
362
|
+
local_var_path = '/validate/address/street-address'
|
363
|
+
|
364
|
+
# query parameters
|
365
|
+
query_params = {}
|
366
|
+
|
367
|
+
# header parameters
|
368
|
+
header_params = {}
|
369
|
+
# HTTP header 'Accept' (if needed)
|
370
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
371
|
+
# HTTP header 'Content-Type'
|
372
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
373
|
+
|
374
|
+
# form parameters
|
375
|
+
form_params = {}
|
376
|
+
|
377
|
+
# http body (model)
|
378
|
+
post_body = @api_client.object_to_http_body(input)
|
379
|
+
auth_names = ['Apikey']
|
380
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
381
|
+
:header_params => header_params,
|
382
|
+
:query_params => query_params,
|
383
|
+
:form_params => form_params,
|
384
|
+
:body => post_body,
|
385
|
+
:auth_names => auth_names,
|
386
|
+
:return_type => 'ValidateAddressResponse')
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug "API called: AddressApi#address_validate_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
389
|
+
end
|
390
|
+
return data, status_code, headers
|
391
|
+
end
|
392
|
+
# Validate a City and State/Province combination, get location information about it
|
393
|
+
# 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. Supports all major international addresses.
|
394
|
+
# @param input Input parse request
|
395
|
+
# @param [Hash] opts the optional parameters
|
396
|
+
# @return [ValidateCityResponse]
|
397
|
+
def address_validate_city(input, opts = {})
|
398
|
+
data, _status_code, _headers = address_validate_city_with_http_info(input, opts)
|
399
|
+
data
|
400
|
+
end
|
401
|
+
|
402
|
+
# Validate a City and State/Province combination, get location information about it
|
403
|
+
# 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. Supports all major international addresses.
|
404
|
+
# @param input Input parse request
|
405
|
+
# @param [Hash] opts the optional parameters
|
406
|
+
# @return [Array<(ValidateCityResponse, Fixnum, Hash)>] ValidateCityResponse data, response status code and response headers
|
407
|
+
def address_validate_city_with_http_info(input, opts = {})
|
408
|
+
if @api_client.config.debugging
|
409
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_validate_city ...'
|
410
|
+
end
|
411
|
+
# verify the required parameter 'input' is set
|
412
|
+
if @api_client.config.client_side_validation && input.nil?
|
413
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_city"
|
414
|
+
end
|
415
|
+
# resource path
|
416
|
+
local_var_path = '/validate/address/city'
|
417
|
+
|
418
|
+
# query parameters
|
419
|
+
query_params = {}
|
420
|
+
|
421
|
+
# header parameters
|
422
|
+
header_params = {}
|
423
|
+
# HTTP header 'Accept' (if needed)
|
424
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
425
|
+
# HTTP header 'Content-Type'
|
426
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
427
|
+
|
428
|
+
# form parameters
|
429
|
+
form_params = {}
|
430
|
+
|
431
|
+
# http body (model)
|
432
|
+
post_body = @api_client.object_to_http_body(input)
|
433
|
+
auth_names = ['Apikey']
|
434
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
435
|
+
:header_params => header_params,
|
436
|
+
:query_params => query_params,
|
437
|
+
:form_params => form_params,
|
438
|
+
:body => post_body,
|
439
|
+
:auth_names => auth_names,
|
440
|
+
:return_type => 'ValidateCityResponse')
|
441
|
+
if @api_client.config.debugging
|
442
|
+
@api_client.config.logger.debug "API called: AddressApi#address_validate_city\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
443
|
+
end
|
444
|
+
return data, status_code, headers
|
445
|
+
end
|
446
|
+
# Validate a postal code, get location information about it
|
447
|
+
# Checks if the input postal code is valid, and returns information about it such as City, State and more. Supports all major countries.
|
448
|
+
# @param input Input parse request
|
449
|
+
# @param [Hash] opts the optional parameters
|
450
|
+
# @return [ValidatePostalCodeResponse]
|
451
|
+
def address_validate_postal_code(input, opts = {})
|
452
|
+
data, _status_code, _headers = address_validate_postal_code_with_http_info(input, opts)
|
453
|
+
data
|
454
|
+
end
|
455
|
+
|
456
|
+
# Validate a postal code, get location information about it
|
457
|
+
# Checks if the input postal code is valid, and returns information about it such as City, State and more. Supports all major countries.
|
458
|
+
# @param input Input parse request
|
459
|
+
# @param [Hash] opts the optional parameters
|
460
|
+
# @return [Array<(ValidatePostalCodeResponse, Fixnum, Hash)>] ValidatePostalCodeResponse data, response status code and response headers
|
461
|
+
def address_validate_postal_code_with_http_info(input, opts = {})
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_validate_postal_code ...'
|
464
|
+
end
|
465
|
+
# verify the required parameter 'input' is set
|
466
|
+
if @api_client.config.client_side_validation && input.nil?
|
467
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_postal_code"
|
468
|
+
end
|
469
|
+
# resource path
|
470
|
+
local_var_path = '/validate/address/postal-code'
|
471
|
+
|
472
|
+
# query parameters
|
473
|
+
query_params = {}
|
474
|
+
|
475
|
+
# header parameters
|
476
|
+
header_params = {}
|
477
|
+
# HTTP header 'Accept' (if needed)
|
478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
479
|
+
# HTTP header 'Content-Type'
|
480
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
481
|
+
|
482
|
+
# form parameters
|
483
|
+
form_params = {}
|
484
|
+
|
485
|
+
# http body (model)
|
486
|
+
post_body = @api_client.object_to_http_body(input)
|
487
|
+
auth_names = ['Apikey']
|
488
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
489
|
+
:header_params => header_params,
|
490
|
+
:query_params => query_params,
|
491
|
+
:form_params => form_params,
|
492
|
+
:body => post_body,
|
493
|
+
:auth_names => auth_names,
|
494
|
+
:return_type => 'ValidatePostalCodeResponse')
|
495
|
+
if @api_client.config.debugging
|
496
|
+
@api_client.config.logger.debug "API called: AddressApi#address_validate_postal_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
497
|
+
end
|
498
|
+
return data, status_code, headers
|
499
|
+
end
|
500
|
+
# Validate a state or province, name or abbreviation, get location information about it
|
501
|
+
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more. Supports all major countries.
|
502
|
+
# @param input Input parse request
|
503
|
+
# @param [Hash] opts the optional parameters
|
504
|
+
# @return [ValidateStateResponse]
|
505
|
+
def address_validate_state(input, opts = {})
|
506
|
+
data, _status_code, _headers = address_validate_state_with_http_info(input, opts)
|
507
|
+
data
|
508
|
+
end
|
509
|
+
|
510
|
+
# Validate a state or province, name or abbreviation, get location information about it
|
511
|
+
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more. Supports all major countries.
|
512
|
+
# @param input Input parse request
|
513
|
+
# @param [Hash] opts the optional parameters
|
514
|
+
# @return [Array<(ValidateStateResponse, Fixnum, Hash)>] ValidateStateResponse data, response status code and response headers
|
515
|
+
def address_validate_state_with_http_info(input, opts = {})
|
516
|
+
if @api_client.config.debugging
|
517
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_validate_state ...'
|
518
|
+
end
|
519
|
+
# verify the required parameter 'input' is set
|
520
|
+
if @api_client.config.client_side_validation && input.nil?
|
521
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_state"
|
522
|
+
end
|
523
|
+
# resource path
|
524
|
+
local_var_path = '/validate/address/state'
|
525
|
+
|
526
|
+
# query parameters
|
527
|
+
query_params = {}
|
528
|
+
|
529
|
+
# header parameters
|
530
|
+
header_params = {}
|
531
|
+
# HTTP header 'Accept' (if needed)
|
532
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
533
|
+
# HTTP header 'Content-Type'
|
534
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
535
|
+
|
536
|
+
# form parameters
|
537
|
+
form_params = {}
|
538
|
+
|
539
|
+
# http body (model)
|
540
|
+
post_body = @api_client.object_to_http_body(input)
|
541
|
+
auth_names = ['Apikey']
|
542
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
543
|
+
:header_params => header_params,
|
544
|
+
:query_params => query_params,
|
545
|
+
:form_params => form_params,
|
546
|
+
:body => post_body,
|
547
|
+
:auth_names => auth_names,
|
548
|
+
:return_type => 'ValidateStateResponse')
|
549
|
+
if @api_client.config.debugging
|
550
|
+
@api_client.config.logger.debug "API called: AddressApi#address_validate_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
551
|
+
end
|
552
|
+
return data, status_code, headers
|
553
|
+
end
|
554
|
+
end
|
555
|
+
end
|