ipgeolocation_sdk 1.0.0 → 2.0.1

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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +288 -2003
  4. data/lib/ipgeolocation_sdk/client.rb +227 -0
  5. data/lib/ipgeolocation_sdk/client_config.rb +106 -0
  6. data/lib/ipgeolocation_sdk/enums.rb +110 -0
  7. data/lib/ipgeolocation_sdk/errors.rb +38 -0
  8. data/lib/ipgeolocation_sdk/json_output.rb +30 -0
  9. data/lib/ipgeolocation_sdk/models.rb +186 -0
  10. data/lib/ipgeolocation_sdk/request_models.rb +175 -0
  11. data/lib/ipgeolocation_sdk/serde.rb +434 -0
  12. data/lib/ipgeolocation_sdk/transport.rb +124 -0
  13. data/lib/ipgeolocation_sdk/value_object.rb +60 -0
  14. data/lib/ipgeolocation_sdk/version.rb +1 -13
  15. data/lib/ipgeolocation_sdk.rb +19 -101
  16. metadata +38 -308
  17. data/Gemfile +0 -9
  18. data/Rakefile +0 -10
  19. data/docs/ASNConnection.md +0 -22
  20. data/docs/ASNDetails.md +0 -48
  21. data/docs/ASNLookupApi.md +0 -89
  22. data/docs/ASNResponse.md +0 -20
  23. data/docs/ASNResponseXML.md +0 -20
  24. data/docs/ASNResponseXMLAsn.md +0 -48
  25. data/docs/Abuse.md +0 -40
  26. data/docs/AbuseContactApi.md +0 -85
  27. data/docs/AbuseResponse.md +0 -20
  28. data/docs/AbuseResponseXML.md +0 -20
  29. data/docs/Astronomy.md +0 -68
  30. data/docs/AstronomyApi.md +0 -97
  31. data/docs/AstronomyEvening.md +0 -36
  32. data/docs/AstronomyLocation.md +0 -50
  33. data/docs/AstronomyMorning.md +0 -36
  34. data/docs/AstronomyResponse.md +0 -22
  35. data/docs/AstronomyXMLResponse.md +0 -22
  36. data/docs/BulkIPGeolocation.md +0 -42
  37. data/docs/BulkIPSecurity.md +0 -42
  38. data/docs/CountryMetadata.md +0 -22
  39. data/docs/Currency.md +0 -22
  40. data/docs/ErrorResponse.md +0 -18
  41. data/docs/ErrorXMLResponse.md +0 -18
  42. data/docs/ErrorXMLResponseArray.md +0 -18
  43. data/docs/GeolocationResponse.md +0 -38
  44. data/docs/GeolocationXMLResponse.md +0 -38
  45. data/docs/GeolocationXMLResponseArray.md +0 -38
  46. data/docs/GetBulkIpGeolocation200ResponseInner1.md +0 -49
  47. data/docs/GetBulkIpGeolocationRequest.md +0 -18
  48. data/docs/GetBulkIpSecurityInfo200ResponseInner1.md +0 -49
  49. data/docs/IPLocationApi.md +0 -175
  50. data/docs/Location.md +0 -58
  51. data/docs/LocationMinimal.md +0 -52
  52. data/docs/Network.md +0 -22
  53. data/docs/NetworkAsn.md +0 -38
  54. data/docs/NetworkCompany.md +0 -22
  55. data/docs/NetworkMinimal.md +0 -20
  56. data/docs/NetworkMinimalAsn.md +0 -22
  57. data/docs/NetworkMinimalCompany.md +0 -18
  58. data/docs/ParseBulkUserAgentStringsRequest.md +0 -18
  59. data/docs/ParseUserAgentStringRequest.md +0 -18
  60. data/docs/Security.md +0 -38
  61. data/docs/SecurityAPIResponse.md +0 -34
  62. data/docs/SecurityAPIXMLResponse.md +0 -34
  63. data/docs/SecurityAPIXMLResponseArray.md +0 -34
  64. data/docs/SecurityApi.md +0 -175
  65. data/docs/TimeConversionApi.md +0 -109
  66. data/docs/TimeConversionResponse.md +0 -24
  67. data/docs/TimeConversionXMLResponse.md +0 -24
  68. data/docs/TimeZone.md +0 -36
  69. data/docs/TimeZoneDetailedResponse.md +0 -26
  70. data/docs/TimeZoneDetailedXMLResponse.md +0 -26
  71. data/docs/TimeZoneDstEnd.md +0 -28
  72. data/docs/TimeZoneDstStart.md +0 -28
  73. data/docs/TimezoneAirport.md +0 -40
  74. data/docs/TimezoneApi.md +0 -99
  75. data/docs/TimezoneDetail.md +0 -56
  76. data/docs/TimezoneDetailDstEnd.md +0 -28
  77. data/docs/TimezoneDetailDstStart.md +0 -28
  78. data/docs/TimezoneLocation.md +0 -48
  79. data/docs/TimezoneLocode.md +0 -32
  80. data/docs/UserAgentApi.md +0 -235
  81. data/docs/UserAgentData.md +0 -32
  82. data/docs/UserAgentDataDevice.md +0 -24
  83. data/docs/UserAgentDataEngine.md +0 -24
  84. data/docs/UserAgentDataOperatingSystem.md +0 -26
  85. data/docs/UserAgentXMLData.md +0 -32
  86. data/docs/UserAgentXMLDataArray.md +0 -32
  87. data/git_push.sh +0 -57
  88. data/ipgeolocation_sdk.gemspec +0 -29
  89. data/lib/ipgeolocation_sdk/api/abuse_contact_api.rb +0 -86
  90. data/lib/ipgeolocation_sdk/api/asn_lookup_api.rb +0 -92
  91. data/lib/ipgeolocation_sdk/api/astronomy_api.rb +0 -116
  92. data/lib/ipgeolocation_sdk/api/ip_geolocation_api.rb +0 -186
  93. data/lib/ipgeolocation_sdk/api/ip_security_api.rb +0 -184
  94. data/lib/ipgeolocation_sdk/api/time_conversion_api.rb +0 -122
  95. data/lib/ipgeolocation_sdk/api/timezone_api.rb +0 -113
  96. data/lib/ipgeolocation_sdk/api/user_agent_api.rb +0 -158
  97. data/lib/ipgeolocation_sdk/api_client.rb +0 -393
  98. data/lib/ipgeolocation_sdk/api_error.rb +0 -58
  99. data/lib/ipgeolocation_sdk/configuration.rb +0 -308
  100. data/lib/ipgeolocation_sdk/models/abuse.rb +0 -305
  101. data/lib/ipgeolocation_sdk/models/abuse_response.rb +0 -229
  102. data/lib/ipgeolocation_sdk/models/abuse_response_xml.rb +0 -229
  103. data/lib/ipgeolocation_sdk/models/asn_connection.rb +0 -238
  104. data/lib/ipgeolocation_sdk/models/asn_response.rb +0 -230
  105. data/lib/ipgeolocation_sdk/models/asn_response_asn.rb +0 -368
  106. data/lib/ipgeolocation_sdk/models/asn_response_xml.rb +0 -229
  107. data/lib/ipgeolocation_sdk/models/asn_response_xml_asn.rb +0 -364
  108. data/lib/ipgeolocation_sdk/models/astronomy.rb +0 -445
  109. data/lib/ipgeolocation_sdk/models/astronomy_evening.rb +0 -301
  110. data/lib/ipgeolocation_sdk/models/astronomy_location.rb +0 -364
  111. data/lib/ipgeolocation_sdk/models/astronomy_morning.rb +0 -301
  112. data/lib/ipgeolocation_sdk/models/astronomy_response.rb +0 -238
  113. data/lib/ipgeolocation_sdk/models/astronomy_xml_response.rb +0 -238
  114. data/lib/ipgeolocation_sdk/models/bulk_ip_geolocation.rb +0 -113
  115. data/lib/ipgeolocation_sdk/models/bulk_ip_security.rb +0 -113
  116. data/lib/ipgeolocation_sdk/models/country_metadata.rb +0 -240
  117. data/lib/ipgeolocation_sdk/models/currency.rb +0 -238
  118. data/lib/ipgeolocation_sdk/models/error_response.rb +0 -220
  119. data/lib/ipgeolocation_sdk/models/error_xml_response.rb +0 -220
  120. data/lib/ipgeolocation_sdk/models/error_xml_response_array.rb +0 -220
  121. data/lib/ipgeolocation_sdk/models/geolocation_response.rb +0 -310
  122. data/lib/ipgeolocation_sdk/models/geolocation_xml_response.rb +0 -310
  123. data/lib/ipgeolocation_sdk/models/geolocation_xml_response_array.rb +0 -310
  124. data/lib/ipgeolocation_sdk/models/get_bulk_ip_geolocation200_response_inner1.rb +0 -105
  125. data/lib/ipgeolocation_sdk/models/get_bulk_ip_geolocation_request.rb +0 -241
  126. data/lib/ipgeolocation_sdk/models/get_bulk_ip_security_info200_response_inner1.rb +0 -105
  127. data/lib/ipgeolocation_sdk/models/location.rb +0 -400
  128. data/lib/ipgeolocation_sdk/models/location_minimal.rb +0 -373
  129. data/lib/ipgeolocation_sdk/models/network.rb +0 -238
  130. data/lib/ipgeolocation_sdk/models/network_asn.rb +0 -310
  131. data/lib/ipgeolocation_sdk/models/network_company.rb +0 -238
  132. data/lib/ipgeolocation_sdk/models/network_minimal.rb +0 -229
  133. data/lib/ipgeolocation_sdk/models/network_minimal_asn.rb +0 -238
  134. data/lib/ipgeolocation_sdk/models/network_minimal_company.rb +0 -220
  135. data/lib/ipgeolocation_sdk/models/parse_bulk_user_agent_strings_request.rb +0 -222
  136. data/lib/ipgeolocation_sdk/models/parse_user_agent_string_request.rb +0 -220
  137. data/lib/ipgeolocation_sdk/models/security.rb +0 -310
  138. data/lib/ipgeolocation_sdk/models/security_api_response.rb +0 -292
  139. data/lib/ipgeolocation_sdk/models/security_apixml_response.rb +0 -292
  140. data/lib/ipgeolocation_sdk/models/security_apixml_response_array.rb +0 -292
  141. data/lib/ipgeolocation_sdk/models/time_conversion_response.rb +0 -247
  142. data/lib/ipgeolocation_sdk/models/time_conversion_xml_response.rb +0 -247
  143. data/lib/ipgeolocation_sdk/models/time_zone.rb +0 -301
  144. data/lib/ipgeolocation_sdk/models/time_zone_detailed_response.rb +0 -256
  145. data/lib/ipgeolocation_sdk/models/time_zone_detailed_xml_response.rb +0 -256
  146. data/lib/ipgeolocation_sdk/models/time_zone_dst_end.rb +0 -265
  147. data/lib/ipgeolocation_sdk/models/time_zone_dst_start.rb +0 -265
  148. data/lib/ipgeolocation_sdk/models/timezone_airport.rb +0 -319
  149. data/lib/ipgeolocation_sdk/models/timezone_detail.rb +0 -391
  150. data/lib/ipgeolocation_sdk/models/timezone_detail_dst_end.rb +0 -265
  151. data/lib/ipgeolocation_sdk/models/timezone_detail_dst_start.rb +0 -265
  152. data/lib/ipgeolocation_sdk/models/timezone_location.rb +0 -355
  153. data/lib/ipgeolocation_sdk/models/timezone_locode.rb +0 -283
  154. data/lib/ipgeolocation_sdk/models/user_agent_data.rb +0 -283
  155. data/lib/ipgeolocation_sdk/models/user_agent_data_device.rb +0 -247
  156. data/lib/ipgeolocation_sdk/models/user_agent_data_engine.rb +0 -247
  157. data/lib/ipgeolocation_sdk/models/user_agent_data_operating_system.rb +0 -256
  158. data/lib/ipgeolocation_sdk/models/user_agent_xml_data.rb +0 -283
  159. data/lib/ipgeolocation_sdk/models/user_agent_xml_data_array.rb +0 -283
  160. data/spec/api/abuse_contact_api_spec.rb +0 -48
  161. data/spec/api/asn_lookup_api_spec.rb +0 -50
  162. data/spec/api/astronomy_api_spec.rb +0 -54
  163. data/spec/api/ip_location_api_spec.rb +0 -67
  164. data/spec/api/security_api_spec.rb +0 -67
  165. data/spec/api/time_conversion_api_spec.rb +0 -60
  166. data/spec/api/timezone_api_spec.rb +0 -56
  167. data/spec/api/user_agent_api_spec.rb +0 -74
  168. data/spec/models/abuse_response_spec.rb +0 -42
  169. data/spec/models/abuse_response_xml_spec.rb +0 -42
  170. data/spec/models/abuse_spec.rb +0 -90
  171. data/spec/models/asn_connection_spec.rb +0 -48
  172. data/spec/models/asn_response_asn_spec.rb +0 -126
  173. data/spec/models/asn_response_spec.rb +0 -42
  174. data/spec/models/asn_response_xml_asn_spec.rb +0 -126
  175. data/spec/models/asn_response_xml_spec.rb +0 -42
  176. data/spec/models/astronomy_evening_spec.rb +0 -90
  177. data/spec/models/astronomy_location_spec.rb +0 -132
  178. data/spec/models/astronomy_morning_spec.rb +0 -90
  179. data/spec/models/astronomy_response_spec.rb +0 -48
  180. data/spec/models/astronomy_spec.rb +0 -186
  181. data/spec/models/astronomy_xml_response_spec.rb +0 -48
  182. data/spec/models/country_metadata_spec.rb +0 -48
  183. data/spec/models/currency_spec.rb +0 -48
  184. data/spec/models/error_response_spec.rb +0 -36
  185. data/spec/models/error_xml_response_array_spec.rb +0 -36
  186. data/spec/models/error_xml_response_spec.rb +0 -36
  187. data/spec/models/geolocation_response_spec.rb +0 -96
  188. data/spec/models/geolocation_xml_response_array_spec.rb +0 -96
  189. data/spec/models/geolocation_xml_response_spec.rb +0 -96
  190. data/spec/models/get_bulk_ip_geolocation200_response_inner1_spec.rb +0 -32
  191. data/spec/models/get_bulk_ip_geolocation200_response_inner_spec.rb +0 -32
  192. data/spec/models/get_bulk_ip_geolocation_request_spec.rb +0 -36
  193. data/spec/models/get_bulk_ip_security_info200_response_inner1_spec.rb +0 -32
  194. data/spec/models/get_bulk_ip_security_info200_response_inner_spec.rb +0 -32
  195. data/spec/models/location_minimal_spec.rb +0 -138
  196. data/spec/models/location_spec.rb +0 -156
  197. data/spec/models/network_asn_spec.rb +0 -96
  198. data/spec/models/network_company_spec.rb +0 -48
  199. data/spec/models/network_minimal_asn_spec.rb +0 -48
  200. data/spec/models/network_minimal_company_spec.rb +0 -36
  201. data/spec/models/network_minimal_spec.rb +0 -42
  202. data/spec/models/network_spec.rb +0 -48
  203. data/spec/models/parse_bulk_user_agent_strings_request_spec.rb +0 -36
  204. data/spec/models/parse_user_agent_string_request_spec.rb +0 -36
  205. data/spec/models/security_api_response_spec.rb +0 -84
  206. data/spec/models/security_apixml_response_array_spec.rb +0 -84
  207. data/spec/models/security_apixml_response_spec.rb +0 -84
  208. data/spec/models/security_spec.rb +0 -96
  209. data/spec/models/time_conversion_response_spec.rb +0 -54
  210. data/spec/models/time_conversion_xml_response_spec.rb +0 -54
  211. data/spec/models/time_zone_detailed_response_spec.rb +0 -60
  212. data/spec/models/time_zone_detailed_xml_response_spec.rb +0 -60
  213. data/spec/models/time_zone_dst_end_spec.rb +0 -66
  214. data/spec/models/time_zone_dst_start_spec.rb +0 -66
  215. data/spec/models/time_zone_spec.rb +0 -90
  216. data/spec/models/timezone_airport_spec.rb +0 -102
  217. data/spec/models/timezone_detail_dst_end_spec.rb +0 -66
  218. data/spec/models/timezone_detail_dst_start_spec.rb +0 -66
  219. data/spec/models/timezone_detail_spec.rb +0 -150
  220. data/spec/models/timezone_location_spec.rb +0 -126
  221. data/spec/models/timezone_locode_spec.rb +0 -78
  222. data/spec/models/user_agent_data_device_spec.rb +0 -54
  223. data/spec/models/user_agent_data_engine_spec.rb +0 -54
  224. data/spec/models/user_agent_data_operating_system_spec.rb +0 -60
  225. data/spec/models/user_agent_data_spec.rb +0 -78
  226. data/spec/models/user_agent_xml_data_array_spec.rb +0 -78
  227. data/spec/models/user_agent_xml_data_spec.rb +0 -78
  228. data/spec/spec_helper.rb +0 -111
