From b39189b8a2cee94ab277729033f82460c72c8b38 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 11:59:40 +0000 Subject: [PATCH] feat: deprecate `IPLocation` --- README.md | 1 + docs/DataCenter.md | 2 + docs/DataCenterInfo.md | 10 ++ docs/IPLocation.md | 2 + docs/IpInfoResultV4.md | 1 + docs/IpInfoResultV6.md | 1 + fingerprint_pro_server_api_sdk/__init__.py | 1 + .../models/__init__.py | 1 + .../models/data_center_info.py | 140 ++++++++++++++++++ .../models/ip_info_result_v4.py | 28 +++- .../models/ip_info_result_v6.py | 28 +++- res/fingerprint-server-api.yaml | 28 +++- test/mocks/get_event.json | 4 +- test/mocks/webhook.json | 4 +- 14 files changed, 243 insertions(+), 8 deletions(-) create mode 100644 docs/DataCenterInfo.md create mode 100644 fingerprint_pro_server_api_sdk/models/data_center_info.py diff --git a/README.md b/README.md index 2edf3ed4..e6f3d7f4 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ Class | Method | HTTP request | Description - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) - [DataCenter](docs/DataCenter.md) + - [DataCenterInfo](docs/DataCenterInfo.md) - [ErrorEvent403Response](docs/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) - [ErrorEvent404Response](docs/ErrorEvent404Response.md) diff --git a/docs/DataCenter.md b/docs/DataCenter.md index 675a1d91..f1c93f0e 100644 --- a/docs/DataCenter.md +++ b/docs/DataCenter.md @@ -1,4 +1,6 @@ # DataCenter +`dataCenter` is deprecated in favor of `datacenter` + ## Properties Name | Type | Description | Notes diff --git a/docs/DataCenterInfo.md b/docs/DataCenterInfo.md new file mode 100644 index 00000000..66c19419 --- /dev/null +++ b/docs/DataCenterInfo.md @@ -0,0 +1,10 @@ +# DataCenterInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | | +**name** | **str** | | [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) + diff --git a/docs/IPLocation.md b/docs/IPLocation.md index 5fc4bd38..73e6458c 100644 --- a/docs/IPLocation.md +++ b/docs/IPLocation.md @@ -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 diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md index c08f44eb..50794969 100644 --- a/docs/IpInfoResultV4.md +++ b/docs/IpInfoResultV4.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] **asn** | [**ASN**](ASN.md) | | [optional] +**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] **data_center** | [**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) diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md index 76721965..6f16fedf 100644 --- a/docs/IpInfoResultV6.md +++ b/docs/IpInfoResultV6.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] **asn** | [**ASN**](ASN.md) | | [optional] +**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] **data_center** | [**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) diff --git a/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index 56345ddd..ccd4c6a8 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -26,6 +26,7 @@ from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence from fingerprint_pro_server_api_sdk.models.data_center import DataCenter +from fingerprint_pro_server_api_sdk.models.data_center_info import DataCenterInfo from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 091c0c72..675c93b6 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -20,6 +20,7 @@ from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence from fingerprint_pro_server_api_sdk.models.data_center import DataCenter +from fingerprint_pro_server_api_sdk.models.data_center_info import DataCenterInfo from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/data_center_info.py b/fingerprint_pro_server_api_sdk/models/data_center_info.py new file mode 100644 index 00000000..ddb8c5b6 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/data_center_info.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. # noqa: E501 + + OpenAPI spec version: 3 + Contact: support@fingerprint.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DataCenterInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'result': 'bool', + 'name': 'str' + } + + attribute_map = { + 'result': 'result', + 'name': 'name' + } + + def __init__(self, result=None, name=None): # noqa: E501 + """DataCenterInfo - a model defined in Swagger""" # noqa: E501 + self._result = None + self._name = None + self.discriminator = None + self.result = result + if name is not None: + self.name = name + + @property + def result(self): + """Gets the result of this DataCenterInfo. # noqa: E501 + + + :return: The result of this DataCenterInfo. # noqa: E501 + :rtype: bool + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this DataCenterInfo. + + + :param result: The result of this DataCenterInfo. # noqa: E501 + :type: bool + """ + if result is None: + raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 + + self._result = result + + @property + def name(self): + """Gets the name of this DataCenterInfo. # noqa: E501 + + + :return: The name of this DataCenterInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DataCenterInfo. + + + :param name: The name of this DataCenterInfo. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenterInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenterInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenterInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py index c8827340..8046e39c 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py @@ -31,6 +31,7 @@ class IpInfoResultV4(object): 'address': 'str', 'geolocation': 'IPLocation', 'asn': 'ASN', + 'datacenter': 'DataCenterInfo', 'data_center': 'DataCenter' } @@ -38,14 +39,16 @@ class IpInfoResultV4(object): 'address': 'address', 'geolocation': 'geolocation', 'asn': 'asn', + 'datacenter': 'datacenter', 'data_center': '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, data_center=None): # noqa: E501 """IpInfoResultV4 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None self._asn = None + self._datacenter = None self._data_center = None self.discriminator = None if address is not None: @@ -54,6 +57,8 @@ def __init__(self, address=None, geolocation=None, asn=None, data_center=None): self.geolocation = geolocation if asn is not None: self.asn = asn + if datacenter is not None: + self.datacenter = datacenter if data_center is not None: self.data_center = data_center @@ -120,6 +125,27 @@ def asn(self, asn): self._asn = asn + @property + def datacenter(self): + """Gets the datacenter of this IpInfoResultV4. # noqa: E501 + + + :return: The datacenter of this IpInfoResultV4. # noqa: E501 + :rtype: DataCenterInfo + """ + return self._datacenter + + @datacenter.setter + def datacenter(self, datacenter): + """Sets the datacenter of this IpInfoResultV4. + + + :param datacenter: The datacenter of this IpInfoResultV4. # noqa: E501 + :type: DataCenterInfo + """ + + self._datacenter = datacenter + @property def data_center(self): """Gets the data_center of this IpInfoResultV4. # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py index f384a2d5..3e10c1eb 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py @@ -31,6 +31,7 @@ class IpInfoResultV6(object): 'address': 'str', 'geolocation': 'IPLocation', 'asn': 'ASN', + 'datacenter': 'DataCenterInfo', 'data_center': 'DataCenter' } @@ -38,14 +39,16 @@ class IpInfoResultV6(object): 'address': 'address', 'geolocation': 'geolocation', 'asn': 'asn', + 'datacenter': 'datacenter', 'data_center': '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, data_center=None): # noqa: E501 """IpInfoResultV6 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None self._asn = None + self._datacenter = None self._data_center = None self.discriminator = None if address is not None: @@ -54,6 +57,8 @@ def __init__(self, address=None, geolocation=None, asn=None, data_center=None): self.geolocation = geolocation if asn is not None: self.asn = asn + if datacenter is not None: + self.datacenter = datacenter if data_center is not None: self.data_center = data_center @@ -120,6 +125,27 @@ def asn(self, asn): self._asn = asn + @property + def datacenter(self): + """Gets the datacenter of this IpInfoResultV6. # noqa: E501 + + + :return: The datacenter of this IpInfoResultV6. # noqa: E501 + :rtype: DataCenterInfo + """ + return self._datacenter + + @datacenter.setter + def datacenter(self, datacenter): + """Sets the datacenter of this IpInfoResultV6. + + + :param datacenter: The datacenter of this IpInfoResultV6. # noqa: E501 + :type: DataCenterInfo + """ + + self._datacenter = datacenter + @property def data_center(self): """Gets the data_center of this IpInfoResultV6. # noqa: E501 diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index d5a61a28..4329383a 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -158,7 +158,7 @@ paths: asn: '7922' name: COMCAST-7922 network: 73.136.0.0/13 - dataCenter: + datacenter: result: true name: DediPath incognito: @@ -3701,7 +3701,7 @@ paths: asn: '7922' name: COMCAST-7922 network: 73.136.0.0/13 - dataCenter: + datacenter: result: true name: DediPath rootApps: @@ -4320,8 +4320,22 @@ components: - asn - network title: ASN + DataCenterInfo: + type: object + additionalProperties: false + properties: + result: + type: boolean + name: + type: string + example: DediPath + required: + - result + title: DataCenterInfo DataCenter: type: object + deprecated: true + description: '`dataCenter` is deprecated in favor of `datacenter`' additionalProperties: false properties: result: @@ -4335,6 +4349,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: >- @@ -4857,6 +4877,8 @@ components: $ref: '#/components/schemas/IPLocation' asn: $ref: '#/components/schemas/ASN' + datacenter: + $ref: '#/components/schemas/DataCenterInfo' dataCenter: $ref: '#/components/schemas/DataCenter' v6: @@ -4871,6 +4893,8 @@ components: $ref: '#/components/schemas/IPLocation' asn: $ref: '#/components/schemas/ASN' + datacenter: + $ref: '#/components/schemas/DataCenterInfo' dataCenter: $ref: '#/components/schemas/DataCenter' IpBlockListResult: diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index 0a89f7d4..808f12f4 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -100,7 +100,7 @@ "name": "COMCAST-7922", "network": "73.136.0.0/13" }, - "dataCenter": { + "datacenter": { "result": true, "name": "DediPath" } @@ -229,4 +229,4 @@ } } } -} \ No newline at end of file +} diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 9ae35fa0..9ba70238 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -94,7 +94,7 @@ "name": "COMCAST-7922", "network": "73.136.0.0/13" }, - "dataCenter": { + "datacenter": { "result": true, "name": "DediPath" } @@ -184,4 +184,4 @@ "locationSpoofing": { "result": true } -} \ No newline at end of file +}