cloudmersive-validate-api-client 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/README.md +171 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-validate-api-client.gemspec +45 -0
  6. data/docs/AddressApi.md +497 -0
  7. data/docs/AddressGetServersResponse.md +9 -0
  8. data/docs/AddressVerifySyntaxOnlyResponse.md +11 -0
  9. data/docs/CheckResponse.md +8 -0
  10. data/docs/CountryDetails.md +11 -0
  11. data/docs/CountryListResult.md +9 -0
  12. data/docs/DomainApi.md +228 -0
  13. data/docs/EmailApi.md +173 -0
  14. data/docs/FirstNameValidationRequest.md +8 -0
  15. data/docs/FirstNameValidationResponse.md +9 -0
  16. data/docs/FullEmailValidationResponse.md +16 -0
  17. data/docs/FullNameValidationRequest.md +8 -0
  18. data/docs/FullNameValidationResponse.md +17 -0
  19. data/docs/GeolocateResponse.md +16 -0
  20. data/docs/GetGenderRequest.md +9 -0
  21. data/docs/GetGenderResponse.md +9 -0
  22. data/docs/GetTimezonesRequest.md +8 -0
  23. data/docs/GetTimezonesResponse.md +13 -0
  24. data/docs/IPAddressApi.md +63 -0
  25. data/docs/LastNameValidationRequest.md +8 -0
  26. data/docs/LastNameValidationResponse.md +9 -0
  27. data/docs/LeadEnrichmentApi.md +61 -0
  28. data/docs/LeadEnrichmentRequest.md +21 -0
  29. data/docs/LeadEnrichmentResponse.md +25 -0
  30. data/docs/NameApi.md +283 -0
  31. data/docs/ParseAddressRequest.md +9 -0
  32. data/docs/ParseAddressResponse.md +16 -0
  33. data/docs/PhoneNumberApi.md +63 -0
  34. data/docs/PhoneNumberValidateRequest.md +9 -0
  35. data/docs/PhoneNumberValidationResponse.md +15 -0
  36. data/docs/Timezone.md +10 -0
  37. data/docs/UserAgentApi.md +63 -0
  38. data/docs/UserAgentValidateRequest.md +8 -0
  39. data/docs/UserAgentValidateResponse.md +21 -0
  40. data/docs/ValidateAddressRequest.md +13 -0
  41. data/docs/ValidateAddressResponse.md +10 -0
  42. data/docs/ValidateCityRequest.md +11 -0
  43. data/docs/ValidateCityResponse.md +12 -0
  44. data/docs/ValidateCountryRequest.md +8 -0
  45. data/docs/ValidateCountryResponse.md +14 -0
  46. data/docs/ValidateIdentifierRequest.md +15 -0
  47. data/docs/ValidateIdentifierResponse.md +9 -0
  48. data/docs/ValidatePostalCodeRequest.md +10 -0
  49. data/docs/ValidatePostalCodeResponse.md +12 -0
  50. data/docs/ValidateStateRequest.md +10 -0
  51. data/docs/ValidateStateResponse.md +11 -0
  52. data/docs/ValidateUrlRequestFull.md +8 -0
  53. data/docs/ValidateUrlRequestSyntaxOnly.md +8 -0
  54. data/docs/ValidateUrlResponseFull.md +12 -0
  55. data/docs/ValidateUrlResponseSyntaxOnly.md +9 -0
  56. data/docs/VatApi.md +63 -0
  57. data/docs/VatLookupRequest.md +8 -0
  58. data/docs/VatLookupResponse.md +19 -0
  59. data/docs/WhoisResponse.md +22 -0
  60. data/git_push.sh +55 -0
  61. data/lib/cloudmersive-validate-api-client.rb +93 -0
  62. data/lib/cloudmersive-validate-api-client/api/address_api.rb +501 -0
  63. data/lib/cloudmersive-validate-api-client/api/domain_api.rb +239 -0
  64. data/lib/cloudmersive-validate-api-client/api/email_api.rb +185 -0
  65. data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +77 -0
  66. data/lib/cloudmersive-validate-api-client/api/lead_enrichment_api.rb +75 -0
  67. data/lib/cloudmersive-validate-api-client/api/name_api.rb +293 -0
  68. data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +77 -0
  69. data/lib/cloudmersive-validate-api-client/api/user_agent_api.rb +77 -0
  70. data/lib/cloudmersive-validate-api-client/api/vat_api.rb +77 -0
  71. data/lib/cloudmersive-validate-api-client/api_client.rb +391 -0
  72. data/lib/cloudmersive-validate-api-client/api_error.rb +38 -0
  73. data/lib/cloudmersive-validate-api-client/configuration.rb +209 -0
  74. data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +198 -0
  75. data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +216 -0
  76. data/lib/cloudmersive-validate-api-client/models/check_response.rb +186 -0
  77. data/lib/cloudmersive-validate-api-client/models/country_details.rb +216 -0
  78. data/lib/cloudmersive-validate-api-client/models/country_list_result.rb +198 -0
  79. data/lib/cloudmersive-validate-api-client/models/first_name_validation_request.rb +186 -0
  80. data/lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb +196 -0
  81. data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +266 -0
  82. data/lib/cloudmersive-validate-api-client/models/full_name_validation_request.rb +186 -0
  83. data/lib/cloudmersive-validate-api-client/models/full_name_validation_response.rb +276 -0
  84. data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +266 -0
  85. data/lib/cloudmersive-validate-api-client/models/get_gender_request.rb +196 -0
  86. data/lib/cloudmersive-validate-api-client/models/get_gender_response.rb +196 -0
  87. data/lib/cloudmersive-validate-api-client/models/get_timezones_request.rb +186 -0
  88. data/lib/cloudmersive-validate-api-client/models/get_timezones_response.rb +238 -0
  89. data/lib/cloudmersive-validate-api-client/models/last_name_validation_request.rb +186 -0
  90. data/lib/cloudmersive-validate-api-client/models/last_name_validation_response.rb +196 -0
  91. data/lib/cloudmersive-validate-api-client/models/lead_enrichment_request.rb +316 -0
  92. data/lib/cloudmersive-validate-api-client/models/lead_enrichment_response.rb +356 -0
  93. data/lib/cloudmersive-validate-api-client/models/parse_address_request.rb +196 -0
  94. data/lib/cloudmersive-validate-api-client/models/parse_address_response.rb +266 -0
  95. data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +196 -0
  96. data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +256 -0
  97. data/lib/cloudmersive-validate-api-client/models/timezone.rb +206 -0
  98. data/lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb +186 -0
  99. data/lib/cloudmersive-validate-api-client/models/user_agent_validate_response.rb +316 -0
  100. data/lib/cloudmersive-validate-api-client/models/validate_address_request.rb +236 -0
  101. data/lib/cloudmersive-validate-api-client/models/validate_address_response.rb +206 -0
  102. data/lib/cloudmersive-validate-api-client/models/validate_city_request.rb +216 -0
  103. data/lib/cloudmersive-validate-api-client/models/validate_city_response.rb +226 -0
  104. data/lib/cloudmersive-validate-api-client/models/validate_country_request.rb +186 -0
  105. data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +248 -0
  106. data/lib/cloudmersive-validate-api-client/models/validate_identifier_request.rb +256 -0
  107. data/lib/cloudmersive-validate-api-client/models/validate_identifier_response.rb +196 -0
  108. data/lib/cloudmersive-validate-api-client/models/validate_postal_code_request.rb +206 -0
  109. data/lib/cloudmersive-validate-api-client/models/validate_postal_code_response.rb +226 -0
  110. data/lib/cloudmersive-validate-api-client/models/validate_state_request.rb +206 -0
  111. data/lib/cloudmersive-validate-api-client/models/validate_state_response.rb +216 -0
  112. data/lib/cloudmersive-validate-api-client/models/validate_url_request_full.rb +186 -0
  113. data/lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb +186 -0
  114. data/lib/cloudmersive-validate-api-client/models/validate_url_response_full.rb +226 -0
  115. data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +196 -0
  116. data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +186 -0
  117. data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +295 -0
  118. data/lib/cloudmersive-validate-api-client/models/whois_response.rb +326 -0
  119. data/lib/cloudmersive-validate-api-client/version.rb +15 -0
  120. data/spec/api/address_api_spec.rb +142 -0
  121. data/spec/api/domain_api_spec.rb +83 -0
  122. data/spec/api/email_api_spec.rb +71 -0
  123. data/spec/api/ip_address_api_spec.rb +47 -0
  124. data/spec/api/lead_enrichment_api_spec.rb +46 -0
  125. data/spec/api/name_api_spec.rb +95 -0
  126. data/spec/api/phone_number_api_spec.rb +47 -0
  127. data/spec/api/user_agent_api_spec.rb +47 -0
  128. data/spec/api/vat_api_spec.rb +47 -0
  129. data/spec/api_client_spec.rb +243 -0
  130. data/spec/configuration_spec.rb +42 -0
  131. data/spec/models/address_get_servers_response_spec.rb +47 -0
  132. data/spec/models/address_verify_syntax_only_response_spec.rb +59 -0
  133. data/spec/models/check_response_spec.rb +41 -0
  134. data/spec/models/country_details_spec.rb +59 -0
  135. data/spec/models/country_list_result_spec.rb +47 -0
  136. data/spec/models/first_name_validation_request_spec.rb +41 -0
  137. data/spec/models/first_name_validation_response_spec.rb +47 -0
  138. data/spec/models/full_email_validation_response_spec.rb +89 -0
  139. data/spec/models/full_name_validation_request_spec.rb +41 -0
  140. data/spec/models/full_name_validation_response_spec.rb +95 -0
  141. data/spec/models/geolocate_response_spec.rb +89 -0
  142. data/spec/models/get_gender_request_spec.rb +47 -0
  143. data/spec/models/get_gender_response_spec.rb +47 -0
  144. data/spec/models/get_timezones_request_spec.rb +41 -0
  145. data/spec/models/get_timezones_response_spec.rb +71 -0
  146. data/spec/models/last_name_validation_request_spec.rb +41 -0
  147. data/spec/models/last_name_validation_response_spec.rb +47 -0
  148. data/spec/models/lead_enrichment_request_spec.rb +119 -0
  149. data/spec/models/lead_enrichment_response_spec.rb +143 -0
  150. data/spec/models/parse_address_request_spec.rb +47 -0
  151. data/spec/models/parse_address_response_spec.rb +89 -0
  152. data/spec/models/phone_number_validate_request_spec.rb +47 -0
  153. data/spec/models/phone_number_validation_response_spec.rb +83 -0
  154. data/spec/models/timezone_spec.rb +53 -0
  155. data/spec/models/user_agent_validate_request_spec.rb +41 -0
  156. data/spec/models/user_agent_validate_response_spec.rb +119 -0
  157. data/spec/models/validate_address_request_spec.rb +71 -0
  158. data/spec/models/validate_address_response_spec.rb +53 -0
  159. data/spec/models/validate_city_request_spec.rb +59 -0
  160. data/spec/models/validate_city_response_spec.rb +65 -0
  161. data/spec/models/validate_country_request_spec.rb +41 -0
  162. data/spec/models/validate_country_response_spec.rb +77 -0
  163. data/spec/models/validate_identifier_request_spec.rb +83 -0
  164. data/spec/models/validate_identifier_response_spec.rb +47 -0
  165. data/spec/models/validate_postal_code_request_spec.rb +53 -0
  166. data/spec/models/validate_postal_code_response_spec.rb +65 -0
  167. data/spec/models/validate_state_request_spec.rb +53 -0
  168. data/spec/models/validate_state_response_spec.rb +59 -0
  169. data/spec/models/validate_url_request_full_spec.rb +41 -0
  170. data/spec/models/validate_url_request_syntax_only_spec.rb +41 -0
  171. data/spec/models/validate_url_response_full_spec.rb +65 -0
  172. data/spec/models/validate_url_response_syntax_only_spec.rb +47 -0
  173. data/spec/models/vat_lookup_request_spec.rb +41 -0
  174. data/spec/models/vat_lookup_response_spec.rb +107 -0
  175. data/spec/models/whois_response_spec.rb +125 -0
  176. data/spec/spec_helper.rb +111 -0
  177. metadata +177 -2
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::VatLookupRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **vat_code** | **String** | VAT code to lookup; example \"CZ25123891\" | [optional]
7
+
8
+
@@ -0,0 +1,19 @@
1
+ # CloudmersiveValidateApiClient::VatLookupResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **country_code** | **String** | Two-letter country code | [optional]
7
+ **vat_number** | **String** | VAT number | [optional]
8
+ **is_valid** | **BOOLEAN** | True if the VAT code is valid, false otherwise | [optional]
9
+ **business_name** | **String** | Name of the business | [optional]
10
+ **business_address** | **String** | Business address as a single string | [optional]
11
+ **business_building** | **String** | For the business address, the name of the building, house or structure if applicable, such as \"Cloudmersive Building 2\". This will often by null. | [optional]
12
+ **business_street_number** | **String** | For the business address, the street number or house number of the address. For example, in the address \"1600 Pennsylvania Avenue NW\" the street number would be \"1600\". This value will typically be populated for most addresses. | [optional]
13
+ **business_street** | **String** | For the business address, the name of the street or road of the address. For example, in the address \"1600 Pennsylvania Avenue NW\" the street number would be \"Pennsylvania Avenue NW\". | [optional]
14
+ **business_city** | **String** | For the business address, the city of the address. | [optional]
15
+ **business_state_or_province** | **String** | For the business address, the state or province of the address. | [optional]
16
+ **business_postal_code** | **String** | For the business address, the postal code or zip code of the address. | [optional]
17
+ **business_country** | **String** | For the business address, country of the address, if present in the address. If not included in the address it will be null. | [optional]
18
+
19
+
@@ -0,0 +1,22 @@
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
+ **registrant_name** | **String** | Name of the domain registrant | [optional]
8
+ **registrant_organization** | **String** | Organization name of the domain registrant | [optional]
9
+ **registrant_email** | **String** | Email address of the domain registrant | [optional]
10
+ **registrant_street_number** | **String** | Street number of the address of the domain registrant, if available | [optional]
11
+ **registrant_street** | **String** | Street name of the address of the domain registrant, if available | [optional]
12
+ **registrant_city** | **String** | City of the domain registrant, if available | [optional]
13
+ **registrant_state_or_province** | **String** | State or Province of the address of the domain registrant, if available | [optional]
14
+ **registrant_postal_code** | **String** | Postal code of the address of the domain registrant, if available | [optional]
15
+ **registrant_country** | **String** | Country of the address of the domain registrant, if available | [optional]
16
+ **registrant_raw_address** | **String** | Raw address string of the domain registrant, if available | [optional]
17
+ **registrant_telephone** | **String** | Telephone number of the address of the domain registrant | [optional]
18
+ **whois_server** | **String** | Server used to lookup WHOIS information (may change based on lookup). | [optional]
19
+ **raw_text_record** | **String** | WHOIS raw text record | [optional]
20
+ **created_dt** | **DateTime** | Creation date for the record | [optional]
21
+
22
+
@@ -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,93 @@
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
+ # 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/country_details'
24
+ require 'cloudmersive-validate-api-client/models/country_list_result'
25
+ require 'cloudmersive-validate-api-client/models/first_name_validation_request'
26
+ require 'cloudmersive-validate-api-client/models/first_name_validation_response'
27
+ require 'cloudmersive-validate-api-client/models/full_email_validation_response'
28
+ require 'cloudmersive-validate-api-client/models/full_name_validation_request'
29
+ require 'cloudmersive-validate-api-client/models/full_name_validation_response'
30
+ require 'cloudmersive-validate-api-client/models/geolocate_response'
31
+ require 'cloudmersive-validate-api-client/models/get_gender_request'
32
+ require 'cloudmersive-validate-api-client/models/get_gender_response'
33
+ require 'cloudmersive-validate-api-client/models/get_timezones_request'
34
+ require 'cloudmersive-validate-api-client/models/get_timezones_response'
35
+ require 'cloudmersive-validate-api-client/models/last_name_validation_request'
36
+ require 'cloudmersive-validate-api-client/models/last_name_validation_response'
37
+ require 'cloudmersive-validate-api-client/models/lead_enrichment_request'
38
+ require 'cloudmersive-validate-api-client/models/lead_enrichment_response'
39
+ require 'cloudmersive-validate-api-client/models/parse_address_request'
40
+ require 'cloudmersive-validate-api-client/models/parse_address_response'
41
+ require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
42
+ require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
43
+ require 'cloudmersive-validate-api-client/models/timezone'
44
+ require 'cloudmersive-validate-api-client/models/user_agent_validate_request'
45
+ require 'cloudmersive-validate-api-client/models/user_agent_validate_response'
46
+ require 'cloudmersive-validate-api-client/models/validate_address_request'
47
+ require 'cloudmersive-validate-api-client/models/validate_address_response'
48
+ require 'cloudmersive-validate-api-client/models/validate_city_request'
49
+ require 'cloudmersive-validate-api-client/models/validate_city_response'
50
+ require 'cloudmersive-validate-api-client/models/validate_country_request'
51
+ require 'cloudmersive-validate-api-client/models/validate_country_response'
52
+ require 'cloudmersive-validate-api-client/models/validate_identifier_request'
53
+ require 'cloudmersive-validate-api-client/models/validate_identifier_response'
54
+ require 'cloudmersive-validate-api-client/models/validate_postal_code_request'
55
+ require 'cloudmersive-validate-api-client/models/validate_postal_code_response'
56
+ require 'cloudmersive-validate-api-client/models/validate_state_request'
57
+ require 'cloudmersive-validate-api-client/models/validate_state_response'
58
+ require 'cloudmersive-validate-api-client/models/validate_url_request_full'
59
+ require 'cloudmersive-validate-api-client/models/validate_url_request_syntax_only'
60
+ require 'cloudmersive-validate-api-client/models/validate_url_response_full'
61
+ require 'cloudmersive-validate-api-client/models/validate_url_response_syntax_only'
62
+ require 'cloudmersive-validate-api-client/models/vat_lookup_request'
63
+ require 'cloudmersive-validate-api-client/models/vat_lookup_response'
64
+ require 'cloudmersive-validate-api-client/models/whois_response'
65
+
66
+ # APIs
67
+ require 'cloudmersive-validate-api-client/api/address_api'
68
+ require 'cloudmersive-validate-api-client/api/domain_api'
69
+ require 'cloudmersive-validate-api-client/api/email_api'
70
+ require 'cloudmersive-validate-api-client/api/ip_address_api'
71
+ require 'cloudmersive-validate-api-client/api/lead_enrichment_api'
72
+ require 'cloudmersive-validate-api-client/api/name_api'
73
+ require 'cloudmersive-validate-api-client/api/phone_number_api'
74
+ require 'cloudmersive-validate-api-client/api/user_agent_api'
75
+ require 'cloudmersive-validate-api-client/api/vat_api'
76
+
77
+ module CloudmersiveValidateApiClient
78
+ class << self
79
+ # Customize default settings for the SDK using block.
80
+ # CloudmersiveValidateApiClient.configure do |config|
81
+ # config.username = "xxx"
82
+ # config.password = "xxx"
83
+ # end
84
+ # If no block given, return the default Configuration object.
85
+ def configure
86
+ if block_given?
87
+ yield(Configuration.default)
88
+ else
89
+ Configuration.default
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,501 @@
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
+ # Gets IANA/Olsen time zones for a country
177
+ # Gets the IANA/Olsen time zones for a country.
178
+ # @param input Input request
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [GetTimezonesResponse]
181
+ def address_get_timezone(input, opts = {})
182
+ data, _status_code, _headers = address_get_timezone_with_http_info(input, opts)
183
+ data
184
+ end
185
+
186
+ # Gets IANA/Olsen time zones for a country
187
+ # Gets the IANA/Olsen time zones for a country.
188
+ # @param input Input request
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [Array<(GetTimezonesResponse, Fixnum, Hash)>] GetTimezonesResponse data, response status code and response headers
191
+ def address_get_timezone_with_http_info(input, opts = {})
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_get_timezone ...'
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_timezone"
198
+ end
199
+ # resource path
200
+ local_var_path = '/validate/address/country/get-timezones'
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 => 'GetTimezonesResponse')
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug "API called: AddressApi#address_get_timezone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
227
+ end
228
+ return data, status_code, headers
229
+ end
230
+ # Parse an unstructured input text string into an international, formatted address
231
+ # 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.
232
+ # @param input Input parse request
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [ParseAddressResponse]
235
+ def address_parse_string(input, opts = {})
236
+ data, _status_code, _headers = address_parse_string_with_http_info(input, opts)
237
+ data
238
+ end
239
+
240
+ # Parse an unstructured input text string into an international, formatted address
241
+ # 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.
242
+ # @param input Input parse request
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [Array<(ParseAddressResponse, Fixnum, Hash)>] ParseAddressResponse data, response status code and response headers
245
+ def address_parse_string_with_http_info(input, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_parse_string ...'
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_parse_string"
252
+ end
253
+ # resource path
254
+ local_var_path = '/validate/address/parse'
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 => 'ParseAddressResponse')
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: AddressApi#address_parse_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+ # Validate a street address
285
+ # 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.
286
+ # @param input Input parse request
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [ValidateAddressResponse]
289
+ def address_validate_address(input, opts = {})
290
+ data, _status_code, _headers = address_validate_address_with_http_info(input, opts)
291
+ data
292
+ end
293
+
294
+ # Validate a street address
295
+ # 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.
296
+ # @param input Input parse request
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [Array<(ValidateAddressResponse, Fixnum, Hash)>] ValidateAddressResponse data, response status code and response headers
299
+ def address_validate_address_with_http_info(input, opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_address ...'
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_validate_address"
306
+ end
307
+ # resource path
308
+ local_var_path = '/validate/address/street-address'
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 => 'ValidateAddressResponse')
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug "API called: AddressApi#address_validate_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
335
+ end
336
+ return data, status_code, headers
337
+ end
338
+ # Validate a City and State/Province combination, get location information about it
339
+ # 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.
340
+ # @param input Input parse request
341
+ # @param [Hash] opts the optional parameters
342
+ # @return [ValidateCityResponse]
343
+ def address_validate_city(input, opts = {})
344
+ data, _status_code, _headers = address_validate_city_with_http_info(input, opts)
345
+ data
346
+ end
347
+
348
+ # Validate a City and State/Province combination, get location information about it
349
+ # 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.
350
+ # @param input Input parse request
351
+ # @param [Hash] opts the optional parameters
352
+ # @return [Array<(ValidateCityResponse, Fixnum, Hash)>] ValidateCityResponse data, response status code and response headers
353
+ def address_validate_city_with_http_info(input, opts = {})
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_city ...'
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_city"
360
+ end
361
+ # resource path
362
+ local_var_path = '/validate/address/city'
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 => 'ValidateCityResponse')
387
+ if @api_client.config.debugging
388
+ @api_client.config.logger.debug "API called: AddressApi#address_validate_city\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
389
+ end
390
+ return data, status_code, headers
391
+ end
392
+ # Validate a postal code, get location information about it
393
+ # Checks if the input postal code is valid, and returns information about it such as City, State and more.
394
+ # @param input Input parse request
395
+ # @param [Hash] opts the optional parameters
396
+ # @return [ValidatePostalCodeResponse]
397
+ def address_validate_postal_code(input, opts = {})
398
+ data, _status_code, _headers = address_validate_postal_code_with_http_info(input, opts)
399
+ data
400
+ end
401
+
402
+ # Validate a postal code, get location information about it
403
+ # Checks if the input postal code is valid, and returns information about it such as City, State and more.
404
+ # @param input Input parse request
405
+ # @param [Hash] opts the optional parameters
406
+ # @return [Array<(ValidatePostalCodeResponse, Fixnum, Hash)>] ValidatePostalCodeResponse data, response status code and response headers
407
+ def address_validate_postal_code_with_http_info(input, opts = {})
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_postal_code ...'
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_postal_code"
414
+ end
415
+ # resource path
416
+ local_var_path = '/validate/address/postal-code'
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 => 'ValidatePostalCodeResponse')
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug "API called: AddressApi#address_validate_postal_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
443
+ end
444
+ return data, status_code, headers
445
+ end
446
+ # Validate a state or province, name or abbreviation, get location information about it
447
+ # Checks if the input state name or code is valid, and returns information about it such as normalized State name and more.
448
+ # @param input Input parse request
449
+ # @param [Hash] opts the optional parameters
450
+ # @return [ValidateStateResponse]
451
+ def address_validate_state(input, opts = {})
452
+ data, _status_code, _headers = address_validate_state_with_http_info(input, opts)
453
+ data
454
+ end
455
+
456
+ # Validate a state or province, name or abbreviation, get location information about it
457
+ # Checks if the input state name or code is valid, and returns information about it such as normalized State name and more.
458
+ # @param input Input parse request
459
+ # @param [Hash] opts the optional parameters
460
+ # @return [Array<(ValidateStateResponse, Fixnum, Hash)>] ValidateStateResponse data, response status code and response headers
461
+ def address_validate_state_with_http_info(input, opts = {})
462
+ if @api_client.config.debugging
463
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_validate_state ...'
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_state"
468
+ end
469
+ # resource path
470
+ local_var_path = '/validate/address/state'
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 => 'ValidateStateResponse')
495
+ if @api_client.config.debugging
496
+ @api_client.config.logger.debug "API called: AddressApi#address_validate_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
+ end
498
+ return data, status_code, headers
499
+ end
500
+ end
501
+ end