@@ -1,283 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module IpgeolocationSdk
17
- class UserAgentXMLDataArray
18
- attr_accessor :user_agent_string
19
-
20
- attr_accessor :name
21
-
22
- attr_accessor :type
23
-
24
- attr_accessor :version
25
-
26
- attr_accessor :version_major
27
-
28
- attr_accessor :device
29
-
30
- attr_accessor :engine
31
-
32
- attr_accessor :operating_system
33
-
34
- # Attribute mapping from ruby-style variable name to JSON key.
35
- def self.attribute_map
36
- {
37
- :'user_agent_string' => :'user_agent_string',
38
- :'name' => :'name',
39
- :'type' => :'type',
40
- :'version' => :'version',
41
- :'version_major' => :'version_major',
42
- :'device' => :'device',
43
- :'engine' => :'engine',
44
- :'operating_system' => :'operating_system'
45
- }
46
- end
47
-
48
- # Returns attribute mapping this model knows about
49
- def self.acceptable_attribute_map
50
- attribute_map
51
- end
52
-
53
- # Returns all the JSON keys this model knows about
54
- def self.acceptable_attributes
55
- acceptable_attribute_map.values
56
- end
57
-
58
- # Attribute type mapping.
59
- def self.openapi_types
60
- {
61
- :'user_agent_string' => :'String',
62
- :'name' => :'String',
63
- :'type' => :'String',
64
- :'version' => :'String',
65
- :'version_major' => :'String',
66
- :'device' => :'UserAgentDataDevice',
67
- :'engine' => :'UserAgentDataEngine',
68
- :'operating_system' => :'UserAgentDataOperatingSystem'
69
- }
70
- end
71
-
72
- # List of attributes with nullable: true
73
- def self.openapi_nullable
74
- Set.new([
75
- ])
76
- end
77
-
78
- # Initializes the object
79
- # @param [Hash] attributes Model attributes in the form of hash
80
- def initialize(attributes = {})
81
- if (!attributes.is_a?(Hash))
82
- fail ArgumentError, "The input argument (attributes) must be a hash in `IpgeolocationSdk::UserAgentXMLDataArray` initialize method"
83
- end
84
-
85
- # check to see if the attribute exists and convert string to symbol for hash key
86
- acceptable_attribute_map = self.class.acceptable_attribute_map
87
- attributes = attributes.each_with_object({}) { |(k, v), h|
88
- if (!acceptable_attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `IpgeolocationSdk::UserAgentXMLDataArray`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
- end
91
- h[k.to_sym] = v
92
- }
93
-
94
- if attributes.key?(:'user_agent_string')
95
- self.user_agent_string = attributes[:'user_agent_string']
96
- end
97
-
98
- if attributes.key?(:'name')
99
- self.name = attributes[:'name']
100
- end
101
-
102
- if attributes.key?(:'type')
103
- self.type = attributes[:'type']
104
- end
105
-
106
- if attributes.key?(:'version')
107
- self.version = attributes[:'version']
108
- end
109
-
110
- if attributes.key?(:'version_major')
111
- self.version_major = attributes[:'version_major']
112
- end
113
-
114
- if attributes.key?(:'device')
115
- self.device = attributes[:'device']
116
- end
117
-
118
- if attributes.key?(:'engine')
119
- self.engine = attributes[:'engine']
120
- end
121
-
122
- if attributes.key?(:'operating_system')
123
- self.operating_system = attributes[:'operating_system']
124
- end
125
- end
126
-
127
- # Show invalid properties with the reasons. Usually used together with valid?
128
- # @return Array for valid properties with the reasons
129
- def list_invalid_properties
130
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
131
- invalid_properties = Array.new
132
- invalid_properties
133
- end
134
-
135
- # Check to see if the all the properties in the model are valid
136
- # @return true if the model is valid
137
- def valid?
138
- warn '[DEPRECATED] the `valid?` method is obsolete'
139
- true
140
- end
141
-
142
- # Checks equality by comparing each attribute.
143
- # @param [Object] Object to be compared
144
- def ==(o)
145
- return true if self.equal?(o)
146
- self.class == o.class &&
147
- user_agent_string == o.user_agent_string &&
148
- name == o.name &&
149
- type == o.type &&
150
- version == o.version &&
151
- version_major == o.version_major &&
152
- device == o.device &&
153
- engine == o.engine &&
154
- operating_system == o.operating_system
155
- end
156
-
157
- # @see the `==` method
158
- # @param [Object] Object to be compared
159
- def eql?(o)
160
- self == o
161
- end
162
-
163
- # Calculates hash code according to all attributes.
164
- # @return [Integer] Hash code
165
- def hash
166
- [user_agent_string, name, type, version, version_major, device, engine, operating_system].hash
167
- end
168
-
169
- # Builds the object from hash
170
- # @param [Hash] attributes Model attributes in the form of hash
171
- # @return [Object] Returns the model itself
172
- def self.build_from_hash(attributes)
173
- return nil unless attributes.is_a?(Hash)
174
- attributes = attributes.transform_keys(&:to_sym)
175
- transformed_hash = {}
176
- openapi_types.each_pair do |key, type|
177
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
- transformed_hash["#{key}"] = nil
179
- elsif type =~ /\AArray<(.*)>/i
180
- # check to ensure the input is an array given that the attribute
181
- # is documented as an array but the input is not
182
- if attributes[attribute_map[key]].is_a?(Array)
183
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
- end
185
- elsif !attributes[attribute_map[key]].nil?
186
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
- end
188
- end
189
- new(transformed_hash)
190
- end
191
-
192
- # Deserializes the data based on type
193
- # @param string type Data type
194
- # @param string value Value to be deserialized
195
- # @return [Object] Deserialized data
196
- def self._deserialize(type, value)
197
- case type.to_sym
198
- when :Time
199
- Time.parse(value)
200
- when :Date
201
- Date.parse(value)
202
- when :String
203
- value.to_s
204
- when :Integer
205
- value.to_i
206
- when :Float
207
- value.to_f
208
- when :Boolean
209
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
- true
211
- else
212
- false
213
- end
214
- when :Object
215
- # generic object (usually a Hash), return directly
216
- value
217
- when /\AArray<(?<inner_type>.+)>\z/
218
- inner_type = Regexp.last_match[:inner_type]
219
- value.map { |v| _deserialize(inner_type, v) }
220
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
- k_type = Regexp.last_match[:k_type]
222
- v_type = Regexp.last_match[:v_type]
223
- {}.tap do |hash|
224
- value.each do |k, v|
225
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
- end
227
- end
228
- else # model
229
- # models (e.g. Pet) or oneOf
230
- klass = IpgeolocationSdk.const_get(type)
231
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
232
- end
233
- end
234
-
235
- # Returns the string representation of the object
236
- # @return [String] String presentation of the object
237
- def to_s
238
- to_hash.to_s
239
- end
240
-
241
- # to_body is an alias to to_hash (backward compatibility)
242
- # @return [Hash] Returns the object in the form of hash
243
- def to_body
244
- to_hash
245
- end
246
-
247
- # Returns the object in the form of hash
248
- # @return [Hash] Returns the object in the form of hash
249
- def to_hash
250
- hash = {}
251
- self.class.attribute_map.each_pair do |attr, param|
252
- value = self.send(attr)
253
- if value.nil?
254
- is_nullable = self.class.openapi_nullable.include?(attr)
255
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
- end
257
-
258
- hash[param] = _to_hash(value)
259
- end
260
- hash
261
- end
262
-
263
- # Outputs non-array value in the form of hash
264
- # For object, use to_hash. Otherwise, just return the value
265
- # @param [Object] value Any valid value
266
- # @return [Hash] Returns the value in the form of hash
267
- def _to_hash(value)
268
- if value.is_a?(Array)
269
- value.compact.map { |v| _to_hash(v) }
270
- elsif value.is_a?(Hash)
271
- {}.tap do |hash|
272
- value.each { |k, v| hash[k] = _to_hash(v) }
273
- end
274
- elsif value.respond_to? :to_hash
275
- value.to_hash
276
- else
277
- value
278
- end
279
- end
280
-
281
- end
282
-
283
- end
@@ -1,48 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for IpgeolocationSdk::AbuseContactApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'AbuseContactApi' do
20
- before do
21
- # run before each test
22
- @api_instance = IpgeolocationSdk::AbuseContactApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AbuseContactApi' do
30
- it 'should create an instance of AbuseContactApi' do
31
- expect(@api_instance).to be_instance_of(IpgeolocationSdk::AbuseContactApi)
32
- end
33
- end
34
-
35
- # unit tests for get_abuse_contact_info
36
- # The Abuse Contact API provides essential contact information to report abusive activity associated with IP addresses. By querying an IP address (IPv4 or IPv6), users receive detailed abuse contact data, including the responsible organization, abuse handling role, contact emails, phone numbers, and registered address. This enables users to swiftly take action to report and mitigate threats such as spam, DDoS attacks, and phishing. In addition to abuse-specific contacts, the API also includes registration metadata like the registered country and abuse handle. This empowers cybersecurity teams, hosting providers, and compliance entities to take appropriate legal or administrative action.
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [String] :ip query parameter &#39;ip&#39;.
39
- # @option opts [String] :excludes You can exclude specific fields from the API response (except the ip field) by listing them in the excludes parameter as a comma-separated list. For example, you want to remove emails and handle from api response, you can put the keys in excludes parameter like this.
40
- # @option opts [String] :fields You can customize the API response by using the fields parameter to include only the specific data you need. For example, to retrieve only the role and emails, specify these keys in the fields parameter as shown below.
41
- # @return [AbuseResponse]
42
- describe 'get_abuse_contact_info test' do
43
- it 'should work' do
44
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
- end
46
- end
47
-
48
- end
@@ -1,50 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for IpgeolocationSdk::ASNLookupApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'ASNLookupApi' do
20
- before do
21
- # run before each test
22
- @api_instance = IpgeolocationSdk::ASNLookupApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of ASNLookupApi' do
30
- it 'should create an instance of ASNLookupApi' do
31
- expect(@api_instance).to be_instance_of(IpgeolocationSdk::ASNLookupApi)
32
- end
33
- end
34
-
35
- # unit tests for get_asn_info
36
- # ASN API provides comprehensive details for an ASN including the as name, organization name, the country of registration, associated domain, and its type (ISP, host provider, or business). The API also shows the allocation date of provided ASN and if it is currently allocated or not. It also contains the routing information including peering, upstreams, and downstreams to help understand the relationship between different ASNs. Example Use Cases: - Looking up ASN information for an IP address (e.g., &#x60;GET /asn?ip&#x3D;8.8.8.8&#x60;) - Retrieving ASN information for a specific ASN number (e.g., &#x60;GET /asn?asn&#x3D;12345&#x60;) - Getting peering relationships for an ASN (e.g., &#x60;GET /asn?asn&#x3D;12345&amp;include&#x3D;peers&#x60;)
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [String] :ip query parameter &#39;ip&#39;.
39
- # @option opts [Integer] :asn query paramter &#39;asn&#39;.
40
- # @option opts [String] :include This parameter can have four options: a) peers b) downstreams c) upstreams d) routes e) whois_response. You may add any of them in comma-separated way. In order to get the ASN details with peering data, pass peers string in the include parameter like mentioned below.
41
- # @option opts [String] :excludes You can exclude fields from the response according to you requirement with the exception of ip field. For example, you want to remove date_allocated and allocation_status from api response, you can put the keys in excludes parameter like this.
42
- # @option opts [String] :fields You can filter out only those fields which you want to see in the response by using the fields parameter. To retrieve only the AS organization, its country and downstreams in api response, you can put the keys in fields parameter like this. API will combine these fields with the default ASN response. Note: Parameters &#x60;peers, downstreams, upstreams, routes, whois_response&#x60; can be used in both &#x60;include&#x60; , and &#x60;fields&#x60;. If you use include and fields at the same time, fields parameter will be considered only.
43
- # @return [ASNResponse]
44
- describe 'get_asn_info test' do
45
- it 'should work' do
46
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
47
- end
48
- end
49
-
50
- end
@@ -1,54 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for IpgeolocationSdk::AstronomyApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'AstronomyApi' do
20
- before do
21
- # run before each test
22
- @api_instance = IpgeolocationSdk::AstronomyApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AstronomyApi' do
30
- it 'should create an instance of AstronomyApi' do
31
- expect(@api_instance).to be_instance_of(IpgeolocationSdk::AstronomyApi)
32
- end
33
- end
34
-
35
- # unit tests for get_astronomy_details
36
- # The Astronomy API provides the location-based rise and set times for the Sun and Moon along with the current position, distance from earth, and azimuth of the Sun and the Moon for a specific date at the queried time.
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [String] :ip query paramter &#39;ip&#39;. If not provided, will be your network IP
39
- # @option opts [String] :location query paramter &#39;location&#39;. If not provided, will be your ip location
40
- # @option opts [String] :lat query paramter &#39;lat&#39;.
41
- # @option opts [String] :long query paramter &#39;long&#39;.
42
- # @option opts [String] :time_zone
43
- # @option opts [String] :date The date (YYYY-MM-DD) to lookup for. default will be the current date
44
- # @option opts [Float] :elevation query parameter &#39;elevation&#39;
45
- # @option opts [String] :output Desired output format.
46
- # @option opts [String] :lang By default, the API responds in English. You can change the response language by passing the language code as a query parameter &#x60;lang&#x60;. Multi language feature is available only for &#x60;paid users&#x60;.
47
- # @return [AstronomyResponse]
48
- describe 'get_astronomy_details test' do
49
- it 'should work' do
50
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
- end
52
- end
53
-
54
- end
@@ -1,67 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for IpgeolocationSdk::IPLocationApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'IPLocationApi' do
20
- before do
21
- # run before each test
22
- @api_instance = IpgeolocationSdk::IPLocationApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of IPLocationApi' do
30
- it 'should create an instance of IPLocationApi' do
31
- expect(@api_instance).to be_instance_of(IpgeolocationSdk::IPLocationApi)
32
- end
33
- end
34
-
35
- # unit tests for get_bulk_ip_geolocation
36
- # This feature is available only on our paid API subscriptions (STANDARD or ADVANCED). This endpoint allows you to perform the geolocation lookup for multiple IPv4, IPv6 addresses or domain names (maximum 50,000) at the same time. The requests count per lookup is equal to total IP addresses or domain names passed. To perform bulk IP Geolocation Lookup, send a POST request and pass the \&quot;ips\&quot; array as JSON data along with it.
37
- # @param get_bulk_ip_geolocation_request
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :lang By default, the API responds in English. You can change the response language by passing the language code as a query parameter &#x60;lang&#x60;. Multi language feature is available only for &#x60;paid users&#x60;.
40
- # @option opts [String] :fields you can filter the API response by specifying the fields that you need, instead of getting the full response. To do this, pass the desired field names using the &#x60;fields&#x60; query parameter with each field represented as a dot-separated path.
41
- # @option opts [String] :excludes you can also filter the API response by excluding specific fields (except the IP address) that you don&#39;t need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path
42
- # @option opts [String] :include IP Geolocation API also provides IP-Security, abuse, timezone, user-agent and DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting information on Advanced API subscription, but doesn&#39;t respond it by default. To get these information along with the geolocation information, you must pass the &#x60;include&#x3D;security&#x60; or &#x60;include&#x3D;abuse&#x60; or &#x60;include&#x3D;dma&#x60; or &#x60;include&#x3D;time_zone&#x60; or &#x60;include&#x3D;user-agent&#x60; or you can fetch multiples by adding values in comma-separated way. In addition to that, IPGeolocation API also provide hostname lookup for an IP address on all the paid API subscriptions (STANDARD and ADVANCED), but doesn&#39;t respond it by default. To get the hostname for an IP address, you can pass one of the three values &#x60;hostname, liveHostname, hostnameFallbackLive&#x60; as a URL parameter &#x60;include&#x3D;&#x60;.
43
- # @option opts [String] :output Desired output format(json or xml).
44
- # @return [Array<GetBulkIpGeolocation200ResponseInner>]
45
- describe 'get_bulk_ip_geolocation test' do
46
- it 'should work' do
47
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
48
- end
49
- end
50
-
51
- # unit tests for get_ip_geolocation
52
- # IP Geolocation API provides real-time and accurate geolocation, network, abuse, and security information for any IPv4 or IPv6 address and domain name along with the user-agent detail for the provided user-agent string. You can geolocate your online visitors and provide them the customized user-experience accordingly.
53
- # @param [Hash] opts the optional parameters
54
- # @option opts [String] :ip In order to find geolocation information about an IP (ipv4 ipv6) address or a domain name, pass it as a query parameter ip. When this endpoint is queried without an IP address, it returns the geolocation information of the device/client which is calling it
55
- # @option opts [String] :lang By default, the API responds in English. You can change the response language by passing the language code as a query parameter &#x60;lang&#x60;. Multi language feature is available only for &#x60;paid users&#x60;.
56
- # @option opts [String] :fields you can filter the API response by specifying the fields that you need, instead of getting the full response. To do this, pass the desired field names using the &#x60;fields&#x60; query parameter with each field represented as a dot-separated path.
57
- # @option opts [String] :excludes you can also filter the API response by excluding specific fields (except the IP address) that you don&#39;t need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path
58
- # @option opts [String] :include IP Geolocation API also provides IP-Security, abuse, timezone, user-agent and DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting information on Advanced API subscription, but doesn&#39;t respond it by default. To get these information along with the geolocation information, you must pass the &#x60;include&#x3D;security&#x60; or &#x60;include&#x3D;abuse&#x60; or &#x60;include&#x3D;dma&#x60; or &#x60;include&#x3D;time_zone&#x60; or &#x60;include&#x3D;user-agent&#x60; or you can fetch multiples by adding values in comma-separated way. In addition to that, IPGeolocation API also provide hostname lookup for an IP address on all the paid API subscriptions (STANDARD and ADVANCED), but doesn&#39;t respond it by default. To get the hostname for an IP address, you can pass one of the three values &#x60;hostname, liveHostname, hostnameFallbackLive&#x60; as a URL parameter &#x60;include&#x3D;&#x60;.
59
- # @option opts [String] :output Desired output format (json or xml).
60
- # @return [GeolocationResponse]
61
- describe 'get_ip_geolocation test' do
62
- it 'should work' do
63
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
64
- end
65
- end
66
-
67
- end
@@ -1,67 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for IpgeolocationSdk::SecurityApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'SecurityApi' do
20
- before do
21
- # run before each test
22
- @api_instance = IpgeolocationSdk::SecurityApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of SecurityApi' do
30
- it 'should create an instance of SecurityApi' do
31
- expect(@api_instance).to be_instance_of(IpgeolocationSdk::SecurityApi)
32
- end
33
- end
34
-
35
- # unit tests for get_bulk_ip_security_info
36
- # The Bulk IP Security Lookup API can provide security details for up to &#x60;50,000&#x60; bulk IPs. This API also has parameters to customize the response, just like the single IP Security Lookup API.
37
- # @param get_bulk_ip_geolocation_request
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :include Include optional objects like &#x60;location&#x60;, &#x60;network&#x60;. Use comma-separated values. Example: include&#x3D;location,network
40
- # @option opts [String] :fields Get specific fields, objects from the response.
41
- # @option opts [String] :excludes Exclude specific fields, objects from the response.
42
- # @option opts [String] :output Desired output format.
43
- # @option opts [String] :lang By default, the API responds in English. You can change the response language by passing the language code as a query parameter &#x60;lang&#x60;. Multi language feature is available only for &#x60;paid users&#x60;.
44
- # @return [Array<GetBulkIpSecurityInfo200ResponseInner>]
45
- describe 'get_bulk_ip_security_info test' do
46
- it 'should work' do
47
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
48
- end
49
- end
50
-
51
- # unit tests for get_ip_security_info
52
- # IP Security API provides security details of a given IP. It detects whether the IP is proxy, tor or bot. It also shows the proxy types of the IP (like VPN, PROXY, RELAY etc.) with it&#39;s VPN/proxy service provider making our API powerful VPN checker. It finds the IPs that are involved in spam activities. It also checks whether the IP links to a cloud provider and includes the provider&#39;s name.
53
- # @param [Hash] opts the optional parameters
54
- # @option opts [String] :ip query parameter &#39;ip&#39;. If not provided, will be your network IP
55
- # @option opts [String] :include Include optional details like location and/or network.
56
- # @option opts [String] :fields Get specific fields, objects from the response.
57
- # @option opts [String] :excludes Exclude specific fields, objects from the response.
58
- # @option opts [String] :output Desired output format (json or xml).
59
- # @option opts [String] :lang By default, the API responds in English. You can change the response language by passing the language code as a query parameter &#x60;lang&#x60;. Multi language feature is available only for &#x60;paid users&#x60;.
60
- # @return [SecurityAPIResponse]
61
- describe 'get_ip_security_info test' do
62
- it 'should work' do
63
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
64
- end
65
- end
66
-
67
- end
@@ -1,60 +0,0 @@
1
- =begin
2
- #IPGeolocation.io - IP intelligence products
3
-
4
- #Ipgeolocation provides a set of APIs to make ip based decisions.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.13.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for IpgeolocationSdk::TimeConversionApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'TimeConversionApi' do
20
- before do
21
- # run before each test
22
- @api_instance = IpgeolocationSdk::TimeConversionApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of TimeConversionApi' do
30
- it 'should create an instance of TimeConversionApi' do
31
- expect(@api_instance).to be_instance_of(IpgeolocationSdk::TimeConversionApi)
32
- end
33
- end
34
-
35
- # unit tests for convert_time_between_timezones
36
- # You can convert a timestamp provided as a query paramter time from one time zone to another time zone.
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [String] :time time parameter takes the input in the following two formats: i) &#39;yyyy-MM-dd HH:mm&#39;, and ii) &#39;yyyy-MM-dd HH:mm:ss&#39;. This parameter is optional and you can omit it to convert the current time between two coordinates, time zones or locations.
39
- # @option opts [String] :tz_from timezone to convert from
40
- # @option opts [String] :tz_to timezone to convert to
41
- # @option opts [Float] :lat_from latitude to convert from
42
- # @option opts [Float] :long_from longitude to convert from
43
- # @option opts [Float] :lat_to latitude to convert to
44
- # @option opts [Float] :long_to longitude to convert to
45
- # @option opts [String] :location_from location to convert from
46
- # @option opts [String] :location_to location to convert to
47
- # @option opts [String] :icao_from location to convert from
48
- # @option opts [String] :icao_to location to convert to
49
- # @option opts [String] :iata_from location to convert from
50
- # @option opts [String] :iata_to location to convert to
51
- # @option opts [String] :locode_from location to convert from
52
- # @option opts [String] :locode_to location to convert to
53
- # @return [TimeConversionResponse]
54
- describe 'convert_time_between_timezones test' do
55
- it 'should work' do
56
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
- end
58
- end
59
-
60
- end