internetdata 2.9.2 → 2.10.0

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +146 -9
  3. data/lib/internetdata/api/database_v2_api.rb +2 -2
  4. data/lib/internetdata/api_client.rb +2 -2
  5. data/lib/internetdata/api_error.rb +2 -2
  6. data/lib/internetdata/api_model_base.rb +2 -2
  7. data/lib/internetdata/asn_result.rb +107 -0
  8. data/lib/internetdata/bogon.rb +87 -0
  9. data/lib/internetdata/bogons.rb +93 -0
  10. data/lib/internetdata/cache.rb +35 -0
  11. data/lib/internetdata/client.rb +388 -16
  12. data/lib/internetdata/configuration.rb +23 -2
  13. data/lib/internetdata/domain_result.rb +124 -0
  14. data/lib/internetdata/errors.rb +29 -6
  15. data/lib/internetdata/models/abuse_contact.rb +236 -0
  16. data/lib/internetdata/models/asn.rb +294 -0
  17. data/lib/internetdata/models/asn_lookup_response.rb +405 -0
  18. data/lib/internetdata/models/asn_prefix.rb +329 -0
  19. data/lib/internetdata/models/batch_lookup_error.rb +192 -0
  20. data/lib/internetdata/models/bit_torrent_detail.rb +410 -0
  21. data/lib/internetdata/models/carrier_detail.rb +273 -0
  22. data/lib/internetdata/models/class_detail.rb +246 -0
  23. data/lib/internetdata/models/client_registration.rb +2 -2
  24. data/lib/internetdata/models/company.rb +213 -0
  25. data/lib/internetdata/models/database.rb +2 -2
  26. data/lib/internetdata/models/database_checksums_response.rb +2 -2
  27. data/lib/internetdata/models/database_format.rb +2 -2
  28. data/lib/internetdata/models/database_list.rb +2 -2
  29. data/lib/internetdata/models/database_metadata.rb +2 -2
  30. data/lib/internetdata/models/database_metadata_column.rb +2 -2
  31. data/lib/internetdata/models/database_version.rb +2 -2
  32. data/lib/internetdata/models/db_checksums.rb +2 -2
  33. data/lib/internetdata/models/device_authorization.rb +2 -2
  34. data/lib/internetdata/models/disposable_detail.rb +248 -0
  35. data/lib/internetdata/models/dns_address_record.rb +192 -0
  36. data/lib/internetdata/models/dns_cname_record.rb +192 -0
  37. data/lib/internetdata/models/dns_mx_record.rb +219 -0
  38. data/lib/internetdata/models/dns_ns_record.rb +192 -0
  39. data/lib/internetdata/models/dns_resolver_detail.rb +300 -0
  40. data/lib/internetdata/models/domain_dns.rb +279 -0
  41. data/lib/internetdata/models/domain_ip_range.rb +219 -0
  42. data/lib/internetdata/models/domain_ip_ranges.rb +276 -0
  43. data/lib/internetdata/models/domain_lookup_response.rb +376 -0
  44. data/lib/internetdata/models/download.rb +2 -2
  45. data/lib/internetdata/models/download_list.rb +2 -2
  46. data/lib/internetdata/models/entitlement.rb +243 -0
  47. data/lib/internetdata/models/entitlement_apikey.rb +207 -0
  48. data/lib/internetdata/models/entitlement_plan.rb +216 -0
  49. data/lib/internetdata/models/entitlement_usage.rb +259 -0
  50. data/lib/internetdata/models/error_envelope.rb +2 -2
  51. data/lib/internetdata/models/hosted_domains.rb +166 -0
  52. data/lib/internetdata/models/location.rb +509 -0
  53. data/lib/internetdata/models/lookup_response.rb +897 -0
  54. data/lib/internetdata/models/oauth_metadata.rb +2 -2
  55. data/lib/internetdata/models/proxy_detail.rb +327 -0
  56. data/lib/internetdata/models/pubproxy_detail.rb +329 -0
  57. data/lib/internetdata/models/rwhois.rb +301 -0
  58. data/lib/internetdata/models/satellite_detail.rb +327 -0
  59. data/lib/internetdata/models/smtp_detail.rb +273 -0
  60. data/lib/internetdata/models/ssh_detail.rb +300 -0
  61. data/lib/internetdata/models/standing.rb +2 -2
  62. data/lib/internetdata/models/token_response.rb +2 -2
  63. data/lib/internetdata/models/web_detail.rb +516 -0
  64. data/lib/internetdata/models/whois.rb +382 -0
  65. data/lib/internetdata/oauth_api.rb +1 -1
  66. data/lib/internetdata/result.rb +431 -0
  67. data/lib/internetdata/transport.rb +215 -27
  68. data/lib/internetdata/version.rb +1 -1
  69. data/lib/internetdata.rb +17 -2
  70. metadata +58 -3
