cloudmersive-validate-api-client 1.4.2 → 2.0.5
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +22 -7
- data/cloudmersive-validate-api-client.gemspec +3 -3
- data/docs/AddressApi.md +270 -1
- data/docs/CountryDetails.md +11 -0
- data/docs/CountryListResult.md +9 -0
- data/docs/DomainApi.md +2 -2
- data/docs/EmailApi.md +3 -3
- data/docs/IPAddressApi.md +56 -1
- data/docs/TorNodeResponse.md +8 -0
- data/docs/ValidateCityRequest.md +11 -0
- data/docs/ValidateCityResponse.md +12 -0
- data/docs/ValidateCountryResponse.md +1 -0
- data/docs/ValidatePostalCodeRequest.md +10 -0
- data/docs/ValidatePostalCodeResponse.md +12 -0
- data/docs/ValidateStateRequest.md +10 -0
- data/docs/ValidateStateResponse.md +11 -0
- data/lib/cloudmersive-validate-api-client.rb +10 -1
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +276 -18
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +14 -18
- data/lib/cloudmersive-validate-api-client/api/email_api.rb +11 -14
- data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +58 -5
- data/lib/cloudmersive-validate-api-client/api/lead_enrichment_api.rb +5 -8
- data/lib/cloudmersive-validate-api-client/api/name_api.rb +17 -22
- data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +5 -6
- data/lib/cloudmersive-validate-api-client/api/user_agent_api.rb +5 -6
- data/lib/cloudmersive-validate-api-client/api/vat_api.rb +5 -6
- data/lib/cloudmersive-validate-api-client/api_client.rb +11 -9
- data/lib/cloudmersive-validate-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-validate-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/check_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/country_details.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/country_list_result.rb +198 -0
- data/lib/cloudmersive-validate-api-client/models/first_name_validation_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/full_name_validation_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/full_name_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_gender_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_gender_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_timezones_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/get_timezones_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/last_name_validation_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/last_name_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/lead_enrichment_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/lead_enrichment_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/parse_address_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/parse_address_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/timezone.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/tor_node_response.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/user_agent_validate_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_address_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_address_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_city_request.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/validate_city_response.rb +226 -0
- data/lib/cloudmersive-validate-api-client/models/validate_country_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +18 -11
- data/lib/cloudmersive-validate-api-client/models/validate_identifier_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_identifier_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_postal_code_request.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/validate_postal_code_response.rb +226 -0
- data/lib/cloudmersive-validate-api-client/models/validate_state_request.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/validate_state_response.rb +216 -0
- data/lib/cloudmersive-validate-api-client/models/validate_url_request_full.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_url_response_full.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +7 -10
- data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +7 -11
- data/lib/cloudmersive-validate-api-client/models/whois_response.rb +7 -10
- data/lib/cloudmersive-validate-api-client/version.rb +2 -2
- data/spec/api/address_api_spec.rb +65 -6
- data/spec/api/domain_api_spec.rb +5 -5
- data/spec/api/email_api_spec.rb +4 -4
- data/spec/api/ip_address_api_spec.rb +14 -2
- data/spec/api/lead_enrichment_api_spec.rb +2 -3
- data/spec/api/name_api_spec.rb +6 -6
- data/spec/api/phone_number_api_spec.rb +2 -2
- data/spec/api/user_agent_api_spec.rb +2 -2
- data/spec/api/vat_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +52 -35
- data/spec/configuration_spec.rb +9 -9
- data/spec/models/address_get_servers_response_spec.rb +3 -4
- data/spec/models/address_verify_syntax_only_response_spec.rb +5 -6
- data/spec/models/check_response_spec.rb +2 -3
- data/spec/models/country_details_spec.rb +59 -0
- data/spec/models/country_list_result_spec.rb +47 -0
- data/spec/models/first_name_validation_request_spec.rb +2 -3
- data/spec/models/first_name_validation_response_spec.rb +3 -4
- data/spec/models/full_email_validation_response_spec.rb +10 -11
- data/spec/models/full_name_validation_request_spec.rb +2 -3
- data/spec/models/full_name_validation_response_spec.rb +11 -12
- data/spec/models/geolocate_response_spec.rb +10 -11
- data/spec/models/get_gender_request_spec.rb +3 -4
- data/spec/models/get_gender_response_spec.rb +3 -4
- data/spec/models/get_timezones_request_spec.rb +2 -3
- data/spec/models/get_timezones_response_spec.rb +7 -8
- data/spec/models/last_name_validation_request_spec.rb +2 -3
- data/spec/models/last_name_validation_response_spec.rb +3 -4
- data/spec/models/lead_enrichment_request_spec.rb +15 -16
- data/spec/models/lead_enrichment_response_spec.rb +19 -20
- data/spec/models/parse_address_request_spec.rb +3 -4
- data/spec/models/parse_address_response_spec.rb +10 -11
- data/spec/models/phone_number_validate_request_spec.rb +3 -4
- data/spec/models/phone_number_validation_response_spec.rb +9 -10
- data/spec/models/timezone_spec.rb +4 -5
- data/spec/models/tor_node_response_spec.rb +41 -0
- data/spec/models/user_agent_validate_request_spec.rb +2 -3
- data/spec/models/user_agent_validate_response_spec.rb +15 -16
- data/spec/models/validate_address_request_spec.rb +7 -8
- data/spec/models/validate_address_response_spec.rb +4 -5
- data/spec/models/validate_city_request_spec.rb +59 -0
- data/spec/models/validate_city_response_spec.rb +65 -0
- data/spec/models/validate_country_request_spec.rb +2 -3
- data/spec/models/validate_country_response_spec.rb +13 -8
- data/spec/models/validate_identifier_request_spec.rb +9 -10
- data/spec/models/validate_identifier_response_spec.rb +3 -4
- data/spec/models/validate_postal_code_request_spec.rb +53 -0
- data/spec/models/validate_postal_code_response_spec.rb +65 -0
- data/spec/models/validate_state_request_spec.rb +53 -0
- data/spec/models/validate_state_response_spec.rb +59 -0
- data/spec/models/validate_url_request_full_spec.rb +2 -3
- data/spec/models/validate_url_request_syntax_only_spec.rb +2 -3
- data/spec/models/validate_url_response_full_spec.rb +6 -7
- data/spec/models/validate_url_response_syntax_only_spec.rb +3 -4
- data/spec/models/vat_lookup_request_spec.rb +2 -3
- data/spec/models/vat_lookup_response_spec.rb +13 -14
- data/spec/models/whois_response_spec.rb +16 -17
- data/spec/spec_helper.rb +1 -1
- metadata +29 -2
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -32,14 +32,37 @@ describe 'AddressApi' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# unit tests for address_check_eu_membership
|
36
|
+
# Check if a country is a member of the European Union (EU)
|
37
|
+
# Checks if the input country is a member of the European Union or not.
|
38
|
+
# @param input Input request
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [ValidateCountryResponse]
|
41
|
+
describe 'address_check_eu_membership test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
35
47
|
# unit tests for address_country
|
36
48
|
# Validate and normalize country information, return ISO 3166-1 country codes and country name
|
37
|
-
# Validates and normalizes country information, and returns key information about a country. Also returns distinct time zones in the country.
|
49
|
+
# 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.
|
38
50
|
# @param input Input request
|
39
51
|
# @param [Hash] opts the optional parameters
|
40
52
|
# @return [ValidateCountryResponse]
|
41
53
|
describe 'address_country test' do
|
42
|
-
it
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# unit tests for address_country_list
|
60
|
+
# Get a list of ISO 3166-1 countries
|
61
|
+
# Enumerates the list of ISO 3166-1 countries, including name, country codes, and more.
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @return [CountryListResult]
|
64
|
+
describe 'address_country_list test' do
|
65
|
+
it 'should work' do
|
43
66
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
67
|
end
|
45
68
|
end
|
@@ -51,7 +74,7 @@ describe 'AddressApi' do
|
|
51
74
|
# @param [Hash] opts the optional parameters
|
52
75
|
# @return [GetTimezonesResponse]
|
53
76
|
describe 'address_get_timezone test' do
|
54
|
-
it
|
77
|
+
it 'should work' do
|
55
78
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
79
|
end
|
57
80
|
end
|
@@ -63,7 +86,7 @@ describe 'AddressApi' do
|
|
63
86
|
# @param [Hash] opts the optional parameters
|
64
87
|
# @return [ParseAddressResponse]
|
65
88
|
describe 'address_parse_string test' do
|
66
|
-
it
|
89
|
+
it 'should work' do
|
67
90
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
91
|
end
|
69
92
|
end
|
@@ -75,7 +98,43 @@ describe 'AddressApi' do
|
|
75
98
|
# @param [Hash] opts the optional parameters
|
76
99
|
# @return [ValidateAddressResponse]
|
77
100
|
describe 'address_validate_address test' do
|
78
|
-
it
|
101
|
+
it 'should work' do
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# unit tests for address_validate_city
|
107
|
+
# Validate a City and State/Province combination, get location information about it
|
108
|
+
# 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.
|
109
|
+
# @param input Input parse request
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [ValidateCityResponse]
|
112
|
+
describe 'address_validate_city test' do
|
113
|
+
it 'should work' do
|
114
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# unit tests for address_validate_postal_code
|
119
|
+
# Validate a postal code, get location information about it
|
120
|
+
# Checks if the input postal code is valid, and returns information about it such as City, State and more.
|
121
|
+
# @param input Input parse request
|
122
|
+
# @param [Hash] opts the optional parameters
|
123
|
+
# @return [ValidatePostalCodeResponse]
|
124
|
+
describe 'address_validate_postal_code test' do
|
125
|
+
it 'should work' do
|
126
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# unit tests for address_validate_state
|
131
|
+
# Validate a state or province, name or abbreviation, get location information about it
|
132
|
+
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more.
|
133
|
+
# @param input Input parse request
|
134
|
+
# @param [Hash] opts the optional parameters
|
135
|
+
# @return [ValidateStateResponse]
|
136
|
+
describe 'address_validate_state test' do
|
137
|
+
it 'should work' do
|
79
138
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
139
|
end
|
81
140
|
end
|
data/spec/api/domain_api_spec.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ describe 'DomainApi' do
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [CheckResponse]
|
41
41
|
describe 'domain_check test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -51,7 +51,7 @@ describe 'DomainApi' do
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
52
52
|
# @return [WhoisResponse]
|
53
53
|
describe 'domain_post test' do
|
54
|
-
it
|
54
|
+
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
56
|
end
|
57
57
|
end
|
@@ -63,7 +63,7 @@ describe 'DomainApi' do
|
|
63
63
|
# @param [Hash] opts the optional parameters
|
64
64
|
# @return [ValidateUrlResponseFull]
|
65
65
|
describe 'domain_url_full test' do
|
66
|
-
it
|
66
|
+
it 'should work' do
|
67
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
68
|
end
|
69
69
|
end
|
@@ -75,7 +75,7 @@ describe 'DomainApi' do
|
|
75
75
|
# @param [Hash] opts the optional parameters
|
76
76
|
# @return [ValidateUrlResponseSyntaxOnly]
|
77
77
|
describe 'domain_url_syntax_only test' do
|
78
|
-
it
|
78
|
+
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
80
|
end
|
81
81
|
end
|
data/spec/api/email_api_spec.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ describe 'EmailApi' do
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [AddressGetServersResponse]
|
41
41
|
describe 'email_address_get_servers test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -51,7 +51,7 @@ describe 'EmailApi' do
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
52
52
|
# @return [FullEmailValidationResponse]
|
53
53
|
describe 'email_full_validation test' do
|
54
|
-
it
|
54
|
+
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
56
|
end
|
57
57
|
end
|
@@ -63,7 +63,7 @@ describe 'EmailApi' do
|
|
63
63
|
# @param [Hash] opts the optional parameters
|
64
64
|
# @return [AddressVerifySyntaxOnlyResponse]
|
65
65
|
describe 'email_post test' do
|
66
|
-
it
|
66
|
+
it 'should work' do
|
67
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
68
|
end
|
69
69
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -32,6 +32,18 @@ describe 'IPAddressApi' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# unit tests for i_p_address_is_tor_node
|
36
|
+
# Check if IP address is a Tor node server
|
37
|
+
# Check if the input IP address is a Tor exit node server. Tor servers are a type of privacy-preserving technology that can hide the original IP address who makes a request.
|
38
|
+
# @param value IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [TorNodeResponse]
|
41
|
+
describe 'i_p_address_is_tor_node test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
35
47
|
# unit tests for i_p_address_post
|
36
48
|
# Geolocate an IP address
|
37
49
|
# Identify an IP address Country, State/Provence, City, Zip/Postal Code, etc. Useful for security and UX applications.
|
@@ -39,7 +51,7 @@ describe 'IPAddressApi' do
|
|
39
51
|
# @param [Hash] opts the optional parameters
|
40
52
|
# @return [GeolocateResponse]
|
41
53
|
describe 'i_p_address_post test' do
|
42
|
-
it
|
54
|
+
it 'should work' do
|
43
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
56
|
end
|
45
57
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -34,12 +34,11 @@ describe 'LeadEnrichmentApi' do
|
|
34
34
|
|
35
35
|
# unit tests for lead_enrichment_enrich_lead
|
36
36
|
# Enrich an input lead with additional fields of data
|
37
|
-
#
|
38
37
|
# @param request Input lead with known fields set, and unknown fields left blank (null)
|
39
38
|
# @param [Hash] opts the optional parameters
|
40
39
|
# @return [LeadEnrichmentResponse]
|
41
40
|
describe 'lead_enrichment_enrich_lead test' do
|
42
|
-
it
|
41
|
+
it 'should work' do
|
43
42
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
43
|
end
|
45
44
|
end
|
data/spec/api/name_api_spec.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ describe 'NameApi' do
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [GetGenderResponse]
|
41
41
|
describe 'name_get_gender test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -51,7 +51,7 @@ describe 'NameApi' do
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
52
52
|
# @return [ValidateIdentifierResponse]
|
53
53
|
describe 'name_identifier test' do
|
54
|
-
it
|
54
|
+
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
56
|
end
|
57
57
|
end
|
@@ -63,7 +63,7 @@ describe 'NameApi' do
|
|
63
63
|
# @param [Hash] opts the optional parameters
|
64
64
|
# @return [FirstNameValidationResponse]
|
65
65
|
describe 'name_validate_first_name test' do
|
66
|
-
it
|
66
|
+
it 'should work' do
|
67
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
68
|
end
|
69
69
|
end
|
@@ -75,7 +75,7 @@ describe 'NameApi' do
|
|
75
75
|
# @param [Hash] opts the optional parameters
|
76
76
|
# @return [FullNameValidationResponse]
|
77
77
|
describe 'name_validate_full_name test' do
|
78
|
-
it
|
78
|
+
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
80
|
end
|
81
81
|
end
|
@@ -87,7 +87,7 @@ describe 'NameApi' do
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
88
88
|
# @return [LastNameValidationResponse]
|
89
89
|
describe 'name_validate_last_name test' do
|
90
|
-
it
|
90
|
+
it 'should work' do
|
91
91
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
92
|
end
|
93
93
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ describe 'PhoneNumberApi' do
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [PhoneNumberValidationResponse]
|
41
41
|
describe 'phone_number_syntax_only test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ describe 'UserAgentApi' do
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [UserAgentValidateResponse]
|
41
41
|
describe 'user_agent_parse test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
data/spec/api/vat_api_spec.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,7 +39,7 @@ describe 'VatApi' do
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @return [VatLookupResponse]
|
41
41
|
describe 'vat_vat_lookup test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
data/spec/api_client_spec.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -51,11 +51,11 @@ describe CloudmersiveValidateApiClient::ApiClient do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
describe
|
54
|
+
describe 'params_encoding in #build_request' do
|
55
55
|
let(:config) { CloudmersiveValidateApiClient::Configuration.new }
|
56
56
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new(config) }
|
57
57
|
|
58
|
-
it
|
58
|
+
it 'defaults to nil' do
|
59
59
|
expect(CloudmersiveValidateApiClient::Configuration.default.params_encoding).to eq(nil)
|
60
60
|
expect(config.params_encoding).to eq(nil)
|
61
61
|
|
@@ -63,18 +63,18 @@ describe CloudmersiveValidateApiClient::ApiClient do
|
|
63
63
|
expect(request.options[:params_encoding]).to eq(nil)
|
64
64
|
end
|
65
65
|
|
66
|
-
it
|
66
|
+
it 'can be customized' do
|
67
67
|
config.params_encoding = :multi
|
68
68
|
request = api_client.build_request(:get, '/test')
|
69
69
|
expect(request.options[:params_encoding]).to eq(:multi)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
describe
|
73
|
+
describe 'timeout in #build_request' do
|
74
74
|
let(:config) { CloudmersiveValidateApiClient::Configuration.new }
|
75
75
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new(config) }
|
76
76
|
|
77
|
-
it
|
77
|
+
it 'defaults to 0' do
|
78
78
|
expect(CloudmersiveValidateApiClient::Configuration.default.timeout).to eq(0)
|
79
79
|
expect(config.timeout).to eq(0)
|
80
80
|
|
@@ -82,88 +82,105 @@ describe CloudmersiveValidateApiClient::ApiClient do
|
|
82
82
|
expect(request.options[:timeout]).to eq(0)
|
83
83
|
end
|
84
84
|
|
85
|
-
it
|
85
|
+
it 'can be customized' do
|
86
86
|
config.timeout = 100
|
87
87
|
request = api_client.build_request(:get, '/test')
|
88
88
|
expect(request.options[:timeout]).to eq(100)
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
describe
|
92
|
+
describe '#build_request' do
|
93
|
+
let(:config) { CloudmersiveValidateApiClient::Configuration.new }
|
94
|
+
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new(config) }
|
95
|
+
|
96
|
+
it 'does not send multipart to request' do
|
97
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_not_including(:multipart))
|
98
|
+
api_client.build_request(:get, '/test')
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'when the content type is multipart' do
|
102
|
+
it 'sends multipart to request' do
|
103
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_including(multipart: true))
|
104
|
+
api_client.build_request(:get, '/test', {header_params: { 'Content-Type' => 'multipart/form-data'}})
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe '#deserialize' do
|
93
110
|
it "handles Array<Integer>" do
|
94
111
|
api_client = CloudmersiveValidateApiClient::ApiClient.new
|
95
|
-
headers = {'Content-Type' => 'application/json'}
|
112
|
+
headers = { 'Content-Type' => 'application/json' }
|
96
113
|
response = double('response', headers: headers, body: '[12, 34]')
|
97
114
|
data = api_client.deserialize(response, 'Array<Integer>')
|
98
115
|
expect(data).to be_instance_of(Array)
|
99
116
|
expect(data).to eq([12, 34])
|
100
117
|
end
|
101
118
|
|
102
|
-
it
|
119
|
+
it 'handles Array<Array<Integer>>' do
|
103
120
|
api_client = CloudmersiveValidateApiClient::ApiClient.new
|
104
|
-
headers = {'Content-Type' => 'application/json'}
|
121
|
+
headers = { 'Content-Type' => 'application/json' }
|
105
122
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
106
123
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
107
124
|
expect(data).to be_instance_of(Array)
|
108
125
|
expect(data).to eq([[12, 34], [56]])
|
109
126
|
end
|
110
127
|
|
111
|
-
it
|
128
|
+
it 'handles Hash<String, String>' do
|
112
129
|
api_client = CloudmersiveValidateApiClient::ApiClient.new
|
113
|
-
headers = {'Content-Type' => 'application/json'}
|
130
|
+
headers = { 'Content-Type' => 'application/json' }
|
114
131
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
115
132
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
116
133
|
expect(data).to be_instance_of(Hash)
|
117
|
-
expect(data).to eq(
|
134
|
+
expect(data).to eq(:message => 'Hello')
|
118
135
|
end
|
119
136
|
end
|
120
137
|
|
121
138
|
describe "#object_to_hash" do
|
122
|
-
it
|
139
|
+
it 'ignores nils and includes empty arrays' do
|
123
140
|
# uncomment below to test object_to_hash for model
|
124
|
-
#api_client = CloudmersiveValidateApiClient::ApiClient.new
|
125
|
-
#_model = CloudmersiveValidateApiClient::ModelName.new
|
141
|
+
# api_client = CloudmersiveValidateApiClient::ApiClient.new
|
142
|
+
# _model = CloudmersiveValidateApiClient::ModelName.new
|
126
143
|
# update the model attribute below
|
127
|
-
#_model.id = 1
|
144
|
+
# _model.id = 1
|
128
145
|
# update the expected value (hash) below
|
129
|
-
#expected = {id: 1, name: '', tags: []}
|
130
|
-
#expect(api_client.object_to_hash(_model)).to eq(expected)
|
146
|
+
# expected = {id: 1, name: '', tags: []}
|
147
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
131
148
|
end
|
132
149
|
end
|
133
150
|
|
134
|
-
describe
|
151
|
+
describe '#build_collection_param' do
|
135
152
|
let(:param) { ['aa', 'bb', 'cc'] }
|
136
153
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
|
137
154
|
|
138
|
-
it
|
155
|
+
it 'works for csv' do
|
139
156
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
140
157
|
end
|
141
158
|
|
142
|
-
it
|
159
|
+
it 'works for ssv' do
|
143
160
|
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
144
161
|
end
|
145
162
|
|
146
|
-
it
|
163
|
+
it 'works for tsv' do
|
147
164
|
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
148
165
|
end
|
149
166
|
|
150
|
-
it
|
167
|
+
it 'works for pipes' do
|
151
168
|
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
152
169
|
end
|
153
170
|
|
154
|
-
it
|
171
|
+
it 'works for multi' do
|
155
172
|
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
156
173
|
end
|
157
174
|
|
158
|
-
it
|
175
|
+
it 'fails for invalid collection format' do
|
159
176
|
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
160
177
|
end
|
161
178
|
end
|
162
179
|
|
163
|
-
describe
|
180
|
+
describe '#json_mime?' do
|
164
181
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
|
165
182
|
|
166
|
-
it
|
183
|
+
it 'works' do
|
167
184
|
expect(api_client.json_mime?(nil)).to eq false
|
168
185
|
expect(api_client.json_mime?('')).to eq false
|
169
186
|
|
@@ -177,10 +194,10 @@ describe CloudmersiveValidateApiClient::ApiClient do
|
|
177
194
|
end
|
178
195
|
end
|
179
196
|
|
180
|
-
describe
|
197
|
+
describe '#select_header_accept' do
|
181
198
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
|
182
199
|
|
183
|
-
it
|
200
|
+
it 'works' do
|
184
201
|
expect(api_client.select_header_accept(nil)).to be_nil
|
185
202
|
expect(api_client.select_header_accept([])).to be_nil
|
186
203
|
|
@@ -193,10 +210,10 @@ describe CloudmersiveValidateApiClient::ApiClient do
|
|
193
210
|
end
|
194
211
|
end
|
195
212
|
|
196
|
-
describe
|
213
|
+
describe '#select_header_content_type' do
|
197
214
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
|
198
215
|
|
199
|
-
it
|
216
|
+
it 'works' do
|
200
217
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
201
218
|
expect(api_client.select_header_content_type([])).to eq('application/json')
|
202
219
|
|
@@ -208,10 +225,10 @@ describe CloudmersiveValidateApiClient::ApiClient do
|
|
208
225
|
end
|
209
226
|
end
|
210
227
|
|
211
|
-
describe
|
228
|
+
describe '#sanitize_filename' do
|
212
229
|
let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
|
213
230
|
|
214
|
-
it
|
231
|
+
it 'works' do
|
215
232
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
216
233
|
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
217
234
|
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|