class CloudmersiveValidateApiClient::AddressApi
Attributes
Public Class Methods
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Check if a country is a member of the European Union (EU) Checks if the input country is a member of the European Union or not. @param input Input request @param [Hash] opts the optional parameters @return [ValidateCountryResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 27 def address_check_eu_membership(input, opts = {}) data, _status_code, _headers = address_check_eu_membership_with_http_info(input, opts) data end
Check if a country is a member of the European Union (EU) Checks if the input country is a member of the European Union or not. @param input Input request @param [Hash] opts the optional parameters @return [Array<(ValidateCountryResponse
, Fixnum, Hash)>] ValidateCountryResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 37 def address_check_eu_membership_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_check_eu_membership ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_check_eu_membership" end # resource path local_var_path = '/validate/address/country/check-eu-membership' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateCountryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_check_eu_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Validate and normalize country information, return ISO 3166-1 country codes and country name 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. @param input Input request @param [Hash] opts the optional parameters @return [ValidateCountryResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 81 def address_country(input, opts = {}) data, _status_code, _headers = address_country_with_http_info(input, opts) data end
Get a list of ISO 3166-1 countries Enumerates the list of ISO 3166-1 countries, including name, country codes, and more. @param [Hash] opts the optional parameters @return [CountryListResult]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 134 def address_country_list(opts = {}) data, _status_code, _headers = address_country_list_with_http_info(opts) data end
Get a list of ISO 3166-1 countries Enumerates the list of ISO 3166-1 countries, including name, country codes, and more. @param [Hash] opts the optional parameters @return [Array<(CountryListResult
, Fixnum, Hash)>] CountryListResult
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 143 def address_country_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_country_list ...' end # resource path local_var_path = '/validate/address/country/list' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CountryListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_country_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Validate and normalize country information, return ISO 3166-1 country codes and country name 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. @param input Input request @param [Hash] opts the optional parameters @return [Array<(ValidateCountryResponse
, Fixnum, Hash)>] ValidateCountryResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 91 def address_country_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_country ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_country" end # resource path local_var_path = '/validate/address/country' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateCountryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_country\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Geocode a street address into latitude and longitude Geocodes a street address into latitude and longitude. @param input Input parse request @param [Hash] opts the optional parameters @return [ValidateAddressResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 181 def address_geocode(input, opts = {}) data, _status_code, _headers = address_geocode_with_http_info(input, opts) data end
Geocode a street address into latitude and longitude Geocodes a street address into latitude and longitude. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(ValidateAddressResponse
, Fixnum, Hash)>] ValidateAddressResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 191 def address_geocode_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_geocode ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_geocode" end # resource path local_var_path = '/validate/address/geocode' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateAddressResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_geocode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the currency of the input country Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name. @param input Input request @param [Hash] opts the optional parameters @return [ValidateCountryResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 235 def address_get_country_currency(input, opts = {}) data, _status_code, _headers = address_get_country_currency_with_http_info(input, opts) data end
Get the currency of the input country Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name. @param input Input request @param [Hash] opts the optional parameters @return [Array<(ValidateCountryResponse
, Fixnum, Hash)>] ValidateCountryResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 245 def address_get_country_currency_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_get_country_currency ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_country_currency" end # resource path local_var_path = '/validate/address/country/get-currency' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateCountryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_get_country_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the region, subregion and continent of the country Gets the continent information including region and subregion for the input country. @param input Input request @param [Hash] opts the optional parameters @return [ValidateCountryResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 289 def address_get_country_region(input, opts = {}) data, _status_code, _headers = address_get_country_region_with_http_info(input, opts) data end
Get the region, subregion and continent of the country Gets the continent information including region and subregion for the input country. @param input Input request @param [Hash] opts the optional parameters @return [Array<(ValidateCountryResponse
, Fixnum, Hash)>] ValidateCountryResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 299 def address_get_country_region_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_get_country_region ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_country_region" end # resource path local_var_path = '/validate/address/country/get-region' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateCountryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_get_country_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets IANA/Olsen time zones for a country Gets the IANA/Olsen time zones for a country. @param input Input request @param [Hash] opts the optional parameters @return [GetTimezonesResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 343 def address_get_timezone(input, opts = {}) data, _status_code, _headers = address_get_timezone_with_http_info(input, opts) data end
Gets IANA/Olsen time zones for a country Gets the IANA/Olsen time zones for a country. @param input Input request @param [Hash] opts the optional parameters @return [Array<(GetTimezonesResponse
, Fixnum, Hash)>] GetTimezonesResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 353 def address_get_timezone_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_get_timezone ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_timezone" end # resource path local_var_path = '/validate/address/country/get-timezones' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetTimezonesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_get_timezone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Normalize a street address Normalizes 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. @param input Input parse request @param [Hash] opts the optional parameters @return [NormalizeAddressResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 397 def address_normalize_address(input, opts = {}) data, _status_code, _headers = address_normalize_address_with_http_info(input, opts) data end
Normalize a street address Normalizes 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. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(NormalizeAddressResponse
, Fixnum, Hash)>] NormalizeAddressResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 407 def address_normalize_address_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_normalize_address ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_normalize_address" end # resource path local_var_path = '/validate/address/street-address/normalize' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NormalizeAddressResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_normalize_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Parse an unstructured input text string into an international, formatted address 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. @param input Input parse request @param [Hash] opts the optional parameters @return [ParseAddressResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 451 def address_parse_string(input, opts = {}) data, _status_code, _headers = address_parse_string_with_http_info(input, opts) data end
Parse an unstructured input text string into an international, formatted address 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. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(ParseAddressResponse
, Fixnum, Hash)>] ParseAddressResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 461 def address_parse_string_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_parse_string ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_parse_string" end # resource path local_var_path = '/validate/address/parse' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ParseAddressResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_parse_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Reverse geocode a lattitude and longitude into an address Converts lattitude and longitude coordinates into an address through reverse-geocoding. @param input Input reverse geocoding request @param [Hash] opts the optional parameters @return [ReverseGeocodeAddressResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 505 def address_reverse_geocode_address(input, opts = {}) data, _status_code, _headers = address_reverse_geocode_address_with_http_info(input, opts) data end
Reverse geocode a lattitude and longitude into an address Converts lattitude and longitude coordinates into an address through reverse-geocoding. @param input Input reverse geocoding request @param [Hash] opts the optional parameters @return [Array<(ReverseGeocodeAddressResponse
, Fixnum, Hash)>] ReverseGeocodeAddressResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 515 def address_reverse_geocode_address_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_reverse_geocode_address ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_reverse_geocode_address" end # resource path local_var_path = '/validate/address/geocode/reverse' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ReverseGeocodeAddressResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_reverse_geocode_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Validate a street address 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. @param input Input parse request @param [Hash] opts the optional parameters @return [ValidateAddressResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 559 def address_validate_address(input, opts = {}) data, _status_code, _headers = address_validate_address_with_http_info(input, opts) data end
Validate a street address 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. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(ValidateAddressResponse
, Fixnum, Hash)>] ValidateAddressResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 569 def address_validate_address_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_address ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_address" end # resource path local_var_path = '/validate/address/street-address' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateAddressResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_validate_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Validate a City and State/Province combination, get location information about it 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. @param input Input parse request @param [Hash] opts the optional parameters @return [ValidateCityResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 613 def address_validate_city(input, opts = {}) data, _status_code, _headers = address_validate_city_with_http_info(input, opts) data end
Validate a City and State/Province combination, get location information about it 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. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(ValidateCityResponse
, Fixnum, Hash)>] ValidateCityResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 623 def address_validate_city_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_city ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_city" end # resource path local_var_path = '/validate/address/city' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateCityResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_validate_city\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Validate a postal code, get location information about it Checks if the input postal code is valid, and returns information about it such as City, State and more. Supports all major countries. @param input Input parse request @param [Hash] opts the optional parameters @return [ValidatePostalCodeResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 667 def address_validate_postal_code(input, opts = {}) data, _status_code, _headers = address_validate_postal_code_with_http_info(input, opts) data end
Validate a postal code, get location information about it Checks if the input postal code is valid, and returns information about it such as City, State and more. Supports all major countries. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(ValidatePostalCodeResponse
, Fixnum, Hash)>] ValidatePostalCodeResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 677 def address_validate_postal_code_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_postal_code ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_postal_code" end # resource path local_var_path = '/validate/address/postal-code' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidatePostalCodeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_validate_postal_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Validate a state or province, name or abbreviation, get location information about it 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. @param input Input parse request @param [Hash] opts the optional parameters @return [ValidateStateResponse]
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 721 def address_validate_state(input, opts = {}) data, _status_code, _headers = address_validate_state_with_http_info(input, opts) data end
Validate a state or province, name or abbreviation, get location information about it 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. @param input Input parse request @param [Hash] opts the optional parameters @return [Array<(ValidateStateResponse
, Fixnum, Hash)>] ValidateStateResponse
data, response status code and response headers
# File lib/cloudmersive-validate-api-client/api/address_api.rb, line 731 def address_validate_state_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_state ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_validate_state" end # resource path local_var_path = '/validate/address/state' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ValidateStateResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AddressApi#address_validate_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end