@@ -0,0 +1,276 @@
1
+ =begin
2
+ #InternetData API
3
+
4
+ #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
5
+
6
+ The version of the OpenAPI document: 2026.11.13
7
+ Contact: support@internetdata.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module InternetData
17
+ # The organization's IP ranges, from Domain IP Ranges. Paid plans and the trial.
18
+ class DomainIpRanges < ApiModelBase
19
+ # The organization's domain.
20
+ attr_accessor :domain
21
+
22
+ # Where its home page redirects, when that is how it was reached.
23
+ attr_accessor :redirects_to
24
+
25
+ # How many ranges it holds.
26
+ attr_accessor :total
27
+
28
+ # IPv4 addresses across them.
29
+ attr_accessor :ipv4
30
+
31
+ # The first 1000, IPv4 before IPv6, the largest first.
32
+ attr_accessor :ranges
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'domain' => :'domain',
38
+ :'redirects_to' => :'redirects_to',
39
+ :'total' => :'total',
40
+ :'ipv4' => :'ipv4',
41
+ :'ranges' => :'ranges'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'domain' => :'String',
59
+ :'redirects_to' => :'String',
60
+ :'total' => :'Integer',
61
+ :'ipv4' => :'Integer',
62
+ :'ranges' => :'Array<DomainIpRange>'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::DomainIpRanges` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::DomainIpRanges`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'domain')
89
+ self.domain = attributes[:'domain']
90
+ else
91
+ self.domain = nil
92
+ end
93
+
94
+ if attributes.key?(:'redirects_to')
95
+ self.redirects_to = attributes[:'redirects_to']
96
+ else
97
+ self.redirects_to = nil
98
+ end
99
+
100
+ if attributes.key?(:'total')
101
+ self.total = attributes[:'total']
102
+ else
103
+ self.total = nil
104
+ end
105
+
106
+ if attributes.key?(:'ipv4')
107
+ self.ipv4 = attributes[:'ipv4']
108
+ else
109
+ self.ipv4 = nil
110
+ end
111
+
112
+ if attributes.key?(:'ranges')
113
+ if (value = attributes[:'ranges']).is_a?(Array)
114
+ self.ranges = value
115
+ end
116
+ else
117
+ self.ranges = nil
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
125
+ invalid_properties = Array.new
126
+ if @domain.nil?
127
+ invalid_properties.push('invalid value for "domain", domain cannot be nil.')
128
+ end
129
+
130
+ if @redirects_to.nil?
131
+ invalid_properties.push('invalid value for "redirects_to", redirects_to cannot be nil.')
132
+ end
133
+
134
+ if @total.nil?
135
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
136
+ end
137
+
138
+ if @ipv4.nil?
139
+ invalid_properties.push('invalid value for "ipv4", ipv4 cannot be nil.')
140
+ end
141
+
142
+ if @ranges.nil?
143
+ invalid_properties.push('invalid value for "ranges", ranges cannot be nil.')
144
+ end
145
+
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ warn '[DEPRECATED] the `valid?` method is obsolete'
153
+ return false if @domain.nil?
154
+ return false if @redirects_to.nil?
155
+ return false if @total.nil?
156
+ return false if @ipv4.nil?
157
+ return false if @ranges.nil?
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] domain Value to be assigned
163
+ def domain=(domain)
164
+ if domain.nil?
165
+ fail ArgumentError, 'domain cannot be nil'
166
+ end
167
+
168
+ @domain = domain
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] redirects_to Value to be assigned
173
+ def redirects_to=(redirects_to)
174
+ if redirects_to.nil?
175
+ fail ArgumentError, 'redirects_to cannot be nil'
176
+ end
177
+
178
+ @redirects_to = redirects_to
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] total Value to be assigned
183
+ def total=(total)
184
+ if total.nil?
185
+ fail ArgumentError, 'total cannot be nil'
186
+ end
187
+
188
+ @total = total
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] ipv4 Value to be assigned
193
+ def ipv4=(ipv4)
194
+ if ipv4.nil?
195
+ fail ArgumentError, 'ipv4 cannot be nil'
196
+ end
197
+
198
+ @ipv4 = ipv4
199
+ end
200
+
201
+ # Custom attribute writer method with validation
202
+ # @param [Object] ranges Value to be assigned
203
+ def ranges=(ranges)
204
+ if ranges.nil?
205
+ fail ArgumentError, 'ranges cannot be nil'
206
+ end
207
+
208
+ @ranges = ranges
209
+ end
210
+
211
+ # Checks equality by comparing each attribute.
212
+ # @param [Object] Object to be compared
213
+ def ==(o)
214
+ return true if self.equal?(o)
215
+ self.class == o.class &&
216
+ domain == o.domain &&
217
+ redirects_to == o.redirects_to &&
218
+ total == o.total &&
219
+ ipv4 == o.ipv4 &&
220
+ ranges == o.ranges
221
+ end
222
+
223
+ # @see the `==` method
224
+ # @param [Object] Object to be compared
225
+ def eql?(o)
226
+ self == o
227
+ end
228
+
229
+ # Calculates hash code according to all attributes.
230
+ # @return [Integer] Hash code
231
+ def hash
232
+ [domain, redirects_to, total, ipv4, ranges].hash
233
+ end
234
+
235
+ # Builds the object from hash
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ # @return [Object] Returns the model itself
238
+ def self.build_from_hash(attributes)
239
+ return nil unless attributes.is_a?(Hash)
240
+ attributes = attributes.transform_keys(&:to_sym)
241
+ transformed_hash = {}
242
+ openapi_types.each_pair do |key, type|
243
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
244
+ transformed_hash["#{key}"] = nil
245
+ elsif type =~ /\AArray<(.*)>/i
246
+ # check to ensure the input is an array given that the attribute
247
+ # is documented as an array but the input is not
248
+ if attributes[attribute_map[key]].is_a?(Array)
249
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
250
+ end
251
+ elsif !attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
253
+ end
254
+ end
255
+ new(transformed_hash)
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.openapi_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ end
275
+
276
+ end
@@ -0,0 +1,376 @@
1
+ =begin
2
+ #InternetData API
3
+
4
+ #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
5
+
6
+ The version of the OpenAPI document: 2026.11.13
7
+ Contact: support@internetdata.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module InternetData
17
+ # What every database says about one domain.
18
+ class DomainLookupResponse < ApiModelBase
19
+ # The domain, lowercase and in punycode.
20
+ attr_accessor :domain
21
+
22
+ # In Domain List: a registered domain.
23
+ attr_accessor :is_registered
24
+
25
+ # In Disposable Domain. Paid plans and the trial.
26
+ attr_accessor :is_disposable
27
+
28
+ # It has A records.
29
+ attr_accessor :has_a
30
+
31
+ # AAAA records.
32
+ attr_accessor :has_aaaa
33
+
34
+ # MX records.
35
+ attr_accessor :has_mx
36
+
37
+ # NS records.
38
+ attr_accessor :has_ns
39
+
40
+ # A CNAME record.
41
+ attr_accessor :has_cname
42
+
43
+ attr_accessor :dns
44
+
45
+ attr_accessor :ip_ranges
46
+
47
+ # `{}` when `is_disposable` is false. Paid plans and the trial.
48
+ attr_accessor :disposable
49
+
50
+ # On every answer to a key on the free plan, and on no other: `false` while the day's trial of every field lasts, `true` once the answer has Unlimited's fields.
51
+ attr_accessor :trial_expired
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'domain' => :'domain',
57
+ :'is_registered' => :'is_registered',
58
+ :'is_disposable' => :'is_disposable',
59
+ :'has_a' => :'has_a',
60
+ :'has_aaaa' => :'has_aaaa',
61
+ :'has_mx' => :'has_mx',
62
+ :'has_ns' => :'has_ns',
63
+ :'has_cname' => :'has_cname',
64
+ :'dns' => :'dns',
65
+ :'ip_ranges' => :'ip_ranges',
66
+ :'disposable' => :'disposable',
67
+ :'trial_expired' => :'trial_expired'
68
+ }
69
+ end
70
+
71
+ # Returns attribute mapping this model knows about
72
+ def self.acceptable_attribute_map
73
+ attribute_map
74
+ end
75
+
76
+ # Returns all the JSON keys this model knows about
77
+ def self.acceptable_attributes
78
+ acceptable_attribute_map.values
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.openapi_types
83
+ {
84
+ :'domain' => :'String',
85
+ :'is_registered' => :'Boolean',
86
+ :'is_disposable' => :'Boolean',
87
+ :'has_a' => :'Boolean',
88
+ :'has_aaaa' => :'Boolean',
89
+ :'has_mx' => :'Boolean',
90
+ :'has_ns' => :'Boolean',
91
+ :'has_cname' => :'Boolean',
92
+ :'dns' => :'DomainDns',
93
+ :'ip_ranges' => :'DomainIpRanges',
94
+ :'disposable' => :'DisposableDetail',
95
+ :'trial_expired' => :'Boolean'
96
+ }
97
+ end
98
+
99
+ # List of attributes with nullable: true
100
+ def self.openapi_nullable
101
+ Set.new([
102
+ ])
103
+ end
104
+
105
+ # Initializes the object
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ def initialize(attributes = {})
108
+ if (!attributes.is_a?(Hash))
109
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::DomainLookupResponse` initialize method"
110
+ end
111
+
112
+ # check to see if the attribute exists and convert string to symbol for hash key
113
+ acceptable_attribute_map = self.class.acceptable_attribute_map
114
+ attributes = attributes.each_with_object({}) { |(k, v), h|
115
+ if (!acceptable_attribute_map.key?(k.to_sym))
116
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::DomainLookupResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
117
+ end
118
+ h[k.to_sym] = v
119
+ }
120
+
121
+ if attributes.key?(:'domain')
122
+ self.domain = attributes[:'domain']
123
+ else
124
+ self.domain = nil
125
+ end
126
+
127
+ if attributes.key?(:'is_registered')
128
+ self.is_registered = attributes[:'is_registered']
129
+ else
130
+ self.is_registered = nil
131
+ end
132
+
133
+ if attributes.key?(:'is_disposable')
134
+ self.is_disposable = attributes[:'is_disposable']
135
+ end
136
+
137
+ if attributes.key?(:'has_a')
138
+ self.has_a = attributes[:'has_a']
139
+ else
140
+ self.has_a = nil
141
+ end
142
+
143
+ if attributes.key?(:'has_aaaa')
144
+ self.has_aaaa = attributes[:'has_aaaa']
145
+ else
146
+ self.has_aaaa = nil
147
+ end
148
+
149
+ if attributes.key?(:'has_mx')
150
+ self.has_mx = attributes[:'has_mx']
151
+ else
152
+ self.has_mx = nil
153
+ end
154
+
155
+ if attributes.key?(:'has_ns')
156
+ self.has_ns = attributes[:'has_ns']
157
+ else
158
+ self.has_ns = nil
159
+ end
160
+
161
+ if attributes.key?(:'has_cname')
162
+ self.has_cname = attributes[:'has_cname']
163
+ else
164
+ self.has_cname = nil
165
+ end
166
+
167
+ if attributes.key?(:'dns')
168
+ self.dns = attributes[:'dns']
169
+ end
170
+
171
+ if attributes.key?(:'ip_ranges')
172
+ self.ip_ranges = attributes[:'ip_ranges']
173
+ end
174
+
175
+ if attributes.key?(:'disposable')
176
+ self.disposable = attributes[:'disposable']
177
+ end
178
+
179
+ if attributes.key?(:'trial_expired')
180
+ self.trial_expired = attributes[:'trial_expired']
181
+ end
182
+ end
183
+
184
+ # Show invalid properties with the reasons. Usually used together with valid?
185
+ # @return Array for valid properties with the reasons
186
+ def list_invalid_properties
187
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
188
+ invalid_properties = Array.new
189
+ if @domain.nil?
190
+ invalid_properties.push('invalid value for "domain", domain cannot be nil.')
191
+ end
192
+
193
+ if @is_registered.nil?
194
+ invalid_properties.push('invalid value for "is_registered", is_registered cannot be nil.')
195
+ end
196
+
197
+ if @has_a.nil?
198
+ invalid_properties.push('invalid value for "has_a", has_a cannot be nil.')
199
+ end
200
+
201
+ if @has_aaaa.nil?
202
+ invalid_properties.push('invalid value for "has_aaaa", has_aaaa cannot be nil.')
203
+ end
204
+
205
+ if @has_mx.nil?
206
+ invalid_properties.push('invalid value for "has_mx", has_mx cannot be nil.')
207
+ end
208
+
209
+ if @has_ns.nil?
210
+ invalid_properties.push('invalid value for "has_ns", has_ns cannot be nil.')
211
+ end
212
+
213
+ if @has_cname.nil?
214
+ invalid_properties.push('invalid value for "has_cname", has_cname cannot be nil.')
215
+ end
216
+
217
+ invalid_properties
218
+ end
219
+
220
+ # Check to see if the all the properties in the model are valid
221
+ # @return true if the model is valid
222
+ def valid?
223
+ warn '[DEPRECATED] the `valid?` method is obsolete'
224
+ return false if @domain.nil?
225
+ return false if @is_registered.nil?
226
+ return false if @has_a.nil?
227
+ return false if @has_aaaa.nil?
228
+ return false if @has_mx.nil?
229
+ return false if @has_ns.nil?
230
+ return false if @has_cname.nil?
231
+ true
232
+ end
233
+
234
+ # Custom attribute writer method with validation
235
+ # @param [Object] domain Value to be assigned
236
+ def domain=(domain)
237
+ if domain.nil?
238
+ fail ArgumentError, 'domain cannot be nil'
239
+ end
240
+
241
+ @domain = domain
242
+ end
243
+
244
+ # Custom attribute writer method with validation
245
+ # @param [Object] is_registered Value to be assigned
246
+ def is_registered=(is_registered)
247
+ if is_registered.nil?
248
+ fail ArgumentError, 'is_registered cannot be nil'
249
+ end
250
+
251
+ @is_registered = is_registered
252
+ end
253
+
254
+ # Custom attribute writer method with validation
255
+ # @param [Object] has_a Value to be assigned
256
+ def has_a=(has_a)
257
+ if has_a.nil?
258
+ fail ArgumentError, 'has_a cannot be nil'
259
+ end
260
+
261
+ @has_a = has_a
262
+ end
263
+
264
+ # Custom attribute writer method with validation
265
+ # @param [Object] has_aaaa Value to be assigned
266
+ def has_aaaa=(has_aaaa)
267
+ if has_aaaa.nil?
268
+ fail ArgumentError, 'has_aaaa cannot be nil'
269
+ end
270
+
271
+ @has_aaaa = has_aaaa
272
+ end
273
+
274
+ # Custom attribute writer method with validation
275
+ # @param [Object] has_mx Value to be assigned
276
+ def has_mx=(has_mx)
277
+ if has_mx.nil?
278
+ fail ArgumentError, 'has_mx cannot be nil'
279
+ end
280
+
281
+ @has_mx = has_mx
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] has_ns Value to be assigned
286
+ def has_ns=(has_ns)
287
+ if has_ns.nil?
288
+ fail ArgumentError, 'has_ns cannot be nil'
289
+ end
290
+
291
+ @has_ns = has_ns
292
+ end
293
+
294
+ # Custom attribute writer method with validation
295
+ # @param [Object] has_cname Value to be assigned
296
+ def has_cname=(has_cname)
297
+ if has_cname.nil?
298
+ fail ArgumentError, 'has_cname cannot be nil'
299
+ end
300
+
301
+ @has_cname = has_cname
302
+ end
303
+
304
+ # Checks equality by comparing each attribute.
305
+ # @param [Object] Object to be compared
306
+ def ==(o)
307
+ return true if self.equal?(o)
308
+ self.class == o.class &&
309
+ domain == o.domain &&
310
+ is_registered == o.is_registered &&
311
+ is_disposable == o.is_disposable &&
312
+ has_a == o.has_a &&
313
+ has_aaaa == o.has_aaaa &&
314
+ has_mx == o.has_mx &&
315
+ has_ns == o.has_ns &&
316
+ has_cname == o.has_cname &&
317
+ dns == o.dns &&
318
+ ip_ranges == o.ip_ranges &&
319
+ disposable == o.disposable &&
320
+ trial_expired == o.trial_expired
321
+ end
322
+
323
+ # @see the `==` method
324
+ # @param [Object] Object to be compared
325
+ def eql?(o)
326
+ self == o
327
+ end
328
+
329
+ # Calculates hash code according to all attributes.
330
+ # @return [Integer] Hash code
331
+ def hash
332
+ [domain, is_registered, is_disposable, has_a, has_aaaa, has_mx, has_ns, has_cname, dns, ip_ranges, disposable, trial_expired].hash
333
+ end
334
+
335
+ # Builds the object from hash
336
+ # @param [Hash] attributes Model attributes in the form of hash
337
+ # @return [Object] Returns the model itself
338
+ def self.build_from_hash(attributes)
339
+ return nil unless attributes.is_a?(Hash)
340
+ attributes = attributes.transform_keys(&:to_sym)
341
+ transformed_hash = {}
342
+ openapi_types.each_pair do |key, type|
343
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
344
+ transformed_hash["#{key}"] = nil
345
+ elsif type =~ /\AArray<(.*)>/i
346
+ # check to ensure the input is an array given that the attribute
347
+ # is documented as an array but the input is not
348
+ if attributes[attribute_map[key]].is_a?(Array)
349
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
350
+ end
351
+ elsif !attributes[attribute_map[key]].nil?
352
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
353
+ end
354
+ end
355
+ new(transformed_hash)
356
+ end
357
+
358
+ # Returns the object in the form of hash
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_hash
361
+ hash = {}
362
+ self.class.attribute_map.each_pair do |attr, param|
363
+ value = self.send(attr)
364
+ if value.nil?
365
+ is_nullable = self.class.openapi_nullable.include?(attr)
366
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
367
+ end
368
+
369
+ hash[param] = _to_hash(value)
370
+ end
371
+ hash
372
+ end
373
+
374
+ end
375
+
376
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #InternetData API
3
3
 
4
- #The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
4
+ #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.08
6
+ The version of the OpenAPI document: 2026.11.13
7
7
  Contact: support@internetdata.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #InternetData API
3
3
 
4
- #The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
4
+ #The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.08
6
+ The version of the OpenAPI document: 2026.11.13
7
7
  Contact: support@internetdata.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0