From c5345d75f7d9795f296765ecbba7538553689c03 Mon Sep 17 00:00:00 2001 From: Dan0sz <18595395+Dan0sz@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:19:54 +0200 Subject: [PATCH] Regenerated API client to include Funnels API. --- src/Client/.openapi-generator/FILES | 9 +- src/Client/README.md | 46 +- src/Client/lib/Api/DefaultApi.php | 1367 +++++++++++++++-- src/Client/lib/ApiException.php | 10 + src/Client/lib/Configuration.php | 27 + src/Client/lib/HeaderSelector.php | 10 + src/Client/lib/Model/Capabilities.php | 31 + src/Client/lib/Model/CapabilitiesFeatures.php | 33 + src/Client/lib/Model/CustomProp.php | 29 + src/Client/lib/Model/CustomPropCustomProp.php | 29 + .../lib/Model/CustomPropDisableRequest.php | 30 + .../CustomPropDisableRequestBulkDisable.php | 29 + .../lib/Model/CustomPropEnableRequest.php | 30 + .../CustomPropEnableRequestBulkEnable.php | 29 + .../lib/Model/CustomPropListResponse.php | 29 + src/Client/lib/Model/Error.php | 29 + src/Client/lib/Model/Funnel.php | 410 +++++ src/Client/lib/Model/FunnelCreateRequest.php | 413 +++++ .../lib/Model/FunnelCreateRequestFunnel.php | 464 ++++++ .../FunnelCreateRequestFunnelStepsInner.php | 481 ++++++ src/Client/lib/Model/FunnelFunnel.php | 501 ++++++ src/Client/lib/Model/FunnelListResponse.php | 450 ++++++ .../lib/Model/FunnelListResponseMeta.php | 412 +++++ src/Client/lib/Model/Goal.php | 30 + src/Client/lib/Model/GoalCreateRequest.php | 38 +- .../GoalCreateRequestBulkGetOrCreate.php | 35 +- .../Model/GoalCreateRequestCustomEvent.php | 31 + .../GoalCreateRequestCustomEventGoal.php | 29 + .../lib/Model/GoalCreateRequestPageview.php | 31 + .../Model/GoalCreateRequestPageviewGoal.php | 29 + .../lib/Model/GoalCreateRequestRevenue.php | 31 + .../Model/GoalCreateRequestRevenueGoal.php | 30 + src/Client/lib/Model/GoalCustomEvent.php | 30 + .../lib/Model/GoalCustomEventAllOfGoal.php | 31 + .../lib/Model/GoalDeleteBulkRequest.php | 29 + src/Client/lib/Model/GoalListResponse.php | 36 +- src/Client/lib/Model/GoalPageview.php | 30 + .../lib/Model/GoalPageviewAllOfGoal.php | 31 + src/Client/lib/Model/GoalRevenue.php | 30 + src/Client/lib/Model/GoalRevenueAllOfGoal.php | 32 + src/Client/lib/Model/GoalType.php | 29 + src/Client/lib/Model/Link.php | 29 + src/Client/lib/Model/ModelInterface.php | 13 + src/Client/lib/Model/NotFoundError.php | 29 + src/Client/lib/Model/PaginationMetadata.php | 31 + .../lib/Model/PaginationMetadataLinks.php | 30 + src/Client/lib/Model/PaymentRequiredError.php | 29 + src/Client/lib/Model/SharedLink.php | 29 + .../lib/Model/SharedLinkCreateRequest.php | 29 + .../SharedLinkCreateRequestSharedLink.php | 30 + .../lib/Model/SharedLinkListResponse.php | 36 +- src/Client/lib/Model/SharedLinkSharedLink.php | 32 + src/Client/lib/Model/UnauthorizedError.php | 29 + .../lib/Model/UnprocessableEntityError.php | 29 + src/Client/lib/ObjectSerializer.php | 6 + 55 files changed, 5685 insertions(+), 156 deletions(-) create mode 100644 src/Client/lib/Model/Funnel.php create mode 100644 src/Client/lib/Model/FunnelCreateRequest.php create mode 100644 src/Client/lib/Model/FunnelCreateRequestFunnel.php create mode 100644 src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php create mode 100644 src/Client/lib/Model/FunnelFunnel.php create mode 100644 src/Client/lib/Model/FunnelListResponse.php create mode 100644 src/Client/lib/Model/FunnelListResponseMeta.php diff --git a/src/Client/.openapi-generator/FILES b/src/Client/.openapi-generator/FILES index 11942af0..af008fce 100644 --- a/src/Client/.openapi-generator/FILES +++ b/src/Client/.openapi-generator/FILES @@ -17,10 +17,16 @@ lib/Model/CustomPropEnableRequest.php lib/Model/CustomPropEnableRequestBulkEnable.php lib/Model/CustomPropListResponse.php lib/Model/Error.php +lib/Model/Funnel.php +lib/Model/FunnelCreateRequest.php +lib/Model/FunnelCreateRequestFunnel.php +lib/Model/FunnelCreateRequestFunnelStepsInner.php +lib/Model/FunnelFunnel.php +lib/Model/FunnelListResponse.php +lib/Model/FunnelListResponseMeta.php lib/Model/Goal.php lib/Model/GoalCreateRequest.php lib/Model/GoalCreateRequestBulkGetOrCreate.php -lib/Model/GoalCreateRequestBulkGetOrCreateGoalsInner.php lib/Model/GoalCreateRequestCustomEvent.php lib/Model/GoalCreateRequestCustomEventGoal.php lib/Model/GoalCreateRequestPageview.php @@ -31,7 +37,6 @@ lib/Model/GoalCustomEvent.php lib/Model/GoalCustomEventAllOfGoal.php lib/Model/GoalDeleteBulkRequest.php lib/Model/GoalListResponse.php -lib/Model/GoalListResponseMeta.php lib/Model/GoalPageview.php lib/Model/GoalPageviewAllOfGoal.php lib/Model/GoalRevenue.php diff --git a/src/Client/README.md b/src/Client/README.md index 1bb96455..bec8bbf2 100644 --- a/src/Client/README.md +++ b/src/Client/README.md @@ -2,6 +2,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + ## Installation & Usage ### Requirements @@ -49,12 +50,12 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basic_auth -$config = Plausible\Analytics\WP\Client\Configuration::getDefaultConfiguration() +$config = PlausibleAnalyticsWPClient\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); -$apiInstance = new Plausible\Analytics\WP\Client\Api\DefaultApi( +$apiInstance = new PlausibleAnalyticsWPClient\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -74,19 +75,22 @@ try { All URIs are relative to *https://plausible.io* - Class | Method | HTTP request | Description ---------------|---------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|----------------------------- - *DefaultApi* | [**plausibleWebPluginsAPIControllersCapabilitiesIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerscapabilitiesindex) | **GET** /api/plugins/v1/capabilities | Retrieve Capabilities - *DefaultApi* | [**plausibleWebPluginsAPIControllersCustomPropsDisable**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerscustompropsdisable) | **DELETE** /api/plugins/v1/custom_props | Disable CustomProp(s) - *DefaultApi* | [**plausibleWebPluginsAPIControllersCustomPropsEnable**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerscustompropsenable) | **PUT** /api/plugins/v1/custom_props | Get or enable CustomProp(s) - *DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsCreate**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalscreate) | **PUT** /api/plugins/v1/goals | Get or create Goal - *DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsDelete**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsdelete) | **DELETE** /api/plugins/v1/goals/{id} | Delete Goal by ID - *DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsDeleteBulk**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsdeletebulk) | **DELETE** /api/plugins/v1/goals | Delete Goals in bulk - *DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsGet**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsget) | **GET** /api/plugins/v1/goals/{id} | Retrieve Goal by ID - *DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsindex) | **GET** /api/plugins/v1/goals | Retrieve Goals - *DefaultApi* | [**plausibleWebPluginsAPIControllersSharedLinksCreate**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerssharedlinkscreate) | **PUT** /api/plugins/v1/shared_links | Get or create Shared Link - *DefaultApi* | [**plausibleWebPluginsAPIControllersSharedLinksGet**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerssharedlinksget) | **GET** /api/plugins/v1/shared_links/{id} | Retrieve Shared Link by ID - *DefaultApi* | [**plausibleWebPluginsAPIControllersSharedLinksIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerssharedlinksindex) | **GET** /api/plugins/v1/shared_links | Retrieve Shared Links +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**plausibleWebPluginsAPIControllersCapabilitiesIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerscapabilitiesindex) | **GET** /api/plugins/v1/capabilities | Retrieve Capabilities +*DefaultApi* | [**plausibleWebPluginsAPIControllersCustomPropsDisable**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerscustompropsdisable) | **DELETE** /api/plugins/v1/custom_props | Disable CustomProp(s) +*DefaultApi* | [**plausibleWebPluginsAPIControllersCustomPropsEnable**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerscustompropsenable) | **PUT** /api/plugins/v1/custom_props | Get or enable CustomProp(s) +*DefaultApi* | [**plausibleWebPluginsAPIControllersFunnelsCreate**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersfunnelscreate) | **PUT** /api/plugins/v1/funnels | Get or create Funnel +*DefaultApi* | [**plausibleWebPluginsAPIControllersFunnelsGet**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersfunnelsget) | **GET** /api/plugins/v1/funnels/{id} | Retrieve Funnel by ID +*DefaultApi* | [**plausibleWebPluginsAPIControllersFunnelsIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersfunnelsindex) | **GET** /api/plugins/v1/funnels | Retrieve Funnels +*DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsCreate**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalscreate) | **PUT** /api/plugins/v1/goals | Get or create Goal +*DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsDelete**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsdelete) | **DELETE** /api/plugins/v1/goals/{id} | Delete Goal by ID +*DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsDeleteBulk**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsdeletebulk) | **DELETE** /api/plugins/v1/goals | Delete Goals in bulk +*DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsGet**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsget) | **GET** /api/plugins/v1/goals/{id} | Retrieve Goal by ID +*DefaultApi* | [**plausibleWebPluginsAPIControllersGoalsIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollersgoalsindex) | **GET** /api/plugins/v1/goals | Retrieve Goals +*DefaultApi* | [**plausibleWebPluginsAPIControllersSharedLinksCreate**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerssharedlinkscreate) | **PUT** /api/plugins/v1/shared_links | Get or create Shared Link +*DefaultApi* | [**plausibleWebPluginsAPIControllersSharedLinksGet**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerssharedlinksget) | **GET** /api/plugins/v1/shared_links/{id} | Retrieve Shared Link by ID +*DefaultApi* | [**plausibleWebPluginsAPIControllersSharedLinksIndex**](docs/Api/DefaultApi.md#plausiblewebpluginsapicontrollerssharedlinksindex) | **GET** /api/plugins/v1/shared_links | Retrieve Shared Links ## Models @@ -100,10 +104,16 @@ All URIs are relative to *https://plausible.io* - [CustomPropEnableRequestBulkEnable](docs/Model/CustomPropEnableRequestBulkEnable.md) - [CustomPropListResponse](docs/Model/CustomPropListResponse.md) - [Error](docs/Model/Error.md) +- [Funnel](docs/Model/Funnel.md) +- [FunnelCreateRequest](docs/Model/FunnelCreateRequest.md) +- [FunnelCreateRequestFunnel](docs/Model/FunnelCreateRequestFunnel.md) +- [FunnelCreateRequestFunnelStepsInner](docs/Model/FunnelCreateRequestFunnelStepsInner.md) +- [FunnelFunnel](docs/Model/FunnelFunnel.md) +- [FunnelListResponse](docs/Model/FunnelListResponse.md) +- [FunnelListResponseMeta](docs/Model/FunnelListResponseMeta.md) - [Goal](docs/Model/Goal.md) - [GoalCreateRequest](docs/Model/GoalCreateRequest.md) - [GoalCreateRequestBulkGetOrCreate](docs/Model/GoalCreateRequestBulkGetOrCreate.md) -- [GoalCreateRequestBulkGetOrCreateGoalsInner](docs/Model/GoalCreateRequestBulkGetOrCreateGoalsInner.md) - [GoalCreateRequestCustomEvent](docs/Model/GoalCreateRequestCustomEvent.md) - [GoalCreateRequestCustomEventGoal](docs/Model/GoalCreateRequestCustomEventGoal.md) - [GoalCreateRequestPageview](docs/Model/GoalCreateRequestPageview.md) @@ -114,7 +124,6 @@ All URIs are relative to *https://plausible.io* - [GoalCustomEventAllOfGoal](docs/Model/GoalCustomEventAllOfGoal.md) - [GoalDeleteBulkRequest](docs/Model/GoalDeleteBulkRequest.md) - [GoalListResponse](docs/Model/GoalListResponse.md) -- [GoalListResponseMeta](docs/Model/GoalListResponseMeta.md) - [GoalPageview](docs/Model/GoalPageview.md) - [GoalPageviewAllOfGoal](docs/Model/GoalPageviewAllOfGoal.md) - [GoalRevenue](docs/Model/GoalRevenue.md) @@ -136,7 +145,6 @@ All URIs are relative to *https://plausible.io* ## Authorization Authentication schemes defined for the API: - ### basic_auth - **Type**: HTTP basic authentication @@ -152,6 +160,8 @@ vendor/bin/phpunit ## Author + + ## About this package This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/src/Client/lib/Api/DefaultApi.php b/src/Client/lib/Api/DefaultApi.php index 29bc7b17..5468ae39 100644 --- a/src/Client/lib/Api/DefaultApi.php +++ b/src/Client/lib/Api/DefaultApi.php @@ -2,6 +2,7 @@ /** * DefaultApi * PHP version 7.4 + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -10,7 +11,9 @@ /** * Plausible Plugins API + * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * * The version of the OpenAPI document: 1.0-rc * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 7.0.1 @@ -38,6 +41,7 @@ /** * DefaultApi Class Doc Comment + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -55,6 +59,15 @@ class DefaultApi { 'plausibleWebPluginsAPIControllersCustomPropsEnable' => [ 'application/json', ], + 'plausibleWebPluginsAPIControllersFunnelsCreate' => [ + 'application/json', + ], + 'plausibleWebPluginsAPIControllersFunnelsGet' => [ + 'application/json', + ], + 'plausibleWebPluginsAPIControllersFunnelsIndex' => [ + 'application/json', + ], 'plausibleWebPluginsAPIControllersGoalsCreate' => [ 'application/json', ], @@ -121,6 +134,7 @@ public function __construct( /** * Get the host index + * * @return int Host index */ public function getHostIndex() { @@ -145,6 +159,7 @@ public function getConfig() { /** * Operation plausibleWebPluginsAPIControllersCapabilitiesIndex + * * Retrieve Capabilities * * @param string $contentType The value for the Content-Type header. Check @@ -165,6 +180,7 @@ public function plausibleWebPluginsAPIControllersCapabilitiesIndex( /** * Operation plausibleWebPluginsAPIControllersCapabilitiesIndexWithHttpInfo + * * Retrieve Capabilities * * @param string $contentType The value for the Content-Type header. Check @@ -336,6 +352,7 @@ public function plausibleWebPluginsAPIControllersCapabilitiesIndexRequest( /** * Create http client option + * * @return array of http client options * @throws \RuntimeException on file opening failure */ @@ -353,6 +370,7 @@ protected function createHttpClientOption() { /** * Operation plausibleWebPluginsAPIControllersCapabilitiesIndexAsync + * * Retrieve Capabilities * * @param string $contentType The value for the Content-Type header. Check @@ -374,6 +392,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersCapabilitiesIndexAsyncWithHttpInfo + * * Retrieve Capabilities * * @param string $contentType The value for the Content-Type header. Check @@ -422,6 +441,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersCustomPropsDisable + * * Disable CustomProp(s) * * @param \Plausible\Analytics\WP\Client\Model\CustomPropDisableRequest $custom_prop_disable_request CustomProp disable params (optional) @@ -443,6 +463,7 @@ public function plausibleWebPluginsAPIControllersCustomPropsDisable( /** * Operation plausibleWebPluginsAPIControllersCustomPropsDisableWithHttpInfo + * * Disable CustomProp(s) * * @param \Plausible\Analytics\WP\Client\Model\CustomPropDisableRequest $custom_prop_disable_request CustomProp disable params (optional) @@ -613,6 +634,7 @@ public function plausibleWebPluginsAPIControllersCustomPropsDisableRequest( /** * Operation plausibleWebPluginsAPIControllersCustomPropsDisableAsync + * * Disable CustomProp(s) * * @param \Plausible\Analytics\WP\Client\Model\CustomPropDisableRequest $custom_prop_disable_request CustomProp disable params (optional) @@ -637,6 +659,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersCustomPropsDisableAsyncWithHttpInfo + * * Disable CustomProp(s) * * @param \Plausible\Analytics\WP\Client\Model\CustomPropDisableRequest $custom_prop_disable_request CustomProp disable params (optional) @@ -648,16 +671,1080 @@ function ( $response ) { * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface * @throws \InvalidArgumentException */ - public function plausibleWebPluginsAPIControllersCustomPropsDisableAsyncWithHttpInfo( - $custom_prop_disable_request = null, - string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsDisable' ][ 0 ] + public function plausibleWebPluginsAPIControllersCustomPropsDisableAsyncWithHttpInfo( + $custom_prop_disable_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsDisable' ][ 0 ] + ) { + $returnType = ''; + $request = $this->plausibleWebPluginsAPIControllersCustomPropsDisableRequest( $custom_prop_disable_request, $contentType ); + + return $this->client->sendAsync( $request, $this->createHttpClientOption() )->then( + function ( $response ) use ( $returnType ) { + return [ null, $response->getStatusCode(), $response->getHeaders() ]; + }, + function ( $exception ) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() + ); + } + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersCustomPropsEnable + * + * Get or enable CustomProp(s) + * + * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Model\CustomPropListResponse|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\PaymentRequiredError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError + * @throws \InvalidArgumentException + * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response + */ + public function plausibleWebPluginsAPIControllersCustomPropsEnable( + $custom_prop_enable_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + ) { + [ $response ] = $this->plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( $custom_prop_enable_request, $contentType ); + + return $response; + } + + /** + * Operation plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo + * + * Get or enable CustomProp(s) + * + * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] + * to see the possible values for this operation + * + * @return array of + * \Plausible\Analytics\WP\Client\Model\CustomPropListResponse|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\PaymentRequiredError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError, + * HTTP status code, HTTP response headers (array of strings) + * @throws \InvalidArgumentException + * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response + */ + public function plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( + $custom_prop_enable_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + ) { + $request = $this->plausibleWebPluginsAPIControllersCustomPropsEnableRequest( $custom_prop_enable_request, $contentType ); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send( $request, $options ); + } catch ( RequestException $e ) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch ( ConnectException $e ) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), null, null + ); + } + + $statusCode = $response->getStatusCode(); + + if ( $statusCode < 200 || $statusCode > 299 ) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() + ); + } + + switch ( $statusCode ) { + case 201: + if ( '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 401: + if ( '\Plausible\Analytics\WP\Client\Model\UnauthorizedError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\UnauthorizedError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnauthorizedError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 402: + if ( '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 422: + if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse'; + if ( $returnType === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( $returnType !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, $returnType, [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + + } catch ( ApiException $e ) { + switch ( $e->getCode() ) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\UnauthorizedError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 422: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + } + throw $e; + } + } + + /** + * Create request for operation 'plausibleWebPluginsAPIControllersCustomPropsEnable' + * + * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Psr7\Request + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersCustomPropsEnableRequest( + $custom_prop_enable_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + ) { + + $resourcePath = '/api/plugins/v1/custom_props'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [ 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if ( isset( $custom_prop_enable_request ) ) { + if ( stripos( $headers[ 'Content-Type' ], 'application/json' ) !== false ) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Utils::jsonEncode( + ObjectSerializer::sanitizeForSerialization( $custom_prop_enable_request ) + ); + } else { + $httpBody = $custom_prop_enable_request; + } + } elseif ( count( $formParams ) > 0 ) { + if ( $multipart ) { + $multipartContents = []; + foreach ( $formParams as $formParamName => $formParamValue ) { + $formParamValueItems = is_array( $formParamValue ) ? $formParamValue : [ $formParamValue ]; + foreach ( $formParamValueItems as $formParamValueItem ) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream( $multipartContents ); + + } elseif ( stripos( $headers[ 'Content-Type' ], 'application/json' ) !== false ) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Utils::jsonEncode( $formParams ); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery( $formParams ); + } + } + + // this endpoint requires HTTP basic authentication + if ( ! empty( $this->config->getUsername() ) || ! ( empty( $this->config->getPassword() ) ) ) { + $headers[ 'Authorization' ] = 'Basic ' . base64_encode( $this->config->getUsername() . ":" . $this->config->getPassword() ); + } + + $defaultHeaders = []; + if ( $this->config->getUserAgent() ) { + $defaultHeaders[ 'User-Agent' ] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery( $queryParams ); + + return new Request( + 'PUT', $operationHost . $resourcePath . ( $query ? "?{$query}" : '' ), $headers, $httpBody + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersCustomPropsEnableAsync + * + * Get or enable CustomProp(s) + * + * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersCustomPropsEnableAsync( + $custom_prop_enable_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + ) { + return $this->plausibleWebPluginsAPIControllersCustomPropsEnableAsyncWithHttpInfo( $custom_prop_enable_request, $contentType )->then( + function ( $response ) { + return $response[ 0 ]; + } + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersCustomPropsEnableAsyncWithHttpInfo + * + * Get or enable CustomProp(s) + * + * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersCustomPropsEnableAsyncWithHttpInfo( + $custom_prop_enable_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + ) { + $returnType = '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse'; + $request = $this->plausibleWebPluginsAPIControllersCustomPropsEnableRequest( $custom_prop_enable_request, $contentType ); + + return $this->client->sendAsync( $request, $this->createHttpClientOption() )->then( + function ( $response ) use ( $returnType ) { + if ( $returnType === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( $returnType !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, $returnType, [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ( $exception ) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() + ); + } + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsCreate + * + * Get or create Funnel + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequest $funnel_create_request Funnel params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersFunnelsCreate'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Model\Funnel|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\PaymentRequiredError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError + * @throws \InvalidArgumentException + * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response + */ + public function plausibleWebPluginsAPIControllersFunnelsCreate( + $funnel_create_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsCreate' ][ 0 ] + ) { + [ $response ] = $this->plausibleWebPluginsAPIControllersFunnelsCreateWithHttpInfo( $funnel_create_request, $contentType ); + + return $response; + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsCreateWithHttpInfo + * + * Get or create Funnel + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequest $funnel_create_request Funnel params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersFunnelsCreate'] + * to see the possible values for this operation + * + * @return array of + * \Plausible\Analytics\WP\Client\Model\Funnel|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\PaymentRequiredError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError, + * HTTP status code, HTTP response headers (array of strings) + * @throws \InvalidArgumentException + * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response + */ + public function plausibleWebPluginsAPIControllersFunnelsCreateWithHttpInfo( + $funnel_create_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsCreate' ][ 0 ] + ) { + $request = $this->plausibleWebPluginsAPIControllersFunnelsCreateRequest( $funnel_create_request, $contentType ); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send( $request, $options ); + } catch ( RequestException $e ) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch ( ConnectException $e ) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), null, null + ); + } + + $statusCode = $response->getStatusCode(); + + if ( $statusCode < 200 || $statusCode > 299 ) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() + ); + } + + switch ( $statusCode ) { + case 201: + if ( '\Plausible\Analytics\WP\Client\Model\Funnel' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\Funnel' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\Funnel', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 401: + if ( '\Plausible\Analytics\WP\Client\Model\UnauthorizedError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\UnauthorizedError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnauthorizedError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 402: + if ( '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 422: + if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Plausible\Analytics\WP\Client\Model\Funnel'; + if ( $returnType === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( $returnType !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, $returnType, [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + + } catch ( ApiException $e ) { + switch ( $e->getCode() ) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\Funnel', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\UnauthorizedError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 402: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 422: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + } + throw $e; + } + } + + /** + * Create request for operation 'plausibleWebPluginsAPIControllersFunnelsCreate' + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequest $funnel_create_request Funnel params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersFunnelsCreate'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Psr7\Request + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersFunnelsCreateRequest( + $funnel_create_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsCreate' ][ 0 ] + ) { + + $resourcePath = '/api/plugins/v1/funnels'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $headers = $this->headerSelector->selectHeaders( + [ 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if ( isset( $funnel_create_request ) ) { + if ( stripos( $headers[ 'Content-Type' ], 'application/json' ) !== false ) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Utils::jsonEncode( + ObjectSerializer::sanitizeForSerialization( $funnel_create_request ) + ); + } else { + $httpBody = $funnel_create_request; + } + } elseif ( count( $formParams ) > 0 ) { + if ( $multipart ) { + $multipartContents = []; + foreach ( $formParams as $formParamName => $formParamValue ) { + $formParamValueItems = is_array( $formParamValue ) ? $formParamValue : [ $formParamValue ]; + foreach ( $formParamValueItems as $formParamValueItem ) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream( $multipartContents ); + + } elseif ( stripos( $headers[ 'Content-Type' ], 'application/json' ) !== false ) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Utils::jsonEncode( $formParams ); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery( $formParams ); + } + } + + // this endpoint requires HTTP basic authentication + if ( ! empty( $this->config->getUsername() ) || ! ( empty( $this->config->getPassword() ) ) ) { + $headers[ 'Authorization' ] = 'Basic ' . base64_encode( $this->config->getUsername() . ":" . $this->config->getPassword() ); + } + + $defaultHeaders = []; + if ( $this->config->getUserAgent() ) { + $defaultHeaders[ 'User-Agent' ] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery( $queryParams ); + + return new Request( + 'PUT', $operationHost . $resourcePath . ( $query ? "?{$query}" : '' ), $headers, $httpBody + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsCreateAsync + * + * Get or create Funnel + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequest $funnel_create_request Funnel params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersFunnelsCreate'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersFunnelsCreateAsync( + $funnel_create_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsCreate' ][ 0 ] + ) { + return $this->plausibleWebPluginsAPIControllersFunnelsCreateAsyncWithHttpInfo( $funnel_create_request, $contentType )->then( + function ( $response ) { + return $response[ 0 ]; + } + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsCreateAsyncWithHttpInfo + * + * Get or create Funnel + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequest $funnel_create_request Funnel params (optional) + * @param string $contentType The value for the Content-Type header. Check + * self::contentTypes['plausibleWebPluginsAPIControllersFunnelsCreate'] + * to see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersFunnelsCreateAsyncWithHttpInfo( + $funnel_create_request = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsCreate' ][ 0 ] + ) { + $returnType = '\Plausible\Analytics\WP\Client\Model\Funnel'; + $request = $this->plausibleWebPluginsAPIControllersFunnelsCreateRequest( $funnel_create_request, $contentType ); + + return $this->client->sendAsync( $request, $this->createHttpClientOption() )->then( + function ( $response ) use ( $returnType ) { + if ( $returnType === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( $returnType !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, $returnType, [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ( $exception ) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() + ); + } + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsGet + * + * Retrieve Funnel by ID + * + * @param int $id Funnel ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsGet'] to + * see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Model\Funnel|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\NotFoundError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError + * @throws \InvalidArgumentException + * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response + */ + public function plausibleWebPluginsAPIControllersFunnelsGet( + $id, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsGet' ][ 0 ] + ) { + [ $response ] = $this->plausibleWebPluginsAPIControllersFunnelsGetWithHttpInfo( $id, $contentType ); + + return $response; + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsGetWithHttpInfo + * + * Retrieve Funnel by ID + * + * @param int $id Funnel ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsGet'] to + * see the possible values for this operation + * + * @return array of + * \Plausible\Analytics\WP\Client\Model\Funnel|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\NotFoundError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError, + * HTTP status code, HTTP response headers (array of strings) + * @throws \InvalidArgumentException + * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response + */ + public function plausibleWebPluginsAPIControllersFunnelsGetWithHttpInfo( + $id, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsGet' ][ 0 ] + ) { + $request = $this->plausibleWebPluginsAPIControllersFunnelsGetRequest( $id, $contentType ); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send( $request, $options ); + } catch ( RequestException $e ) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch ( ConnectException $e ) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), null, null + ); + } + + $statusCode = $response->getStatusCode(); + + if ( $statusCode < 200 || $statusCode > 299 ) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), $statusCode, $response->getHeaders(), (string) $response->getBody() + ); + } + + switch ( $statusCode ) { + case 200: + if ( '\Plausible\Analytics\WP\Client\Model\Funnel' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\Funnel' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\Funnel', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 401: + if ( '\Plausible\Analytics\WP\Client\Model\UnauthorizedError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\UnauthorizedError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnauthorizedError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 404: + if ( '\Plausible\Analytics\WP\Client\Model\NotFoundError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\NotFoundError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\NotFoundError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + case 422: + if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Plausible\Analytics\WP\Client\Model\Funnel'; + if ( $returnType === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( $returnType !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, $returnType, [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; + + } catch ( ApiException $e ) { + switch ( $e->getCode() ) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\Funnel', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\UnauthorizedError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\NotFoundError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + case 422: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', + $e->getResponseHeaders() + ); + $e->setResponseObject( $data ); + break; + } + throw $e; + } + } + + /** + * Create request for operation 'plausibleWebPluginsAPIControllersFunnelsGet' + * + * @param int $id Funnel ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsGet'] to + * see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Psr7\Request + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersFunnelsGetRequest( + $id, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsGet' ][ 0 ] + ) { + + // verify the required parameter 'id' is set + if ( $id === null || ( is_array( $id ) && count( $id ) === 0 ) ) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling plausibleWebPluginsAPIControllersFunnelsGet' + ); + } + + $resourcePath = '/api/plugins/v1/funnels/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ( $id !== null ) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue( $id ), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + [ 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if ( count( $formParams ) > 0 ) { + if ( $multipart ) { + $multipartContents = []; + foreach ( $formParams as $formParamName => $formParamValue ) { + $formParamValueItems = is_array( $formParamValue ) ? $formParamValue : [ $formParamValue ]; + foreach ( $formParamValueItems as $formParamValueItem ) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream( $multipartContents ); + + } elseif ( stripos( $headers[ 'Content-Type' ], 'application/json' ) !== false ) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Utils::jsonEncode( $formParams ); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery( $formParams ); + } + } + + // this endpoint requires HTTP basic authentication + if ( ! empty( $this->config->getUsername() ) || ! ( empty( $this->config->getPassword() ) ) ) { + $headers[ 'Authorization' ] = 'Basic ' . base64_encode( $this->config->getUsername() . ":" . $this->config->getPassword() ); + } + + $defaultHeaders = []; + if ( $this->config->getUserAgent() ) { + $defaultHeaders[ 'User-Agent' ] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery( $queryParams ); + + return new Request( + 'GET', $operationHost . $resourcePath . ( $query ? "?{$query}" : '' ), $headers, $httpBody + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsGetAsync + * + * Retrieve Funnel by ID + * + * @param int $id Funnel ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsGet'] to + * see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersFunnelsGetAsync( + $id, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsGet' ][ 0 ] + ) { + return $this->plausibleWebPluginsAPIControllersFunnelsGetAsyncWithHttpInfo( $id, $contentType )->then( + function ( $response ) { + return $response[ 0 ]; + } + ); + } + + /** + * Operation plausibleWebPluginsAPIControllersFunnelsGetAsyncWithHttpInfo + * + * Retrieve Funnel by ID + * + * @param int $id Funnel ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsGet'] to + * see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface + * @throws \InvalidArgumentException + */ + public function plausibleWebPluginsAPIControllersFunnelsGetAsyncWithHttpInfo( + $id, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsGet' ][ 0 ] ) { - $returnType = ''; - $request = $this->plausibleWebPluginsAPIControllersCustomPropsDisableRequest( $custom_prop_disable_request, $contentType ); + $returnType = '\Plausible\Analytics\WP\Client\Model\Funnel'; + $request = $this->plausibleWebPluginsAPIControllersFunnelsGetRequest( $id, $contentType ); return $this->client->sendAsync( $request, $this->createHttpClientOption() )->then( function ( $response ) use ( $returnType ) { - return [ null, $response->getStatusCode(), $response->getHeaders() ]; + if ( $returnType === '\SplFileObject' ) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ( $returnType !== 'string' ) { + $content = json_decode( $content ); + } + } + + return [ + ObjectSerializer::deserialize( $content, $returnType, [] ), + $response->getStatusCode(), + $response->getHeaders(), + ]; }, function ( $exception ) { $response = $exception->getResponse(); @@ -674,47 +1761,54 @@ function ( $exception ) { } /** - * Operation plausibleWebPluginsAPIControllersCustomPropsEnable - * Get or enable CustomProp(s) + * Operation plausibleWebPluginsAPIControllersFunnelsIndex * - * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) - * @param string $contentType The value for the Content-Type header. Check - * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] - * to see the possible values for this operation + * Retrieve Funnels * - * @return \Plausible\Analytics\WP\Client\Model\CustomPropListResponse|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\PaymentRequiredError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError + * @param int $limit Maximum entries per page (optional) + * @param string $after Cursor value to seek after - generated internally (optional) + * @param string $before Cursor value to seek before - generated internally (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsIndex'] to + * see the possible values for this operation + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelListResponse|\Plausible\Analytics\WP\Client\Model\UnauthorizedError * @throws \InvalidArgumentException * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response */ - public function plausibleWebPluginsAPIControllersCustomPropsEnable( - $custom_prop_enable_request = null, - string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + public function plausibleWebPluginsAPIControllersFunnelsIndex( + $limit = null, + $after = null, + $before = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsIndex' ][ 0 ] ) { - [ $response ] = $this->plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( $custom_prop_enable_request, $contentType ); + [ $response ] = $this->plausibleWebPluginsAPIControllersFunnelsIndexWithHttpInfo( $limit, $after, $before, $contentType ); return $response; } /** - * Operation plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo - * Get or enable CustomProp(s) + * Operation plausibleWebPluginsAPIControllersFunnelsIndexWithHttpInfo * - * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) - * @param string $contentType The value for the Content-Type header. Check - * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] - * to see the possible values for this operation + * Retrieve Funnels * - * @return array of - * \Plausible\Analytics\WP\Client\Model\CustomPropListResponse|\Plausible\Analytics\WP\Client\Model\UnauthorizedError|\Plausible\Analytics\WP\Client\Model\PaymentRequiredError|\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError, - * HTTP status code, HTTP response headers (array of strings) + * @param int $limit Maximum entries per page (optional) + * @param string $after Cursor value to seek after - generated internally (optional) + * @param string $before Cursor value to seek before - generated internally (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsIndex'] to + * see the possible values for this operation + * + * @return array of \Plausible\Analytics\WP\Client\Model\FunnelListResponse|\Plausible\Analytics\WP\Client\Model\UnauthorizedError, HTTP status + * code, HTTP response headers (array of strings) * @throws \InvalidArgumentException * @throws \Plausible\Analytics\WP\Client\ApiException on non-2xx response */ - public function plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( - $custom_prop_enable_request = null, - string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + public function plausibleWebPluginsAPIControllersFunnelsIndexWithHttpInfo( + $limit = null, + $after = null, + $before = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsIndex' ][ 0 ] ) { - $request = $this->plausibleWebPluginsAPIControllersCustomPropsEnableRequest( $custom_prop_enable_request, $contentType ); + $request = $this->plausibleWebPluginsAPIControllersFunnelsIndexRequest( $limit, $after, $before, $contentType ); try { $options = $this->createHttpClientOption(); @@ -746,18 +1840,18 @@ public function plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( } switch ( $statusCode ) { - case 201: - if ( '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse' === '\SplFileObject' ) { + case 200: + if ( '\Plausible\Analytics\WP\Client\Model\FunnelListResponse' === '\SplFileObject' ) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ( '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse' !== 'string' ) { + if ( '\Plausible\Analytics\WP\Client\Model\FunnelListResponse' !== 'string' ) { $content = json_decode( $content ); } } return [ - ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse', [] ), + ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\FunnelListResponse', [] ), $response->getStatusCode(), $response->getHeaders(), ]; @@ -776,39 +1870,9 @@ public function plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( $response->getStatusCode(), $response->getHeaders(), ]; - case 402: - if ( '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError' === '\SplFileObject' ) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ( '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError' !== 'string' ) { - $content = json_decode( $content ); - } - } - - return [ - ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError', [] ), - $response->getStatusCode(), - $response->getHeaders(), - ]; - case 422: - if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' === '\SplFileObject' ) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ( '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError' !== 'string' ) { - $content = json_decode( $content ); - } - } - - return [ - ObjectSerializer::deserialize( $content, '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', [] ), - $response->getStatusCode(), - $response->getHeaders(), - ]; } - $returnType = '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse'; + $returnType = '\Plausible\Analytics\WP\Client\Model\FunnelListResponse'; if ( $returnType === '\SplFileObject' ) { $content = $response->getBody(); //stream goes to serializer } else { @@ -826,10 +1890,10 @@ public function plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( } catch ( ApiException $e ) { switch ( $e->getCode() ) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse', + '\Plausible\Analytics\WP\Client\Model\FunnelListResponse', $e->getResponseHeaders() ); $e->setResponseObject( $data ); @@ -842,50 +1906,74 @@ public function plausibleWebPluginsAPIControllersCustomPropsEnableWithHttpInfo( ); $e->setResponseObject( $data ); break; - case 402: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Plausible\Analytics\WP\Client\Model\PaymentRequiredError', - $e->getResponseHeaders() - ); - $e->setResponseObject( $data ); - break; - case 422: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Plausible\Analytics\WP\Client\Model\UnprocessableEntityError', - $e->getResponseHeaders() - ); - $e->setResponseObject( $data ); - break; } throw $e; } } /** - * Create request for operation 'plausibleWebPluginsAPIControllersCustomPropsEnable' + * Create request for operation 'plausibleWebPluginsAPIControllersFunnelsIndex' * - * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) - * @param string $contentType The value for the Content-Type header. Check - * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] - * to see the possible values for this operation + * @param int $limit Maximum entries per page (optional) + * @param string $after Cursor value to seek after - generated internally (optional) + * @param string $before Cursor value to seek before - generated internally (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsIndex'] to + * see the possible values for this operation * * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Psr7\Request * @throws \InvalidArgumentException */ - public function plausibleWebPluginsAPIControllersCustomPropsEnableRequest( - $custom_prop_enable_request = null, - string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + public function plausibleWebPluginsAPIControllersFunnelsIndexRequest( + $limit = null, + $after = null, + $before = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsIndex' ][ 0 ] ) { - $resourcePath = '/api/plugins/v1/custom_props'; + $resourcePath = '/api/plugins/v1/funnels'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge( + $queryParams, + ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? [] + ); + // query params + $queryParams = array_merge( + $queryParams, + ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? [] + ); + // query params + $queryParams = array_merge( + $queryParams, + ObjectSerializer::toQueryValue( + $before, + 'before', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? [] + ); + $headers = $this->headerSelector->selectHeaders( [ 'application/json', ], $contentType, @@ -893,16 +1981,7 @@ public function plausibleWebPluginsAPIControllersCustomPropsEnableRequest( ); // for model (json/xml) - if ( isset( $custom_prop_enable_request ) ) { - if ( stripos( $headers[ 'Content-Type' ], 'application/json' ) !== false ) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Utils::jsonEncode( - ObjectSerializer::sanitizeForSerialization( $custom_prop_enable_request ) - ); - } else { - $httpBody = $custom_prop_enable_request; - } - } elseif ( count( $formParams ) > 0 ) { + if ( count( $formParams ) > 0 ) { if ( $multipart ) { $multipartContents = []; foreach ( $formParams as $formParamName => $formParamValue ) { @@ -946,27 +2025,31 @@ public function plausibleWebPluginsAPIControllersCustomPropsEnableRequest( $query = ObjectSerializer::buildQuery( $queryParams ); return new Request( - 'PUT', $operationHost . $resourcePath . ( $query ? "?{$query}" : '' ), $headers, $httpBody + 'GET', $operationHost . $resourcePath . ( $query ? "?{$query}" : '' ), $headers, $httpBody ); } /** - * Operation plausibleWebPluginsAPIControllersCustomPropsEnableAsync - * Get or enable CustomProp(s) + * Operation plausibleWebPluginsAPIControllersFunnelsIndexAsync * - * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) - * @param string $contentType The value for the Content-Type header. Check - * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] - * to see the possible values for this operation + * Retrieve Funnels + * + * @param int $limit Maximum entries per page (optional) + * @param string $after Cursor value to seek after - generated internally (optional) + * @param string $before Cursor value to seek before - generated internally (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsIndex'] to + * see the possible values for this operation * * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface * @throws \InvalidArgumentException */ - public function plausibleWebPluginsAPIControllersCustomPropsEnableAsync( - $custom_prop_enable_request = null, - string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + public function plausibleWebPluginsAPIControllersFunnelsIndexAsync( + $limit = null, + $after = null, + $before = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsIndex' ][ 0 ] ) { - return $this->plausibleWebPluginsAPIControllersCustomPropsEnableAsyncWithHttpInfo( $custom_prop_enable_request, $contentType )->then( + return $this->plausibleWebPluginsAPIControllersFunnelsIndexAsyncWithHttpInfo( $limit, $after, $before, $contentType )->then( function ( $response ) { return $response[ 0 ]; } @@ -974,23 +2057,27 @@ function ( $response ) { } /** - * Operation plausibleWebPluginsAPIControllersCustomPropsEnableAsyncWithHttpInfo - * Get or enable CustomProp(s) + * Operation plausibleWebPluginsAPIControllersFunnelsIndexAsyncWithHttpInfo * - * @param \Plausible\Analytics\WP\Client\Model\CustomPropEnableRequest $custom_prop_enable_request CustomProp enable params (optional) - * @param string $contentType The value for the Content-Type header. Check - * self::contentTypes['plausibleWebPluginsAPIControllersCustomPropsEnable'] - * to see the possible values for this operation + * Retrieve Funnels + * + * @param int $limit Maximum entries per page (optional) + * @param string $after Cursor value to seek after - generated internally (optional) + * @param string $before Cursor value to seek before - generated internally (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['plausibleWebPluginsAPIControllersFunnelsIndex'] to + * see the possible values for this operation * * @return \Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise\PromiseInterface * @throws \InvalidArgumentException */ - public function plausibleWebPluginsAPIControllersCustomPropsEnableAsyncWithHttpInfo( - $custom_prop_enable_request = null, - string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersCustomPropsEnable' ][ 0 ] + public function plausibleWebPluginsAPIControllersFunnelsIndexAsyncWithHttpInfo( + $limit = null, + $after = null, + $before = null, + string $contentType = self::contentTypes[ 'plausibleWebPluginsAPIControllersFunnelsIndex' ][ 0 ] ) { - $returnType = '\Plausible\Analytics\WP\Client\Model\CustomPropListResponse'; - $request = $this->plausibleWebPluginsAPIControllersCustomPropsEnableRequest( $custom_prop_enable_request, $contentType ); + $returnType = '\Plausible\Analytics\WP\Client\Model\FunnelListResponse'; + $request = $this->plausibleWebPluginsAPIControllersFunnelsIndexRequest( $limit, $after, $before, $contentType ); return $this->client->sendAsync( $request, $this->createHttpClientOption() )->then( function ( $response ) use ( $returnType ) { @@ -1025,6 +2112,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersGoalsCreate + * * Get or create Goal * * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequest $goal_create_request Goal params (optional) @@ -1047,6 +2135,7 @@ public function plausibleWebPluginsAPIControllersGoalsCreate( /** * Operation plausibleWebPluginsAPIControllersGoalsCreateWithHttpInfo + * * Get or create Goal * * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequest $goal_create_request Goal params (optional) @@ -1302,6 +2391,7 @@ public function plausibleWebPluginsAPIControllersGoalsCreateRequest( /** * Operation plausibleWebPluginsAPIControllersGoalsCreateAsync + * * Get or create Goal * * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequest $goal_create_request Goal params (optional) @@ -1325,6 +2415,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersGoalsCreateAsyncWithHttpInfo + * * Get or create Goal * * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequest $goal_create_request Goal params (optional) @@ -1375,6 +2466,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersGoalsDelete + * * Delete Goal by ID * * @param int $id Goal ID (required) @@ -1394,6 +2486,7 @@ public function plausibleWebPluginsAPIControllersGoalsDelete( /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteWithHttpInfo + * * Delete Goal by ID * * @param int $id Goal ID (required) @@ -1551,6 +2644,7 @@ public function plausibleWebPluginsAPIControllersGoalsDeleteRequest( /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteAsync + * * Delete Goal by ID * * @param int $id Goal ID (required) @@ -1573,6 +2667,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteAsyncWithHttpInfo + * * Delete Goal by ID * * @param int $id Goal ID (required) @@ -1609,6 +2704,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteBulk + * * Delete Goals in bulk * * @param \Plausible\Analytics\WP\Client\Model\GoalDeleteBulkRequest $goal_delete_bulk_request Goal params (optional) @@ -1629,6 +2725,7 @@ public function plausibleWebPluginsAPIControllersGoalsDeleteBulk( /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteBulkWithHttpInfo + * * Delete Goals in bulk * * @param \Plausible\Analytics\WP\Client\Model\GoalDeleteBulkRequest $goal_delete_bulk_request Goal params (optional) @@ -1781,6 +2878,7 @@ public function plausibleWebPluginsAPIControllersGoalsDeleteBulkRequest( /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteBulkAsync + * * Delete Goals in bulk * * @param \Plausible\Analytics\WP\Client\Model\GoalDeleteBulkRequest $goal_delete_bulk_request Goal params (optional) @@ -1804,6 +2902,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersGoalsDeleteBulkAsyncWithHttpInfo + * * Delete Goals in bulk * * @param \Plausible\Analytics\WP\Client\Model\GoalDeleteBulkRequest $goal_delete_bulk_request Goal params (optional) @@ -1841,6 +2940,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersGoalsGet + * * Retrieve Goal by ID * * @param int $id Goal ID (required) @@ -1862,6 +2962,7 @@ public function plausibleWebPluginsAPIControllersGoalsGet( /** * Operation plausibleWebPluginsAPIControllersGoalsGetWithHttpInfo + * * Retrieve Goal by ID * * @param int $id Goal ID (required) @@ -2122,6 +3223,7 @@ public function plausibleWebPluginsAPIControllersGoalsGetRequest( /** * Operation plausibleWebPluginsAPIControllersGoalsGetAsync + * * Retrieve Goal by ID * * @param int $id Goal ID (required) @@ -2144,6 +3246,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersGoalsGetAsyncWithHttpInfo + * * Retrieve Goal by ID * * @param int $id Goal ID (required) @@ -2193,6 +3296,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersGoalsIndex + * * Retrieve Goals * * @param int $limit Maximum entries per page (optional) @@ -2218,6 +3322,7 @@ public function plausibleWebPluginsAPIControllersGoalsIndex( /** * Operation plausibleWebPluginsAPIControllersGoalsIndexWithHttpInfo + * * Retrieve Goals * * @param int $limit Maximum entries per page (optional) @@ -2460,6 +3565,7 @@ public function plausibleWebPluginsAPIControllersGoalsIndexRequest( /** * Operation plausibleWebPluginsAPIControllersGoalsIndexAsync + * * Retrieve Goals * * @param int $limit Maximum entries per page (optional) @@ -2486,6 +3592,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersGoalsIndexAsyncWithHttpInfo + * * Retrieve Goals * * @param int $limit Maximum entries per page (optional) @@ -2539,6 +3646,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersSharedLinksCreate + * * Get or create Shared Link * * @param \Plausible\Analytics\WP\Client\Model\SharedLinkCreateRequest $shared_link_create_request Shared Link params (optional) @@ -2561,6 +3669,7 @@ public function plausibleWebPluginsAPIControllersSharedLinksCreate( /** * Operation plausibleWebPluginsAPIControllersSharedLinksCreateWithHttpInfo + * * Get or create Shared Link * * @param \Plausible\Analytics\WP\Client\Model\SharedLinkCreateRequest $shared_link_create_request Shared Link params (optional) @@ -2793,6 +3902,7 @@ public function plausibleWebPluginsAPIControllersSharedLinksCreateRequest( /** * Operation plausibleWebPluginsAPIControllersSharedLinksCreateAsync + * * Get or create Shared Link * * @param \Plausible\Analytics\WP\Client\Model\SharedLinkCreateRequest $shared_link_create_request Shared Link params (optional) @@ -2816,6 +3926,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersSharedLinksCreateAsyncWithHttpInfo + * * Get or create Shared Link * * @param \Plausible\Analytics\WP\Client\Model\SharedLinkCreateRequest $shared_link_create_request Shared Link params (optional) @@ -2866,6 +3977,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersSharedLinksGet + * * Retrieve Shared Link by ID * * @param int $id Shared Link ID (required) @@ -2887,6 +3999,7 @@ public function plausibleWebPluginsAPIControllersSharedLinksGet( /** * Operation plausibleWebPluginsAPIControllersSharedLinksGetWithHttpInfo + * * Retrieve Shared Link by ID * * @param int $id Shared Link ID (required) @@ -3147,6 +4260,7 @@ public function plausibleWebPluginsAPIControllersSharedLinksGetRequest( /** * Operation plausibleWebPluginsAPIControllersSharedLinksGetAsync + * * Retrieve Shared Link by ID * * @param int $id Shared Link ID (required) @@ -3169,6 +4283,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersSharedLinksGetAsyncWithHttpInfo + * * Retrieve Shared Link by ID * * @param int $id Shared Link ID (required) @@ -3218,6 +4333,7 @@ function ( $exception ) { /** * Operation plausibleWebPluginsAPIControllersSharedLinksIndex + * * Retrieve Shared Links * * @param int $limit Maximum entries per page (optional) @@ -3244,6 +4360,7 @@ public function plausibleWebPluginsAPIControllersSharedLinksIndex( /** * Operation plausibleWebPluginsAPIControllersSharedLinksIndexWithHttpInfo + * * Retrieve Shared Links * * @param int $limit Maximum entries per page (optional) @@ -3488,6 +4605,7 @@ public function plausibleWebPluginsAPIControllersSharedLinksIndexRequest( /** * Operation plausibleWebPluginsAPIControllersSharedLinksIndexAsync + * * Retrieve Shared Links * * @param int $limit Maximum entries per page (optional) @@ -3515,6 +4633,7 @@ function ( $response ) { /** * Operation plausibleWebPluginsAPIControllersSharedLinksIndexAsyncWithHttpInfo + * * Retrieve Shared Links * * @param int $limit Maximum entries per page (optional) diff --git a/src/Client/lib/ApiException.php b/src/Client/lib/ApiException.php index 9a421e47..86a4cd43 100644 --- a/src/Client/lib/ApiException.php +++ b/src/Client/lib/ApiException.php @@ -2,6 +2,7 @@ /** * ApiException * PHP version 7.4 + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -10,7 +11,9 @@ /** * Plausible Plugins API + * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * * The version of the OpenAPI document: 1.0-rc * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 7.0.1 @@ -28,6 +31,7 @@ /** * ApiException Class Doc Comment + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -36,18 +40,21 @@ class ApiException extends Exception { /** * The HTTP body of the server response either as Json or string. + * * @var \stdClass|string|null */ protected $responseBody; /** * The HTTP header of the server response. + * * @var string[]|null */ protected $responseHeaders; /** * The deserialized response object + * * @var \stdClass|string|null */ protected $responseObject; @@ -68,6 +75,7 @@ public function __construct( $message = "", $code = 0, $responseHeaders = [], $r /** * Gets the HTTP response header + * * @return string[]|null HTTP response header */ public function getResponseHeaders() { @@ -76,6 +84,7 @@ public function getResponseHeaders() { /** * Gets the HTTP body of the server response either as Json or string + * * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string */ public function getResponseBody() { @@ -84,6 +93,7 @@ public function getResponseBody() { /** * Gets the deserialized response object (during deserialization) + * * @return mixed the deserialized response object */ public function getResponseObject() { diff --git a/src/Client/lib/Configuration.php b/src/Client/lib/Configuration.php index feab5a6a..fa84b7ba 100644 --- a/src/Client/lib/Configuration.php +++ b/src/Client/lib/Configuration.php @@ -2,6 +2,7 @@ /** * Configuration * PHP version 7.4 + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -10,7 +11,9 @@ /** * Plausible Plugins API + * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * * The version of the OpenAPI document: 1.0-rc * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 7.0.1 @@ -27,6 +30,7 @@ /** * Configuration Class Doc Comment * PHP version 7.4 + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -44,66 +48,77 @@ class Configuration { /** * Associate array to store API key(s) + * * @var string[] */ protected $apiKeys = []; /** * Associate array to store API prefix (e.g. Bearer) + * * @var string[] */ protected $apiKeyPrefixes = []; /** * Access token for OAuth/Bearer authentication + * * @var string */ protected $accessToken = ''; /** * Boolean format for query string + * * @var string */ protected $booleanFormatForQueryString = self::BOOLEAN_FORMAT_INT; /** * Username for HTTP basic authentication + * * @var string */ protected $username = ''; /** * Password for HTTP basic authentication + * * @var string */ protected $password = ''; /** * The host + * * @var string */ protected $host = 'https://plausible.io'; /** * User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default + * * @var string */ protected $userAgent = 'OpenAPI-Generator/1.0.0/PHP'; /** * Debug switch (default set to false) + * * @var bool */ protected $debug = false; /** * Debug file location (log to STDOUT by default) + * * @var string */ protected $debugFile = 'php://output'; /** * Debug file location (log to STDOUT by default) + * * @var string */ protected $tempFolderPath; @@ -117,6 +132,7 @@ public function __construct() { /** * Gets the essential information for debugging + * * @return string The report for debugging */ public static function toDebugReport() { @@ -131,6 +147,7 @@ public static function toDebugReport() { /** * Gets the temp folder path + * * @return string Temp folder path */ public function getTempFolderPath() { @@ -152,6 +169,7 @@ public function setTempFolderPath( $tempFolderPath ) { /** * Gets the default configuration instance + * * @return Configuration */ public static function getDefaultConfiguration() { @@ -203,6 +221,7 @@ public function setApiKeyPrefix( $apiKeyIdentifier, $prefix ) { /** * Gets the access token for OAuth + * * @return string Access token for OAuth */ public function getAccessToken() { @@ -224,6 +243,7 @@ public function setAccessToken( $accessToken ) { /** * Gets boolean format for query string. + * * @return string Boolean format for query string */ public function getBooleanFormatForQueryString(): string { @@ -245,6 +265,7 @@ public function setBooleanFormatForQueryString( string $booleanFormat ) { /** * Gets the username for HTTP basic authentication + * * @return string Username for HTTP basic authentication */ public function getUsername() { @@ -266,6 +287,7 @@ public function setUsername( $username ) { /** * Gets the password for HTTP basic authentication + * * @return string Password for HTTP basic authentication */ public function getPassword() { @@ -287,6 +309,7 @@ public function setPassword( $password ) { /** * Gets the host + * * @return string Host */ public function getHost() { @@ -308,6 +331,7 @@ public function setHost( $host ) { /** * Gets the user agent of the api client + * * @return string user agent */ public function getUserAgent() { @@ -334,6 +358,7 @@ public function setUserAgent( $userAgent ) { /** * Gets the debug flag + * * @return bool */ public function getDebug() { @@ -355,6 +380,7 @@ public function setDebug( $debug ) { /** * Gets the debug file + * * @return string */ public function getDebugFile() { @@ -480,6 +506,7 @@ public static function getHostString( array $hostsSettings, $hostIndex, array $v /** * Returns an array of host settings + * * @return array an array of host settings */ public function getHostSettings() { diff --git a/src/Client/lib/HeaderSelector.php b/src/Client/lib/HeaderSelector.php index 1437e53f..e7f9ae94 100644 --- a/src/Client/lib/HeaderSelector.php +++ b/src/Client/lib/HeaderSelector.php @@ -2,6 +2,7 @@ /** * HeaderSelector * PHP version 7.4 + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -10,7 +11,9 @@ /** * Plausible Plugins API + * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * * The version of the OpenAPI document: 1.0-rc * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 7.0.1 @@ -26,6 +29,7 @@ /** * HeaderSelector Class Doc Comment + * * @category Class * @package Plausible\Analytics\WP\Client * @author OpenAPI Generator team @@ -190,12 +194,18 @@ function ( array $a, array $b ) { /** * Calculate the next weight, based on the current one. + * * If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the * following formula: + * * next weight = current weight - 10 ^ (floor(log(current weight - 1))) + * * ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) ) + * * Starting from 1000, this generates the following series: + * * 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 + * * The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. diff --git a/src/Client/lib/Model/Capabilities.php b/src/Client/lib/Model/Capabilities.php index 3f4ed92a..a948c296 100644 --- a/src/Client/lib/Model/Capabilities.php +++ b/src/Client/lib/Model/Capabilities.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -69,6 +77,7 @@ class Capabilities implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -80,6 +89,7 @@ class Capabilities implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -90,6 +100,7 @@ class Capabilities implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -100,6 +111,7 @@ class Capabilities implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -110,12 +122,14 @@ class Capabilities implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -162,6 +176,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -170,6 +185,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -178,6 +194,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -187,6 +204,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -195,6 +213,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -203,6 +222,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -222,6 +242,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -230,6 +251,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -239,6 +261,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -247,6 +270,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -267,6 +291,7 @@ public function listInvalidProperties() { /** * Gets authorized + * * @return bool */ public function getAuthorized() { @@ -291,6 +316,7 @@ public function setAuthorized( $authorized ) { /** * Gets data_domain + * * @return string */ public function getDataDomain() { @@ -331,6 +357,7 @@ private function setOpenAPINullablesSetToNull( array $openAPINullablesSetToNull /** * Gets features + * * @return \Plausible\Analytics\WP\Client\Model\CapabilitiesFeatures */ public function getFeatures() { @@ -405,7 +432,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -416,6 +445,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -427,6 +457,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CapabilitiesFeatures.php b/src/Client/lib/Model/CapabilitiesFeatures.php index 7278f35a..5992936d 100644 --- a/src/Client/lib/Model/CapabilitiesFeatures.php +++ b/src/Client/lib/Model/CapabilitiesFeatures.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -72,6 +80,7 @@ class CapabilitiesFeatures implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -85,6 +94,7 @@ class CapabilitiesFeatures implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -97,6 +107,7 @@ class CapabilitiesFeatures implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -109,6 +120,7 @@ class CapabilitiesFeatures implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -121,12 +133,14 @@ class CapabilitiesFeatures implements ModelInterface, ArrayAccess, \JsonSerializ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -175,6 +189,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -183,6 +198,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -191,6 +207,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -200,6 +217,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -208,6 +226,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -216,6 +235,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -235,6 +255,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -243,6 +264,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -252,6 +274,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -260,6 +283,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -286,6 +310,7 @@ public function listInvalidProperties() { /** * Gets funnels + * * @return bool */ public function getFunnels() { @@ -310,6 +335,7 @@ public function setFunnels( $funnels ) { /** * Gets goals + * * @return bool */ public function getGoals() { @@ -334,6 +360,7 @@ public function setGoals( $goals ) { /** * Gets props + * * @return bool */ public function getProps() { @@ -358,6 +385,7 @@ public function setProps( $props ) { /** * Gets revenue_goals + * * @return bool */ public function getRevenueGoals() { @@ -382,6 +410,7 @@ public function setRevenueGoals( $revenue_goals ) { /** * Gets stats_api + * * @return bool */ public function getStatsApi() { @@ -456,7 +485,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -467,6 +498,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -478,6 +510,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomProp.php b/src/Client/lib/Model/CustomProp.php index 8c59b5fe..6b42ad04 100644 --- a/src/Client/lib/Model/CustomProp.php +++ b/src/Client/lib/Model/CustomProp.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class CustomProp implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class CustomProp implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class CustomProp implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class CustomProp implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class CustomProp implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets custom_prop + * * @return \Plausible\Analytics\WP\Client\Model\CustomPropCustomProp */ public function getCustomProp() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomPropCustomProp.php b/src/Client/lib/Model/CustomPropCustomProp.php index fc5cd4c9..9953269e 100644 --- a/src/Client/lib/Model/CustomPropCustomProp.php +++ b/src/Client/lib/Model/CustomPropCustomProp.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -64,6 +72,7 @@ class CustomPropCustomProp implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -73,6 +82,7 @@ class CustomPropCustomProp implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -81,6 +91,7 @@ class CustomPropCustomProp implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -89,6 +100,7 @@ class CustomPropCustomProp implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -97,12 +109,14 @@ class CustomPropCustomProp implements ModelInterface, ArrayAccess, \JsonSerializ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -147,6 +161,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -155,6 +170,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -163,6 +179,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -172,6 +189,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -180,6 +198,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -188,6 +207,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -207,6 +227,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -215,6 +236,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -224,6 +246,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -232,6 +255,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -246,6 +270,7 @@ public function listInvalidProperties() { /** * Gets key + * * @return string */ public function getKey() { @@ -320,7 +345,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -331,6 +358,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -342,6 +370,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomPropDisableRequest.php b/src/Client/lib/Model/CustomPropDisableRequest.php index 064955ca..b7326d22 100644 --- a/src/Client/lib/Model/CustomPropDisableRequest.php +++ b/src/Client/lib/Model/CustomPropDisableRequest.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -67,6 +75,7 @@ class CustomPropDisableRequest implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class CustomPropDisableRequest implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class CustomPropDisableRequest implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class CustomPropDisableRequest implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class CustomPropDisableRequest implements ModelInterface, ArrayAccess, \JsonSeri /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -261,6 +285,7 @@ public function listInvalidProperties() { /** * Gets custom_props + * * @return \Plausible\Analytics\WP\Client\Model\CustomProp[] */ public function getCustomProps() { @@ -291,6 +316,7 @@ public function setCustomProps( $custom_props ) { /** * Gets custom_prop + * * @return \Plausible\Analytics\WP\Client\Model\CustomPropCustomProp */ public function getCustomProp() { @@ -365,7 +391,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -376,6 +404,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -387,6 +416,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php b/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php index 67806820..952afabb 100644 --- a/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php +++ b/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class CustomPropDisableRequestBulkDisable implements ModelInterface, ArrayAccess /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class CustomPropDisableRequestBulkDisable implements ModelInterface, ArrayAccess /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class CustomPropDisableRequestBulkDisable implements ModelInterface, ArrayAccess /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class CustomPropDisableRequestBulkDisable implements ModelInterface, ArrayAccess /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class CustomPropDisableRequestBulkDisable implements ModelInterface, ArrayAccess /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -250,6 +274,7 @@ public function listInvalidProperties() { /** * Gets custom_props + * * @return \Plausible\Analytics\WP\Client\Model\CustomProp[] */ public function getCustomProps() { @@ -330,7 +355,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -341,6 +368,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -352,6 +380,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomPropEnableRequest.php b/src/Client/lib/Model/CustomPropEnableRequest.php index cff292c5..5f4fe393 100644 --- a/src/Client/lib/Model/CustomPropEnableRequest.php +++ b/src/Client/lib/Model/CustomPropEnableRequest.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -67,6 +75,7 @@ class CustomPropEnableRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class CustomPropEnableRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class CustomPropEnableRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class CustomPropEnableRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class CustomPropEnableRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -261,6 +285,7 @@ public function listInvalidProperties() { /** * Gets custom_props + * * @return \Plausible\Analytics\WP\Client\Model\CustomProp[] */ public function getCustomProps() { @@ -291,6 +316,7 @@ public function setCustomProps( $custom_props ) { /** * Gets custom_prop + * * @return \Plausible\Analytics\WP\Client\Model\CustomPropCustomProp */ public function getCustomProp() { @@ -365,7 +391,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -376,6 +404,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -387,6 +416,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php b/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php index 2f1d1a28..aa3d7438 100644 --- a/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php +++ b/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class CustomPropEnableRequestBulkEnable implements ModelInterface, ArrayAccess, /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class CustomPropEnableRequestBulkEnable implements ModelInterface, ArrayAccess, /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class CustomPropEnableRequestBulkEnable implements ModelInterface, ArrayAccess, /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class CustomPropEnableRequestBulkEnable implements ModelInterface, ArrayAccess, /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class CustomPropEnableRequestBulkEnable implements ModelInterface, ArrayAccess, /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -250,6 +274,7 @@ public function listInvalidProperties() { /** * Gets custom_props + * * @return \Plausible\Analytics\WP\Client\Model\CustomProp[] */ public function getCustomProps() { @@ -330,7 +355,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -341,6 +368,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -352,6 +380,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/CustomPropListResponse.php b/src/Client/lib/Model/CustomPropListResponse.php index ac044c78..f3364cc8 100644 --- a/src/Client/lib/Model/CustomPropListResponse.php +++ b/src/Client/lib/Model/CustomPropListResponse.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class CustomPropListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class CustomPropListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class CustomPropListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class CustomPropListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class CustomPropListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets custom_props + * * @return \Plausible\Analytics\WP\Client\Model\CustomProp[] */ public function getCustomProps() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/Error.php b/src/Client/lib/Model/Error.php index 459ba904..72ccbe35 100644 --- a/src/Client/lib/Model/Error.php +++ b/src/Client/lib/Model/Error.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets detail + * * @return string */ public function getDetail() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/Funnel.php b/src/Client/lib/Model/Funnel.php new file mode 100644 index 00000000..08a5d5d2 --- /dev/null +++ b/src/Client/lib/Model/Funnel.php @@ -0,0 +1,410 @@ + + */ +class Funnel implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'funnel' => '\Plausible\Analytics\WP\Client\Model\FunnelFunnel' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'funnel' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'funnel' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'funnel' => 'funnel' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'funnel' => 'setFunnel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'funnel' => 'getFunnel' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('funnel', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 funnel + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelFunnel|null + */ + public function getFunnel() + { + return $this->container['funnel']; + } + + /** + * Sets funnel + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelFunnel|null $funnel funnel + * + * @return self + */ + public function setFunnel($funnel) + { + if (is_null($funnel)) { + throw new \InvalidArgumentException('non-nullable funnel cannot be null'); + } + $this->container['funnel'] = $funnel; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/FunnelCreateRequest.php b/src/Client/lib/Model/FunnelCreateRequest.php new file mode 100644 index 00000000..66e61ad8 --- /dev/null +++ b/src/Client/lib/Model/FunnelCreateRequest.php @@ -0,0 +1,413 @@ + + */ +class FunnelCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel.CreateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'funnel' => '\Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnel' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'funnel' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'funnel' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'funnel' => 'funnel' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'funnel' => 'setFunnel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'funnel' => 'getFunnel' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('funnel', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['funnel'] === null) { + $invalidProperties[] = "'funnel' 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 funnel + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnel + */ + public function getFunnel() + { + return $this->container['funnel']; + } + + /** + * Sets funnel + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnel $funnel funnel + * + * @return self + */ + public function setFunnel($funnel) + { + if (is_null($funnel)) { + throw new \InvalidArgumentException('non-nullable funnel cannot be null'); + } + $this->container['funnel'] = $funnel; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/FunnelCreateRequestFunnel.php b/src/Client/lib/Model/FunnelCreateRequestFunnel.php new file mode 100644 index 00000000..f4beec22 --- /dev/null +++ b/src/Client/lib/Model/FunnelCreateRequestFunnel.php @@ -0,0 +1,464 @@ + + */ +class FunnelCreateRequestFunnel implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel_CreateRequest_funnel'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'steps' => '\Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'steps' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'steps' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'steps' => 'steps' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'steps' => 'setSteps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'steps' => 'getSteps' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('name', $data ?? [], null); + $this->setIfExists('steps', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['steps'] === null) { + $invalidProperties[] = "'steps' can't be null"; + } + if ((count($this->container['steps']) > 8)) { + $invalidProperties[] = "invalid value for 'steps', number of items must be less than or equal to 8."; + } + + if ((count($this->container['steps']) < 2)) { + $invalidProperties[] = "invalid value for 'steps', number of items must be greater than or equal to 2."; + } + + 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 name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Funnel Name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets steps + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[] + */ + public function getSteps() + { + return $this->container['steps']; + } + + /** + * Sets steps + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[] $steps Funnel Steps + * + * @return self + */ + public function setSteps($steps) + { + if (is_null($steps)) { + throw new \InvalidArgumentException('non-nullable steps cannot be null'); + } + + if ((count($steps) > 8)) { + throw new \InvalidArgumentException('invalid value for $steps when calling FunnelCreateRequestFunnel., number of items must be less than or equal to 8.'); + } + if ((count($steps) < 2)) { + throw new \InvalidArgumentException('invalid length for $steps when calling FunnelCreateRequestFunnel., number of items must be greater than or equal to 2.'); + } + $this->container['steps'] = $steps; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php b/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php new file mode 100644 index 00000000..32632324 --- /dev/null +++ b/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php @@ -0,0 +1,481 @@ + + */ +class FunnelCreateRequestFunnelStepsInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel_CreateRequest_funnel_steps_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'goal' => '\Plausible\Analytics\WP\Client\Model\GoalCreateRequestPageviewGoal', + 'goal_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'goal' => null, + 'goal_type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'goal' => false, + 'goal_type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'goal' => 'goal', + 'goal_type' => 'goal_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'goal' => 'setGoal', + 'goal_type' => 'setGoalType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'goal' => 'getGoal', + 'goal_type' => 'getGoalType' + ]; + + /** + * 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::$openAPIModelName; + } + + public const GOAL_TYPE_GOAL_PAGEVIEW = 'Goal.Pageview'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getGoalTypeAllowableValues() + { + return [ + self::GOAL_TYPE_GOAL_PAGEVIEW, + ]; + } + + /** + * 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->setIfExists('goal', $data ?? [], null); + $this->setIfExists('goal_type', $data ?? [], 'Goal.Pageview'); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['goal'] === null) { + $invalidProperties[] = "'goal' can't be null"; + } + if ($this->container['goal_type'] === null) { + $invalidProperties[] = "'goal_type' can't be null"; + } + $allowedValues = $this->getGoalTypeAllowableValues(); + if (!is_null($this->container['goal_type']) && !in_array($this->container['goal_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'goal_type', must be one of '%s'", + $this->container['goal_type'], + implode("', '", $allowedValues) + ); + } + + 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 goal + * + * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestPageviewGoal + */ + public function getGoal() + { + return $this->container['goal']; + } + + /** + * Sets goal + * + * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequestPageviewGoal $goal goal + * + * @return self + */ + public function setGoal($goal) + { + if (is_null($goal)) { + throw new \InvalidArgumentException('non-nullable goal cannot be null'); + } + $this->container['goal'] = $goal; + + return $this; + } + + /** + * Gets goal_type + * + * @return string + */ + public function getGoalType() + { + return $this->container['goal_type']; + } + + /** + * Sets goal_type + * + * @param string $goal_type goal_type + * + * @return self + */ + public function setGoalType($goal_type) + { + if (is_null($goal_type)) { + throw new \InvalidArgumentException('non-nullable goal_type cannot be null'); + } + $allowedValues = $this->getGoalTypeAllowableValues(); + if (!in_array($goal_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'goal_type', must be one of '%s'", + $goal_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['goal_type'] = $goal_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/FunnelFunnel.php b/src/Client/lib/Model/FunnelFunnel.php new file mode 100644 index 00000000..078c9596 --- /dev/null +++ b/src/Client/lib/Model/FunnelFunnel.php @@ -0,0 +1,501 @@ + + */ +class FunnelFunnel implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel_funnel'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string', + 'steps' => '\Plausible\Analytics\WP\Client\Model\Goal[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'steps' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'steps' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'steps' => 'steps' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'steps' => 'setSteps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'steps' => 'getSteps' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('steps', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['steps'] === null) { + $invalidProperties[] = "'steps' can't be null"; + } + if ((count($this->container['steps']) > 8)) { + $invalidProperties[] = "invalid value for 'steps', number of items must be less than or equal to 8."; + } + + if ((count($this->container['steps']) < 2)) { + $invalidProperties[] = "invalid value for 'steps', number of items must be greater than or equal to 2."; + } + + 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 id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Funnel ID + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets steps + * + * @return \Plausible\Analytics\WP\Client\Model\Goal[] + */ + public function getSteps() + { + return $this->container['steps']; + } + + /** + * Sets steps + * + * @param \Plausible\Analytics\WP\Client\Model\Goal[] $steps Funnel Steps + * + * @return self + */ + public function setSteps($steps) + { + if (is_null($steps)) { + throw new \InvalidArgumentException('non-nullable steps cannot be null'); + } + + if ((count($steps) > 8)) { + throw new \InvalidArgumentException('invalid value for $steps when calling FunnelFunnel., number of items must be less than or equal to 8.'); + } + if ((count($steps) < 2)) { + throw new \InvalidArgumentException('invalid length for $steps when calling FunnelFunnel., number of items must be greater than or equal to 2.'); + } + $this->container['steps'] = $steps; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/FunnelListResponse.php b/src/Client/lib/Model/FunnelListResponse.php new file mode 100644 index 00000000..adeb18c4 --- /dev/null +++ b/src/Client/lib/Model/FunnelListResponse.php @@ -0,0 +1,450 @@ + + */ +class FunnelListResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel.ListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'funnels' => '\Plausible\Analytics\WP\Client\Model\Funnel[]', + 'meta' => '\Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'funnels' => null, + 'meta' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'funnels' => false, + 'meta' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'funnels' => 'funnels', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'funnels' => 'setFunnels', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'funnels' => 'getFunnels', + 'meta' => 'getMeta' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('funnels', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['funnels'] === null) { + $invalidProperties[] = "'funnels' can't be null"; + } + if ($this->container['meta'] === null) { + $invalidProperties[] = "'meta' 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 funnels + * + * @return \Plausible\Analytics\WP\Client\Model\Funnel[] + */ + public function getFunnels() + { + return $this->container['funnels']; + } + + /** + * Sets funnels + * + * @param \Plausible\Analytics\WP\Client\Model\Funnel[] $funnels funnels + * + * @return self + */ + public function setFunnels($funnels) + { + if (is_null($funnels)) { + throw new \InvalidArgumentException('non-nullable funnels cannot be null'); + } + $this->container['funnels'] = $funnels; + + return $this; + } + + /** + * Gets meta + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta $meta meta + * + * @return self + */ + public function setMeta($meta) + { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/FunnelListResponseMeta.php b/src/Client/lib/Model/FunnelListResponseMeta.php new file mode 100644 index 00000000..78cb7812 --- /dev/null +++ b/src/Client/lib/Model/FunnelListResponseMeta.php @@ -0,0 +1,412 @@ + + */ +class FunnelListResponseMeta implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Funnel_ListResponse_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'pagination' => '\Plausible\Analytics\WP\Client\Model\PaginationMetadata' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'pagination' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'pagination' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pagination' => 'pagination' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pagination' => 'setPagination' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pagination' => 'getPagination' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('pagination', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['pagination'] === null) { + $invalidProperties[] = "'pagination' 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 pagination + * + * @return \Plausible\Analytics\WP\Client\Model\PaginationMetadata + */ + public function getPagination() + { + return $this->container['pagination']; + } + + /** + * Sets pagination + * + * @param \Plausible\Analytics\WP\Client\Model\PaginationMetadata $pagination pagination + * + * @return self + */ + public function setPagination($pagination) + { + if (is_null($pagination)) { + throw new \InvalidArgumentException('non-nullable pagination cannot be null'); + } + $this->container['pagination'] = $pagination; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Client/lib/Model/Goal.php b/src/Client/lib/Model/Goal.php index accc7402..7a0ffd5c 100644 --- a/src/Client/lib/Model/Goal.php +++ b/src/Client/lib/Model/Goal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -67,6 +75,7 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -158,6 +172,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -166,6 +181,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -174,6 +190,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -183,6 +200,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -191,6 +209,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -199,6 +218,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -218,6 +238,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -226,6 +247,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -235,6 +257,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -243,6 +266,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -260,6 +284,7 @@ public function listInvalidProperties() { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -284,6 +309,7 @@ public function setGoalType( $goal_type ) { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalPageviewAllOfGoal */ public function getGoal() { @@ -358,7 +384,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -369,6 +397,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -380,6 +409,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequest.php b/src/Client/lib/Model/GoalCreateRequest.php index 5eded378..60b93a03 100644 --- a/src/Client/lib/Model/GoalCreateRequest.php +++ b/src/Client/lib/Model/GoalCreateRequest.php @@ -1,7 +1,9 @@ '\Plausible\Analytics\WP\Client\Model\GoalCreateRequestBulkGetOrCreateGoalsInner[]', + 'goals' => '\Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[]', 'goal' => '\Plausible\Analytics\WP\Client\Model\GoalCreateRequestPageviewGoal', 'goal_type' => 'string', ]; /** * Array of property to format mappings. Used for (de)serialization + * * @var string[] * @phpstan-var array * @psalm-var array @@ -71,6 +79,7 @@ class GoalCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -82,6 +91,7 @@ class GoalCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -92,6 +102,7 @@ class GoalCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -102,6 +113,7 @@ class GoalCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -112,12 +124,14 @@ class GoalCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializabl /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -164,6 +178,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -172,6 +187,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -180,6 +196,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -189,6 +206,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -197,6 +215,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -205,6 +224,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -224,6 +244,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -232,6 +253,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -241,6 +263,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -249,6 +272,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -285,6 +309,7 @@ public function listInvalidProperties() { /** * Gets allowable values of the enum + * * @return string[] */ public function getGoalTypeAllowableValues() { @@ -295,7 +320,8 @@ public function getGoalTypeAllowableValues() { /** * Gets goals - * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestBulkGetOrCreateGoalsInner[] + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[] */ public function getGoals() { return $this->container[ 'goals' ]; @@ -304,7 +330,7 @@ public function getGoals() { /** * Sets goals * - * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequestBulkGetOrCreateGoalsInner[] $goals goals + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[] $goals goals * * @return self */ @@ -330,6 +356,7 @@ public function setGoals( $goals ) { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestPageviewGoal */ public function getGoal() { @@ -354,6 +381,7 @@ public function setGoal( $goal ) { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -438,7 +466,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -449,6 +479,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -460,6 +491,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php b/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php index 87dc9060..0a051c43 100644 --- a/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php +++ b/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php @@ -1,7 +1,9 @@ '\Plausible\Analytics\WP\Client\Model\GoalCreateRequestBulkGetOrCreateGoalsInner[]', + 'goals' => '\Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[]', ]; /** * Array of property to format mappings. Used for (de)serialization + * * @var string[] * @phpstan-var array * @psalm-var array @@ -65,6 +73,7 @@ class GoalCreateRequestBulkGetOrCreate implements ModelInterface, ArrayAccess, \ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class GoalCreateRequestBulkGetOrCreate implements ModelInterface, ArrayAccess, \ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class GoalCreateRequestBulkGetOrCreate implements ModelInterface, ArrayAccess, \ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class GoalCreateRequestBulkGetOrCreate implements ModelInterface, ArrayAccess, \ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class GoalCreateRequestBulkGetOrCreate implements ModelInterface, ArrayAccess, \ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -254,7 +278,8 @@ public function listInvalidProperties() { /** * Gets goals - * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestBulkGetOrCreateGoalsInner[] + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[] */ public function getGoals() { return $this->container[ 'goals' ]; @@ -263,7 +288,7 @@ public function getGoals() { /** * Sets goals * - * @param \Plausible\Analytics\WP\Client\Model\GoalCreateRequestBulkGetOrCreateGoalsInner[] $goals goals + * @param \Plausible\Analytics\WP\Client\Model\FunnelCreateRequestFunnelStepsInner[] $goals goals * * @return self */ @@ -339,7 +364,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -350,6 +377,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -361,6 +389,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestCustomEvent.php b/src/Client/lib/Model/GoalCreateRequestCustomEvent.php index 2b9134eb..f746f3fd 100644 --- a/src/Client/lib/Model/GoalCreateRequestCustomEvent.php +++ b/src/Client/lib/Model/GoalCreateRequestCustomEvent.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -69,6 +77,7 @@ class GoalCreateRequestCustomEvent implements ModelInterface, ArrayAccess, \Json /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -79,6 +88,7 @@ class GoalCreateRequestCustomEvent implements ModelInterface, ArrayAccess, \Json /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -88,6 +98,7 @@ class GoalCreateRequestCustomEvent implements ModelInterface, ArrayAccess, \Json /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -97,6 +108,7 @@ class GoalCreateRequestCustomEvent implements ModelInterface, ArrayAccess, \Json /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -106,12 +118,14 @@ class GoalCreateRequestCustomEvent implements ModelInterface, ArrayAccess, \Json /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -157,6 +171,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -165,6 +180,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -173,6 +189,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -182,6 +199,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -190,6 +208,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -198,6 +217,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -217,6 +237,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -225,6 +246,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -234,6 +256,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -242,6 +265,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -267,6 +291,7 @@ public function listInvalidProperties() { /** * Gets allowable values of the enum + * * @return string[] */ public function getGoalTypeAllowableValues() { @@ -277,6 +302,7 @@ public function getGoalTypeAllowableValues() { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestCustomEventGoal */ public function getGoal() { @@ -301,6 +327,7 @@ public function setGoal( $goal ) { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -385,7 +412,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -396,6 +425,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -407,6 +437,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php b/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php index ec6657d1..562485c2 100644 --- a/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php +++ b/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -64,6 +72,7 @@ class GoalCreateRequestCustomEventGoal implements ModelInterface, ArrayAccess, \ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -73,6 +82,7 @@ class GoalCreateRequestCustomEventGoal implements ModelInterface, ArrayAccess, \ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -81,6 +91,7 @@ class GoalCreateRequestCustomEventGoal implements ModelInterface, ArrayAccess, \ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -89,6 +100,7 @@ class GoalCreateRequestCustomEventGoal implements ModelInterface, ArrayAccess, \ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -97,12 +109,14 @@ class GoalCreateRequestCustomEventGoal implements ModelInterface, ArrayAccess, \ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -147,6 +161,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -155,6 +170,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -163,6 +179,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -172,6 +189,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -180,6 +198,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -188,6 +207,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -207,6 +227,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -215,6 +236,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -224,6 +246,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -232,6 +255,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -246,6 +270,7 @@ public function listInvalidProperties() { /** * Gets event_name + * * @return string */ public function getEventName() { @@ -320,7 +345,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -331,6 +358,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -342,6 +370,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestPageview.php b/src/Client/lib/Model/GoalCreateRequestPageview.php index 94da5a08..cc1afd93 100644 --- a/src/Client/lib/Model/GoalCreateRequestPageview.php +++ b/src/Client/lib/Model/GoalCreateRequestPageview.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -69,6 +77,7 @@ class GoalCreateRequestPageview implements ModelInterface, ArrayAccess, \JsonSer /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -79,6 +88,7 @@ class GoalCreateRequestPageview implements ModelInterface, ArrayAccess, \JsonSer /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -88,6 +98,7 @@ class GoalCreateRequestPageview implements ModelInterface, ArrayAccess, \JsonSer /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -97,6 +108,7 @@ class GoalCreateRequestPageview implements ModelInterface, ArrayAccess, \JsonSer /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -106,12 +118,14 @@ class GoalCreateRequestPageview implements ModelInterface, ArrayAccess, \JsonSer /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -157,6 +171,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -165,6 +180,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -173,6 +189,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -182,6 +199,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -190,6 +208,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -198,6 +217,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -217,6 +237,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -225,6 +246,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -234,6 +256,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -242,6 +265,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -267,6 +291,7 @@ public function listInvalidProperties() { /** * Gets allowable values of the enum + * * @return string[] */ public function getGoalTypeAllowableValues() { @@ -277,6 +302,7 @@ public function getGoalTypeAllowableValues() { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestPageviewGoal */ public function getGoal() { @@ -301,6 +327,7 @@ public function setGoal( $goal ) { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -385,7 +412,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -396,6 +425,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -407,6 +437,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php b/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php index 69b1ce68..38989f39 100644 --- a/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php +++ b/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -64,6 +72,7 @@ class GoalCreateRequestPageviewGoal implements ModelInterface, ArrayAccess, \Jso /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -73,6 +82,7 @@ class GoalCreateRequestPageviewGoal implements ModelInterface, ArrayAccess, \Jso /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -81,6 +91,7 @@ class GoalCreateRequestPageviewGoal implements ModelInterface, ArrayAccess, \Jso /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -89,6 +100,7 @@ class GoalCreateRequestPageviewGoal implements ModelInterface, ArrayAccess, \Jso /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -97,12 +109,14 @@ class GoalCreateRequestPageviewGoal implements ModelInterface, ArrayAccess, \Jso /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -147,6 +161,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -155,6 +170,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -163,6 +179,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -172,6 +189,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -180,6 +198,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -188,6 +207,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -207,6 +227,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -215,6 +236,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -224,6 +246,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -232,6 +255,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -246,6 +270,7 @@ public function listInvalidProperties() { /** * Gets path + * * @return string */ public function getPath() { @@ -320,7 +345,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -331,6 +358,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -342,6 +370,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestRevenue.php b/src/Client/lib/Model/GoalCreateRequestRevenue.php index c95f4a61..0fa56895 100644 --- a/src/Client/lib/Model/GoalCreateRequestRevenue.php +++ b/src/Client/lib/Model/GoalCreateRequestRevenue.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -69,6 +77,7 @@ class GoalCreateRequestRevenue implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -79,6 +88,7 @@ class GoalCreateRequestRevenue implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -88,6 +98,7 @@ class GoalCreateRequestRevenue implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -97,6 +108,7 @@ class GoalCreateRequestRevenue implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -106,12 +118,14 @@ class GoalCreateRequestRevenue implements ModelInterface, ArrayAccess, \JsonSeri /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -157,6 +171,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -165,6 +180,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -173,6 +189,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -182,6 +199,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -190,6 +208,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -198,6 +217,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -217,6 +237,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -225,6 +246,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -234,6 +256,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -242,6 +265,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -267,6 +291,7 @@ public function listInvalidProperties() { /** * Gets allowable values of the enum + * * @return string[] */ public function getGoalTypeAllowableValues() { @@ -277,6 +302,7 @@ public function getGoalTypeAllowableValues() { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalCreateRequestRevenueGoal */ public function getGoal() { @@ -301,6 +327,7 @@ public function setGoal( $goal ) { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -385,7 +412,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -396,6 +425,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -407,6 +437,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php b/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php index 6e4b88a0..c58e8895 100644 --- a/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php +++ b/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -66,6 +74,7 @@ class GoalCreateRequestRevenueGoal implements ModelInterface, ArrayAccess, \Json /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -76,6 +85,7 @@ class GoalCreateRequestRevenueGoal implements ModelInterface, ArrayAccess, \Json /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -85,6 +95,7 @@ class GoalCreateRequestRevenueGoal implements ModelInterface, ArrayAccess, \Json /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -94,6 +105,7 @@ class GoalCreateRequestRevenueGoal implements ModelInterface, ArrayAccess, \Json /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -103,12 +115,14 @@ class GoalCreateRequestRevenueGoal implements ModelInterface, ArrayAccess, \Json /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -154,6 +168,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -162,6 +177,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -170,6 +186,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -179,6 +196,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -187,6 +205,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -195,6 +214,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -214,6 +234,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -222,6 +243,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -231,6 +253,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -239,6 +262,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -256,6 +280,7 @@ public function listInvalidProperties() { /** * Gets currency + * * @return string */ public function getCurrency() { @@ -280,6 +305,7 @@ public function setCurrency( $currency ) { /** * Gets event_name + * * @return string */ public function getEventName() { @@ -354,7 +380,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -365,6 +393,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -376,6 +405,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCustomEvent.php b/src/Client/lib/Model/GoalCustomEvent.php index 4fc6b275..1c5df258 100644 --- a/src/Client/lib/Model/GoalCustomEvent.php +++ b/src/Client/lib/Model/GoalCustomEvent.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -67,6 +75,7 @@ class GoalCustomEvent implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class GoalCustomEvent implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class GoalCustomEvent implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class GoalCustomEvent implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class GoalCustomEvent implements ModelInterface, ArrayAccess, \JsonSerializable /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -257,6 +281,7 @@ public function listInvalidProperties() { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -281,6 +306,7 @@ public function setGoalType( $goal_type ) { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalCustomEventAllOfGoal */ public function getGoal() { @@ -355,7 +381,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -366,6 +394,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -377,6 +406,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalCustomEventAllOfGoal.php b/src/Client/lib/Model/GoalCustomEventAllOfGoal.php index a9babbea..ad354ae0 100644 --- a/src/Client/lib/Model/GoalCustomEventAllOfGoal.php +++ b/src/Client/lib/Model/GoalCustomEventAllOfGoal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -68,6 +76,7 @@ class GoalCustomEventAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -79,6 +88,7 @@ class GoalCustomEventAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -89,6 +99,7 @@ class GoalCustomEventAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -99,6 +110,7 @@ class GoalCustomEventAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -109,12 +121,14 @@ class GoalCustomEventAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeri /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -161,6 +175,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -169,6 +184,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -177,6 +193,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -186,6 +203,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -194,6 +212,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -202,6 +221,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -221,6 +241,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -229,6 +250,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -238,6 +260,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -246,6 +269,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -266,6 +290,7 @@ public function listInvalidProperties() { /** * Gets display_name + * * @return string */ public function getDisplayName() { @@ -290,6 +315,7 @@ public function setDisplayName( $display_name ) { /** * Gets event_name + * * @return string */ public function getEventName() { @@ -314,6 +340,7 @@ public function setEventName( $event_name ) { /** * Gets id + * * @return int */ public function getId() { @@ -388,7 +415,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -399,6 +428,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -410,6 +440,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalDeleteBulkRequest.php b/src/Client/lib/Model/GoalDeleteBulkRequest.php index 7e861462..df58524a 100644 --- a/src/Client/lib/Model/GoalDeleteBulkRequest.php +++ b/src/Client/lib/Model/GoalDeleteBulkRequest.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class GoalDeleteBulkRequest implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class GoalDeleteBulkRequest implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class GoalDeleteBulkRequest implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class GoalDeleteBulkRequest implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class GoalDeleteBulkRequest implements ModelInterface, ArrayAccess, \JsonSeriali /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -254,6 +278,7 @@ public function listInvalidProperties() { /** * Gets goal_ids + * * @return int[] */ public function getGoalIds() { @@ -339,7 +364,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -350,6 +377,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -361,6 +389,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalListResponse.php b/src/Client/lib/Model/GoalListResponse.php index c8dc5ae1..8181933b 100644 --- a/src/Client/lib/Model/GoalListResponse.php +++ b/src/Client/lib/Model/GoalListResponse.php @@ -1,7 +1,9 @@ '\Plausible\Analytics\WP\Client\Model\Goal[]', - 'meta' => '\Plausible\Analytics\WP\Client\Model\GoalListResponseMeta', + 'meta' => '\Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta', ]; /** * Array of property to format mappings. Used for (de)serialization + * * @var string[] * @phpstan-var array * @psalm-var array @@ -67,6 +75,7 @@ class GoalListResponse implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class GoalListResponse implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class GoalListResponse implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class GoalListResponse implements ModelInterface, ArrayAccess, \JsonSerializable /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class GoalListResponse implements ModelInterface, ArrayAccess, \JsonSerializable /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -257,6 +281,7 @@ public function listInvalidProperties() { /** * Gets goals + * * @return \Plausible\Analytics\WP\Client\Model\Goal[] */ public function getGoals() { @@ -281,7 +306,8 @@ public function setGoals( $goals ) { /** * Gets meta - * @return \Plausible\Analytics\WP\Client\Model\GoalListResponseMeta + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta */ public function getMeta() { return $this->container[ 'meta' ]; @@ -290,7 +316,7 @@ public function getMeta() { /** * Sets meta * - * @param \Plausible\Analytics\WP\Client\Model\GoalListResponseMeta $meta meta + * @param \Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta $meta meta * * @return self */ @@ -355,7 +381,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -366,6 +394,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -377,6 +406,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalPageview.php b/src/Client/lib/Model/GoalPageview.php index d4f2e9b3..7e37694c 100644 --- a/src/Client/lib/Model/GoalPageview.php +++ b/src/Client/lib/Model/GoalPageview.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -67,6 +75,7 @@ class GoalPageview implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class GoalPageview implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class GoalPageview implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class GoalPageview implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class GoalPageview implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -257,6 +281,7 @@ public function listInvalidProperties() { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -281,6 +306,7 @@ public function setGoalType( $goal_type ) { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalPageviewAllOfGoal */ public function getGoal() { @@ -355,7 +381,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -366,6 +394,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -377,6 +406,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalPageviewAllOfGoal.php b/src/Client/lib/Model/GoalPageviewAllOfGoal.php index b055d405..79b37b78 100644 --- a/src/Client/lib/Model/GoalPageviewAllOfGoal.php +++ b/src/Client/lib/Model/GoalPageviewAllOfGoal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -68,6 +76,7 @@ class GoalPageviewAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -79,6 +88,7 @@ class GoalPageviewAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -89,6 +99,7 @@ class GoalPageviewAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -99,6 +110,7 @@ class GoalPageviewAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeriali /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -109,12 +121,14 @@ class GoalPageviewAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeriali /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -161,6 +175,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -169,6 +184,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -177,6 +193,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -186,6 +203,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -194,6 +212,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -202,6 +221,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -221,6 +241,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -229,6 +250,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -238,6 +260,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -246,6 +269,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -266,6 +290,7 @@ public function listInvalidProperties() { /** * Gets display_name + * * @return string */ public function getDisplayName() { @@ -290,6 +315,7 @@ public function setDisplayName( $display_name ) { /** * Gets id + * * @return int */ public function getId() { @@ -314,6 +340,7 @@ public function setId( $id ) { /** * Gets path + * * @return string */ public function getPath() { @@ -388,7 +415,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -399,6 +428,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -410,6 +440,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalRevenue.php b/src/Client/lib/Model/GoalRevenue.php index 5ce8ca80..0e9bc0b3 100644 --- a/src/Client/lib/Model/GoalRevenue.php +++ b/src/Client/lib/Model/GoalRevenue.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -67,6 +75,7 @@ class GoalRevenue implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class GoalRevenue implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class GoalRevenue implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class GoalRevenue implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class GoalRevenue implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -257,6 +281,7 @@ public function listInvalidProperties() { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -281,6 +306,7 @@ public function setGoalType( $goal_type ) { /** * Gets goal + * * @return \Plausible\Analytics\WP\Client\Model\GoalRevenueAllOfGoal */ public function getGoal() { @@ -355,7 +381,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -366,6 +394,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -377,6 +406,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalRevenueAllOfGoal.php b/src/Client/lib/Model/GoalRevenueAllOfGoal.php index 8ba482f8..b7d0a70f 100644 --- a/src/Client/lib/Model/GoalRevenueAllOfGoal.php +++ b/src/Client/lib/Model/GoalRevenueAllOfGoal.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -70,6 +78,7 @@ class GoalRevenueAllOfGoal implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -82,6 +91,7 @@ class GoalRevenueAllOfGoal implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -93,6 +103,7 @@ class GoalRevenueAllOfGoal implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -104,6 +115,7 @@ class GoalRevenueAllOfGoal implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -115,12 +127,14 @@ class GoalRevenueAllOfGoal implements ModelInterface, ArrayAccess, \JsonSerializ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -168,6 +182,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -176,6 +191,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -184,6 +200,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -193,6 +210,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -201,6 +219,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -209,6 +228,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -228,6 +248,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -236,6 +257,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -245,6 +267,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -253,6 +276,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -276,6 +300,7 @@ public function listInvalidProperties() { /** * Gets currency + * * @return string */ public function getCurrency() { @@ -300,6 +325,7 @@ public function setCurrency( $currency ) { /** * Gets display_name + * * @return string */ public function getDisplayName() { @@ -324,6 +350,7 @@ public function setDisplayName( $display_name ) { /** * Gets event_name + * * @return string */ public function getEventName() { @@ -348,6 +375,7 @@ public function setEventName( $event_name ) { /** * Gets id + * * @return int */ public function getId() { @@ -422,7 +450,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -433,6 +463,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -444,6 +475,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/GoalType.php b/src/Client/lib/Model/GoalType.php index 3b3ac891..94eef2f9 100644 --- a/src/Client/lib/Model/GoalType.php +++ b/src/Client/lib/Model/GoalType.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class GoalType implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class GoalType implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class GoalType implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class GoalType implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class GoalType implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets goal_type + * * @return string */ public function getGoalType() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/Link.php b/src/Client/lib/Model/Link.php index e74c6c28..e0886fe4 100644 --- a/src/Client/lib/Model/Link.php +++ b/src/Client/lib/Model/Link.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -64,6 +72,7 @@ class Link implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -73,6 +82,7 @@ class Link implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -81,6 +91,7 @@ class Link implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -89,6 +100,7 @@ class Link implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -97,12 +109,14 @@ class Link implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -147,6 +161,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -155,6 +170,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -163,6 +179,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -172,6 +189,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -180,6 +198,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -188,6 +207,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -207,6 +227,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -215,6 +236,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -224,6 +246,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -232,6 +255,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -246,6 +270,7 @@ public function listInvalidProperties() { /** * Gets url + * * @return string */ public function getUrl() { @@ -320,7 +345,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -331,6 +358,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -342,6 +370,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/ModelInterface.php b/src/Client/lib/Model/ModelInterface.php index 4a12517d..ffe8fb9c 100644 --- a/src/Client/lib/Model/ModelInterface.php +++ b/src/Client/lib/Model/ModelInterface.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class NotFoundError implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class NotFoundError implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class NotFoundError implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class NotFoundError implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class NotFoundError implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets errors + * * @return \Plausible\Analytics\WP\Client\Model\Error[] */ public function getErrors() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/PaginationMetadata.php b/src/Client/lib/Model/PaginationMetadata.php index 4a027aab..cb3a1003 100644 --- a/src/Client/lib/Model/PaginationMetadata.php +++ b/src/Client/lib/Model/PaginationMetadata.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -69,6 +77,7 @@ class PaginationMetadata implements ModelInterface, ArrayAccess, \JsonSerializab /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -80,6 +89,7 @@ class PaginationMetadata implements ModelInterface, ArrayAccess, \JsonSerializab /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -90,6 +100,7 @@ class PaginationMetadata implements ModelInterface, ArrayAccess, \JsonSerializab /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -100,6 +111,7 @@ class PaginationMetadata implements ModelInterface, ArrayAccess, \JsonSerializab /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -110,12 +122,14 @@ class PaginationMetadata implements ModelInterface, ArrayAccess, \JsonSerializab /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -162,6 +176,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -170,6 +185,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -178,6 +194,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -187,6 +204,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -195,6 +213,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -203,6 +222,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -222,6 +242,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -230,6 +251,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -239,6 +261,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -247,6 +270,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -264,6 +288,7 @@ public function listInvalidProperties() { /** * Gets has_next_page + * * @return bool */ public function getHasNextPage() { @@ -288,6 +313,7 @@ public function setHasNextPage( $has_next_page ) { /** * Gets has_prev_page + * * @return bool */ public function getHasPrevPage() { @@ -312,6 +338,7 @@ public function setHasPrevPage( $has_prev_page ) { /** * Gets links + * * @return \Plausible\Analytics\WP\Client\Model\PaginationMetadataLinks|null */ public function getLinks() { @@ -386,7 +413,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -397,6 +426,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -408,6 +438,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/PaginationMetadataLinks.php b/src/Client/lib/Model/PaginationMetadataLinks.php index 66a69b9e..6dd686ac 100644 --- a/src/Client/lib/Model/PaginationMetadataLinks.php +++ b/src/Client/lib/Model/PaginationMetadataLinks.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -66,6 +74,7 @@ class PaginationMetadataLinks implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -76,6 +85,7 @@ class PaginationMetadataLinks implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -85,6 +95,7 @@ class PaginationMetadataLinks implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -94,6 +105,7 @@ class PaginationMetadataLinks implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -103,12 +115,14 @@ class PaginationMetadataLinks implements ModelInterface, ArrayAccess, \JsonSeria /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -154,6 +168,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -162,6 +177,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -170,6 +186,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -179,6 +196,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -187,6 +205,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -195,6 +214,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -214,6 +234,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -222,6 +243,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -231,6 +253,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -239,6 +262,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -249,6 +273,7 @@ public function listInvalidProperties() { /** * Gets next + * * @return \Plausible\Analytics\WP\Client\Model\Link|null */ public function getNext() { @@ -273,6 +298,7 @@ public function setNext( $next ) { /** * Gets prev + * * @return \Plausible\Analytics\WP\Client\Model\Link|null */ public function getPrev() { @@ -347,7 +373,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -358,6 +386,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -369,6 +398,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/PaymentRequiredError.php b/src/Client/lib/Model/PaymentRequiredError.php index c3328910..48312dc1 100644 --- a/src/Client/lib/Model/PaymentRequiredError.php +++ b/src/Client/lib/Model/PaymentRequiredError.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class PaymentRequiredError implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class PaymentRequiredError implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class PaymentRequiredError implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class PaymentRequiredError implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class PaymentRequiredError implements ModelInterface, ArrayAccess, \JsonSerializ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets errors + * * @return \Plausible\Analytics\WP\Client\Model\Error[] */ public function getErrors() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/SharedLink.php b/src/Client/lib/Model/SharedLink.php index a41b5d75..432084c5 100644 --- a/src/Client/lib/Model/SharedLink.php +++ b/src/Client/lib/Model/SharedLink.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class SharedLink implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class SharedLink implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class SharedLink implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class SharedLink implements ModelInterface, ArrayAccess, \JsonSerializable { /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class SharedLink implements ModelInterface, ArrayAccess, \JsonSerializable { /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets shared_link + * * @return \Plausible\Analytics\WP\Client\Model\SharedLinkSharedLink */ public function getSharedLink() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/SharedLinkCreateRequest.php b/src/Client/lib/Model/SharedLinkCreateRequest.php index dbc80042..1fb8466a 100644 --- a/src/Client/lib/Model/SharedLinkCreateRequest.php +++ b/src/Client/lib/Model/SharedLinkCreateRequest.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class SharedLinkCreateRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class SharedLinkCreateRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class SharedLinkCreateRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class SharedLinkCreateRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class SharedLinkCreateRequest implements ModelInterface, ArrayAccess, \JsonSeria /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets shared_link + * * @return \Plausible\Analytics\WP\Client\Model\SharedLinkCreateRequestSharedLink */ public function getSharedLink() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php b/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php index 0d99f04d..ff0b0787 100644 --- a/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php +++ b/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -66,6 +74,7 @@ class SharedLinkCreateRequestSharedLink implements ModelInterface, ArrayAccess, /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -76,6 +85,7 @@ class SharedLinkCreateRequestSharedLink implements ModelInterface, ArrayAccess, /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -85,6 +95,7 @@ class SharedLinkCreateRequestSharedLink implements ModelInterface, ArrayAccess, /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -94,6 +105,7 @@ class SharedLinkCreateRequestSharedLink implements ModelInterface, ArrayAccess, /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -103,12 +115,14 @@ class SharedLinkCreateRequestSharedLink implements ModelInterface, ArrayAccess, /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -154,6 +168,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -162,6 +177,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -170,6 +186,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -179,6 +196,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -187,6 +205,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -195,6 +214,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -214,6 +234,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -222,6 +243,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -231,6 +253,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -239,6 +262,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -253,6 +277,7 @@ public function listInvalidProperties() { /** * Gets name + * * @return string */ public function getName() { @@ -277,6 +302,7 @@ public function setName( $name ) { /** * Gets password + * * @return string|null */ public function getPassword() { @@ -351,7 +377,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -362,6 +390,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -373,6 +402,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/SharedLinkListResponse.php b/src/Client/lib/Model/SharedLinkListResponse.php index f736e91e..fe0eac49 100644 --- a/src/Client/lib/Model/SharedLinkListResponse.php +++ b/src/Client/lib/Model/SharedLinkListResponse.php @@ -1,7 +1,9 @@ '\Plausible\Analytics\WP\Client\Model\GoalListResponseMeta', + 'meta' => '\Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta', 'shared_links' => '\Plausible\Analytics\WP\Client\Model\SharedLink[]', ]; /** * Array of property to format mappings. Used for (de)serialization + * * @var string[] * @phpstan-var array * @psalm-var array @@ -67,6 +75,7 @@ class SharedLinkListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -77,6 +86,7 @@ class SharedLinkListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -86,6 +96,7 @@ class SharedLinkListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -95,6 +106,7 @@ class SharedLinkListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -104,12 +116,14 @@ class SharedLinkListResponse implements ModelInterface, ArrayAccess, \JsonSerial /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -155,6 +169,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -163,6 +178,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -171,6 +187,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -180,6 +197,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -188,6 +206,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -196,6 +215,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -215,6 +235,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -223,6 +244,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -232,6 +254,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -240,6 +263,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -257,7 +281,8 @@ public function listInvalidProperties() { /** * Gets meta - * @return \Plausible\Analytics\WP\Client\Model\GoalListResponseMeta + * + * @return \Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta */ public function getMeta() { return $this->container[ 'meta' ]; @@ -266,7 +291,7 @@ public function getMeta() { /** * Sets meta * - * @param \Plausible\Analytics\WP\Client\Model\GoalListResponseMeta $meta meta + * @param \Plausible\Analytics\WP\Client\Model\FunnelListResponseMeta $meta meta * * @return self */ @@ -281,6 +306,7 @@ public function setMeta( $meta ) { /** * Gets shared_links + * * @return \Plausible\Analytics\WP\Client\Model\SharedLink[] */ public function getSharedLinks() { @@ -355,7 +381,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -366,6 +394,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -377,6 +406,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/SharedLinkSharedLink.php b/src/Client/lib/Model/SharedLinkSharedLink.php index d3842014..da800d13 100644 --- a/src/Client/lib/Model/SharedLinkSharedLink.php +++ b/src/Client/lib/Model/SharedLinkSharedLink.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -70,6 +78,7 @@ class SharedLinkSharedLink implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -82,6 +91,7 @@ class SharedLinkSharedLink implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -93,6 +103,7 @@ class SharedLinkSharedLink implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -104,6 +115,7 @@ class SharedLinkSharedLink implements ModelInterface, ArrayAccess, \JsonSerializ /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -115,12 +127,14 @@ class SharedLinkSharedLink implements ModelInterface, ArrayAccess, \JsonSerializ /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -168,6 +182,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -176,6 +191,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -184,6 +200,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -193,6 +210,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -201,6 +219,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -209,6 +228,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -228,6 +248,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -236,6 +257,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -245,6 +267,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -253,6 +276,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -276,6 +300,7 @@ public function listInvalidProperties() { /** * Gets href + * * @return string */ public function getHref() { @@ -300,6 +325,7 @@ public function setHref( $href ) { /** * Gets id + * * @return int */ public function getId() { @@ -324,6 +350,7 @@ public function setId( $id ) { /** * Gets name + * * @return string */ public function getName() { @@ -348,6 +375,7 @@ public function setName( $name ) { /** * Gets password_protected + * * @return bool */ public function getPasswordProtected() { @@ -422,7 +450,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -433,6 +463,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -444,6 +475,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/UnauthorizedError.php b/src/Client/lib/Model/UnauthorizedError.php index d2a06fd1..66bfc71c 100644 --- a/src/Client/lib/Model/UnauthorizedError.php +++ b/src/Client/lib/Model/UnauthorizedError.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class UnauthorizedError implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class UnauthorizedError implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class UnauthorizedError implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class UnauthorizedError implements ModelInterface, ArrayAccess, \JsonSerializabl /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class UnauthorizedError implements ModelInterface, ArrayAccess, \JsonSerializabl /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets errors + * * @return \Plausible\Analytics\WP\Client\Model\Error[] */ public function getErrors() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/Model/UnprocessableEntityError.php b/src/Client/lib/Model/UnprocessableEntityError.php index a9e54591..71ca9cc4 100644 --- a/src/Client/lib/Model/UnprocessableEntityError.php +++ b/src/Client/lib/Model/UnprocessableEntityError.php @@ -1,7 +1,9 @@ * @psalm-var array @@ -65,6 +73,7 @@ class UnprocessableEntityError implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of nullable properties. Used for (de)serialization + * * @var boolean[] */ protected static array $openAPINullables = [ @@ -74,6 +83,7 @@ class UnprocessableEntityError implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes where the key is the local name, * and the value is the original name + * * @var string[] */ protected static $attributeMap = [ @@ -82,6 +92,7 @@ class UnprocessableEntityError implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to setter functions (for deserialization of responses) + * * @var string[] */ protected static $setters = [ @@ -90,6 +101,7 @@ class UnprocessableEntityError implements ModelInterface, ArrayAccess, \JsonSeri /** * Array of attributes to getter functions (for serialization of requests) + * * @var string[] */ protected static $getters = [ @@ -98,12 +110,14 @@ class UnprocessableEntityError implements ModelInterface, ArrayAccess, \JsonSeri /** * If a nullable field gets set to null, insert it here + * * @var boolean[] */ protected array $openAPINullablesSetToNull = []; /** * Associative array for storing property values + * * @var mixed[] */ protected $container = []; @@ -148,6 +162,7 @@ public static function isNullable( string $property ): bool { /** * Array of nullable properties + * * @return array */ protected static function openAPINullables(): array { @@ -156,6 +171,7 @@ protected static function openAPINullables(): array { /** * Array of property to type mappings. Used for (de)serialization + * * @return array */ public static function openAPITypes() { @@ -164,6 +180,7 @@ public static function openAPITypes() { /** * Array of property to format mappings. Used for (de)serialization + * * @return array */ public static function openAPIFormats() { @@ -173,6 +190,7 @@ public static function openAPIFormats() { /** * Array of attributes where the key is the local name, * and the value is the original name + * * @return array */ public static function attributeMap() { @@ -181,6 +199,7 @@ public static function attributeMap() { /** * Array of attributes to setter functions (for deserialization of responses) + * * @return array */ public static function setters() { @@ -189,6 +208,7 @@ public static function setters() { /** * Array of attributes to getter functions (for serialization of requests) + * * @return array */ public static function getters() { @@ -208,6 +228,7 @@ public function isNullableSetToNull( string $property ): bool { /** * Array of nullable field names deliberately set to null + * * @return boolean[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,6 +237,7 @@ private function getOpenAPINullablesSetToNull(): array { /** * The original name of the model. + * * @return string */ public function getModelName() { @@ -225,6 +247,7 @@ public function getModelName() { /** * Validate all the properties in the model * return true if all passed + * * @return bool True if all properties are valid */ public function valid() { @@ -233,6 +256,7 @@ public function valid() { /** * Show all the invalid properties with reasons. + * * @return array invalid properties with reasons */ public function listInvalidProperties() { @@ -247,6 +271,7 @@ public function listInvalidProperties() { /** * Gets errors + * * @return \Plausible\Analytics\WP\Client\Model\Error[] */ public function getErrors() { @@ -321,7 +346,9 @@ public function offsetUnset( $offset ): void { /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * * @return mixed Returns data which can be serialized by json_encode(), which is a value * of any type other than a resource. */ @@ -332,6 +359,7 @@ public function jsonSerialize() { /** * Gets the string presentation of the object + * * @return string */ public function __toString() { @@ -343,6 +371,7 @@ public function __toString() { /** * Gets a header-safe presentation of the object + * * @return string */ public function toHeaderValue() { diff --git a/src/Client/lib/ObjectSerializer.php b/src/Client/lib/ObjectSerializer.php index 83680f67..667117bc 100644 --- a/src/Client/lib/ObjectSerializer.php +++ b/src/Client/lib/ObjectSerializer.php @@ -1,7 +1,9 @@