cloudmersive-validate-api-client 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +118 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-validate-api-client.gemspec +45 -0
  6. data/docs/AddressGetServersResponse.md +9 -0
  7. data/docs/AddressVerifySyntaxOnlyResponse.md +8 -0
  8. data/docs/CheckResponse.md +8 -0
  9. data/docs/DomainApi.md +118 -0
  10. data/docs/EmailApi.md +173 -0
  11. data/docs/FullEmailValidationResponse.md +9 -0
  12. data/docs/GeolocateResponse.md +16 -0
  13. data/docs/IPAddressApi.md +63 -0
  14. data/docs/PhoneNumberApi.md +63 -0
  15. data/docs/PhoneNumberValidateRequest.md +9 -0
  16. data/docs/PhoneNumberValidationResponse.md +15 -0
  17. data/docs/VatApi.md +63 -0
  18. data/docs/VatLookupRequest.md +8 -0
  19. data/docs/VatLookupResponse.md +12 -0
  20. data/docs/WhoisResponse.md +11 -0
  21. data/git_push.sh +55 -0
  22. data/lib/cloudmersive-validate-api-client.rb +54 -0
  23. data/lib/cloudmersive-validate-api-client/api/domain_api.rb +133 -0
  24. data/lib/cloudmersive-validate-api-client/api/email_api.rb +188 -0
  25. data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +78 -0
  26. data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +78 -0
  27. data/lib/cloudmersive-validate-api-client/api/vat_api.rb +78 -0
  28. data/lib/cloudmersive-validate-api-client/api_client.rb +389 -0
  29. data/lib/cloudmersive-validate-api-client/api_error.rb +38 -0
  30. data/lib/cloudmersive-validate-api-client/configuration.rb +209 -0
  31. data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +199 -0
  32. data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +189 -0
  33. data/lib/cloudmersive-validate-api-client/models/check_response.rb +189 -0
  34. data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +199 -0
  35. data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +269 -0
  36. data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +199 -0
  37. data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +259 -0
  38. data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +188 -0
  39. data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +224 -0
  40. data/lib/cloudmersive-validate-api-client/models/whois_response.rb +219 -0
  41. data/lib/cloudmersive-validate-api-client/version.rb +15 -0
  42. data/spec/api/domain_api_spec.rb +59 -0
  43. data/spec/api/email_api_spec.rb +71 -0
  44. data/spec/api/ip_address_api_spec.rb +47 -0
  45. data/spec/api/phone_number_api_spec.rb +47 -0
  46. data/spec/api/vat_api_spec.rb +47 -0
  47. data/spec/api_client_spec.rb +226 -0
  48. data/spec/configuration_spec.rb +42 -0
  49. data/spec/models/address_get_servers_response_spec.rb +48 -0
  50. data/spec/models/address_verify_syntax_only_response_spec.rb +42 -0
  51. data/spec/models/check_response_spec.rb +42 -0
  52. data/spec/models/full_email_validation_response_spec.rb +48 -0
  53. data/spec/models/geolocate_response_spec.rb +90 -0
  54. data/spec/models/phone_number_validate_request_spec.rb +48 -0
  55. data/spec/models/phone_number_validation_response_spec.rb +84 -0
  56. data/spec/models/vat_lookup_request_spec.rb +42 -0
  57. data/spec/models/vat_lookup_response_spec.rb +66 -0
  58. data/spec/models/whois_response_spec.rb +60 -0
  59. data/spec/spec_helper.rb +111 -0
  60. metadata +284 -0
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::FullEmailValidationResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **valid_address** | **BOOLEAN** | True if the email address is valid, false otherwise | [optional]
7
+ **mail_server_used_for_validation** | **String** | Email server connected to for verification | [optional]
8
+
9
+
@@ -0,0 +1,16 @@
1
+ # CloudmersiveValidateApiClient::GeolocateResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **country_code** | **String** | Two-letter country code of IP address | [optional]
7
+ **country_name** | **String** | Country name of IP address | [optional]
8
+ **city** | **String** | City of IP address | [optional]
9
+ **region_code** | **String** | State/region code of IP address | [optional]
10
+ **region_name** | **String** | State/region of IP address | [optional]
11
+ **zip_code** | **String** | Zip or postal code of IP address | [optional]
12
+ **timezone_standard_name** | **String** | Timezone of IP address | [optional]
13
+ **latitude** | **Float** | Latitude of IP address | [optional]
14
+ **longitude** | **Float** | Longitude of IP address | [optional]
15
+
16
+
@@ -0,0 +1,63 @@
1
+ # CloudmersiveValidateApiClient::IPAddressApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**i_p_address_post**](IPAddressApi.md#i_p_address_post) | **POST** /validate/ip/geolocate | Geolocate an IP address
8
+
9
+
10
+ # **i_p_address_post**
11
+ > GeolocateResponse i_p_address_post(value)
12
+
13
+ Geolocate an IP address
14
+
15
+ Identify an IP address Country, State/Provence, City, Zip/Postal Code, etc. Useful for security and UX applications.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'cloudmersive-validate-api-client'
21
+ # setup authorization
22
+ CloudmersiveValidateApiClient.configure do |config|
23
+ # Configure API key authorization: Apikey
24
+ config.api_key['Apikey'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ #config.api_key_prefix['Apikey'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = CloudmersiveValidateApiClient::IPAddressApi.new
30
+
31
+ value = "value_example" # String | IP address to geolocate, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
32
+
33
+
34
+ begin
35
+ #Geolocate an IP address
36
+ result = api_instance.i_p_address_post(value)
37
+ p result
38
+ rescue CloudmersiveValidateApiClient::ApiError => e
39
+ puts "Exception when calling IPAddressApi->i_p_address_post: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **value** | **String**| IP address to geolocate, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes. |
48
+
49
+ ### Return type
50
+
51
+ [**GeolocateResponse**](GeolocateResponse.md)
52
+
53
+ ### Authorization
54
+
55
+ [Apikey](../README.md#Apikey)
56
+
57
+ ### HTTP request headers
58
+
59
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
60
+ - **Accept**: application/json, text/json, application/xml, text/xml
61
+
62
+
63
+
@@ -0,0 +1,63 @@
1
+ # CloudmersiveValidateApiClient::PhoneNumberApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**phone_number_syntax_only**](PhoneNumberApi.md#phone_number_syntax_only) | **POST** /validate/phonenumber/basic | Validate phone number (basic)
8
+
9
+
10
+ # **phone_number_syntax_only**
11
+ > PhoneNumberValidationResponse phone_number_syntax_only(value)
12
+
13
+ Validate phone number (basic)
14
+
15
+ Validate a phone number by analyzing the syntax
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'cloudmersive-validate-api-client'
21
+ # setup authorization
22
+ CloudmersiveValidateApiClient.configure do |config|
23
+ # Configure API key authorization: Apikey
24
+ config.api_key['Apikey'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ #config.api_key_prefix['Apikey'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = CloudmersiveValidateApiClient::PhoneNumberApi.new
30
+
31
+ value = CloudmersiveValidateApiClient::PhoneNumberValidateRequest.new # PhoneNumberValidateRequest | Phone number to validate in a PhoneNumberValidateRequest object. Try a phone number such as \"1.800.463.3339\", and either leave DefaultCountryCode blank or use \"US\".
32
+
33
+
34
+ begin
35
+ #Validate phone number (basic)
36
+ result = api_instance.phone_number_syntax_only(value)
37
+ p result
38
+ rescue CloudmersiveValidateApiClient::ApiError => e
39
+ puts "Exception when calling PhoneNumberApi->phone_number_syntax_only: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **value** | [**PhoneNumberValidateRequest**](PhoneNumberValidateRequest.md)| Phone number to validate in a PhoneNumberValidateRequest object. Try a phone number such as \"1.800.463.3339\", and either leave DefaultCountryCode blank or use \"US\". |
48
+
49
+ ### Return type
50
+
51
+ [**PhoneNumberValidationResponse**](PhoneNumberValidationResponse.md)
52
+
53
+ ### Authorization
54
+
55
+ [Apikey](../README.md#Apikey)
56
+
57
+ ### HTTP request headers
58
+
59
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
60
+ - **Accept**: application/json, text/json, application/xml, text/xml
61
+
62
+
63
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::PhoneNumberValidateRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **phone_number** | **String** | Raw phone number string to parse as input for validation | [optional]
7
+ **default_country_code** | **String** | Optional, default country code. If left blank, will default to \"US\". | [optional]
8
+
9
+
@@ -0,0 +1,15 @@
1
+ # CloudmersiveValidateApiClient::PhoneNumberValidationResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **is_valid** | **BOOLEAN** | True if the phone number is valid, false otherwise | [optional]
7
+ **successful** | **BOOLEAN** | True if the operation was successful, false if there was an error during validation. See IsValid for validation result. | [optional]
8
+ **phone_number_type** | **String** | Type of phone number; possible values are: FixedLine, Mobile, FixedLineOrMobile, TollFree, PremiumRate, SharedCost, Voip, PersonalNumber, Pager, Uan, Voicemail, Unknown | [optional]
9
+ **e164_format** | **String** | E.164 format of the phone number | [optional]
10
+ **international_format** | **String** | Internaltional format of the phone number | [optional]
11
+ **national_format** | **String** | National format of the phone number | [optional]
12
+ **country_code** | **String** | Two digit country code of the phone number | [optional]
13
+ **country_name** | **String** | User-friendly long name of the country for the phone number | [optional]
14
+
15
+
data/docs/VatApi.md ADDED
@@ -0,0 +1,63 @@
1
+ # CloudmersiveValidateApiClient::VatApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**vat_vat_lookup**](VatApi.md#vat_vat_lookup) | **POST** /validate/vat/lookup | Lookup a VAT code
8
+
9
+
10
+ # **vat_vat_lookup**
11
+ > VatLookupResponse vat_vat_lookup(input)
12
+
13
+ Lookup a VAT code
14
+
15
+ Checks if a VAT code is valid, and if it is, returns more information about it
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'cloudmersive-validate-api-client'
21
+ # setup authorization
22
+ CloudmersiveValidateApiClient.configure do |config|
23
+ # Configure API key authorization: Apikey
24
+ config.api_key['Apikey'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ #config.api_key_prefix['Apikey'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = CloudmersiveValidateApiClient::VatApi.new
30
+
31
+ input = CloudmersiveValidateApiClient::VatLookupRequest.new # VatLookupRequest | Input VAT code
32
+
33
+
34
+ begin
35
+ #Lookup a VAT code
36
+ result = api_instance.vat_vat_lookup(input)
37
+ p result
38
+ rescue CloudmersiveValidateApiClient::ApiError => e
39
+ puts "Exception when calling VatApi->vat_vat_lookup: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **input** | [**VatLookupRequest**](VatLookupRequest.md)| Input VAT code |
48
+
49
+ ### Return type
50
+
51
+ [**VatLookupResponse**](VatLookupResponse.md)
52
+
53
+ ### Authorization
54
+
55
+ [Apikey](../README.md#Apikey)
56
+
57
+ ### HTTP request headers
58
+
59
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
60
+ - **Accept**: application/json, text/json, application/xml, text/xml
61
+
62
+
63
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::VatLookupRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **vat_code** | **String** | | [optional]
7
+
8
+
@@ -0,0 +1,12 @@
1
+ # CloudmersiveValidateApiClient::VatLookupResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **country_code** | **String** | | [optional]
7
+ **vat_number** | **String** | | [optional]
8
+ **is_valid** | **BOOLEAN** | | [optional]
9
+ **business_name** | **String** | | [optional]
10
+ **business_address** | **String** | | [optional]
11
+
12
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveValidateApiClient::WhoisResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **valid_domain** | **BOOLEAN** | True if the domain is valid, false if it is not | [optional]
7
+ **whois_server** | **String** | Server used to lookup WHOIS information (may change based on lookup). | [optional]
8
+ **raw_text_record** | **String** | WHOIS raw text record | [optional]
9
+ **created_dt** | **DateTime** | Creation date for the record | [optional]
10
+
11
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,54 @@
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: unset
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'cloudmersive-validate-api-client/api_client'
15
+ require 'cloudmersive-validate-api-client/api_error'
16
+ require 'cloudmersive-validate-api-client/version'
17
+ require 'cloudmersive-validate-api-client/configuration'
18
+
19
+ # Models
20
+ require 'cloudmersive-validate-api-client/models/address_get_servers_response'
21
+ require 'cloudmersive-validate-api-client/models/address_verify_syntax_only_response'
22
+ require 'cloudmersive-validate-api-client/models/check_response'
23
+ require 'cloudmersive-validate-api-client/models/full_email_validation_response'
24
+ require 'cloudmersive-validate-api-client/models/geolocate_response'
25
+ require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
26
+ require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
27
+ require 'cloudmersive-validate-api-client/models/vat_lookup_request'
28
+ require 'cloudmersive-validate-api-client/models/vat_lookup_response'
29
+ require 'cloudmersive-validate-api-client/models/whois_response'
30
+
31
+ # APIs
32
+ require 'cloudmersive-validate-api-client/api/domain_api'
33
+ require 'cloudmersive-validate-api-client/api/email_api'
34
+ require 'cloudmersive-validate-api-client/api/ip_address_api'
35
+ require 'cloudmersive-validate-api-client/api/phone_number_api'
36
+ require 'cloudmersive-validate-api-client/api/vat_api'
37
+
38
+ module CloudmersiveValidateApiClient
39
+ class << self
40
+ # Customize default settings for the SDK using block.
41
+ # CloudmersiveValidateApiClient.configure do |config|
42
+ # config.username = "xxx"
43
+ # config.password = "xxx"
44
+ # end
45
+ # If no block given, return the default Configuration object.
46
+ def configure
47
+ if block_given?
48
+ yield(Configuration.default)
49
+ else
50
+ Configuration.default
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,133 @@
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: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveValidateApiClient
16
+ class DomainApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Validate a domain name
24
+ # Check whether a domain name is valid or not. API performs a live validation by contacting DNS services to validate the existence of the domain name.
25
+ # @param domain Domain name to check, for example \&quot;cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [CheckResponse]
28
+ def domain_check(domain, opts = {})
29
+ data, _status_code, _headers = domain_check_with_http_info(domain, opts)
30
+ return data
31
+ end
32
+
33
+ # Validate a domain name
34
+ # Check whether a domain name is valid or not. API performs a live validation by contacting DNS services to validate the existence of the domain name.
35
+ # @param domain Domain name to check, for example \&quot;cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(CheckResponse, Fixnum, Hash)>] CheckResponse data, response status code and response headers
38
+ def domain_check_with_http_info(domain, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: DomainApi.domain_check ..."
41
+ end
42
+ # verify the required parameter 'domain' is set
43
+ if @api_client.config.client_side_validation && domain.nil?
44
+ fail ArgumentError, "Missing the required parameter 'domain' when calling DomainApi.domain_check"
45
+ end
46
+ # resource path
47
+ local_var_path = "/validate/domain/check"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(domain)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'CheckResponse')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: DomainApi#domain_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Get WHOIS information for a domain
79
+ # Validate whether a domain name exists, and also return the full WHOIS record for that domain name. WHOIS records include all the registration details of the domain name, such as information about the domain's owners.
80
+ # @param domain Domain name to check, for example \&quot;cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [WhoisResponse]
83
+ def domain_post(domain, opts = {})
84
+ data, _status_code, _headers = domain_post_with_http_info(domain, opts)
85
+ return data
86
+ end
87
+
88
+ # Get WHOIS information for a domain
89
+ # Validate whether a domain name exists, and also return the full WHOIS record for that domain name. WHOIS records include all the registration details of the domain name, such as information about the domain&#39;s owners.
90
+ # @param domain Domain name to check, for example \&quot;cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(WhoisResponse, Fixnum, Hash)>] WhoisResponse data, response status code and response headers
93
+ def domain_post_with_http_info(domain, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "Calling API: DomainApi.domain_post ..."
96
+ end
97
+ # verify the required parameter 'domain' is set
98
+ if @api_client.config.client_side_validation && domain.nil?
99
+ fail ArgumentError, "Missing the required parameter 'domain' when calling DomainApi.domain_post"
100
+ end
101
+ # resource path
102
+ local_var_path = "/validate/domain/whois"
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = @api_client.object_to_http_body(domain)
119
+ auth_names = ['Apikey']
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'WhoisResponse')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: DomainApi#domain_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ end
133
+ end