cloudmersive-validate-api-client 2.1.1 → 2.1.6

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +34 -4
  3. data/docs/AddressApi.md +55 -0
  4. data/docs/BotCheckResponse.md +8 -0
  5. data/docs/DateTimeApi.md +222 -0
  6. data/docs/DateTimeNaturalLanguageParseRequest.md +8 -0
  7. data/docs/DateTimeNowResult.md +10 -0
  8. data/docs/DateTimeStandardizedParseRequest.md +9 -0
  9. data/docs/DateTimeStandardizedParseResponse.md +16 -0
  10. data/docs/DomainApi.md +168 -3
  11. data/docs/EmailApi.md +3 -3
  12. data/docs/GetPublicHolidaysRequest.md +9 -0
  13. data/docs/IPAddressApi.md +169 -4
  14. data/docs/IPIntelligenceResponse.md +16 -0
  15. data/docs/IPReverseDNSLookupResponse.md +9 -0
  16. data/docs/NormalizeAddressResponse.md +18 -0
  17. data/docs/PublicHolidayOccurrence.md +12 -0
  18. data/docs/PublicHolidaysResponse.md +9 -0
  19. data/docs/TextInputApi.md +57 -2
  20. data/docs/UrlSsrfRequestBatch.md +8 -0
  21. data/docs/UrlSsrfRequestFull.md +9 -0
  22. data/docs/UrlSsrfResponseBatch.md +8 -0
  23. data/docs/UrlSsrfResponseFull.md +9 -0
  24. data/docs/ValidateUrlResponseSyntaxOnly.md +1 -0
  25. data/docs/XssProtectionBatchRequest.md +8 -0
  26. data/docs/XssProtectionBatchResponse.md +8 -0
  27. data/docs/XssProtectionRequestItem.md +8 -0
  28. data/lib/cloudmersive-validate-api-client.rb +19 -0
  29. data/lib/cloudmersive-validate-api-client/api/address_api.rb +54 -0
  30. data/lib/cloudmersive-validate-api-client/api/date_time_api.rb +231 -0
  31. data/lib/cloudmersive-validate-api-client/api/domain_api.rb +165 -3
  32. data/lib/cloudmersive-validate-api-client/api/email_api.rb +3 -3
  33. data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +166 -4
  34. data/lib/cloudmersive-validate-api-client/api/text_input_api.rb +56 -2
  35. data/lib/cloudmersive-validate-api-client/models/bot_check_response.rb +186 -0
  36. data/lib/cloudmersive-validate-api-client/models/date_time_natural_language_parse_request.rb +186 -0
  37. data/lib/cloudmersive-validate-api-client/models/date_time_now_result.rb +206 -0
  38. data/lib/cloudmersive-validate-api-client/models/date_time_standardized_parse_request.rb +196 -0
  39. data/lib/cloudmersive-validate-api-client/models/date_time_standardized_parse_response.rb +266 -0
  40. data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +1 -1
  41. data/lib/cloudmersive-validate-api-client/models/get_public_holidays_request.rb +196 -0
  42. data/lib/cloudmersive-validate-api-client/models/ip_intelligence_response.rb +266 -0
  43. data/lib/cloudmersive-validate-api-client/models/ip_reverse_dns_lookup_response.rb +196 -0
  44. data/lib/cloudmersive-validate-api-client/models/normalize_address_response.rb +286 -0
  45. data/lib/cloudmersive-validate-api-client/models/public_holiday_occurrence.rb +226 -0
  46. data/lib/cloudmersive-validate-api-client/models/public_holidays_response.rb +198 -0
  47. data/lib/cloudmersive-validate-api-client/models/url_ssrf_request_batch.rb +188 -0
  48. data/lib/cloudmersive-validate-api-client/models/url_ssrf_request_full.rb +198 -0
  49. data/lib/cloudmersive-validate-api-client/models/url_ssrf_response_batch.rb +188 -0
  50. data/lib/cloudmersive-validate-api-client/models/url_ssrf_response_full.rb +196 -0
  51. data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +14 -4
  52. data/lib/cloudmersive-validate-api-client/models/xss_protection_batch_request.rb +188 -0
  53. data/lib/cloudmersive-validate-api-client/models/xss_protection_batch_response.rb +188 -0
  54. data/lib/cloudmersive-validate-api-client/models/xss_protection_request_item.rb +186 -0
  55. data/lib/cloudmersive-validate-api-client/version.rb +1 -1
  56. data/spec/api/address_api_spec.rb +12 -0
  57. data/spec/api/date_time_api_spec.rb +82 -0
  58. data/spec/api/domain_api_spec.rb +36 -0
  59. data/spec/api/ip_address_api_spec.rb +36 -0
  60. data/spec/api/text_input_api_spec.rb +12 -0
  61. data/spec/models/bot_check_response_spec.rb +41 -0
  62. data/spec/models/date_time_natural_language_parse_request_spec.rb +41 -0
  63. data/spec/models/date_time_now_result_spec.rb +53 -0
  64. data/spec/models/date_time_standardized_parse_request_spec.rb +47 -0
  65. data/spec/models/date_time_standardized_parse_response_spec.rb +89 -0
  66. data/spec/models/get_public_holidays_request_spec.rb +47 -0
  67. data/spec/models/ip_intelligence_response_spec.rb +89 -0
  68. data/spec/models/ip_reverse_dns_lookup_response_spec.rb +47 -0
  69. data/spec/models/normalize_address_response_spec.rb +101 -0
  70. data/spec/models/public_holiday_occurrence_spec.rb +65 -0
  71. data/spec/models/public_holidays_response_spec.rb +47 -0
  72. data/spec/models/url_ssrf_request_batch_spec.rb +41 -0
  73. data/spec/models/url_ssrf_request_full_spec.rb +47 -0
  74. data/spec/models/url_ssrf_response_batch_spec.rb +41 -0
  75. data/spec/models/url_ssrf_response_full_spec.rb +47 -0
  76. data/spec/models/validate_url_response_syntax_only_spec.rb +6 -0
  77. data/spec/models/xss_protection_batch_request_spec.rb +41 -0
  78. data/spec/models/xss_protection_batch_response_spec.rb +41 -0
  79. data/spec/models/xss_protection_request_item_spec.rb +41 -0
  80. metadata +59 -2
