cloudmersive-validate-api-client 1.4.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -154
  3. data/Gemfile +0 -7
  4. data/README.md +0 -158
  5. data/Rakefile +0 -8
  6. data/cloudmersive-validate-api-client.gemspec +0 -45
  7. data/docs/AddressApi.md +0 -228
  8. data/docs/AddressGetServersResponse.md +0 -9
  9. data/docs/AddressVerifySyntaxOnlyResponse.md +0 -11
  10. data/docs/CheckResponse.md +0 -8
  11. data/docs/DomainApi.md +0 -228
  12. data/docs/EmailApi.md +0 -173
  13. data/docs/FirstNameValidationRequest.md +0 -8
  14. data/docs/FirstNameValidationResponse.md +0 -9
  15. data/docs/FullEmailValidationResponse.md +0 -16
  16. data/docs/FullNameValidationRequest.md +0 -8
  17. data/docs/FullNameValidationResponse.md +0 -17
  18. data/docs/GeolocateResponse.md +0 -16
  19. data/docs/GetGenderRequest.md +0 -9
  20. data/docs/GetGenderResponse.md +0 -9
  21. data/docs/GetTimezonesRequest.md +0 -8
  22. data/docs/GetTimezonesResponse.md +0 -13
  23. data/docs/IPAddressApi.md +0 -63
  24. data/docs/LastNameValidationRequest.md +0 -8
  25. data/docs/LastNameValidationResponse.md +0 -9
  26. data/docs/LeadEnrichmentApi.md +0 -61
  27. data/docs/LeadEnrichmentRequest.md +0 -21
  28. data/docs/LeadEnrichmentResponse.md +0 -25
  29. data/docs/NameApi.md +0 -283
  30. data/docs/ParseAddressRequest.md +0 -9
  31. data/docs/ParseAddressResponse.md +0 -16
  32. data/docs/PhoneNumberApi.md +0 -63
  33. data/docs/PhoneNumberValidateRequest.md +0 -9
  34. data/docs/PhoneNumberValidationResponse.md +0 -15
  35. data/docs/Timezone.md +0 -10
  36. data/docs/UserAgentApi.md +0 -63
  37. data/docs/UserAgentValidateRequest.md +0 -8
  38. data/docs/UserAgentValidateResponse.md +0 -21
  39. data/docs/ValidateAddressRequest.md +0 -13
  40. data/docs/ValidateAddressResponse.md +0 -10
  41. data/docs/ValidateCountryRequest.md +0 -8
  42. data/docs/ValidateCountryResponse.md +0 -13
  43. data/docs/ValidateIdentifierRequest.md +0 -15
  44. data/docs/ValidateIdentifierResponse.md +0 -9
  45. data/docs/ValidateUrlRequestFull.md +0 -8
  46. data/docs/ValidateUrlRequestSyntaxOnly.md +0 -8
  47. data/docs/ValidateUrlResponseFull.md +0 -12
  48. data/docs/ValidateUrlResponseSyntaxOnly.md +0 -9
  49. data/docs/VatApi.md +0 -63
  50. data/docs/VatLookupRequest.md +0 -8
  51. data/docs/VatLookupResponse.md +0 -19
  52. data/docs/WhoisResponse.md +0 -22
  53. data/git_push.sh +0 -55
  54. data/lib/cloudmersive-validate-api-client.rb +0 -85
  55. data/lib/cloudmersive-validate-api-client/api/address_api.rb +0 -243
  56. data/lib/cloudmersive-validate-api-client/api/domain_api.rb +0 -243
  57. data/lib/cloudmersive-validate-api-client/api/email_api.rb +0 -188
  58. data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +0 -78
  59. data/lib/cloudmersive-validate-api-client/api/lead_enrichment_api.rb +0 -78
  60. data/lib/cloudmersive-validate-api-client/api/name_api.rb +0 -298
  61. data/lib/cloudmersive-validate-api-client/api/phone_number_api.rb +0 -78
  62. data/lib/cloudmersive-validate-api-client/api/user_agent_api.rb +0 -78
  63. data/lib/cloudmersive-validate-api-client/api/vat_api.rb +0 -78
  64. data/lib/cloudmersive-validate-api-client/api_client.rb +0 -389
  65. data/lib/cloudmersive-validate-api-client/api_error.rb +0 -38
  66. data/lib/cloudmersive-validate-api-client/configuration.rb +0 -209
  67. data/lib/cloudmersive-validate-api-client/models/address_get_servers_response.rb +0 -201
  68. data/lib/cloudmersive-validate-api-client/models/address_verify_syntax_only_response.rb +0 -219
  69. data/lib/cloudmersive-validate-api-client/models/check_response.rb +0 -189
  70. data/lib/cloudmersive-validate-api-client/models/first_name_validation_request.rb +0 -189
  71. data/lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb +0 -199
  72. data/lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb +0 -269
  73. data/lib/cloudmersive-validate-api-client/models/full_name_validation_request.rb +0 -189
  74. data/lib/cloudmersive-validate-api-client/models/full_name_validation_response.rb +0 -279
  75. data/lib/cloudmersive-validate-api-client/models/geolocate_response.rb +0 -269
  76. data/lib/cloudmersive-validate-api-client/models/get_gender_request.rb +0 -199
  77. data/lib/cloudmersive-validate-api-client/models/get_gender_response.rb +0 -199
  78. data/lib/cloudmersive-validate-api-client/models/get_timezones_request.rb +0 -189
  79. data/lib/cloudmersive-validate-api-client/models/get_timezones_response.rb +0 -241
  80. data/lib/cloudmersive-validate-api-client/models/last_name_validation_request.rb +0 -189
  81. data/lib/cloudmersive-validate-api-client/models/last_name_validation_response.rb +0 -199
  82. data/lib/cloudmersive-validate-api-client/models/lead_enrichment_request.rb +0 -319
  83. data/lib/cloudmersive-validate-api-client/models/lead_enrichment_response.rb +0 -359
  84. data/lib/cloudmersive-validate-api-client/models/parse_address_request.rb +0 -199
  85. data/lib/cloudmersive-validate-api-client/models/parse_address_response.rb +0 -269
  86. data/lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb +0 -199
  87. data/lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb +0 -259
  88. data/lib/cloudmersive-validate-api-client/models/timezone.rb +0 -209
  89. data/lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb +0 -189
  90. data/lib/cloudmersive-validate-api-client/models/user_agent_validate_response.rb +0 -319
  91. data/lib/cloudmersive-validate-api-client/models/validate_address_request.rb +0 -239
  92. data/lib/cloudmersive-validate-api-client/models/validate_address_response.rb +0 -209
  93. data/lib/cloudmersive-validate-api-client/models/validate_country_request.rb +0 -189
  94. data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +0 -241
  95. data/lib/cloudmersive-validate-api-client/models/validate_identifier_request.rb +0 -259
  96. data/lib/cloudmersive-validate-api-client/models/validate_identifier_response.rb +0 -199
  97. data/lib/cloudmersive-validate-api-client/models/validate_url_request_full.rb +0 -189
  98. data/lib/cloudmersive-validate-api-client/models/validate_url_request_syntax_only.rb +0 -189
  99. data/lib/cloudmersive-validate-api-client/models/validate_url_response_full.rb +0 -229
  100. data/lib/cloudmersive-validate-api-client/models/validate_url_response_syntax_only.rb +0 -199
  101. data/lib/cloudmersive-validate-api-client/models/vat_lookup_request.rb +0 -189
  102. data/lib/cloudmersive-validate-api-client/models/vat_lookup_response.rb +0 -299
  103. data/lib/cloudmersive-validate-api-client/models/whois_response.rb +0 -329
  104. data/lib/cloudmersive-validate-api-client/version.rb +0 -15
  105. data/spec/api/address_api_spec.rb +0 -83
  106. data/spec/api/domain_api_spec.rb +0 -83
  107. data/spec/api/email_api_spec.rb +0 -71
  108. data/spec/api/ip_address_api_spec.rb +0 -47
  109. data/spec/api/lead_enrichment_api_spec.rb +0 -47
  110. data/spec/api/name_api_spec.rb +0 -95
  111. data/spec/api/phone_number_api_spec.rb +0 -47
  112. data/spec/api/user_agent_api_spec.rb +0 -47
  113. data/spec/api/vat_api_spec.rb +0 -47
  114. data/spec/api_client_spec.rb +0 -226
  115. data/spec/configuration_spec.rb +0 -42
  116. data/spec/models/address_get_servers_response_spec.rb +0 -48
  117. data/spec/models/address_verify_syntax_only_response_spec.rb +0 -60
  118. data/spec/models/check_response_spec.rb +0 -42
  119. data/spec/models/first_name_validation_request_spec.rb +0 -42
  120. data/spec/models/first_name_validation_response_spec.rb +0 -48
  121. data/spec/models/full_email_validation_response_spec.rb +0 -90
  122. data/spec/models/full_name_validation_request_spec.rb +0 -42
  123. data/spec/models/full_name_validation_response_spec.rb +0 -96
  124. data/spec/models/geolocate_response_spec.rb +0 -90
  125. data/spec/models/get_gender_request_spec.rb +0 -48
  126. data/spec/models/get_gender_response_spec.rb +0 -48
  127. data/spec/models/get_timezones_request_spec.rb +0 -42
  128. data/spec/models/get_timezones_response_spec.rb +0 -72
  129. data/spec/models/last_name_validation_request_spec.rb +0 -42
  130. data/spec/models/last_name_validation_response_spec.rb +0 -48
  131. data/spec/models/lead_enrichment_request_spec.rb +0 -120
  132. data/spec/models/lead_enrichment_response_spec.rb +0 -144
  133. data/spec/models/parse_address_request_spec.rb +0 -48
  134. data/spec/models/parse_address_response_spec.rb +0 -90
  135. data/spec/models/phone_number_validate_request_spec.rb +0 -48
  136. data/spec/models/phone_number_validation_response_spec.rb +0 -84
  137. data/spec/models/timezone_spec.rb +0 -54
  138. data/spec/models/user_agent_validate_request_spec.rb +0 -42
  139. data/spec/models/user_agent_validate_response_spec.rb +0 -120
  140. data/spec/models/validate_address_request_spec.rb +0 -72
  141. data/spec/models/validate_address_response_spec.rb +0 -54
  142. data/spec/models/validate_country_request_spec.rb +0 -42
  143. data/spec/models/validate_country_response_spec.rb +0 -72
  144. data/spec/models/validate_identifier_request_spec.rb +0 -84
  145. data/spec/models/validate_identifier_response_spec.rb +0 -48
  146. data/spec/models/validate_url_request_full_spec.rb +0 -42
  147. data/spec/models/validate_url_request_syntax_only_spec.rb +0 -42
  148. data/spec/models/validate_url_response_full_spec.rb +0 -66
  149. data/spec/models/validate_url_response_syntax_only_spec.rb +0 -48
  150. data/spec/models/vat_lookup_request_spec.rb +0 -42
  151. data/spec/models/vat_lookup_response_spec.rb +0 -108
  152. data/spec/models/whois_response_spec.rb +0 -126
  153. data/spec/spec_helper.rb +0 -111
