cloudmersive-validate-api-client 1.3.4 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 817501887749af476acdf5fa424e2f4a66cddbec55b12cedb09b7febb7cb99ff
4
- data.tar.gz: 7f824dd84a04036e83f4b715797d9e269680c937e03ebca9568dcc3631aa6f87
3
+ metadata.gz: a6bfce70a2d0aeed84aa2f8534ed8e27ac91f23928da85a3c240cfff9924cdfa
4
+ data.tar.gz: ba33691519f32aa96a7d02d69e94d96ef7383e0e41cff23aae05273fc7fffb93
5
5
  SHA512:
6
- metadata.gz: 283010bb8a35b2b6cf0d94aa4373a91343f4bf566d475a6395502cce880d79a7caf1476114298dd9b17f3208ffbcae7f7738fa62af8ac85eb81cfba9ef0847fe
7
- data.tar.gz: ae34deb3ad3397ff0291fe81f2b88a367f78c6fd3b1e5480c8ecb9bbd1e3eaacf1b1773af569937902951d4de58092115b92269c8e19d76e4ff2c974e4ca5626
6
+ metadata.gz: 26907fe136c8911a82fe471ed4d64b9e146062b564b316269e10ecb200b737c562d36875ba044e872ac7d3c7b9a74c67f9497f94d12b7bc7b371d9f68fb324c9
7
+ data.tar.gz: d9e8761ab1abb1a9fdc92901ff93ab2a767e855cc8cf5bb0800a16e380f594ac52805f1a0c15dbfd0d4ae3b3f9899e5501321af32047087284a49cc094478b11
data/README.md CHANGED
@@ -7,7 +7,7 @@ The validation APIs help you validate data. Check if an E-mail address is real.
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 1.3.4
10
+ - Package version: 1.3.5
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-validate-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-validate-api-client-1.3.4.gem
26
+ gem install ./cloudmersive-validate-api-client-1.3.5.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-validate-api-client-1.3.4.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-validate-api-client-1.3.5.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-validate-api-client', '~> 1.3.4'
34
+ gem 'cloudmersive-validate-api-client', '~> 1.3.5'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -86,6 +86,7 @@ Class | Method | HTTP request | Description
86
86
  *CloudmersiveValidateApiClient::AddressApi* | [**address_parse_string**](docs/AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
87
87
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_check**](docs/DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
88
88
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_post**](docs/DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
89
+ *CloudmersiveValidateApiClient::DomainApi* | [**domain_url_syntax_only**](docs/DomainApi.md#domain_url_syntax_only) | **POST** /validate/domain/url/syntax-only | Validate a URL syntactically
89
90
  *CloudmersiveValidateApiClient::EmailApi* | [**email_address_get_servers**](docs/EmailApi.md#email_address_get_servers) | **POST** /validate/email/address/servers | Partially check whether an email address is valid
90
91
  *CloudmersiveValidateApiClient::EmailApi* | [**email_full_validation**](docs/EmailApi.md#email_full_validation) | **POST** /validate/email/address/full | Fully validate an email address
91
92
  *CloudmersiveValidateApiClient::EmailApi* | [**email_post**](docs/EmailApi.md#email_post) | **POST** /validate/email/address/syntaxOnly | Validate email adddress for syntactic correctness only
@@ -117,6 +118,8 @@ Class | Method | HTTP request | Description
117
118
  - [CloudmersiveValidateApiClient::ParseAddressResponse](docs/ParseAddressResponse.md)
118
119
  - [CloudmersiveValidateApiClient::PhoneNumberValidateRequest](docs/PhoneNumberValidateRequest.md)
119
120
  - [CloudmersiveValidateApiClient::PhoneNumberValidationResponse](docs/PhoneNumberValidationResponse.md)
121
+ - [CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly](docs/ValidateUrlRequestSyntaxOnly.md)
122
+ - [CloudmersiveValidateApiClient::ValidateUrlResponseSyntaxOnly](docs/ValidateUrlResponseSyntaxOnly.md)
120
123
  - [CloudmersiveValidateApiClient::VatLookupRequest](docs/VatLookupRequest.md)
121
124
  - [CloudmersiveValidateApiClient::VatLookupResponse](docs/VatLookupResponse.md)
122
125
  - [CloudmersiveValidateApiClient::WhoisResponse](docs/WhoisResponse.md)
data/docs/DomainApi.md CHANGED
@@ -6,6 +6,7 @@ Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**domain_check**](DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
8
8
  [**domain_post**](DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
9
+ [**domain_url_syntax_only**](DomainApi.md#domain_url_syntax_only) | **POST** /validate/domain/url/syntax-only | Validate a URL syntactically
9
10
 
10
11
 
11
12
  # **domain_check**
@@ -116,3 +117,57 @@ Name | Type | Description | Notes
116
117
 
117
118
 
118
119
 
120
+ # **domain_url_syntax_only**
121
+ > ValidateUrlResponseSyntaxOnly domain_url_syntax_only(request)
122
+
123
+ Validate a URL syntactically
124
+
125
+ Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
126
+
127
+ ### Example
128
+ ```ruby
129
+ # load the gem
130
+ require 'cloudmersive-validate-api-client'
131
+ # setup authorization
132
+ CloudmersiveValidateApiClient.configure do |config|
133
+ # Configure API key authorization: Apikey
134
+ config.api_key['Apikey'] = 'YOUR API KEY'
135
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
136
+ #config.api_key_prefix['Apikey'] = 'Bearer'
137
+ end
138
+
139
+ api_instance = CloudmersiveValidateApiClient::DomainApi.new
140
+
141
+ request = CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly.new # ValidateUrlRequestSyntaxOnly |
142
+
143
+
144
+ begin
145
+ #Validate a URL syntactically
146
+ result = api_instance.domain_url_syntax_only(request)
147
+ p result
148
+ rescue CloudmersiveValidateApiClient::ApiError => e
149
+ puts "Exception when calling DomainApi->domain_url_syntax_only: #{e}"
150
+ end
151
+ ```
152
+
153
+ ### Parameters
154
+
155
+ Name | Type | Description | Notes
156
+ ------------- | ------------- | ------------- | -------------
157
+ **request** | [**ValidateUrlRequestSyntaxOnly**](ValidateUrlRequestSyntaxOnly.md)| |
158
+
159
+ ### Return type
160
+
161
+ [**ValidateUrlResponseSyntaxOnly**](ValidateUrlResponseSyntaxOnly.md)
162
+
163
+ ### Authorization
164
+
165
+ [Apikey](../README.md#Apikey)
166
+
167
+ ### HTTP request headers
168
+
169
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
170
+ - **Accept**: application/json, text/json, application/xml, text/xml
171
+
172
+
173
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveValidateApiClient::ValidateUrlResponseSyntaxOnly
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **valid_url** | **BOOLEAN** | True if the URL is valid, false otherwise | [optional]
7
+ **well_formed_url** | **String** | Well-formed version of the URL | [optional]
8
+
9
+
@@ -34,6 +34,8 @@ require 'cloudmersive-validate-api-client/models/parse_address_request'
34
34
  require 'cloudmersive-validate-api-client/models/parse_address_response'
35
35
  require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
36
36
  require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
37
+ require 'cloudmersive-validate-api-client/models/validate_url_request_syntax_only'
38
+ require 'cloudmersive-validate-api-client/models/validate_url_response_syntax_only'
37
39
  require 'cloudmersive-validate-api-client/models/vat_lookup_request'
38
40
  require 'cloudmersive-validate-api-client/models/vat_lookup_response'
39
41
  require 'cloudmersive-validate-api-client/models/whois_response'
@@ -129,5 +129,60 @@ module CloudmersiveValidateApiClient
129
129
  end
130
130
  return data, status_code, headers
131
131
  end
132
+
133
+ # Validate a URL syntactically
134
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
135
+ # @param request
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [ValidateUrlResponseSyntaxOnly]
138
+ def domain_url_syntax_only(request, opts = {})
139
+ data, _status_code, _headers = domain_url_syntax_only_with_http_info(request, opts)
140
+ return data
141
+ end
142
+
143
+ # Validate a URL syntactically
144
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
145
+ # @param request
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [Array<(ValidateUrlResponseSyntaxOnly, Fixnum, Hash)>] ValidateUrlResponseSyntaxOnly data, response status code and response headers
148
+ def domain_url_syntax_only_with_http_info(request, opts = {})
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "Calling API: DomainApi.domain_url_syntax_only ..."
151
+ end
152
+ # verify the required parameter 'request' is set
153
+ if @api_client.config.client_side_validation && request.nil?
154
+ fail ArgumentError, "Missing the required parameter 'request' when calling DomainApi.domain_url_syntax_only"
155
+ end
156
+ # resource path
157
+ local_var_path = "/validate/domain/url/syntax-only"
158
+
159
+ # query parameters
160
+ query_params = {}
161
+
162
+ # header parameters
163
+ header_params = {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
166
+ # HTTP header 'Content-Type'
167
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
168
+
169
+ # form parameters
170
+ form_params = {}
171
+
172
+ # http body (model)
173
+ post_body = @api_client.object_to_http_body(request)
174
+ auth_names = ['Apikey']
175
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => 'ValidateUrlResponseSyntaxOnly')
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: DomainApi#domain_url_syntax_only\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
132
187
  end
133
188
  end
@@ -0,0 +1,188 @@
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: unset
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveValidateApiClient
16
+ # Request to determine if a URL is valid
17
+ class ValidateUrlRequestSyntaxOnly
18
+ attr_accessor :url
19
+
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'url' => :'URL'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'url' => :'String'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
42
+
43
+ if attributes.has_key?(:'URL')
44
+ self.url = attributes[:'URL']
45
+ end
46
+
47
+ end
48
+
49
+ # Show invalid properties with the reasons. Usually used together with valid?
50
+ # @return Array for valid properties with the reasons
51
+ def list_invalid_properties
52
+ invalid_properties = Array.new
53
+ return invalid_properties
54
+ end
55
+
56
+ # Check to see if the all the properties in the model are valid
57
+ # @return true if the model is valid
58
+ def valid?
59
+ return true
60
+ end
61
+
62
+ # Checks equality by comparing each attribute.
63
+ # @param [Object] Object to be compared
64
+ def ==(o)
65
+ return true if self.equal?(o)
66
+ self.class == o.class &&
67
+ url == o.url
68
+ end
69
+
70
+ # @see the `==` method
71
+ # @param [Object] Object to be compared
72
+ def eql?(o)
73
+ self == o
74
+ end
75
+
76
+ # Calculates hash code according to all attributes.
77
+ # @return [Fixnum] Hash code
78
+ def hash
79
+ [url].hash
80
+ end
81
+
82
+ # Builds the object from hash
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ # @return [Object] Returns the model itself
85
+ def build_from_hash(attributes)
86
+ return nil unless attributes.is_a?(Hash)
87
+ self.class.swagger_types.each_pair do |key, type|
88
+ if type =~ /\AArray<(.*)>/i
89
+ # check to ensure the input is an array given that the the attribute
90
+ # is documented as an array but the input is not
91
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
92
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
93
+ end
94
+ elsif !attributes[self.class.attribute_map[key]].nil?
95
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
96
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
97
+ end
98
+
99
+ self
100
+ end
101
+
102
+ # Deserializes the data based on type
103
+ # @param string type Data type
104
+ # @param string value Value to be deserialized
105
+ # @return [Object] Deserialized data
106
+ def _deserialize(type, value)
107
+ case type.to_sym
108
+ when :DateTime
109
+ DateTime.parse(value)
110
+ when :Date
111
+ Date.parse(value)
112
+ when :String
113
+ value.to_s
114
+ when :Integer
115
+ value.to_i
116
+ when :Float
117
+ value.to_f
118
+ when :BOOLEAN
119
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
120
+ true
121
+ else
122
+ false
123
+ end
124
+ when :Object
125
+ # generic object (usually a Hash), return directly
126
+ value
127
+ when /\AArray<(?<inner_type>.+)>\z/
128
+ inner_type = Regexp.last_match[:inner_type]
129
+ value.map { |v| _deserialize(inner_type, v) }
130
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
131
+ k_type = Regexp.last_match[:k_type]
132
+ v_type = Regexp.last_match[:v_type]
133
+ {}.tap do |hash|
134
+ value.each do |k, v|
135
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
136
+ end
137
+ end
138
+ else # model
139
+ temp_model = CloudmersiveValidateApiClient.const_get(type).new
140
+ temp_model.build_from_hash(value)
141
+ end
142
+ end
143
+
144
+ # Returns the string representation of the object
145
+ # @return [String] String presentation of the object
146
+ def to_s
147
+ to_hash.to_s
148
+ end
149
+
150
+ # to_body is an alias to to_hash (backward compatibility)
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_body
153
+ to_hash
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ next if value.nil?
163
+ hash[param] = _to_hash(value)
164
+ end
165
+ hash
166
+ end
167
+
168
+ # Outputs non-array value in the form of hash
169
+ # For object, use to_hash. Otherwise, just return the value
170
+ # @param [Object] value Any valid value
171
+ # @return [Hash] Returns the value in the form of hash
172
+ def _to_hash(value)
173
+ if value.is_a?(Array)
174
+ value.compact.map{ |v| _to_hash(v) }
175
+ elsif value.is_a?(Hash)
176
+ {}.tap do |hash|
177
+ value.each { |k, v| hash[k] = _to_hash(v) }
178
+ end
179
+ elsif value.respond_to? :to_hash
180
+ value.to_hash
181
+ else
182
+ value
183
+ end
184
+ end
185
+
186
+ end
187
+
188
+ end
@@ -0,0 +1,199 @@
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: unset
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveValidateApiClient
16
+ # Result of validating a URL
17
+ class ValidateUrlResponseSyntaxOnly
18
+ # True if the URL is valid, false otherwise
19
+ attr_accessor :valid_url
20
+
21
+ # Well-formed version of the URL
22
+ attr_accessor :well_formed_url
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'valid_url' => :'ValidURL',
29
+ :'well_formed_url' => :'WellFormedURL'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'valid_url' => :'BOOLEAN',
37
+ :'well_formed_url' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'ValidURL')
50
+ self.valid_url = attributes[:'ValidURL']
51
+ end
52
+
53
+ if attributes.has_key?(:'WellFormedURL')
54
+ self.well_formed_url = attributes[:'WellFormedURL']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ valid_url == o.valid_url &&
78
+ well_formed_url == o.well_formed_url
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [valid_url, well_formed_url].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = CloudmersiveValidateApiClient.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map{ |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: unset
11
11
  =end
12
12
 
13
13
  module CloudmersiveValidateApiClient
14
- VERSION = "1.3.4"
14
+ VERSION = "1.3.5"
15
15
  end
@@ -56,4 +56,16 @@ describe 'DomainApi' do
56
56
  end
57
57
  end
58
58
 
59
+ # unit tests for domain_url_syntax_only
60
+ # Validate a URL syntactically
61
+ # Validate whether a URL is syntactically valid (does not check endpoint for validity). Accepts various types of input and produces a well-formed URL as output.
62
+ # @param request
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [ValidateUrlResponseSyntaxOnly]
65
+ describe 'domain_url_syntax_only test' do
66
+ it "should work" do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
59
71
  end
@@ -0,0 +1,42 @@
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: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'ValidateUrlRequestSyntaxOnly' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of ValidateUrlRequestSyntaxOnly' do
31
+ it 'should create an instance of ValidateUrlRequestSyntaxOnly' do
32
+ expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::ValidateUrlRequestSyntaxOnly)
33
+ end
34
+ end
35
+ describe 'test attribute "url"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
42
+
@@ -0,0 +1,48 @@
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: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveValidateApiClient::ValidateUrlResponseSyntaxOnly
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'ValidateUrlResponseSyntaxOnly' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveValidateApiClient::ValidateUrlResponseSyntaxOnly.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of ValidateUrlResponseSyntaxOnly' do
31
+ it 'should create an instance of ValidateUrlResponseSyntaxOnly' do
32
+ expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::ValidateUrlResponseSyntaxOnly)
33
+ end
34
+ end
35
+ describe 'test attribute "valid_url"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "well_formed_url"' 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
+
47
+ end
48
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-validate-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-18 00:00:00.000000000 Z
11
+ date: 2019-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -226,6 +226,8 @@ files:
226
226
  - "./docs/PhoneNumberApi.md"
227
227
  - "./docs/PhoneNumberValidateRequest.md"
228
228
  - "./docs/PhoneNumberValidationResponse.md"
229
+ - "./docs/ValidateUrlRequestSyntaxOnly.md"
230
+ - "./docs/ValidateUrlResponseSyntaxOnly.md"
229
231
  - "./docs/VatApi.md"
230
232
  - "./docs/VatLookupRequest.md"
231
233
  - "./docs/VatLookupResponse.md"
@@ -259,6 +261,8 @@ files:
259
261
  - "./lib/cloudmersive-validate-api-client/models/parse_address_response.rb"
260
262
  - "./lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb"
261
263
  - "./lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb"
264
+ - "./lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb"
265
+ - "./lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb"
262
266
  - "./lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb"
263
267
  - "./lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb"
264
268
  - "./lib/cloudmersive-validate-api-client/models/whois_response.rb"
@@ -289,6 +293,8 @@ files:
289
293
  - "./spec/models/parse_address_response_spec.rb"
290
294
  - "./spec/models/phone_number_validate_request_spec.rb"
291
295
  - "./spec/models/phone_number_validation_response_spec.rb"
296
+ - "./spec/models/validate_url_request_syntax_only_spec.rb"
297
+ - "./spec/models/validate_url_response_syntax_only_spec.rb"
292
298
  - "./spec/models/vat_lookup_request_spec.rb"
293
299
  - "./spec/models/vat_lookup_response_spec.rb"
294
300
  - "./spec/models/whois_response_spec.rb"