cloudmersive-validate-api-client 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
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,239 @@
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 DomainApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Validate a domain name
23
+ # 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.
24
+ # @param domain Domain name to check, for example \"cloudmersive.com\". The input is a string so be sure to enclose it in double-quotes.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CheckResponse]
27
+ def domain_check(domain, opts = {})
28
+ data, _status_code, _headers = domain_check_with_http_info(domain, opts)
29
+ data
30
+ end
31
+
32
+ # Validate a domain name
33
+ # 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.
34
+ # @param domain Domain name to check, for example \"cloudmersive.com\". The input is a string so be sure to enclose it in double-quotes.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CheckResponse, Fixnum, Hash)>] CheckResponse data, response status code and response headers
37
+ def domain_check_with_http_info(domain, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_check ...'
40
+ end
41
+ # verify the required parameter 'domain' is set
42
+ if @api_client.config.client_side_validation && domain.nil?
43
+ fail ArgumentError, "Missing the required parameter 'domain' when calling DomainApi.domain_check"
44
+ end
45
+ # resource path
46
+ local_var_path = '/validate/domain/check'
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(['text/javascript', '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(domain)
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 => 'CheckResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: DomainApi#domain_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ # Get WHOIS information for a domain
77
+ # 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.
78
+ # @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.
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [WhoisResponse]
81
+ def domain_post(domain, opts = {})
82
+ data, _status_code, _headers = domain_post_with_http_info(domain, opts)
83
+ data
84
+ end
85
+
86
+ # Get WHOIS information for a domain
87
+ # 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.
88
+ # @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.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(WhoisResponse, Fixnum, Hash)>] WhoisResponse data, response status code and response headers
91
+ def domain_post_with_http_info(domain, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_post ...'
94
+ end
95
+ # verify the required parameter 'domain' is set
96
+ if @api_client.config.client_side_validation && domain.nil?
97
+ fail ArgumentError, "Missing the required parameter 'domain' when calling DomainApi.domain_post"
98
+ end
99
+ # resource path
100
+ local_var_path = '/validate/domain/whois'
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(['text/javascript', '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(domain)
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 => 'WhoisResponse')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: DomainApi#domain_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+ # Validate a URL fully
131
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity), whether it exists, and whether the endpoint is up and passes virus scan checks. Accepts various types of input and produces a well-formed URL as output.
132
+ # @param request Input URL request
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [ValidateUrlResponseFull]
135
+ def domain_url_full(request, opts = {})
136
+ data, _status_code, _headers = domain_url_full_with_http_info(request, opts)
137
+ data
138
+ end
139
+
140
+ # Validate a URL fully
141
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity), whether it exists, and whether the endpoint is up and passes virus scan checks. Accepts various types of input and produces a well-formed URL as output.
142
+ # @param request Input URL request
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(ValidateUrlResponseFull, Fixnum, Hash)>] ValidateUrlResponseFull data, response status code and response headers
145
+ def domain_url_full_with_http_info(request, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_url_full ...'
148
+ end
149
+ # verify the required parameter 'request' is set
150
+ if @api_client.config.client_side_validation && request.nil?
151
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_url_full"
152
+ end
153
+ # resource path
154
+ local_var_path = '/validate/domain/url/full'
155
+
156
+ # query parameters
157
+ query_params = {}
158
+
159
+ # header parameters
160
+ header_params = {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
163
+ # HTTP header 'Content-Type'
164
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
165
+
166
+ # form parameters
167
+ form_params = {}
168
+
169
+ # http body (model)
170
+ post_body = @api_client.object_to_http_body(request)
171
+ auth_names = ['Apikey']
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'ValidateUrlResponseFull')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: DomainApi#domain_url_full\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
184
+ # Validate a URL syntactically
185
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
186
+ # @param request Input URL information
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [ValidateUrlResponseSyntaxOnly]
189
+ def domain_url_syntax_only(request, opts = {})
190
+ data, _status_code, _headers = domain_url_syntax_only_with_http_info(request, opts)
191
+ data
192
+ end
193
+
194
+ # Validate a URL syntactically
195
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
196
+ # @param request Input URL information
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [Array<(ValidateUrlResponseSyntaxOnly, Fixnum, Hash)>] ValidateUrlResponseSyntaxOnly data, response status code and response headers
199
+ def domain_url_syntax_only_with_http_info(request, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_url_syntax_only ...'
202
+ end
203
+ # verify the required parameter 'request' is set
204
+ if @api_client.config.client_side_validation && request.nil?
205
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_url_syntax_only"
206
+ end
207
+ # resource path
208
+ local_var_path = '/validate/domain/url/syntax-only'
209
+
210
+ # query parameters
211
+ query_params = {}
212
+
213
+ # header parameters
214
+ header_params = {}
215
+ # HTTP header 'Accept' (if needed)
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
217
+ # HTTP header 'Content-Type'
218
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
219
+
220
+ # form parameters
221
+ form_params = {}
222
+
223
+ # http body (model)
224
+ post_body = @api_client.object_to_http_body(request)
225
+ auth_names = ['Apikey']
226
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => 'ValidateUrlResponseSyntaxOnly')
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: DomainApi#domain_url_syntax_only\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+ end
239
+ end
@@ -0,0 +1,185 @@
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 EmailApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Partially check whether an email address is valid
23
+ # Validate an email address by identifying whether its parent domain has email servers defined. This call is less limited than syntaxOnly but not as comprehensive as address/full.
24
+ # @param email Email address to validate, e.g. \&quot;support@cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AddressGetServersResponse]
27
+ def email_address_get_servers(email, opts = {})
28
+ data, _status_code, _headers = email_address_get_servers_with_http_info(email, opts)
29
+ data
30
+ end
31
+
32
+ # Partially check whether an email address is valid
33
+ # Validate an email address by identifying whether its parent domain has email servers defined. This call is less limited than syntaxOnly but not as comprehensive as address/full.
34
+ # @param email Email address to validate, e.g. \&quot;support@cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AddressGetServersResponse, Fixnum, Hash)>] AddressGetServersResponse data, response status code and response headers
37
+ def email_address_get_servers_with_http_info(email, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EmailApi.email_address_get_servers ...'
40
+ end
41
+ # verify the required parameter 'email' is set
42
+ if @api_client.config.client_side_validation && email.nil?
43
+ fail ArgumentError, "Missing the required parameter 'email' when calling EmailApi.email_address_get_servers"
44
+ end
45
+ # resource path
46
+ local_var_path = '/validate/email/address/servers'
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(['text/javascript', '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(email)
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 => 'AddressGetServersResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: EmailApi#email_address_get_servers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ # Fully validate an email address
77
+ # Performs a full validation of the email address. Checks for syntactic correctness, identifies the mail server in question if any, and then contacts the email server to validate the existence of the account - without sending any emails.
78
+ # @param email Email address to validate, e.g. \&quot;support@cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [FullEmailValidationResponse]
81
+ def email_full_validation(email, opts = {})
82
+ data, _status_code, _headers = email_full_validation_with_http_info(email, opts)
83
+ data
84
+ end
85
+
86
+ # Fully validate an email address
87
+ # Performs a full validation of the email address. Checks for syntactic correctness, identifies the mail server in question if any, and then contacts the email server to validate the existence of the account - without sending any emails.
88
+ # @param email Email address to validate, e.g. \&quot;support@cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(FullEmailValidationResponse, Fixnum, Hash)>] FullEmailValidationResponse data, response status code and response headers
91
+ def email_full_validation_with_http_info(email, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: EmailApi.email_full_validation ...'
94
+ end
95
+ # verify the required parameter 'email' is set
96
+ if @api_client.config.client_side_validation && email.nil?
97
+ fail ArgumentError, "Missing the required parameter 'email' when calling EmailApi.email_full_validation"
98
+ end
99
+ # resource path
100
+ local_var_path = '/validate/email/address/full'
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(['text/javascript', '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(email)
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 => 'FullEmailValidationResponse')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: EmailApi#email_full_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+ # Validate email adddress for syntactic correctness only
131
+ # Validate whether a given email address is syntactically correct via a limited local-only check. Use the address/full API to do a full validation.
132
+ # @param value Email address to validate, e.g. \&quot;support@cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [AddressVerifySyntaxOnlyResponse]
135
+ def email_post(value, opts = {})
136
+ data, _status_code, _headers = email_post_with_http_info(value, opts)
137
+ data
138
+ end
139
+
140
+ # Validate email adddress for syntactic correctness only
141
+ # Validate whether a given email address is syntactically correct via a limited local-only check. Use the address/full API to do a full validation.
142
+ # @param value Email address to validate, e.g. \&quot;support@cloudmersive.com\&quot;. The input is a string so be sure to enclose it in double-quotes.
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(AddressVerifySyntaxOnlyResponse, Fixnum, Hash)>] AddressVerifySyntaxOnlyResponse data, response status code and response headers
145
+ def email_post_with_http_info(value, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: EmailApi.email_post ...'
148
+ end
149
+ # verify the required parameter 'value' is set
150
+ if @api_client.config.client_side_validation && value.nil?
151
+ fail ArgumentError, "Missing the required parameter 'value' when calling EmailApi.email_post"
152
+ end
153
+ # resource path
154
+ local_var_path = '/validate/email/address/syntaxOnly'
155
+
156
+ # query parameters
157
+ query_params = {}
158
+
159
+ # header parameters
160
+ header_params = {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
163
+ # HTTP header 'Content-Type'
164
+ header_params['Content-Type'] = @api_client.select_header_content_type(['text/javascript', 'application/json', 'text/json'])
165
+
166
+ # form parameters
167
+ form_params = {}
168
+
169
+ # http body (model)
170
+ post_body = @api_client.object_to_http_body(value)
171
+ auth_names = ['Apikey']
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'AddressVerifySyntaxOnlyResponse')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: EmailApi#email_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,77 @@
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 IPAddressApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Geolocate an IP address
23
+ # Identify an IP address Country, State/Provence, City, Zip/Postal Code, etc. Useful for security and UX applications.
24
+ # @param value IP address to geolocate, e.g. \&quot;55.55.55.55\&quot;. The input is a string so be sure to enclose it in double-quotes.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [GeolocateResponse]
27
+ def i_p_address_post(value, opts = {})
28
+ data, _status_code, _headers = i_p_address_post_with_http_info(value, opts)
29
+ data
30
+ end
31
+
32
+ # Geolocate an IP address
33
+ # Identify an IP address Country, State/Provence, City, Zip/Postal Code, etc. Useful for security and UX applications.
34
+ # @param value IP address to geolocate, e.g. \&quot;55.55.55.55\&quot;. The input is a string so be sure to enclose it in double-quotes.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(GeolocateResponse, Fixnum, Hash)>] GeolocateResponse data, response status code and response headers
37
+ def i_p_address_post_with_http_info(value, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: IPAddressApi.i_p_address_post ...'
40
+ end
41
+ # verify the required parameter 'value' is set
42
+ if @api_client.config.client_side_validation && value.nil?
43
+ fail ArgumentError, "Missing the required parameter 'value' when calling IPAddressApi.i_p_address_post"
44
+ end
45
+ # resource path
46
+ local_var_path = '/validate/ip/geolocate'
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(['text/javascript', '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(value)
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 => 'GeolocateResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: IPAddressApi#i_p_address_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ end
77
+ end