@@ -1,299 +0,0 @@
1
- =begin
2
- #validateapi
3
-
4
- #The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module CloudmersiveValidateApiClient
16
-
17
- class VatLookupResponse
18
- # Two-letter country code
19
- attr_accessor :country_code
20
-
21
- # VAT number
22
- attr_accessor :vat_number
23
-
24
- # True if the VAT code is valid, false otherwise
25
- attr_accessor :is_valid
26
-
27
- # Name of the business
28
- attr_accessor :business_name
29
-
30
- # Business address as a single string
31
- attr_accessor :business_address
32
-
33
- # For the business address, the name of the building, house or structure if applicable, such as \"Cloudmersive Building 2\". This will often by null.
34
- attr_accessor :business_building
35
-
36
- # For the business address, the street number or house number of the address. For example, in the address \"1600 Pennsylvania Avenue NW\" the street number would be \"1600\". This value will typically be populated for most addresses.
37
- attr_accessor :business_street_number
38
-
39
- # For the business address, the name of the street or road of the address. For example, in the address \"1600 Pennsylvania Avenue NW\" the street number would be \"Pennsylvania Avenue NW\".
40
- attr_accessor :business_street
41
-
42
- # For the business address, the city of the address.
43
- attr_accessor :business_city
44
-
45
- # For the business address, the state or province of the address.
46
- attr_accessor :business_state_or_province
47
-
48
- # For the business address, the postal code or zip code of the address.
49
- attr_accessor :business_postal_code
50
-
51
- # For the business address, country of the address, if present in the address. If not included in the address it will be null.
52
- attr_accessor :business_country
53
-
54
-
55
- # Attribute mapping from ruby-style variable name to JSON key.
56
- def self.attribute_map
57
- {
58
- :'country_code' => :'CountryCode',
59
- :'vat_number' => :'VatNumber',
60
- :'is_valid' => :'IsValid',
61
- :'business_name' => :'BusinessName',
62
- :'business_address' => :'BusinessAddress',
63
- :'business_building' => :'BusinessBuilding',
64
- :'business_street_number' => :'BusinessStreetNumber',
65
- :'business_street' => :'BusinessStreet',
66
- :'business_city' => :'BusinessCity',
67
- :'business_state_or_province' => :'BusinessStateOrProvince',
68
- :'business_postal_code' => :'BusinessPostalCode',
69
- :'business_country' => :'BusinessCountry'
70
- }
71
- end
72
-
73
- # Attribute type mapping.
74
- def self.swagger_types
75
- {
76
- :'country_code' => :'String',
77
- :'vat_number' => :'String',
78
- :'is_valid' => :'BOOLEAN',
79
- :'business_name' => :'String',
80
- :'business_address' => :'String',
81
- :'business_building' => :'String',
82
- :'business_street_number' => :'String',
83
- :'business_street' => :'String',
84
- :'business_city' => :'String',
85
- :'business_state_or_province' => :'String',
86
- :'business_postal_code' => :'String',
87
- :'business_country' => :'String'
88
- }
89
- end
90
-
91
- # Initializes the object
92
- # @param [Hash] attributes Model attributes in the form of hash
93
- def initialize(attributes = {})
94
- return unless attributes.is_a?(Hash)
95
-
96
- # convert string to symbol for hash key
97
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
98
-
99
- if attributes.has_key?(:'CountryCode')
100
- self.country_code = attributes[:'CountryCode']
101
- end
102
-
103
- if attributes.has_key?(:'VatNumber')
104
- self.vat_number = attributes[:'VatNumber']
105
- end
106
-
107
- if attributes.has_key?(:'IsValid')
108
- self.is_valid = attributes[:'IsValid']
109
- end
110
-
111
- if attributes.has_key?(:'BusinessName')
112
- self.business_name = attributes[:'BusinessName']
113
- end
114
-
115
- if attributes.has_key?(:'BusinessAddress')
116
- self.business_address = attributes[:'BusinessAddress']
117
- end
118
-
119
- if attributes.has_key?(:'BusinessBuilding')
120
- self.business_building = attributes[:'BusinessBuilding']
121
- end
122
-
123
- if attributes.has_key?(:'BusinessStreetNumber')
124
- self.business_street_number = attributes[:'BusinessStreetNumber']
125
- end
126
-
127
- if attributes.has_key?(:'BusinessStreet')
128
- self.business_street = attributes[:'BusinessStreet']
129
- end
130
-
131
- if attributes.has_key?(:'BusinessCity')
132
- self.business_city = attributes[:'BusinessCity']
133
- end
134
-
135
- if attributes.has_key?(:'BusinessStateOrProvince')
136
- self.business_state_or_province = attributes[:'BusinessStateOrProvince']
137
- end
138
-
139
- if attributes.has_key?(:'BusinessPostalCode')
140
- self.business_postal_code = attributes[:'BusinessPostalCode']
141
- end
142
-
143
- if attributes.has_key?(:'BusinessCountry')
144
- self.business_country = attributes[:'BusinessCountry']
145
- end
146
-
147
- end
148
-
149
- # Show invalid properties with the reasons. Usually used together with valid?
150
- # @return Array for valid properties with the reasons
151
- def list_invalid_properties
152
- invalid_properties = Array.new
153
- return invalid_properties
154
- end
155
-
156
- # Check to see if the all the properties in the model are valid
157
- # @return true if the model is valid
158
- def valid?
159
- return true
160
- end
161
-
162
- # Checks equality by comparing each attribute.
163
- # @param [Object] Object to be compared
164
- def ==(o)
165
- return true if self.equal?(o)
166
- self.class == o.class &&
167
- country_code == o.country_code &&
168
- vat_number == o.vat_number &&
169
- is_valid == o.is_valid &&
170
- business_name == o.business_name &&
171
- business_address == o.business_address &&
172
- business_building == o.business_building &&
173
- business_street_number == o.business_street_number &&
174
- business_street == o.business_street &&
175
- business_city == o.business_city &&
176
- business_state_or_province == o.business_state_or_province &&
177
- business_postal_code == o.business_postal_code &&
178
- business_country == o.business_country
179
- end
180
-
181
- # @see the `==` method
182
- # @param [Object] Object to be compared
183
- def eql?(o)
184
- self == o
185
- end
186
-
187
- # Calculates hash code according to all attributes.
188
- # @return [Fixnum] Hash code
189
- def hash
190
- [country_code, vat_number, is_valid, business_name, business_address, business_building, business_street_number, business_street, business_city, business_state_or_province, business_postal_code, business_country].hash
191
- end
192
-
193
- # Builds the object from hash
194
- # @param [Hash] attributes Model attributes in the form of hash
195
- # @return [Object] Returns the model itself
196
- def build_from_hash(attributes)
197
- return nil unless attributes.is_a?(Hash)
198
- self.class.swagger_types.each_pair do |key, type|
199
- if type =~ /\AArray<(.*)>/i
200
- # check to ensure the input is an array given that the the attribute
201
- # is documented as an array but the input is not
202
- if attributes[self.class.attribute_map[key]].is_a?(Array)
203
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
204
- end
205
- elsif !attributes[self.class.attribute_map[key]].nil?
206
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
207
- end # or else data not found in attributes(hash), not an issue as the data can be optional
208
- end
209
-
210
- self
211
- end
212
-
213
- # Deserializes the data based on type
214
- # @param string type Data type
215
- # @param string value Value to be deserialized
216
- # @return [Object] Deserialized data
217
- def _deserialize(type, value)
218
- case type.to_sym
219
- when :DateTime
220
- DateTime.parse(value)
221
- when :Date
222
- Date.parse(value)
223
- when :String
224
- value.to_s
225
- when :Integer
226
- value.to_i
227
- when :Float
228
- value.to_f
229
- when :BOOLEAN
230
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
231
- true
232
- else
233
- false
234
- end
235
- when :Object
236
- # generic object (usually a Hash), return directly
237
- value
238
- when /\AArray<(?<inner_type>.+)>\z/
239
- inner_type = Regexp.last_match[:inner_type]
240
- value.map { |v| _deserialize(inner_type, v) }
241
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
242
- k_type = Regexp.last_match[:k_type]
243
- v_type = Regexp.last_match[:v_type]
244
- {}.tap do |hash|
245
- value.each do |k, v|
246
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
247
- end
248
- end
249
- else # model
250
- temp_model = CloudmersiveValidateApiClient.const_get(type).new
251
- temp_model.build_from_hash(value)
252
- end
253
- end
254
-
255
- # Returns the string representation of the object
256
- # @return [String] String presentation of the object
257
- def to_s
258
- to_hash.to_s
259
- end
260
-
261
- # to_body is an alias to to_hash (backward compatibility)
262
- # @return [Hash] Returns the object in the form of hash
263
- def to_body
264
- to_hash
265
- end
266
-
267
- # Returns the object in the form of hash
268
- # @return [Hash] Returns the object in the form of hash
269
- def to_hash
270
- hash = {}
271
- self.class.attribute_map.each_pair do |attr, param|
272
- value = self.send(attr)
273
- next if value.nil?
274
- hash[param] = _to_hash(value)
275
- end
276
- hash
277
- end
278
-
279
- # Outputs non-array value in the form of hash
280
- # For object, use to_hash. Otherwise, just return the value
281
- # @param [Object] value Any valid value
282
- # @return [Hash] Returns the value in the form of hash
283
- def _to_hash(value)
284
- if value.is_a?(Array)
285
- value.compact.map{ |v| _to_hash(v) }
286
- elsif value.is_a?(Hash)
287
- {}.tap do |hash|
288
- value.each { |k, v| hash[k] = _to_hash(v) }
289
- end
290
- elsif value.respond_to? :to_hash
291
- value.to_hash
292
- else
293
- value
294
- end
295
- end
296
-
297
- end
298
-
299
- end
@@ -1,329 +0,0 @@
1
- =begin
2
- #validateapi
3
-
4
- #The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module CloudmersiveValidateApiClient
16
- # Result of a WHOIS operation
17
- class WhoisResponse
18
- # True if the domain is valid, false if it is not
19
- attr_accessor :valid_domain
20
-
21
- # Name of the domain registrant
22
- attr_accessor :registrant_name
23
-
24
- # Organization name of the domain registrant
25
- attr_accessor :registrant_organization
26
-
27
- # Email address of the domain registrant
28
- attr_accessor :registrant_email
29
-
30
- # Street number of the address of the domain registrant, if available
31
- attr_accessor :registrant_street_number
32
-
33
- # Street name of the address of the domain registrant, if available
34
- attr_accessor :registrant_street
35
-
36
- # City of the domain registrant, if available
37
- attr_accessor :registrant_city
38
-
39
- # State or Province of the address of the domain registrant, if available
40
- attr_accessor :registrant_state_or_province
41
-
42
- # Postal code of the address of the domain registrant, if available
43
- attr_accessor :registrant_postal_code
44
-
45
- # Country of the address of the domain registrant, if available
46
- attr_accessor :registrant_country
47
-
48
- # Raw address string of the domain registrant, if available
49
- attr_accessor :registrant_raw_address
50
-
51
- # Telephone number of the address of the domain registrant
52
- attr_accessor :registrant_telephone
53
-
54
- # Server used to lookup WHOIS information (may change based on lookup).
55
- attr_accessor :whois_server
56
-
57
- # WHOIS raw text record
58
- attr_accessor :raw_text_record
59
-
60
- # Creation date for the record
61
- attr_accessor :created_dt
62
-
63
-
64
- # Attribute mapping from ruby-style variable name to JSON key.
65
- def self.attribute_map
66
- {
67
- :'valid_domain' => :'ValidDomain',
68
- :'registrant_name' => :'RegistrantName',
69
- :'registrant_organization' => :'RegistrantOrganization',
70
- :'registrant_email' => :'RegistrantEmail',
71
- :'registrant_street_number' => :'RegistrantStreetNumber',
72
- :'registrant_street' => :'RegistrantStreet',
73
- :'registrant_city' => :'RegistrantCity',
74
- :'registrant_state_or_province' => :'RegistrantStateOrProvince',
75
- :'registrant_postal_code' => :'RegistrantPostalCode',
76
- :'registrant_country' => :'RegistrantCountry',
77
- :'registrant_raw_address' => :'RegistrantRawAddress',
78
- :'registrant_telephone' => :'RegistrantTelephone',
79
- :'whois_server' => :'WhoisServer',
80
- :'raw_text_record' => :'RawTextRecord',
81
- :'created_dt' => :'CreatedDt'
82
- }
83
- end
84
-
85
- # Attribute type mapping.
86
- def self.swagger_types
87
- {
88
- :'valid_domain' => :'BOOLEAN',
89
- :'registrant_name' => :'String',
90
- :'registrant_organization' => :'String',
91
- :'registrant_email' => :'String',
92
- :'registrant_street_number' => :'String',
93
- :'registrant_street' => :'String',
94
- :'registrant_city' => :'String',
95
- :'registrant_state_or_province' => :'String',
96
- :'registrant_postal_code' => :'String',
97
- :'registrant_country' => :'String',
98
- :'registrant_raw_address' => :'String',
99
- :'registrant_telephone' => :'String',
100
- :'whois_server' => :'String',
101
- :'raw_text_record' => :'String',
102
- :'created_dt' => :'DateTime'
103
- }
104
- end
105
-
106
- # Initializes the object
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- def initialize(attributes = {})
109
- return unless attributes.is_a?(Hash)
110
-
111
- # convert string to symbol for hash key
112
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
113
-
114
- if attributes.has_key?(:'ValidDomain')
115
- self.valid_domain = attributes[:'ValidDomain']
116
- end
117
-
118
- if attributes.has_key?(:'RegistrantName')
119
- self.registrant_name = attributes[:'RegistrantName']
120
- end
121
-
122
- if attributes.has_key?(:'RegistrantOrganization')
123
- self.registrant_organization = attributes[:'RegistrantOrganization']
124
- end
125
-
126
- if attributes.has_key?(:'RegistrantEmail')
127
- self.registrant_email = attributes[:'RegistrantEmail']
128
- end
129
-
130
- if attributes.has_key?(:'RegistrantStreetNumber')
131
- self.registrant_street_number = attributes[:'RegistrantStreetNumber']
132
- end
133
-
134
- if attributes.has_key?(:'RegistrantStreet')
135
- self.registrant_street = attributes[:'RegistrantStreet']
136
- end
137
-
138
- if attributes.has_key?(:'RegistrantCity')
139
- self.registrant_city = attributes[:'RegistrantCity']
140
- end
141
-
142
- if attributes.has_key?(:'RegistrantStateOrProvince')
143
- self.registrant_state_or_province = attributes[:'RegistrantStateOrProvince']
144
- end
145
-
146
- if attributes.has_key?(:'RegistrantPostalCode')
147
- self.registrant_postal_code = attributes[:'RegistrantPostalCode']
148
- end
149
-
150
- if attributes.has_key?(:'RegistrantCountry')
151
- self.registrant_country = attributes[:'RegistrantCountry']
152
- end
153
-
154
- if attributes.has_key?(:'RegistrantRawAddress')
155
- self.registrant_raw_address = attributes[:'RegistrantRawAddress']
156
- end
157
-
158
- if attributes.has_key?(:'RegistrantTelephone')
159
- self.registrant_telephone = attributes[:'RegistrantTelephone']
160
- end
161
-
162
- if attributes.has_key?(:'WhoisServer')
163
- self.whois_server = attributes[:'WhoisServer']
164
- end
165
-
166
- if attributes.has_key?(:'RawTextRecord')
167
- self.raw_text_record = attributes[:'RawTextRecord']
168
- end
169
-
170
- if attributes.has_key?(:'CreatedDt')
171
- self.created_dt = attributes[:'CreatedDt']
172
- end
173
-
174
- end
175
-
176
- # Show invalid properties with the reasons. Usually used together with valid?
177
- # @return Array for valid properties with the reasons
178
- def list_invalid_properties
179
- invalid_properties = Array.new
180
- return invalid_properties
181
- end
182
-
183
- # Check to see if the all the properties in the model are valid
184
- # @return true if the model is valid
185
- def valid?
186
- return true
187
- end
188
-
189
- # Checks equality by comparing each attribute.
190
- # @param [Object] Object to be compared
191
- def ==(o)
192
- return true if self.equal?(o)
193
- self.class == o.class &&
194
- valid_domain == o.valid_domain &&
195
- registrant_name == o.registrant_name &&
196
- registrant_organization == o.registrant_organization &&
197
- registrant_email == o.registrant_email &&
198
- registrant_street_number == o.registrant_street_number &&
199
- registrant_street == o.registrant_street &&
200
- registrant_city == o.registrant_city &&
201
- registrant_state_or_province == o.registrant_state_or_province &&
202
- registrant_postal_code == o.registrant_postal_code &&
203
- registrant_country == o.registrant_country &&
204
- registrant_raw_address == o.registrant_raw_address &&
205
- registrant_telephone == o.registrant_telephone &&
206
- whois_server == o.whois_server &&
207
- raw_text_record == o.raw_text_record &&
208
- created_dt == o.created_dt
209
- end
210
-
211
- # @see the `==` method
212
- # @param [Object] Object to be compared
213
- def eql?(o)
214
- self == o
215
- end
216
-
217
- # Calculates hash code according to all attributes.
218
- # @return [Fixnum] Hash code
219
- def hash
220
- [valid_domain, registrant_name, registrant_organization, registrant_email, registrant_street_number, registrant_street, registrant_city, registrant_state_or_province, registrant_postal_code, registrant_country, registrant_raw_address, registrant_telephone, whois_server, raw_text_record, created_dt].hash
221
- end
222
-
223
- # Builds the object from hash
224
- # @param [Hash] attributes Model attributes in the form of hash
225
- # @return [Object] Returns the model itself
226
- def build_from_hash(attributes)
227
- return nil unless attributes.is_a?(Hash)
228
- self.class.swagger_types.each_pair do |key, type|
229
- if type =~ /\AArray<(.*)>/i
230
- # check to ensure the input is an array given that the the attribute
231
- # is documented as an array but the input is not
232
- if attributes[self.class.attribute_map[key]].is_a?(Array)
233
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
234
- end
235
- elsif !attributes[self.class.attribute_map[key]].nil?
236
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
- end # or else data not found in attributes(hash), not an issue as the data can be optional
238
- end
239
-
240
- self
241
- end
242
-
243
- # Deserializes the data based on type
244
- # @param string type Data type
245
- # @param string value Value to be deserialized
246
- # @return [Object] Deserialized data
247
- def _deserialize(type, value)
248
- case type.to_sym
249
- when :DateTime
250
- DateTime.parse(value)
251
- when :Date
252
- Date.parse(value)
253
- when :String
254
- value.to_s
255
- when :Integer
256
- value.to_i
257
- when :Float
258
- value.to_f
259
- when :BOOLEAN
260
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
- true
262
- else
263
- false
264
- end
265
- when :Object
266
- # generic object (usually a Hash), return directly
267
- value
268
- when /\AArray<(?<inner_type>.+)>\z/
269
- inner_type = Regexp.last_match[:inner_type]
270
- value.map { |v| _deserialize(inner_type, v) }
271
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
- k_type = Regexp.last_match[:k_type]
273
- v_type = Regexp.last_match[:v_type]
274
- {}.tap do |hash|
275
- value.each do |k, v|
276
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
- end
278
- end
279
- else # model
280
- temp_model = CloudmersiveValidateApiClient.const_get(type).new
281
- temp_model.build_from_hash(value)
282
- end
283
- end
284
-
285
- # Returns the string representation of the object
286
- # @return [String] String presentation of the object
287
- def to_s
288
- to_hash.to_s
289
- end
290
-
291
- # to_body is an alias to to_hash (backward compatibility)
292
- # @return [Hash] Returns the object in the form of hash
293
- def to_body
294
- to_hash
295
- end
296
-
297
- # Returns the object in the form of hash
298
- # @return [Hash] Returns the object in the form of hash
299
- def to_hash
300
- hash = {}
301
- self.class.attribute_map.each_pair do |attr, param|
302
- value = self.send(attr)
303
- next if value.nil?
304
- hash[param] = _to_hash(value)
305
- end
306
- hash
307
- end
308
-
309
- # Outputs non-array value in the form of hash
310
- # For object, use to_hash. Otherwise, just return the value
311
- # @param [Object] value Any valid value
312
- # @return [Hash] Returns the value in the form of hash
313
- def _to_hash(value)
314
- if value.is_a?(Array)
315
- value.compact.map{ |v| _to_hash(v) }
316
- elsif value.is_a?(Hash)
317
- {}.tap do |hash|
318
- value.each { |k, v| hash[k] = _to_hash(v) }
319
- end
320
- elsif value.respond_to? :to_hash
321
- value.to_hash
322
- else
323
- value
324
- end
325
- end
326
-
327
- end
328
-
329
- end