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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +22 -7
  4. data/cloudmersive-validate-api-client.gemspec +3 -3
  5. data/docs/AddressApi.md +270 -1
  6. data/docs/CountryDetails.md +11 -0
  7. data/docs/CountryListResult.md +9 -0
  8. data/docs/DomainApi.md +2 -2
  9. data/docs/EmailApi.md +3 -3
  10. data/docs/IPAddressApi.md +56 -1
  11. data/docs/TorNodeResponse.md +8 -0
  12. data/docs/ValidateCityRequest.md +11 -0
  13. data/docs/ValidateCityResponse.md +12 -0
  14. data/docs/ValidateCountryResponse.md +1 -0
  15. data/docs/ValidatePostalCodeRequest.md +10 -0
  16. data/docs/ValidatePostalCodeResponse.md +12 -0
  17. data/docs/ValidateStateRequest.md +10 -0
  18. data/docs/ValidateStateResponse.md +11 -0
  19. data/lib/cloudmersive-validate-api-client.rb +10 -1
  20. data/lib/cloudmersive-validate-api-client/api/address_api.rb +276 -18
  21. data/lib/cloudmersive-validate-api-client/api/domain_api.rb +14 -18
  22. data/lib/cloudmersive-validate-api-client/api/email_api.rb +11 -14
  23. data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +58 -5
  24. data/lib/cloudmersive-validate-api-client/api/lead_enrichment_api.rb +5 -8
  25. data/lib/cloudmersive-validate-api-client/api/name_api.rb +17 -22
  26. data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +5 -6
  27. data/lib/cloudmersive-validate-api-client/api/user_agent_api.rb +5 -6
  28. data/lib/cloudmersive-validate-api-client/api/vat_api.rb +5 -6
  29. data/lib/cloudmersive-validate-api-client/api_client.rb +11 -9
  30. data/lib/cloudmersive-validate-api-client/api_error.rb +1 -1
  31. data/lib/cloudmersive-validate-api-client/configuration.rb +2 -2
  32. data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +7 -10
  33. data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +7 -10
  34. data/lib/cloudmersive-validate-api-client/models/check_response.rb +7 -10
  35. data/lib/cloudmersive-validate-api-client/models/country_details.rb +216 -0
  36. data/lib/cloudmersive-validate-api-client/models/country_list_result.rb +198 -0
  37. data/lib/cloudmersive-validate-api-client/models/first_name_validation_request.rb +7 -10
  38. data/lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb +7 -10
  39. data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +7 -10
  40. data/lib/cloudmersive-validate-api-client/models/full_name_validation_request.rb +7 -10
  41. data/lib/cloudmersive-validate-api-client/models/full_name_validation_response.rb +7 -10
  42. data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +7 -10
  43. data/lib/cloudmersive-validate-api-client/models/get_gender_request.rb +7 -10
  44. data/lib/cloudmersive-validate-api-client/models/get_gender_response.rb +7 -10
  45. data/lib/cloudmersive-validate-api-client/models/get_timezones_request.rb +7 -10
  46. data/lib/cloudmersive-validate-api-client/models/get_timezones_response.rb +7 -10
  47. data/lib/cloudmersive-validate-api-client/models/last_name_validation_request.rb +7 -10
  48. data/lib/cloudmersive-validate-api-client/models/last_name_validation_response.rb +7 -10
  49. data/lib/cloudmersive-validate-api-client/models/lead_enrichment_request.rb +7 -10
  50. data/lib/cloudmersive-validate-api-client/models/lead_enrichment_response.rb +7 -10
  51. data/lib/cloudmersive-validate-api-client/models/parse_address_request.rb +7 -10
  52. data/lib/cloudmersive-validate-api-client/models/parse_address_response.rb +7 -10
  53. data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +7 -10
  54. data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +7 -10
  55. data/lib/cloudmersive-validate-api-client/models/timezone.rb +7 -10
  56. data/lib/cloudmersive-validate-api-client/models/tor_node_response.rb +186 -0
  57. data/lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb +7 -10
  58. data/lib/cloudmersive-validate-api-client/models/user_agent_validate_response.rb +7 -10
  59. data/lib/cloudmersive-validate-api-client/models/validate_address_request.rb +7 -10
  60. data/lib/cloudmersive-validate-api-client/models/validate_address_response.rb +7 -10
  61. data/lib/cloudmersive-validate-api-client/models/validate_city_request.rb +216 -0
  62. data/lib/cloudmersive-validate-api-client/models/validate_city_response.rb +226 -0
  63. data/lib/cloudmersive-validate-api-client/models/validate_country_request.rb +7 -10
  64. data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +18 -11
  65. data/lib/cloudmersive-validate-api-client/models/validate_identifier_request.rb +7 -10
  66. data/lib/cloudmersive-validate-api-client/models/validate_identifier_response.rb +7 -10
  67. data/lib/cloudmersive-validate-api-client/models/validate_postal_code_request.rb +206 -0
  68. data/lib/cloudmersive-validate-api-client/models/validate_postal_code_response.rb +226 -0
  69. data/lib/cloudmersive-validate-api-client/models/validate_state_request.rb +206 -0
  70. data/lib/cloudmersive-validate-api-client/models/validate_state_response.rb +216 -0
  71. data/lib/cloudmersive-validate-api-client/models/validate_url_request_full.rb +7 -10
  72. data/lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb +7 -10
  73. data/lib/cloudmersive-validate-api-client/models/validate_url_response_full.rb +7 -10
  74. data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +7 -10
  75. data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +7 -10
  76. data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +7 -11
  77. data/lib/cloudmersive-validate-api-client/models/whois_response.rb +7 -10
  78. data/lib/cloudmersive-validate-api-client/version.rb +2 -2
  79. data/spec/api/address_api_spec.rb +65 -6
  80. data/spec/api/domain_api_spec.rb +5 -5
  81. data/spec/api/email_api_spec.rb +4 -4
  82. data/spec/api/ip_address_api_spec.rb +14 -2
  83. data/spec/api/lead_enrichment_api_spec.rb +2 -3
  84. data/spec/api/name_api_spec.rb +6 -6
  85. data/spec/api/phone_number_api_spec.rb +2 -2
  86. data/spec/api/user_agent_api_spec.rb +2 -2
  87. data/spec/api/vat_api_spec.rb +2 -2
  88. data/spec/api_client_spec.rb +52 -35
  89. data/spec/configuration_spec.rb +9 -9
  90. data/spec/models/address_get_servers_response_spec.rb +3 -4
  91. data/spec/models/address_verify_syntax_only_response_spec.rb +5 -6
  92. data/spec/models/check_response_spec.rb +2 -3
  93. data/spec/models/country_details_spec.rb +59 -0
  94. data/spec/models/country_list_result_spec.rb +47 -0
  95. data/spec/models/first_name_validation_request_spec.rb +2 -3
  96. data/spec/models/first_name_validation_response_spec.rb +3 -4
  97. data/spec/models/full_email_validation_response_spec.rb +10 -11
  98. data/spec/models/full_name_validation_request_spec.rb +2 -3
  99. data/spec/models/full_name_validation_response_spec.rb +11 -12
  100. data/spec/models/geolocate_response_spec.rb +10 -11
  101. data/spec/models/get_gender_request_spec.rb +3 -4
  102. data/spec/models/get_gender_response_spec.rb +3 -4
  103. data/spec/models/get_timezones_request_spec.rb +2 -3
  104. data/spec/models/get_timezones_response_spec.rb +7 -8
  105. data/spec/models/last_name_validation_request_spec.rb +2 -3
  106. data/spec/models/last_name_validation_response_spec.rb +3 -4
  107. data/spec/models/lead_enrichment_request_spec.rb +15 -16
  108. data/spec/models/lead_enrichment_response_spec.rb +19 -20
  109. data/spec/models/parse_address_request_spec.rb +3 -4
  110. data/spec/models/parse_address_response_spec.rb +10 -11
  111. data/spec/models/phone_number_validate_request_spec.rb +3 -4
  112. data/spec/models/phone_number_validation_response_spec.rb +9 -10
  113. data/spec/models/timezone_spec.rb +4 -5
  114. data/spec/models/tor_node_response_spec.rb +41 -0
  115. data/spec/models/user_agent_validate_request_spec.rb +2 -3
  116. data/spec/models/user_agent_validate_response_spec.rb +15 -16
  117. data/spec/models/validate_address_request_spec.rb +7 -8
  118. data/spec/models/validate_address_response_spec.rb +4 -5
  119. data/spec/models/validate_city_request_spec.rb +59 -0
  120. data/spec/models/validate_city_response_spec.rb +65 -0
  121. data/spec/models/validate_country_request_spec.rb +2 -3
  122. data/spec/models/validate_country_response_spec.rb +13 -8
  123. data/spec/models/validate_identifier_request_spec.rb +9 -10
  124. data/spec/models/validate_identifier_response_spec.rb +3 -4
  125. data/spec/models/validate_postal_code_request_spec.rb +53 -0
  126. data/spec/models/validate_postal_code_response_spec.rb +65 -0
  127. data/spec/models/validate_state_request_spec.rb +53 -0
  128. data/spec/models/validate_state_response_spec.rb +59 -0
  129. data/spec/models/validate_url_request_full_spec.rb +2 -3
  130. data/spec/models/validate_url_request_syntax_only_spec.rb +2 -3
  131. data/spec/models/validate_url_response_full_spec.rb +6 -7
  132. data/spec/models/validate_url_response_syntax_only_spec.rb +3 -4
  133. data/spec/models/vat_lookup_request_spec.rb +2 -3
  134. data/spec/models/vat_lookup_response_spec.rb +13 -14
  135. data/spec/models/whois_response_spec.rb +16 -17
  136. data/spec/spec_helper.rb +1 -1
  137. 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.3.1
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 "should work" do
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 "should work" do
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 "should work" do
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 "should work" do
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
@@ -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.3.1
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 "should work" do
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 "should work" do
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 "should work" do
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 "should work" do
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
@@ -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.3.1
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 "should work" do
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 "should work" do
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 "should work" do
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.3.1
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 "should work" do
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.3.1
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 "should work" do
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
@@ -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.3.1
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 "should work" do
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 "should work" do
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 "should work" do
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 "should work" do
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 "should work" do
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.3.1
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 "should work" do
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.3.1
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 "should work" do
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.3.1
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 "should work" do
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.3.1
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 "params_encoding in #build_request" do
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 "defaults to nil" do
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 "can be customized" do
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 "timeout in #build_request" do
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 "defaults to 0" do
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 "can be customized" do
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 "#deserialize" do
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 "handles Array<Array<Integer>>" do
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 "handles Hash<String, String>" do
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({:message => 'Hello'})
134
+ expect(data).to eq(:message => 'Hello')
118
135
  end
119
136
  end
120
137
 
121
138
  describe "#object_to_hash" do
122
- it "ignores nils and includes empty arrays" do
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 "#build_collection_param" do
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 "works for csv" do
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 "works for ssv" do
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 "works for tsv" do
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 "works for pipes" do
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 "works for multi" do
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 "fails for invalid collection format" do
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 "#json_mime?" do
180
+ describe '#json_mime?' do
164
181
  let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
165
182
 
166
- it "works" do
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 "#select_header_accept" do
197
+ describe '#select_header_accept' do
181
198
  let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
182
199
 
183
- it "works" do
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 "#select_header_content_type" do
213
+ describe '#select_header_content_type' do
197
214
  let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
198
215
 
199
- it "works" do
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 "#sanitize_filename" do
228
+ describe '#sanitize_filename' do
212
229
  let(:api_client) { CloudmersiveValidateApiClient::ApiClient.new }
213
230
 
214
- it "works" do
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')