From 36fcfe3be5617256a43b9f809b59f0ebde166765 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Thu, 7 Sep 2023 20:11:41 +0200 Subject: [PATCH] fix: update OpenAPI Schema with `asn` and `dataCenter` signals --- README.md | 2 + docs/Model/ASN.md | 11 + docs/Model/DataCenter.md | 10 + docs/Model/IpInfoResultV4.md | 2 + docs/Model/IpInfoResultV6.md | 2 + docs/Model/ProductsResponse.md | 2 +- .../ProductsResponseIdentificationData.md | 2 +- res/fingerprint-server-api.yaml | 205 +++++++++- src/Model/ASN.php | 361 ++++++++++++++++++ src/Model/DataCenter.php | 328 ++++++++++++++++ src/Model/IpInfoResultV4.php | 70 +++- src/Model/IpInfoResultV6.php | 70 +++- src/Model/ProductsResponse.php | 2 +- .../ProductsResponseIdentificationData.php | 2 +- test/mocks/get_event.json | 9 + 15 files changed, 1060 insertions(+), 18 deletions(-) create mode 100644 docs/Model/ASN.md create mode 100644 docs/Model/DataCenter.md create mode 100644 src/Model/ASN.php create mode 100644 src/Model/DataCenter.php diff --git a/README.md b/README.md index bd9fc826..224af2dc 100644 --- a/README.md +++ b/README.md @@ -163,10 +163,12 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [ASN](docs/Model/ASN.md) - [BotdDetectionResult](docs/Model/BotdDetectionResult.md) - [BotdResult](docs/Model/BotdResult.md) - [BrowserDetails](docs/Model/BrowserDetails.md) - [Confidence](docs/Model/Confidence.md) + - [DataCenter](docs/Model/DataCenter.md) - [ErrorEvent403Response](docs/Model/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/Model/ErrorEvent403ResponseError.md) - [ErrorEvent404Response](docs/Model/ErrorEvent404Response.md) diff --git a/docs/Model/ASN.md b/docs/Model/ASN.md new file mode 100644 index 00000000..bc881a4b --- /dev/null +++ b/docs/Model/ASN.md @@ -0,0 +1,11 @@ +# ASN + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asn** | **string** | | +**network** | **string** | | +**name** | **string** | | [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/Model/DataCenter.md b/docs/Model/DataCenter.md new file mode 100644 index 00000000..048a90a2 --- /dev/null +++ b/docs/Model/DataCenter.md @@ -0,0 +1,10 @@ +# DataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | | +**name** | **string** | | [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/Model/IpInfoResultV4.md b/docs/Model/IpInfoResultV4.md index ae0464a4..33d3658c 100644 --- a/docs/Model/IpInfoResultV4.md +++ b/docs/Model/IpInfoResultV4.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **string** | | [optional] **geolocation** | [**\Fingerprint\ServerAPI\Model\IPLocation**](IPLocation.md) | | [optional] +**asn** | [**\Fingerprint\ServerAPI\Model\ASN**](ASN.md) | | [optional] +**data_center** | [**\Fingerprint\ServerAPI\Model\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/Model/IpInfoResultV6.md b/docs/Model/IpInfoResultV6.md index 288eaacb..00575d90 100644 --- a/docs/Model/IpInfoResultV6.md +++ b/docs/Model/IpInfoResultV6.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **string** | | [optional] **geolocation** | [**\Fingerprint\ServerAPI\Model\IPLocation**](IPLocation.md) | | [optional] +**asn** | [**\Fingerprint\ServerAPI\Model\ASN**](ASN.md) | | [optional] +**data_center** | [**\Fingerprint\ServerAPI\Model\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/Model/ProductsResponse.md b/docs/Model/ProductsResponse.md index 5738bdb2..00aa0417 100644 --- a/docs/Model/ProductsResponse.md +++ b/docs/Model/ProductsResponse.md @@ -1,5 +1,5 @@ # ProductsResponse -Contains all the information from each activated product - Fingerprint Pro or Bot Detection +Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) ## Properties diff --git a/docs/Model/ProductsResponseIdentificationData.md b/docs/Model/ProductsResponseIdentificationData.md index af4cce9b..73c86d08 100644 --- a/docs/Model/ProductsResponseIdentificationData.md +++ b/docs/Model/ProductsResponseIdentificationData.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | **first_seen_at** | [**\Fingerprint\ServerAPI\Model\SeenAt**](SeenAt.md) | | **last_seen_at** | [**\Fingerprint\ServerAPI\Model\SeenAt**](SeenAt.md) | | -**visitor_id** | **string** | | +**visitor_id** | **string** | String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. | [[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/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index f6965269..5232357c 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -129,8 +129,7 @@ paths: botd: data: bot: - result: bad - type: selenium + result: notDetected url: https://www.example.com/login ip: 61.127.217.15 time: '2019-05-21T16:40:13Z' @@ -155,6 +154,13 @@ paths: subdivisions: - isoCode: '10' name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath incognito: data: result: false @@ -224,6 +230,106 @@ paths: value: 0 cookiesEnabled: value: true + proPlusBotDetectedResponse: + summary: Bot detected on Pro Plus plan + value: + products: + identification: + data: + visitorId: BotDetected000000000 + requestId: 0KSh65EnVoB85JBmloQK + incognito: true + linkedId: somelinkedId + time: '2019-05-21T16:40:13Z' + timestamp: 1582299576512 + url: https://www.example.com/login + ip: 61.127.217.15 + ipLocation: {} + browserDetails: + browserName: '' + browserMajorVersion: '' + browserFullVersion: '' + os: '' + osVersion: '' + device: '' + userAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) .... + confidence: + score: 0.5 + comment: The real score is unknown + visitorFound: false + firstSeenAt: + global: null + subscription: null + lastSeenAt: + global: null + subscription: null + botd: + data: + bot: + result: bad + type: selenium + url: https://www.example.com/login + ip: 61.127.217.15 + time: '2019-05-21T16:40:13Z' + ipInfo: + data: + v4: + address: 94.142.239.124 + geolocation: + accuracyRadius: 20 + latitude: 50.05 + longitude: 14.4 + postalCode: 150 00 + timezone: Europe/Prague + city: + name: Prague + country: + code: CZ + name: Czechia + continent: + code: EU + name: Europe + subdivisions: + - isoCode: '10' + name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath + incognito: + data: + result: false + rootApps: + data: + result: false + emulator: + data: + result: false + ipBlocklist: + data: + result: false + details: + emailSpam: false + attackSource: false + tor: + data: + result: false + vpn: + data: + result: false + methods: + timezoneMismatch: false + publicVPN: false + proxy: + data: + result: false + tampering: + data: + result: false + anomalyScore: 0 allErrorsResponse: summary: All failed signals value: @@ -248,6 +354,22 @@ paths: error: code: Failed message: internal server error + clonedApp: + error: + code: Failed + message: internal server error + factoryReset: + error: + code: Failed + message: internal server error + jailbroken: + error: + code: Failed + message: internal server error + frida: + error: + code: Failed + message: internal server error emulator: error: code: Failed @@ -268,10 +390,28 @@ paths: error: code: Failed message: internal server error + privacySettings: + error: + code: Failed + message: internal server error + virtualMachine: + error: + code: Failed + message: internal server error tampering: error: code: Failed message: internal server error + rawDeviceAttributes: + data: + audio: + error: + name: Error + message: internal server error + canvas: + error: + name: Error + message: internal server error withBotdError: summary: BotD error value: @@ -3649,6 +3789,13 @@ paths: subdivisions: - isoCode: '10' name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath rootApps: result: false emulator: @@ -4238,6 +4385,35 @@ components: example: global: '2022-05-05T18:28:54.535Z' subscription: null + ASN: + type: object + additionalProperties: false + properties: + asn: + type: string + example: '7922' + network: + type: string + example: 73.136.0.0/13 + name: + type: string + example: COMCAST-7922 + required: + - asn + - network + title: ASN + DataCenter: + type: object + additionalProperties: false + properties: + result: + type: boolean + name: + type: string + example: DediPath + required: + - result + title: DataCenter IPLocation: type: object additionalProperties: false @@ -4311,8 +4487,8 @@ components: ProductsResponse: type: object description: >- - Contains all the information from each activated product - Fingerprint - Pro or Bot Detection + Contains all information about the request identified by `requestId`, + depending on the pricing plan (Pro, Pro Plus, Enterprise) additionalProperties: false properties: identification: @@ -4382,6 +4558,19 @@ components: $ref: '#/components/schemas/SeenAt' visitorId: type: string + description: > + String of 20 characters that uniquely identifies the + visitor's browser. + + + **Pro Plus:** + + If a bot is detected (`products.botd.bot.result != + "notDetected"`), the `visitorId` value contains a + placeholder string `BotDetected000000000`. + example: + - Ibk1527CUFmcnjLwIs4A + - BotDetected000000000 additionalProperties: false required: - browserDetails @@ -4737,6 +4926,10 @@ components: example: 94.142.239.124 geolocation: $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + dataCenter: + $ref: '#/components/schemas/DataCenter' v6: type: object additionalProperties: false @@ -4747,6 +4940,10 @@ components: example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 geolocation: $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + dataCenter: + $ref: '#/components/schemas/DataCenter' IpBlockListResult: type: object properties: diff --git a/src/Model/ASN.php b/src/Model/ASN.php new file mode 100644 index 00000000..c455a809 --- /dev/null +++ b/src/Model/ASN.php @@ -0,0 +1,361 @@ + 'string', +'network' => 'string', +'name' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'asn' => null, +'network' => null, +'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'asn' => 'asn', +'network' => 'network', +'name' => 'name' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'asn' => 'setAsn', +'network' => 'setNetwork', +'name' => 'setName' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'asn' => 'getAsn', +'network' => 'getNetwork', +'name' => 'getName' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['network'] = isset($data['network']) ? $data['network'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['asn'] === null) { + $invalidProperties[] = "'asn' can't be null"; + } + if ($this->container['network'] === null) { + $invalidProperties[] = "'network' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets asn + * + * @return string + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string $asn asn + * + * @return $this + */ + public function setAsn($asn) + { + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets network + * + * @return string + */ + public function getNetwork() + { + return $this->container['network']; + } + + /** + * Sets network + * + * @param string $network network + * + * @return $this + */ + public function setNetwork($network) + { + $this->container['network'] = $network; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php new file mode 100644 index 00000000..2a0fa7ac --- /dev/null +++ b/src/Model/DataCenter.php @@ -0,0 +1,328 @@ + 'bool', +'name' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'result' => null, +'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'result' => 'result', +'name' => 'name' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult', +'name' => 'setName' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult', +'name' => 'getName' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['result'] === null) { + $invalidProperties[] = "'result' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets result + * + * @return bool + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param bool $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 3e507cad..5160caeb 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -57,7 +57,9 @@ class IpInfoResultV4 implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'address' => 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation' ]; +'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', +'asn' => '\Fingerprint\ServerAPI\Model\ASN', +'data_center' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -66,7 +68,9 @@ class IpInfoResultV4 implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'address' => 'ipv4', -'geolocation' => null ]; +'geolocation' => null, +'asn' => null, +'data_center' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -96,7 +100,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation' ]; +'geolocation' => 'geolocation', +'asn' => 'asn', +'data_center' => 'dataCenter' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -105,7 +111,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation' ]; +'geolocation' => 'setGeolocation', +'asn' => 'setAsn', +'data_center' => 'setDataCenter' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -114,7 +122,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation' ]; +'geolocation' => 'getGeolocation', +'asn' => 'getAsn', +'data_center' => 'getDataCenter' ]; /** * Array of attributes where the key is the local name, @@ -176,6 +186,8 @@ public function __construct(array $data = null) { $this->container['address'] = isset($data['address']) ? $data['address'] : null; $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['data_center'] = isset($data['data_center']) ? $data['data_center'] : null; } /** @@ -249,6 +261,54 @@ public function setGeolocation($geolocation) return $this; } + + /** + * Gets asn + * + * @return \Fingerprint\ServerAPI\Model\ASN + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param \Fingerprint\ServerAPI\Model\ASN $asn asn + * + * @return $this + */ + public function setAsn($asn) + { + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets data_center + * + * @return \Fingerprint\ServerAPI\Model\DataCenter + */ + public function getDataCenter() + { + return $this->container['data_center']; + } + + /** + * Sets data_center + * + * @param \Fingerprint\ServerAPI\Model\DataCenter $data_center data_center + * + * @return $this + */ + public function setDataCenter($data_center) + { + $this->container['data_center'] = $data_center; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index b7c8fe02..ad459f2f 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -57,7 +57,9 @@ class IpInfoResultV6 implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'address' => 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation' ]; +'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', +'asn' => '\Fingerprint\ServerAPI\Model\ASN', +'data_center' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -66,7 +68,9 @@ class IpInfoResultV6 implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'address' => 'ipv6', -'geolocation' => null ]; +'geolocation' => null, +'asn' => null, +'data_center' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -96,7 +100,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation' ]; +'geolocation' => 'geolocation', +'asn' => 'asn', +'data_center' => 'dataCenter' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -105,7 +111,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation' ]; +'geolocation' => 'setGeolocation', +'asn' => 'setAsn', +'data_center' => 'setDataCenter' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -114,7 +122,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation' ]; +'geolocation' => 'getGeolocation', +'asn' => 'getAsn', +'data_center' => 'getDataCenter' ]; /** * Array of attributes where the key is the local name, @@ -176,6 +186,8 @@ public function __construct(array $data = null) { $this->container['address'] = isset($data['address']) ? $data['address'] : null; $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['data_center'] = isset($data['data_center']) ? $data['data_center'] : null; } /** @@ -249,6 +261,54 @@ public function setGeolocation($geolocation) return $this; } + + /** + * Gets asn + * + * @return \Fingerprint\ServerAPI\Model\ASN + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param \Fingerprint\ServerAPI\Model\ASN $asn asn + * + * @return $this + */ + public function setAsn($asn) + { + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets data_center + * + * @return \Fingerprint\ServerAPI\Model\DataCenter + */ + public function getDataCenter() + { + return $this->container['data_center']; + } + + /** + * Sets data_center + * + * @param \Fingerprint\ServerAPI\Model\DataCenter $data_center data_center + * + * @return $this + */ + public function setDataCenter($data_center) + { + $this->container['data_center'] = $data_center; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index b3e58059..f7982644 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -35,7 +35,7 @@ * ProductsResponse Class Doc Comment * * @category Class - * @description Contains all the information from each activated product - Fingerprint Pro or Bot Detection + * @description Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) * @package Fingerprint\ServerAPI * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 08279c7e..69b24854 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -665,7 +665,7 @@ public function getVisitorId() /** * Sets visitor_id * - * @param string $visitor_id visitor_id + * @param string $visitor_id String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. * * @return $this */ diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index 339d38bd..79f2b97d 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -94,6 +94,15 @@ "name": "Hlavni mesto Praha" } ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "dataCenter": { + "result": true, + "name": "DediPath" } } }