@@ -0,0 +1,16 @@
1
+ # CloudmersiveValidateApiClient::IPIntelligenceResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **is_bot** | **BOOLEAN** | True if the IP address is a known bot, otherwise false | [optional]
7
+ **is_tor_node** | **BOOLEAN** | True if the IP address is a known Tor exit node, otherwise false | [optional]
8
+ **is_threat** | **BOOLEAN** | True if the IP address is a known threat IP, otherwise false | [optional]
9
+ **is_eu** | **BOOLEAN** | True if the IP address is in the European Union, otherwise false | [optional]
10
+ **location** | [**GeolocateResponse**](GeolocateResponse.md) | Returns the location of the IP address | [optional]
11
+ **currency_code** | **String** | ISO 4217 currency code for the IP address location | [optional]
12
+ **currency_name** | **String** | Name of the currency in English | [optional]
13
+ **region_area** | **String** | Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania | [optional]
14
+ **subregion_area** | **String** | Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean, | [optional]
15
+
16
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::IPReverseDNSLookupResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if a domain was found, false otherwise | [optional]
7
+ **host_name** | **String** | Host name (fully-qualified) associated with the IP address, if any | [optional]
8
+
9
+
@@ -0,0 +1,18 @@
1
+ # CloudmersiveValidateApiClient::NormalizeAddressResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **valid_address** | **BOOLEAN** | True if the address is valid, false otherwise | [optional]
7
+ **building** | **String** | The name of the building, house or structure if applicable, such as \"Cloudmersive Building 2\". This will often by null. | [optional]
8
+ **street_number** | **String** | 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]
9
+ **street** | **String** | 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]
10
+ **city** | **String** | The city of the address. | [optional]
11
+ **state_or_province** | **String** | The state or province of the address. | [optional]
12
+ **postal_code** | **String** | The postal code or zip code of the address. | [optional]
13
+ **country_full_name** | **String** | Country of the address, if present in the address. If not included in the address it will be null. | [optional]
14
+ **iso_two_letter_code** | **String** | Two-letter ISO 3166-1 country code | [optional]
15
+ **latitude** | **Float** | If the address is valid, the degrees latitude of the validated address, null otherwise | [optional]
16
+ **longitude** | **Float** | If the address is valid, the degrees longitude of the validated address, null otherwise | [optional]
17
+
18
+
@@ -0,0 +1,12 @@
1
+ # CloudmersiveValidateApiClient::PublicHolidayOccurrence
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **english_name** | **String** | Name of the holiday in English | [optional]
7
+ **local_name** | **String** | Local name of the holiday | [optional]
8
+ **occurrence_date** | **DateTime** | Date of the holiday (start time) | [optional]
9
+ **holiday_type** | **String** | Type of the holiday; possible values are: Public, Bank, School, Authorities, Optional, Observance | [optional]
10
+ **nationwaide** | **BOOLEAN** | True if the holiday is celebrated in all locales in the country, false otherwise | [optional]
11
+
12
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::PublicHolidaysResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **public_holidays** | [**Array<PublicHolidayOccurrence>**](PublicHolidayOccurrence.md) | Public holidays in the requested country and year | [optional]
8
+
9
+
data/docs/TextInputApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.cloudmersive.com*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**text_input_check_xss**](TextInputApi.md#text_input_check_xss) | **POST** /validate/text-input/check/xss | Check text input for Cross-Site-Scripting (XSS) attacks
8
+ [**text_input_check_xss_batch**](TextInputApi.md#text_input_check_xss_batch) | **POST** /validate/text-input/check-and-protect/xss/batch | Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
8
9
  [**text_input_protect_xss**](TextInputApi.md#text_input_protect_xss) | **POST** /validate/text-input/protect/xss | Protect text input from Cross-Site-Scripting (XSS) attacks through normalization
9
10
 
10
11
 
@@ -57,7 +58,61 @@ Name | Type | Description | Notes
57
58
 
58
59
  ### HTTP request headers
59
60
 
60
- - **Content-Type**: text/javascript, application/json, text/json
61
+ - **Content-Type**: application/json, text/json
62
+ - **Accept**: application/json, text/json, application/xml, text/xml
63
+
64
+
65
+
66
+ # **text_input_check_xss_batch**
67
+ > XssProtectionBatchResponse text_input_check_xss_batch(value)
68
+
69
+ Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
70
+
71
+ Detects XSS (Cross-Site-Scripting) attacks from multiple text input. Output preverses order of input items.
72
+
73
+ ### Example
74
+ ```ruby
75
+ # load the gem
76
+ require 'cloudmersive-validate-api-client'
77
+ # setup authorization
78
+ CloudmersiveValidateApiClient.configure do |config|
79
+ # Configure API key authorization: Apikey
80
+ config.api_key['Apikey'] = 'YOUR API KEY'
81
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
82
+ #config.api_key_prefix['Apikey'] = 'Bearer'
83
+ end
84
+
85
+ api_instance = CloudmersiveValidateApiClient::TextInputApi.new
86
+
87
+ value = CloudmersiveValidateApiClient::XssProtectionBatchRequest.new # XssProtectionBatchRequest | User-facing text input.
88
+
89
+
90
+ begin
91
+ #Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
92
+ result = api_instance.text_input_check_xss_batch(value)
93
+ p result
94
+ rescue CloudmersiveValidateApiClient::ApiError => e
95
+ puts "Exception when calling TextInputApi->text_input_check_xss_batch: #{e}"
96
+ end
97
+ ```
98
+
99
+ ### Parameters
100
+
101
+ Name | Type | Description | Notes
102
+ ------------- | ------------- | ------------- | -------------
103
+ **value** | [**XssProtectionBatchRequest**](XssProtectionBatchRequest.md)| User-facing text input. |
104
+
105
+ ### Return type
106
+
107
+ [**XssProtectionBatchResponse**](XssProtectionBatchResponse.md)
108
+
109
+ ### Authorization
110
+
111
+ [Apikey](../README.md#Apikey)
112
+
113
+ ### HTTP request headers
114
+
115
+ - **Content-Type**: application/json, text/json
61
116
  - **Accept**: application/json, text/json, application/xml, text/xml
62
117
 
63
118
 
@@ -111,7 +166,7 @@ Name | Type | Description | Notes
111
166
 
112
167
  ### HTTP request headers
113
168
 
114
- - **Content-Type**: text/javascript, application/json, text/json
169
+ - **Content-Type**: application/json, text/json
115
170
  - **Accept**: application/json, text/json, application/xml, text/xml
116
171
 
117
172
 
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::UrlSsrfRequestBatch
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_items** | [**Array<UrlSsrfRequestFull>**](UrlSsrfRequestFull.md) | Input URLs to check for SSRF threats | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::UrlSsrfRequestFull
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | URL to validate | [optional]
7
+ **blocked_domains** | **Array<String>** | Top level domains that you do not want to allow access to, e.g. mydomain.com - will block all subdomains as well | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::UrlSsrfResponseBatch
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **output_items** | [**Array<UrlSsrfResponseFull>**](UrlSsrfResponseFull.md) | Results of the operation, with indexes matched to input values | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::UrlSsrfResponseFull
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_url** | **BOOLEAN** | True if the URL is clean, false if it is at risk of containing an SSRF threat or attack | [optional]
7
+ **threat_level** | **String** | Threat level of the URL; possible values are High, Medium, Low and None | [optional]
8
+
9
+
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **valid_url** | **BOOLEAN** | True if the URL is valid, false otherwise | [optional]
7
7
  **well_formed_url** | **String** | Well-formed version of the URL | [optional]
8
+ **top_level_domain_name** | **String** | The top-level domain name of the URL, e.g. mydomain.com | [optional]
8
9
 
9
10
 
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::XssProtectionBatchRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **request_items** | [**Array<XssProtectionRequestItem>**](XssProtectionRequestItem.md) | Multiple items to protect for XSS | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::XssProtectionBatchResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **result_items** | [**Array<XssProtectionResult>**](XssProtectionResult.md) | Results from performing a batch XSS protection operation | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::XssProtectionRequestItem
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_text** | **String** | Individual input text item to protect from XSS | [optional]
7
+
8
+
@@ -19,9 +19,14 @@ require 'cloudmersive-validate-api-client/configuration'
19
19
  # Models
20
20
  require 'cloudmersive-validate-api-client/models/address_get_servers_response'
21
21
  require 'cloudmersive-validate-api-client/models/address_verify_syntax_only_response'
22
+ require 'cloudmersive-validate-api-client/models/bot_check_response'
22
23
  require 'cloudmersive-validate-api-client/models/check_response'
23
24
  require 'cloudmersive-validate-api-client/models/country_details'
24
25
  require 'cloudmersive-validate-api-client/models/country_list_result'
26
+ require 'cloudmersive-validate-api-client/models/date_time_natural_language_parse_request'
27
+ require 'cloudmersive-validate-api-client/models/date_time_now_result'
28
+ require 'cloudmersive-validate-api-client/models/date_time_standardized_parse_request'
29
+ require 'cloudmersive-validate-api-client/models/date_time_standardized_parse_response'
25
30
  require 'cloudmersive-validate-api-client/models/domain_quality_response'
26
31
  require 'cloudmersive-validate-api-client/models/first_name_validation_request'
27
32
  require 'cloudmersive-validate-api-client/models/first_name_validation_response'
@@ -32,21 +37,31 @@ require 'cloudmersive-validate-api-client/models/geolocate_response'
32
37
  require 'cloudmersive-validate-api-client/models/geolocate_street_address_response'
33
38
  require 'cloudmersive-validate-api-client/models/get_gender_request'
34
39
  require 'cloudmersive-validate-api-client/models/get_gender_response'
40
+ require 'cloudmersive-validate-api-client/models/get_public_holidays_request'
35
41
  require 'cloudmersive-validate-api-client/models/get_timezones_request'
36
42
  require 'cloudmersive-validate-api-client/models/get_timezones_response'
43
+ require 'cloudmersive-validate-api-client/models/ip_intelligence_response'
44
+ require 'cloudmersive-validate-api-client/models/ip_reverse_dns_lookup_response'
37
45
  require 'cloudmersive-validate-api-client/models/ip_threat_response'
38
46
  require 'cloudmersive-validate-api-client/models/last_name_validation_request'
39
47
  require 'cloudmersive-validate-api-client/models/last_name_validation_response'
40
48
  require 'cloudmersive-validate-api-client/models/lead_enrichment_request'
41
49
  require 'cloudmersive-validate-api-client/models/lead_enrichment_response'
50
+ require 'cloudmersive-validate-api-client/models/normalize_address_response'
42
51
  require 'cloudmersive-validate-api-client/models/parse_address_request'
43
52
  require 'cloudmersive-validate-api-client/models/parse_address_response'
44
53
  require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
45
54
  require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
55
+ require 'cloudmersive-validate-api-client/models/public_holiday_occurrence'
56
+ require 'cloudmersive-validate-api-client/models/public_holidays_response'
46
57
  require 'cloudmersive-validate-api-client/models/reverse_geocode_address_request'
47
58
  require 'cloudmersive-validate-api-client/models/reverse_geocode_address_response'
48
59
  require 'cloudmersive-validate-api-client/models/timezone'
49
60
  require 'cloudmersive-validate-api-client/models/tor_node_response'
61
+ require 'cloudmersive-validate-api-client/models/url_ssrf_request_batch'
62
+ require 'cloudmersive-validate-api-client/models/url_ssrf_request_full'
63
+ require 'cloudmersive-validate-api-client/models/url_ssrf_response_batch'
64
+ require 'cloudmersive-validate-api-client/models/url_ssrf_response_full'
50
65
  require 'cloudmersive-validate-api-client/models/user_agent_validate_request'
51
66
  require 'cloudmersive-validate-api-client/models/user_agent_validate_response'
52
67
  require 'cloudmersive-validate-api-client/models/validate_address_request'
@@ -68,10 +83,14 @@ require 'cloudmersive-validate-api-client/models/validate_url_response_syntax_on
68
83
  require 'cloudmersive-validate-api-client/models/vat_lookup_request'
69
84
  require 'cloudmersive-validate-api-client/models/vat_lookup_response'
70
85
  require 'cloudmersive-validate-api-client/models/whois_response'
86
+ require 'cloudmersive-validate-api-client/models/xss_protection_batch_request'
87
+ require 'cloudmersive-validate-api-client/models/xss_protection_batch_response'
88
+ require 'cloudmersive-validate-api-client/models/xss_protection_request_item'
71
89
  require 'cloudmersive-validate-api-client/models/xss_protection_result'
72
90
 
73
91
  # APIs
74
92
  require 'cloudmersive-validate-api-client/api/address_api'
93
+ require 'cloudmersive-validate-api-client/api/date_time_api'
75
94
  require 'cloudmersive-validate-api-client/api/domain_api'
76
95
  require 'cloudmersive-validate-api-client/api/email_api'
77
96
  require 'cloudmersive-validate-api-client/api/ip_address_api'
@@ -389,6 +389,60 @@ module CloudmersiveValidateApiClient
389
389
  end
390
390
  return data, status_code, headers
391
391
  end
392
+ # Normalize a street address
393
+ # Normalizes an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
394
+ # @param input Input parse request
395
+ # @param [Hash] opts the optional parameters
396
+ # @return [NormalizeAddressResponse]
397
+ def address_normalize_address(input, opts = {})
398
+ data, _status_code, _headers = address_normalize_address_with_http_info(input, opts)
399
+ data
400
+ end
401
+
402
+ # Normalize a street address
403
+ # Normalizes an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
404
+ # @param input Input parse request
405
+ # @param [Hash] opts the optional parameters
406
+ # @return [Array<(NormalizeAddressResponse, Fixnum, Hash)>] NormalizeAddressResponse data, response status code and response headers
407
+ def address_normalize_address_with_http_info(input, opts = {})
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_normalize_address ...'
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_normalize_address"
414
+ end
415
+ # resource path
416
+ local_var_path = '/validate/address/street-address/normalize'
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 => 'NormalizeAddressResponse')
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug "API called: AddressApi#address_normalize_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
443
+ end
444
+ return data, status_code, headers
445
+ end
392
446
  # Parse an unstructured input text string into an international, formatted address
393
447
  # 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.
394
448
  # @param input Input parse request
@@ -0,0 +1,231 @@
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 DateTimeApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get current date and time as of now
23
+ # Gets the current date and time. Response time is syncronized with atomic clocks, and represents a monotonic, centrally available, consistent clock.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [DateTimeNowResult]
26
+ def date_time_get_now_simple(opts = {})
27
+ data, _status_code, _headers = date_time_get_now_simple_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get current date and time as of now
32
+ # Gets the current date and time. Response time is syncronized with atomic clocks, and represents a monotonic, centrally available, consistent clock.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(DateTimeNowResult, Fixnum, Hash)>] DateTimeNowResult data, response status code and response headers
35
+ def date_time_get_now_simple_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: DateTimeApi.date_time_get_now_simple ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/validate/date-time/get/now'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = ['Apikey']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'DateTimeNowResult')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: DateTimeApi#date_time_get_now_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+ # Get public holidays in the specified country and year
69
+ # Enumerates all public holidays in a given country for a given year. Supports over 100 countries.
70
+ # @param input Input request
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [PublicHolidaysResponse]
73
+ def date_time_get_public_holidays(input, opts = {})
74
+ data, _status_code, _headers = date_time_get_public_holidays_with_http_info(input, opts)
75
+ data
76
+ end
77
+
78
+ # Get public holidays in the specified country and year
79
+ # Enumerates all public holidays in a given country for a given year. Supports over 100 countries.
80
+ # @param input Input request
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [Array<(PublicHolidaysResponse, Fixnum, Hash)>] PublicHolidaysResponse data, response status code and response headers
83
+ def date_time_get_public_holidays_with_http_info(input, opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: DateTimeApi.date_time_get_public_holidays ...'
86
+ end
87
+ # verify the required parameter 'input' is set
88
+ if @api_client.config.client_side_validation && input.nil?
89
+ fail ArgumentError, "Missing the required parameter 'input' when calling DateTimeApi.date_time_get_public_holidays"
90
+ end
91
+ # resource path
92
+ local_var_path = '/validate/date-time/get/holidays'
93
+
94
+ # query parameters
95
+ query_params = {}
96
+
97
+ # header parameters
98
+ header_params = {}
99
+ # HTTP header 'Accept' (if needed)
100
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
101
+ # HTTP header 'Content-Type'
102
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
103
+
104
+ # form parameters
105
+ form_params = {}
106
+
107
+ # http body (model)
108
+ post_body = @api_client.object_to_http_body(input)
109
+ auth_names = ['Apikey']
110
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => 'PublicHolidaysResponse')
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug "API called: DateTimeApi#date_time_get_public_holidays\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
119
+ end
120
+ return data, status_code, headers
121
+ end
122
+ # Parses a free-form natural language date and time string into a date and time
123
+ # Parses an unstructured, free-form, natural language date and time string into a date time object. This is intended for lightweight human-entered input, such as \"tomorrow at 3pm\" or \"tuesday\".
124
+ # @param input Input request
125
+ # @param [Hash] opts the optional parameters
126
+ # @return [DateTimeStandardizedParseResponse]
127
+ def date_time_parse_natural_language_date_time(input, opts = {})
128
+ data, _status_code, _headers = date_time_parse_natural_language_date_time_with_http_info(input, opts)
129
+ data
130
+ end
131
+
132
+ # Parses a free-form natural language date and time string into a date and time
133
+ # Parses an unstructured, free-form, natural language date and time string into a date time object. This is intended for lightweight human-entered input, such as \&quot;tomorrow at 3pm\&quot; or \&quot;tuesday\&quot;.
134
+ # @param input Input request
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [Array<(DateTimeStandardizedParseResponse, Fixnum, Hash)>] DateTimeStandardizedParseResponse data, response status code and response headers
137
+ def date_time_parse_natural_language_date_time_with_http_info(input, opts = {})
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug 'Calling API: DateTimeApi.date_time_parse_natural_language_date_time ...'
140
+ end
141
+ # verify the required parameter 'input' is set
142
+ if @api_client.config.client_side_validation && input.nil?
143
+ fail ArgumentError, "Missing the required parameter 'input' when calling DateTimeApi.date_time_parse_natural_language_date_time"
144
+ end
145
+ # resource path
146
+ local_var_path = '/validate/date-time/parse/date-time/natural-language'
147
+
148
+ # query parameters
149
+ query_params = {}
150
+
151
+ # header parameters
152
+ header_params = {}
153
+ # HTTP header 'Accept' (if needed)
154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
155
+ # HTTP header 'Content-Type'
156
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
157
+
158
+ # form parameters
159
+ form_params = {}
160
+
161
+ # http body (model)
162
+ post_body = @api_client.object_to_http_body(input)
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 => 'DateTimeStandardizedParseResponse')
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug "API called: DateTimeApi#date_time_parse_natural_language_date_time\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
173
+ end
174
+ return data, status_code, headers
175
+ end
176
+ # Parses a standardized date and time string into a date and time
177
+ # Parses a structured date and time string into a date time object. This is intended for standardized date strings that adhere to formatting conventions, rather than natural language input.
178
+ # @param input Input request
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [DateTimeStandardizedParseResponse]
181
+ def date_time_parse_standard_date_time(input, opts = {})
182
+ data, _status_code, _headers = date_time_parse_standard_date_time_with_http_info(input, opts)
183
+ data
184
+ end
185
+
186
+ # Parses a standardized date and time string into a date and time
187
+ # Parses a structured date and time string into a date time object. This is intended for standardized date strings that adhere to formatting conventions, rather than natural language input.
188
+ # @param input Input request
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [Array<(DateTimeStandardizedParseResponse, Fixnum, Hash)>] DateTimeStandardizedParseResponse data, response status code and response headers
191
+ def date_time_parse_standard_date_time_with_http_info(input, opts = {})
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug 'Calling API: DateTimeApi.date_time_parse_standard_date_time ...'
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 DateTimeApi.date_time_parse_standard_date_time"
198
+ end
199
+ # resource path
200
+ local_var_path = '/validate/date-time/parse/date-time/structured'
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 => 'DateTimeStandardizedParseResponse')
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug "API called: DateTimeApi#date_time_parse_standard_date_time\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
227
+ end
228
+ return data, status_code, headers
229
+ end
230
+ end
231
+ end