Skip to content

Commit

Permalink
Merge pull request #45 from fingerprintjs/INTER-481-fixed-datacenter-…
Browse files Browse the repository at this point in the history
…name

Use `datacenter` field for the `IpInfo` signal instead of the wrong `dataCenter`, deprecate `IPLocation`
  • Loading branch information
ilfa authored Jan 12, 2024
2 parents 3c14bd3 + 53bcda2 commit f153d44
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 49 deletions.
2 changes: 2 additions & 0 deletions docs/IPLocation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# IPLocation
This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.


## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/IpInfoResultV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**address** | **str** | | [optional]
**geolocation** | [**IPLocation**](IPLocation.md) | | [optional]
**asn** | [**ASN**](ASN.md) | | [optional]
**data_center** | [**DataCenter**](DataCenter.md) | | [optional]
**datacenter** | [**DataCenter**](DataCenter.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

2 changes: 1 addition & 1 deletion docs/IpInfoResultV6.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**address** | **str** | | [optional]
**geolocation** | [**IPLocation**](IPLocation.md) | | [optional]
**asn** | [**ASN**](ASN.md) | | [optional]
**data_center** | [**DataCenter**](DataCenter.md) | | [optional]
**datacenter** | [**DataCenter**](DataCenter.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class BotdDetectionResult(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
Stores bot detection result
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
5 changes: 4 additions & 1 deletion fingerprint_pro_server_api_sdk/models/botd_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class BotdResult(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
Contains all the information from Bot Detection product
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
5 changes: 4 additions & 1 deletion fingerprint_pro_server_api_sdk/models/event_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class EventResponse(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
Contains results from all activated products - Fingerprint Pro, Bot Detection, and others.
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
5 changes: 4 additions & 1 deletion fingerprint_pro_server_api_sdk/models/ip_info_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class IpInfoResult(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
Details about the request IP address. Has separate fields for v4 and v6 IP address versions.
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
30 changes: 15 additions & 15 deletions fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ class IpInfoResultV4(object):
'address': 'str',
'geolocation': 'IPLocation',
'asn': 'ASN',
'data_center': 'DataCenter'
'datacenter': 'DataCenter'
}

attribute_map = {
'address': 'address',
'geolocation': 'geolocation',
'asn': 'asn',
'data_center': 'dataCenter'
'datacenter': 'datacenter'
}

def __init__(self, address=None, geolocation=None, asn=None, data_center=None): # noqa: E501
def __init__(self, address=None, geolocation=None, asn=None, datacenter=None): # noqa: E501
"""IpInfoResultV4 - a model defined in Swagger""" # noqa: E501
self._address = None
self._geolocation = None
self._asn = None
self._data_center = None
self._datacenter = None
self.discriminator = None
if address is not None:
self.address = address
if geolocation is not None:
self.geolocation = geolocation
if asn is not None:
self.asn = asn
if data_center is not None:
self.data_center = data_center
if datacenter is not None:
self.datacenter = datacenter

@property
def address(self):
Expand Down Expand Up @@ -121,25 +121,25 @@ def asn(self, asn):
self._asn = asn

@property
def data_center(self):
"""Gets the data_center of this IpInfoResultV4. # noqa: E501
def datacenter(self):
"""Gets the datacenter of this IpInfoResultV4. # noqa: E501
:return: The data_center of this IpInfoResultV4. # noqa: E501
:return: The datacenter of this IpInfoResultV4. # noqa: E501
:rtype: DataCenter
"""
return self._data_center
return self._datacenter

@data_center.setter
def data_center(self, data_center):
"""Sets the data_center of this IpInfoResultV4.
@datacenter.setter
def datacenter(self, datacenter):
"""Sets the datacenter of this IpInfoResultV4.
:param data_center: The data_center of this IpInfoResultV4. # noqa: E501
:param datacenter: The datacenter of this IpInfoResultV4. # noqa: E501
:type: DataCenter
"""

self._data_center = data_center
self._datacenter = datacenter

def to_dict(self):
"""Returns the model properties as a dict"""
Expand Down
30 changes: 15 additions & 15 deletions fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ class IpInfoResultV6(object):
'address': 'str',
'geolocation': 'IPLocation',
'asn': 'ASN',
'data_center': 'DataCenter'
'datacenter': 'DataCenter'
}

attribute_map = {
'address': 'address',
'geolocation': 'geolocation',
'asn': 'asn',
'data_center': 'dataCenter'
'datacenter': 'datacenter'
}

def __init__(self, address=None, geolocation=None, asn=None, data_center=None): # noqa: E501
def __init__(self, address=None, geolocation=None, asn=None, datacenter=None): # noqa: E501
"""IpInfoResultV6 - a model defined in Swagger""" # noqa: E501
self._address = None
self._geolocation = None
self._asn = None
self._data_center = None
self._datacenter = None
self.discriminator = None
if address is not None:
self.address = address
if geolocation is not None:
self.geolocation = geolocation
if asn is not None:
self.asn = asn
if data_center is not None:
self.data_center = data_center
if datacenter is not None:
self.datacenter = datacenter

@property
def address(self):
Expand Down Expand Up @@ -121,25 +121,25 @@ def asn(self, asn):
self._asn = asn

@property
def data_center(self):
"""Gets the data_center of this IpInfoResultV6. # noqa: E501
def datacenter(self):
"""Gets the datacenter of this IpInfoResultV6. # noqa: E501
:return: The data_center of this IpInfoResultV6. # noqa: E501
:return: The datacenter of this IpInfoResultV6. # noqa: E501
:rtype: DataCenter
"""
return self._data_center
return self._datacenter

@data_center.setter
def data_center(self, data_center):
"""Sets the data_center of this IpInfoResultV6.
@datacenter.setter
def datacenter(self, datacenter):
"""Sets the datacenter of this IpInfoResultV6.
:param data_center: The data_center of this IpInfoResultV6. # noqa: E501
:param datacenter: The datacenter of this IpInfoResultV6. # noqa: E501
:type: DataCenter
"""

self._data_center = data_center
self._datacenter = datacenter

def to_dict(self):
"""Returns the model properties as a dict"""
Expand Down
5 changes: 4 additions & 1 deletion fingerprint_pro_server_api_sdk/models/ip_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class IPLocation(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
5 changes: 4 additions & 1 deletion fingerprint_pro_server_api_sdk/models/products_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class ProductsResponse(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise)
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class RawDeviceAttributesResult(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
It includes 35+ raw browser identification attributes to provide Fingerprint users with even more information than our standard visitor ID provides. This enables Fingerprint users to not have to run our open-source product in conjunction with Fingerprint Pro Plus and Enterprise to get those additional attributes. Warning: The raw signals data can change at any moment as we improve the product. We cannot guarantee the internal shape of raw device attributes to be stable, so typical semantic versioning rules do not apply here. Use this data with caution without assuming a specific structure beyond the generic type provided here.
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
5 changes: 4 additions & 1 deletion fingerprint_pro_server_api_sdk/models/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import six

class Response(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""
Fields `lastTimestamp` and `paginationKey` added when `limit` or `before` parameter provided and there is more data to show
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
Expand Down
14 changes: 10 additions & 4 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ paths:
asn: '7922'
name: COMCAST-7922
network: 73.136.0.0/13
dataCenter:
datacenter:
result: true
name: DediPath
incognito:
Expand Down Expand Up @@ -3701,7 +3701,7 @@ paths:
asn: '7922'
name: COMCAST-7922
network: 73.136.0.0/13
dataCenter:
datacenter:
result: true
name: DediPath
rootApps:
Expand Down Expand Up @@ -4335,6 +4335,12 @@ components:
IPLocation:
type: object
additionalProperties: false
deprecated: true
description: >-
This field is **deprecated** and will not return a result for **accounts
created after December 18th, 2023**. Please use the [`ipInfo` Smart
signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation)
for geolocation information.
properties:
accuracyRadius:
description: >-
Expand Down Expand Up @@ -4857,7 +4863,7 @@ components:
$ref: '#/components/schemas/IPLocation'
asn:
$ref: '#/components/schemas/ASN'
dataCenter:
datacenter:
$ref: '#/components/schemas/DataCenter'
v6:
type: object
Expand All @@ -4871,7 +4877,7 @@ components:
$ref: '#/components/schemas/IPLocation'
asn:
$ref: '#/components/schemas/ASN'
dataCenter:
datacenter:
$ref: '#/components/schemas/DataCenter'
IpBlockListResult:
type: object
Expand Down
5 changes: 4 additions & 1 deletion template/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import six
{{#models}}
{{#model}}
class {{classname}}(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""{{#description}}
{{{.}}}

{{/description}}NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
"""{{#allowableValues}}
Expand Down
4 changes: 2 additions & 2 deletions test/mocks/get_event.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"name": "COMCAST-7922",
"network": "73.136.0.0/13"
},
"dataCenter": {
"datacenter": {
"result": true,
"name": "DediPath"
}
Expand Down Expand Up @@ -229,4 +229,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions test/mocks/webhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"name": "COMCAST-7922",
"network": "73.136.0.0/13"
},
"dataCenter": {
"datacenter": {
"result": true,
"name": "DediPath"
}
Expand Down Expand Up @@ -184,4 +184,4 @@
"locationSpoofing": {
"result": true
}
}
}

0 comments on commit f153d44

Please sign in to comment.