diff --git a/.changeset/add-mitmattack-smartsignal.md b/.changeset/add-mitmattack-smartsignal.md new file mode 100644 index 00000000..89356d92 --- /dev/null +++ b/.changeset/add-mitmattack-smartsignal.md @@ -0,0 +1,5 @@ +--- +"fingerprint-pro-server-api-php-sdk": minor +--- + +Add `mitmAttack` (man-in-the-middle attack) Smart Signal. diff --git a/.schema-version b/.schema-version index a6316f06..fa49670c 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.3.0 \ No newline at end of file +v2.4.0 \ No newline at end of file diff --git a/README.md b/README.md index 85ff95c8..9983ba2d 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,7 @@ Class | Method | HTTP request | Description - [Incognito](docs/Model/Incognito.md) - [Jailbroken](docs/Model/Jailbroken.md) - [LocationSpoofing](docs/Model/LocationSpoofing.md) + - [MitMAttack](docs/Model/MitMAttack.md) - [PrivacySettings](docs/Model/PrivacySettings.md) - [ProductBotd](docs/Model/ProductBotd.md) - [ProductClonedApp](docs/Model/ProductClonedApp.md) @@ -303,6 +304,7 @@ Class | Method | HTTP request | Description - [ProductIncognito](docs/Model/ProductIncognito.md) - [ProductJailbroken](docs/Model/ProductJailbroken.md) - [ProductLocationSpoofing](docs/Model/ProductLocationSpoofing.md) + - [ProductMitMAttack](docs/Model/ProductMitMAttack.md) - [ProductPrivacySettings](docs/Model/ProductPrivacySettings.md) - [ProductProxy](docs/Model/ProductProxy.md) - [ProductRawDeviceAttributes](docs/Model/ProductRawDeviceAttributes.md) @@ -345,6 +347,7 @@ Class | Method | HTTP request | Description - [WebhookIPInfo](docs/Model/WebhookIPInfo.md) - [WebhookJailbroken](docs/Model/WebhookJailbroken.md) - [WebhookLocationSpoofing](docs/Model/WebhookLocationSpoofing.md) + - [WebhookMitMAttack](docs/Model/WebhookMitMAttack.md) - [WebhookPrivacySettings](docs/Model/WebhookPrivacySettings.md) - [WebhookProxy](docs/Model/WebhookProxy.md) - [WebhookRemoteControl](docs/Model/WebhookRemoteControl.md) diff --git a/docs/Model/MitMAttack.md b/docs/Model/MitMAttack.md new file mode 100644 index 00000000..2dd9309a --- /dev/null +++ b/docs/Model/MitMAttack.md @@ -0,0 +1,9 @@ +# MitMAttack + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. | + +[[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/ProductMitMAttack.md b/docs/Model/ProductMitMAttack.md new file mode 100644 index 00000000..fc09863e --- /dev/null +++ b/docs/Model/ProductMitMAttack.md @@ -0,0 +1,10 @@ +# ProductMitMAttack + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fingerprint\ServerAPI\Model\MitMAttack**](MitMAttack.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.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/Products.md b/docs/Model/Products.md index 3efcca94..ecb3be6b 100644 --- a/docs/Model/Products.md +++ b/docs/Model/Products.md @@ -29,6 +29,7 @@ Name | Type | Description | Notes **remote_control** | [**\Fingerprint\ServerAPI\Model\ProductRemoteControl**](ProductRemoteControl.md) | | [optional] **velocity** | [**\Fingerprint\ServerAPI\Model\ProductVelocity**](ProductVelocity.md) | | [optional] **developer_tools** | [**\Fingerprint\ServerAPI\Model\ProductDeveloperTools**](ProductDeveloperTools.md) | | [optional] +**mitm_attack** | [**\Fingerprint\ServerAPI\Model\ProductMitMAttack**](ProductMitMAttack.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/Webhook.md b/docs/Model/Webhook.md index b2265403..ad9532a6 100644 --- a/docs/Model/Webhook.md +++ b/docs/Model/Webhook.md @@ -43,6 +43,7 @@ Name | Type | Description | Notes **remote_control** | [**\Fingerprint\ServerAPI\Model\WebhookRemoteControl**](WebhookRemoteControl.md) | | [optional] **velocity** | [**\Fingerprint\ServerAPI\Model\WebhookVelocity**](WebhookVelocity.md) | | [optional] **developer_tools** | [**\Fingerprint\ServerAPI\Model\WebhookDeveloperTools**](WebhookDeveloperTools.md) | | [optional] +**mitm_attack** | [**\Fingerprint\ServerAPI\Model\WebhookMitMAttack**](WebhookMitMAttack.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/WebhookMitMAttack.md b/docs/Model/WebhookMitMAttack.md new file mode 100644 index 00000000..d0adb87c --- /dev/null +++ b/docs/Model/WebhookMitMAttack.md @@ -0,0 +1,9 @@ +# WebhookMitMAttack + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-overview#mitm-attack-detection) to learn more about this Smart Signal. | [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/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 75079ce6..301dd653 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -314,6 +314,7 @@ paths: how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. + x-flatten-optional-params: true parameters: - name: visitor_id in: path @@ -338,6 +339,7 @@ paths: [result](https://dev.fingerprint.com/reference/get-function#requestid). When you filter visits by `requestId`, only one visit will be returned. + x-go-skip-pointer: true - name: linked_id in: query schema: @@ -352,6 +354,7 @@ paths: example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. + x-go-skip-pointer: true - name: limit in: query schema: @@ -370,6 +373,7 @@ paths: By default, the most recent 100 visits are scanned, the maximum is 500. + x-go-skip-pointer: true - name: paginationKey in: query schema: @@ -398,6 +402,7 @@ paths: get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. + x-go-skip-pointer: true - name: before in: query deprecated: true @@ -408,6 +413,7 @@ paths: description: > ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. + x-go-skip-pointer: true responses: '200': description: OK. @@ -640,6 +646,7 @@ paths: You can use HTTP basic authentication and set up credentials in your [Fingerprint account](https://dashboard.fingerprint.com/login) + x-flatten-optional-params: true requestBody: content: application/json: @@ -829,6 +836,8 @@ paths: 24h: 5 developerTools: result: false + mitmAttack: + result: false responses: default: description: The server doesn't validate the answer. @@ -1941,6 +1950,31 @@ components: $ref: '#/components/schemas/DeveloperTools' error: $ref: '#/components/schemas/Error' + MitMAttack: + type: object + additionalProperties: false + required: + - result + properties: + result: + type: boolean + description: > + * `true` - When requests made from your users' mobile devices to + Fingerprint servers have been intercepted and potentially modified. + + * `false` - Otherwise or when the request originated from a browser. + + See [MitM Attack + Detection](https://dev.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) + to learn more about this Smart Signal. + ProductMitMAttack: + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/MitMAttack' + error: + $ref: '#/components/schemas/Error' Products: type: object description: >- @@ -1996,6 +2030,8 @@ components: $ref: '#/components/schemas/ProductVelocity' developerTools: $ref: '#/components/schemas/ProductDeveloperTools' + mitmAttack: + $ref: '#/components/schemas/ProductMitMAttack' EventsGetResponse: type: object description: >- @@ -2026,7 +2062,7 @@ components: suspect: type: boolean description: Suspect flag indicating observed suspicious or fraudulent event - x-go-skip-omitempty: true + x-go-force-pointer: true SearchEventsResponse: type: object description: >- @@ -2475,6 +2511,21 @@ components: description: > `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. + WebhookMitMAttack: + type: object + additionalProperties: false + properties: + result: + type: boolean + description: > + * `true` - When requests made from your users' mobile devices to + Fingerprint servers have been intercepted and potentially modified. + + * `false` - Otherwise or when the request originated from a browser. + + See [MitM Attack + Detection](https://dev.fingerprint.com/docs/smart-signals-overview#mitm-attack-detection) + to learn more about this Smart Signal. Webhook: type: object required: @@ -2581,3 +2632,5 @@ components: $ref: '#/components/schemas/WebhookVelocity' developerTools: $ref: '#/components/schemas/WebhookDeveloperTools' + mitmAttack: + $ref: '#/components/schemas/WebhookMitMAttack' diff --git a/src/Model/MitMAttack.php b/src/Model/MitMAttack.php new file mode 100644 index 00000000..c30c3d41 --- /dev/null +++ b/src/Model/MitMAttack.php @@ -0,0 +1,271 @@ + 'bool']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'result' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'result' => 'result']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $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; + } + + /** + * Gets the string presentation of the object. + * + */ + public function __toString(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['result']) { + $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(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets result. + */ + public function getResult(): bool + { + return $this->container['result']; + } + + /** + * Sets result. + * + * @param bool $result * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. + * + * @return $this + */ + public function setResult(bool $result): self + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object in a pretty JSON format. + * + */ + public function toPrettyString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Model/ProductMitMAttack.php b/src/Model/ProductMitMAttack.php new file mode 100644 index 00000000..8ce3f689 --- /dev/null +++ b/src/Model/ProductMitMAttack.php @@ -0,0 +1,293 @@ + '\Fingerprint\ServerAPI\Model\MitMAttack', + 'error' => '\Fingerprint\ServerAPI\Model\Error']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'data' => null, + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'data' => 'data', + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'data' => 'setData', + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'data' => 'getData', + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + */ + public function __toString(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets data. + */ + public function getData(): ?MitMAttack + { + return $this->container['data']; + } + + /** + * Sets data. + * + * @param ?\Fingerprint\ServerAPI\Model\MitMAttack $data data + * + * @return $this + */ + public function setData(?MitMAttack $data): self + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets error. + */ + public function getError(): ?Error + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\Error $error error + * + * @return $this + */ + public function setError(?Error $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object in a pretty JSON format. + * + */ + public function toPrettyString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Model/Products.php b/src/Model/Products.php index 6888fd69..c23155c1 100644 --- a/src/Model/Products.php +++ b/src/Model/Products.php @@ -77,7 +77,8 @@ class Products implements ModelInterface, \ArrayAccess 'suspect_score' => '\Fingerprint\ServerAPI\Model\ProductSuspectScore', 'remote_control' => '\Fingerprint\ServerAPI\Model\ProductRemoteControl', 'velocity' => '\Fingerprint\ServerAPI\Model\ProductVelocity', - 'developer_tools' => '\Fingerprint\ServerAPI\Model\ProductDeveloperTools']; + 'developer_tools' => '\Fingerprint\ServerAPI\Model\ProductDeveloperTools', + 'mitm_attack' => '\Fingerprint\ServerAPI\Model\ProductMitMAttack']; /** * Array of property to format mappings. Used for (de)serialization. @@ -108,7 +109,8 @@ class Products implements ModelInterface, \ArrayAccess 'suspect_score' => null, 'remote_control' => null, 'velocity' => null, - 'developer_tools' => null]; + 'developer_tools' => null, + 'mitm_attack' => null]; /** * Array of attributes where the key is the local name, @@ -140,7 +142,8 @@ class Products implements ModelInterface, \ArrayAccess 'suspect_score' => 'suspectScore', 'remote_control' => 'remoteControl', 'velocity' => 'velocity', - 'developer_tools' => 'developerTools']; + 'developer_tools' => 'developerTools', + 'mitm_attack' => 'mitmAttack']; /** * Array of attributes to setter functions (for deserialization of responses). @@ -171,7 +174,8 @@ class Products implements ModelInterface, \ArrayAccess 'suspect_score' => 'setSuspectScore', 'remote_control' => 'setRemoteControl', 'velocity' => 'setVelocity', - 'developer_tools' => 'setDeveloperTools']; + 'developer_tools' => 'setDeveloperTools', + 'mitm_attack' => 'setMitmAttack']; /** * Array of attributes to getter functions (for serialization of requests). @@ -202,7 +206,8 @@ class Products implements ModelInterface, \ArrayAccess 'suspect_score' => 'getSuspectScore', 'remote_control' => 'getRemoteControl', 'velocity' => 'getVelocity', - 'developer_tools' => 'getDeveloperTools']; + 'developer_tools' => 'getDeveloperTools', + 'mitm_attack' => 'getMitmAttack']; /** * Associative array for storing property values. @@ -243,6 +248,7 @@ public function __construct(?array $data = null) $this->container['remote_control'] = isset($data['remote_control']) ? $data['remote_control'] : null; $this->container['velocity'] = isset($data['velocity']) ? $data['velocity'] : null; $this->container['developer_tools'] = isset($data['developer_tools']) ? $data['developer_tools'] : null; + $this->container['mitm_attack'] = isset($data['mitm_attack']) ? $data['mitm_attack'] : null; } /** @@ -852,6 +858,28 @@ public function setDeveloperTools(?ProductDeveloperTools $developer_tools): self return $this; } + /** + * Gets mitm_attack. + */ + public function getMitmAttack(): ?ProductMitMAttack + { + return $this->container['mitm_attack']; + } + + /** + * Sets mitm_attack. + * + * @param ?\Fingerprint\ServerAPI\Model\ProductMitMAttack $mitm_attack mitm_attack + * + * @return $this + */ + public function setMitmAttack(?ProductMitMAttack $mitm_attack): self + { + $this->container['mitm_attack'] = $mitm_attack; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Webhook.php b/src/Model/Webhook.php index 27c0bd06..38a0ad55 100644 --- a/src/Model/Webhook.php +++ b/src/Model/Webhook.php @@ -91,7 +91,8 @@ class Webhook implements ModelInterface, \ArrayAccess 'suspect_score' => '\Fingerprint\ServerAPI\Model\WebhookSuspectScore', 'remote_control' => '\Fingerprint\ServerAPI\Model\WebhookRemoteControl', 'velocity' => '\Fingerprint\ServerAPI\Model\WebhookVelocity', - 'developer_tools' => '\Fingerprint\ServerAPI\Model\WebhookDeveloperTools']; + 'developer_tools' => '\Fingerprint\ServerAPI\Model\WebhookDeveloperTools', + 'mitm_attack' => '\Fingerprint\ServerAPI\Model\WebhookMitMAttack']; /** * Array of property to format mappings. Used for (de)serialization. @@ -138,7 +139,8 @@ class Webhook implements ModelInterface, \ArrayAccess 'suspect_score' => null, 'remote_control' => null, 'velocity' => null, - 'developer_tools' => null]; + 'developer_tools' => null, + 'mitm_attack' => null]; /** * Array of attributes where the key is the local name, @@ -186,7 +188,8 @@ class Webhook implements ModelInterface, \ArrayAccess 'suspect_score' => 'suspectScore', 'remote_control' => 'remoteControl', 'velocity' => 'velocity', - 'developer_tools' => 'developerTools']; + 'developer_tools' => 'developerTools', + 'mitm_attack' => 'mitmAttack']; /** * Array of attributes to setter functions (for deserialization of responses). @@ -233,7 +236,8 @@ class Webhook implements ModelInterface, \ArrayAccess 'suspect_score' => 'setSuspectScore', 'remote_control' => 'setRemoteControl', 'velocity' => 'setVelocity', - 'developer_tools' => 'setDeveloperTools']; + 'developer_tools' => 'setDeveloperTools', + 'mitm_attack' => 'setMitmAttack']; /** * Array of attributes to getter functions (for serialization of requests). @@ -280,7 +284,8 @@ class Webhook implements ModelInterface, \ArrayAccess 'suspect_score' => 'getSuspectScore', 'remote_control' => 'getRemoteControl', 'velocity' => 'getVelocity', - 'developer_tools' => 'getDeveloperTools']; + 'developer_tools' => 'getDeveloperTools', + 'mitm_attack' => 'getMitmAttack']; /** * Associative array for storing property values. @@ -337,6 +342,7 @@ public function __construct(?array $data = null) $this->container['remote_control'] = isset($data['remote_control']) ? $data['remote_control'] : null; $this->container['velocity'] = isset($data['velocity']) ? $data['velocity'] : null; $this->container['developer_tools'] = isset($data['developer_tools']) ? $data['developer_tools'] : null; + $this->container['mitm_attack'] = isset($data['mitm_attack']) ? $data['mitm_attack'] : null; } /** @@ -1316,6 +1322,28 @@ public function setDeveloperTools(?WebhookDeveloperTools $developer_tools): self return $this; } + /** + * Gets mitm_attack. + */ + public function getMitmAttack(): ?WebhookMitMAttack + { + return $this->container['mitm_attack']; + } + + /** + * Sets mitm_attack. + * + * @param ?\Fingerprint\ServerAPI\Model\WebhookMitMAttack $mitm_attack mitm_attack + * + * @return $this + */ + public function setMitmAttack(?WebhookMitMAttack $mitm_attack): self + { + $this->container['mitm_attack'] = $mitm_attack; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/WebhookMitMAttack.php b/src/Model/WebhookMitMAttack.php new file mode 100644 index 00000000..75db4269 --- /dev/null +++ b/src/Model/WebhookMitMAttack.php @@ -0,0 +1,265 @@ + 'bool']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'result' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'result' => 'result']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $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; + } + + /** + * Gets the string presentation of the object. + * + */ + public function __toString(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets result. + */ + public function getResult(): ?bool + { + return $this->container['result']; + } + + /** + * Sets result. + * + * @param ?bool $result * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-overview#mitm-attack-detection) to learn more about this Smart Signal. + * + * @return $this + */ + public function setResult(?bool $result): self + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object in a pretty JSON format. + * + */ + public function toPrettyString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index 60013c0c..e88b5603 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -332,6 +332,11 @@ "data": { "result": false } + }, + "mitmAttack": { + "data": { + "result": false + } } } } diff --git a/test/mocks/get_event_200_all_errors.json b/test/mocks/get_event_200_all_errors.json index ddc55fac..e4876e19 100644 --- a/test/mocks/get_event_200_all_errors.json +++ b/test/mocks/get_event_200_all_errors.json @@ -153,6 +153,12 @@ "code": "Failed", "message": "internal server error" } + }, + "mitmAttack": { + "error": { + "code": "Failed", + "message": "internal server error" + } } } } diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json index 4ac8b6f5..1c4a2119 100644 --- a/test/mocks/get_event_200_with_broken_format.json +++ b/test/mocks/get_event_200_with_broken_format.json @@ -278,6 +278,11 @@ "data": { "result": false } + }, + "mitmAttack": { + "data": { + "result": false + } } } } diff --git a/test/mocks/get_event_200_with_unknown_field.json b/test/mocks/get_event_200_with_unknown_field.json index eba63e09..39111b39 100644 --- a/test/mocks/get_event_200_with_unknown_field.json +++ b/test/mocks/get_event_200_with_unknown_field.json @@ -280,6 +280,11 @@ "data": { "result": false } + }, + "mitmAttack": { + "data": { + "result": false + } } } } diff --git a/test/mocks/get_event_search_200.json b/test/mocks/get_event_search_200.json index 9d237eb6..b90f62c9 100644 --- a/test/mocks/get_event_search_200.json +++ b/test/mocks/get_event_search_200.json @@ -334,6 +334,11 @@ "data": { "result": false } + }, + "mitmAttack": { + "data": { + "result": false + } } }} ], diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 748d2529..24c5b528 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -242,5 +242,8 @@ }, "developerTools": { "result": false + }, + "mitmAttack": { + "result": false } }