From 8104abdc69971b5745ce66aafe094175e8435d93 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 16 Apr 2025 16:21:55 +0300 Subject: [PATCH] Codegen: Marketing Events --- .../Events/Api/AddEventAttendeesApi.php | 132 +++++----- codegen/Marketing/Events/Api/BasicApi.php | 231 ++++++++-------- codegen/Marketing/Events/Api/BatchApi.php | 99 ++++--- .../Events/Api/ChangePropertyApi.php | 62 ++--- .../Marketing/Events/Api/IdentifiersApi.php | 62 ++--- .../Events/Api/ListAssociationsApi.php | 110 +++----- .../Api/RetrieveParticipantStateApi.php | 247 +++++++++--------- codegen/Marketing/Events/Api/SettingsApi.php | 62 ++--- .../Events/Api/SubscriberStateChangesApi.php | 62 ++--- codegen/Marketing/Events/ApiException.php | 8 +- codegen/Marketing/Events/Configuration.php | 4 +- codegen/Marketing/Events/HeaderSelector.php | 32 ++- codegen/Marketing/Events/Model/AppInfo.php | 6 +- .../Events/Model/AttendanceCounters.php | 6 +- ...InputMarketingEventCreateRequestParams.php | 6 +- ...atchInputMarketingEventEmailSubscriber.php | 6 +- ...MarketingEventExternalUniqueIdentifier.php | 6 +- ...ketingEventPublicObjectIdDeleteRequest.php | 6 +- ...arketingEventPublicUpdateRequestFullV2.php | 6 +- .../BatchInputMarketingEventSubscriber.php | 6 +- ...nseMarketingEventPublicDefaultResponse.php | 6 +- ...eMarketingEventPublicDefaultResponseV2.php | 6 +- ...EventPublicDefaultResponseV2WithErrors.php | 6 +- .../BatchResponseSubscriberEmailResponse.php | 6 +- .../BatchResponseSubscriberVidResponse.php | 6 +- ...EventPublicReadResponseV2ForwardPaging.php | 6 +- ...nseSearchPublicResponseWrapperNoPaging.php | 6 +- ...ketingEventIdentifiersResponseNoPaging.php | 6 +- ...talParticipationBreakdownForwardPaging.php | 6 +- ...ionResponseWithTotalPublicListNoPaging.php | 6 +- .../Events/Model/ContactAssociation.php | 6 +- .../Events/Model/CrmPropertyWrapper.php | 6 +- codegen/Marketing/Events/Model/Error.php | 6 +- .../Marketing/Events/Model/ErrorDetail.php | 6 +- .../Events/Model/EventDetailSettings.php | 6 +- .../Events/Model/EventDetailSettingsUrl.php | 6 +- .../Marketing/Events/Model/ForwardPaging.php | 6 +- .../Model/MarketingEventAssociation.php | 6 +- .../MarketingEventCompleteRequestParams.php | 6 +- .../MarketingEventCreateRequestParams.php | 6 +- .../Model/MarketingEventDefaultResponse.php | 6 +- .../Model/MarketingEventEmailSubscriber.php | 6 +- ...MarketingEventExternalUniqueIdentifier.php | 6 +- .../MarketingEventIdentifiersResponse.php | 6 +- .../MarketingEventPublicDefaultResponse.php | 6 +- .../MarketingEventPublicDefaultResponseV2.php | 6 +- ...ketingEventPublicObjectIdDeleteRequest.php | 6 +- .../MarketingEventPublicReadResponse.php | 6 +- .../MarketingEventPublicReadResponseV2.php | 6 +- ...arketingEventPublicUpdateRequestFullV2.php | 6 +- .../MarketingEventPublicUpdateRequestV2.php | 6 +- .../Events/Model/MarketingEventSubscriber.php | 6 +- .../MarketingEventUpdateRequestParams.php | 6 +- .../Marketing/Events/Model/ModelInterface.php | 2 +- codegen/Marketing/Events/Model/NextPage.php | 6 +- .../Model/ParticipationAssociations.php | 6 +- .../Events/Model/ParticipationBreakdown.php | 6 +- .../Events/Model/ParticipationProperties.php | 6 +- .../Marketing/Events/Model/PropertyValue.php | 6 +- codegen/Marketing/Events/Model/PublicList.php | 6 +- .../Model/SearchPublicResponseWrapper.php | 6 +- .../Marketing/Events/Model/StandardError.php | 6 +- .../Events/Model/SubscriberEmailResponse.php | 6 +- .../Events/Model/SubscriberVidResponse.php | 6 +- codegen/Marketing/Events/ObjectSerializer.php | 98 +++++-- 65 files changed, 770 insertions(+), 747 deletions(-) diff --git a/codegen/Marketing/Events/Api/AddEventAttendeesApi.php b/codegen/Marketing/Events/Api/AddEventAttendeesApi.php index e65b94a27..2fff0f275 100644 --- a/codegen/Marketing/Events/Api/AddEventAttendeesApi.php +++ b/codegen/Marketing/Events/Api/AddEventAttendeesApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -92,13 +92,13 @@ class AddEventAttendeesApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -139,7 +139,7 @@ public function getConfig() * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventEmailSubscriber $batch_input_marketing_event_email_subscriber batch_input_marketing_event_email_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactEmails'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -160,7 +160,7 @@ public function recordByContactEmails($external_event_id, $subscriber_state, $ba * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventEmailSubscriber $batch_input_marketing_event_email_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactEmails'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -193,18 +193,6 @@ public function recordByContactEmailsWithHttpInfo($external_event_id, $subscribe $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: @@ -263,6 +251,19 @@ public function recordByContactEmailsWithHttpInfo($external_event_id, $subscribe ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseSubscriberEmailResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -322,7 +323,7 @@ public function recordByContactEmailsWithHttpInfo($external_event_id, $subscribe * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventEmailSubscriber $batch_input_marketing_event_email_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactEmails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -346,7 +347,7 @@ function ($response) { * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventEmailSubscriber $batch_input_marketing_event_email_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactEmails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -399,7 +400,7 @@ function ($exception) { * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventEmailSubscriber $batch_input_marketing_event_email_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactEmails'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -591,18 +592,6 @@ public function recordByContactIdWithHttpInfo($object_id, $subscriber_state, $ba $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: @@ -661,6 +650,19 @@ public function recordByContactIdWithHttpInfo($object_id, $subscriber_state, $ba ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseSubscriberVidResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -924,7 +926,7 @@ public function recordByContactIdRequest($object_id, $subscriber_state, $batch_i * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventSubscriber $batch_input_marketing_event_subscriber batch_input_marketing_event_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactIds'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -945,7 +947,7 @@ public function recordByContactIds($external_event_id, $subscriber_state, $batch * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventSubscriber $batch_input_marketing_event_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactIds'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -978,18 +980,6 @@ public function recordByContactIdsWithHttpInfo($external_event_id, $subscriber_s $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: @@ -1048,6 +1038,19 @@ public function recordByContactIdsWithHttpInfo($external_event_id, $subscriber_s ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseSubscriberVidResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1107,7 +1110,7 @@ public function recordByContactIdsWithHttpInfo($external_event_id, $subscriber_s * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventSubscriber $batch_input_marketing_event_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactIds'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1131,7 +1134,7 @@ function ($response) { * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventSubscriber $batch_input_marketing_event_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactIds'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1184,7 +1187,7 @@ function ($exception) { * @param string $external_event_id The id of the marketing event in the external event application (required) * @param string $subscriber_state The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. (required) * @param \HubSpot\Client\Marketing\Events\Model\BatchInputMarketingEventSubscriber $batch_input_marketing_event_subscriber (required) - * @param string $external_account_id The accountId that is associated with this marketing event in the external event application (optional) + * @param string|null $external_account_id The accountId that is associated with this marketing event in the external event application (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['recordByContactIds'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1376,18 +1379,6 @@ public function recordByEmailWithHttpInfo($object_id, $subscriber_state, $batch_ $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: @@ -1446,6 +1437,19 @@ public function recordByEmailWithHttpInfo($object_id, $subscriber_state, $batch_ ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseSubscriberEmailResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/BasicApi.php b/codegen/Marketing/Events/Api/BasicApi.php index 1d2dc44cb..b4a631299 100644 --- a/codegen/Marketing/Events/Api/BasicApi.php +++ b/codegen/Marketing/Events/Api/BasicApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -107,13 +107,13 @@ class BasicApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -203,18 +203,6 @@ public function archiveWithHttpInfo($external_event_id, $external_account_id, st $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -463,18 +451,6 @@ public function archiveByObjectIdWithHttpInfo($object_id, string $contentType = $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -705,18 +681,6 @@ public function createWithHttpInfo($marketing_event_create_request_params, strin $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: @@ -775,6 +739,19 @@ public function createWithHttpInfo($marketing_event_create_request_params, strin ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventDefaultResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -999,8 +976,8 @@ public function createRequest($marketing_event_create_request_params, string $co * * Get all marketing event * - * @param string $after The cursor indicating the position of the last retrieved item. (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -1018,8 +995,8 @@ public function getAll($after = null, $limit = 10, string $contentType = self::c * * Get all marketing event * - * @param string $after The cursor indicating the position of the last retrieved item. (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -1052,18 +1029,6 @@ public function getAllWithHttpInfo($after = null, $limit = 10, string $contentTy $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: @@ -1122,6 +1087,19 @@ public function getAllWithHttpInfo($after = null, $limit = 10, string $contentTy ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1178,8 +1156,8 @@ public function getAllWithHttpInfo($after = null, $limit = 10, string $contentTy * * Get all marketing event * - * @param string $after The cursor indicating the position of the last retrieved item. (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1200,8 +1178,8 @@ function ($response) { * * Get all marketing event * - * @param string $after The cursor indicating the position of the last retrieved item. (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1251,8 +1229,8 @@ function ($exception) { /** * Create request for operation 'getAll' * - * @param string $after The cursor indicating the position of the last retrieved item. (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1406,18 +1384,6 @@ public function getByObjectIdWithHttpInfo($object_id, string $contentType = self $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: @@ -1476,6 +1442,19 @@ public function getByObjectIdWithHttpInfo($object_id, string $contentType = self ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventPublicReadResponseV2'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1754,18 +1733,6 @@ public function getDetailsWithHttpInfo($external_event_id, $external_account_id, $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: @@ -1824,6 +1791,19 @@ public function getDetailsWithHttpInfo($external_event_id, $external_account_id, ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventPublicReadResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -2123,18 +2103,6 @@ public function updateWithHttpInfo($external_event_id, $external_account_id, $ma $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: @@ -2193,6 +2161,19 @@ public function updateWithHttpInfo($external_event_id, $external_account_id, $ma ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventPublicDefaultResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -2507,18 +2488,6 @@ public function updateByObjectIdWithHttpInfo($object_id, $marketing_event_public $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: @@ -2577,6 +2546,19 @@ public function updateByObjectIdWithHttpInfo($object_id, $marketing_event_public ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventPublicDefaultResponseV2'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -2872,18 +2854,6 @@ public function upsertWithHttpInfo($external_event_id, $marketing_event_create_r $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: @@ -2942,6 +2912,19 @@ public function upsertWithHttpInfo($external_event_id, $marketing_event_create_r ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventPublicDefaultResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/BatchApi.php b/codegen/Marketing/Events/Api/BatchApi.php index e82e3756f..9c815b875 100644 --- a/codegen/Marketing/Events/Api/BatchApi.php +++ b/codegen/Marketing/Events/Api/BatchApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -92,13 +92,13 @@ class BatchApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -187,18 +187,6 @@ public function archiveWithHttpInfo($batch_input_marketing_event_external_unique $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) { default: @@ -230,6 +218,19 @@ public function archiveWithHttpInfo($batch_input_marketing_event_external_unique ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\Error'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -496,18 +497,6 @@ public function archiveByObjectIdWithHttpInfo($batch_input_marketing_event_publi $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -737,18 +726,6 @@ public function updateByObjectIdWithHttpInfo($batch_input_marketing_event_public $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: @@ -834,6 +811,19 @@ public function updateByObjectIdWithHttpInfo($batch_input_marketing_event_public ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseMarketingEventPublicDefaultResponseV2'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1117,18 +1107,6 @@ public function upsertWithHttpInfo($batch_input_marketing_event_create_request_p $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: @@ -1187,6 +1165,19 @@ public function upsertWithHttpInfo($batch_input_marketing_event_create_request_p ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseMarketingEventPublicDefaultResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/ChangePropertyApi.php b/codegen/Marketing/Events/Api/ChangePropertyApi.php index 00a82329b..ebcaec649 100644 --- a/codegen/Marketing/Events/Api/ChangePropertyApi.php +++ b/codegen/Marketing/Events/Api/ChangePropertyApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -86,13 +86,13 @@ class ChangePropertyApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -183,18 +183,6 @@ public function cancelWithHttpInfo($external_event_id, $external_account_id, str $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: @@ -253,6 +241,19 @@ public function cancelWithHttpInfo($external_event_id, $external_account_id, str ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventDefaultResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -552,18 +553,6 @@ public function completeWithHttpInfo($external_event_id, $external_account_id, $ $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: @@ -622,6 +611,19 @@ public function completeWithHttpInfo($external_event_id, $external_account_id, $ ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventDefaultResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/IdentifiersApi.php b/codegen/Marketing/Events/Api/IdentifiersApi.php index bd2570362..130ca9135 100644 --- a/codegen/Marketing/Events/Api/IdentifiersApi.php +++ b/codegen/Marketing/Events/Api/IdentifiersApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -86,13 +86,13 @@ class IdentifiersApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -181,18 +181,6 @@ public function doSearchWithHttpInfo($q, string $contentType = self::contentType $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: @@ -251,6 +239,19 @@ public function doSearchWithHttpInfo($q, string $contentType = self::contentType ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseSearchPublicResponseWrapperNoPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -528,18 +529,6 @@ public function searchPortalEventsWithHttpInfo($external_event_id, string $conte $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: @@ -598,6 +587,19 @@ public function searchPortalEventsWithHttpInfo($external_event_id, string $conte ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/ListAssociationsApi.php b/codegen/Marketing/Events/Api/ListAssociationsApi.php index 82ccc4c43..0405ab1b4 100644 --- a/codegen/Marketing/Events/Api/ListAssociationsApi.php +++ b/codegen/Marketing/Events/Api/ListAssociationsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -98,13 +98,13 @@ class ListAssociationsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -196,18 +196,6 @@ public function associateByExternalAccountAndEventIdsWithHttpInfo($external_acco $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -475,18 +463,6 @@ public function associateByMarketingEventIdWithHttpInfo($marketing_event_id, $li $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -738,18 +714,6 @@ public function disassociateByExternalAccountAndEventIdsWithHttpInfo($external_a $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -1017,18 +981,6 @@ public function disassociateByMarketingEventIdWithHttpInfo($marketing_event_id, $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() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -1279,18 +1231,6 @@ public function getAllByExternalAccountAndEventIdsWithHttpInfo($external_account $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: @@ -1349,6 +1289,19 @@ public function getAllByExternalAccountAndEventIdsWithHttpInfo($external_account ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalPublicListNoPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1643,18 +1596,6 @@ public function getAllByMarketingEventIdWithHttpInfo($marketing_event_id, string $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: @@ -1713,6 +1654,19 @@ public function getAllByMarketingEventIdWithHttpInfo($marketing_event_id, string ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalPublicListNoPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/RetrieveParticipantStateApi.php b/codegen/Marketing/Events/Api/RetrieveParticipantStateApi.php index 960764c3c..2f65019b2 100644 --- a/codegen/Marketing/Events/Api/RetrieveParticipantStateApi.php +++ b/codegen/Marketing/Events/Api/RetrieveParticipantStateApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -95,13 +95,13 @@ class RetrieveParticipantStateApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -140,9 +140,9 @@ public function getConfig() * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -161,9 +161,9 @@ public function getParticipationsBreakdownByContactId($contact_identifier, $stat * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -196,18 +196,6 @@ public function getParticipationsBreakdownByContactIdWithHttpInfo($contact_ident $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: @@ -266,6 +254,19 @@ public function getParticipationsBreakdownByContactIdWithHttpInfo($contact_ident ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdownForwardPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -323,9 +324,9 @@ public function getParticipationsBreakdownByContactIdWithHttpInfo($contact_ident * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -347,9 +348,9 @@ function ($response) { * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -400,9 +401,9 @@ function ($exception) { * Create request for operation 'getParticipationsBreakdownByContactId' * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -532,10 +533,10 @@ public function getParticipationsBreakdownByContactIdRequest($contact_identifier * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -555,10 +556,10 @@ public function getParticipationsBreakdownByExternalEventId($external_account_id * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -591,18 +592,6 @@ public function getParticipationsBreakdownByExternalEventIdWithHttpInfo($externa $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: @@ -661,6 +650,19 @@ public function getParticipationsBreakdownByExternalEventIdWithHttpInfo($externa ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdownForwardPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -719,10 +721,10 @@ public function getParticipationsBreakdownByExternalEventIdWithHttpInfo($externa * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -745,10 +747,10 @@ function ($response) { * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -800,10 +802,10 @@ function ($exception) { * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -957,10 +959,10 @@ public function getParticipationsBreakdownByExternalEventIdRequest($external_acc * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -979,10 +981,10 @@ public function getParticipationsBreakdownByMarketingEventId($marketing_event_id * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format @@ -1015,18 +1017,6 @@ public function getParticipationsBreakdownByMarketingEventIdWithHttpInfo($market $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: @@ -1085,6 +1075,19 @@ public function getParticipationsBreakdownByMarketingEventIdWithHttpInfo($market ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdownForwardPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1142,10 +1145,10 @@ public function getParticipationsBreakdownByMarketingEventIdWithHttpInfo($market * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1167,10 +1170,10 @@ function ($response) { * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1221,10 +1224,10 @@ function ($exception) { * Create request for operation 'getParticipationsBreakdownByMarketingEventId' * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param string $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) - * @param int $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) - * @param string $after The cursor indicating the position of the last retrieved item. (optional) + * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) + * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1415,18 +1418,6 @@ public function getParticipationsCountersByEventExternalIdWithHttpInfo($external $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: @@ -1485,6 +1476,19 @@ public function getParticipationsCountersByEventExternalIdWithHttpInfo($external ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\AttendanceCounters'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1779,18 +1783,6 @@ public function getParticipationsCountersByMarketingEventIdWithHttpInfo($marketi $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: @@ -1849,6 +1841,19 @@ public function getParticipationsCountersByMarketingEventIdWithHttpInfo($marketi ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\AttendanceCounters'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/SettingsApi.php b/codegen/Marketing/Events/Api/SettingsApi.php index 077079ddb..98770965b 100644 --- a/codegen/Marketing/Events/Api/SettingsApi.php +++ b/codegen/Marketing/Events/Api/SettingsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -86,13 +86,13 @@ class SettingsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -181,18 +181,6 @@ public function getAllWithHttpInfo($app_id, string $contentType = self::contentT $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: @@ -251,6 +239,19 @@ public function getAllWithHttpInfo($app_id, string $contentType = self::contentT ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\EventDetailSettings'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -530,18 +531,6 @@ public function updateWithHttpInfo($app_id, $event_detail_settings_url, string $ $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: @@ -600,6 +589,19 @@ public function updateWithHttpInfo($app_id, $event_detail_settings_url, string $ ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\EventDetailSettings'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/Api/SubscriberStateChangesApi.php b/codegen/Marketing/Events/Api/SubscriberStateChangesApi.php index 82bbf24c7..74324a310 100644 --- a/codegen/Marketing/Events/Api/SubscriberStateChangesApi.php +++ b/codegen/Marketing/Events/Api/SubscriberStateChangesApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -86,13 +86,13 @@ class SubscriberStateChangesApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -187,18 +187,6 @@ public function upsertByContactEmailWithHttpInfo($external_event_id, $subscriber $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) { default: @@ -230,6 +218,19 @@ public function upsertByContactEmailWithHttpInfo($external_event_id, $subscriber ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\Error'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -558,18 +559,6 @@ public function upsertByContactIdWithHttpInfo($external_event_id, $subscriber_st $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) { default: @@ -601,6 +590,19 @@ public function upsertByContactIdWithHttpInfo($external_event_id, $subscriber_st ]; } + 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() + ); + } + $returnType = '\HubSpot\Client\Marketing\Events\Model\Error'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer diff --git a/codegen/Marketing/Events/ApiException.php b/codegen/Marketing/Events/ApiException.php index 5cf35c9bf..bd2a62f0e 100644 --- a/codegen/Marketing/Events/ApiException.php +++ b/codegen/Marketing/Events/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -49,7 +49,7 @@ class ApiException extends Exception /** * The HTTP header of the server response. * - * @var string[]|null + * @var string[][]|null */ protected $responseHeaders; @@ -65,7 +65,7 @@ class ApiException extends Exception * * @param string $message Error message * @param int $code HTTP status code - * @param string[]|null $responseHeaders HTTP response header + * @param string[][]|null $responseHeaders HTTP response header * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string */ public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) @@ -78,7 +78,7 @@ public function __construct($message = "", $code = 0, $responseHeaders = [], $re /** * Gets the HTTP response header * - * @return string[]|null HTTP response header + * @return string[][]|null HTTP response header */ public function getResponseHeaders() { diff --git a/codegen/Marketing/Events/Configuration.php b/codegen/Marketing/Events/Configuration.php index 5b02fa120..84e958096 100644 --- a/codegen/Marketing/Events/Configuration.php +++ b/codegen/Marketing/Events/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -486,7 +486,7 @@ public function getHostSettings() * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/codegen/Marketing/Events/HeaderSelector.php b/codegen/Marketing/Events/HeaderSelector.php index e9ecfbf1e..73df0cae4 100644 --- a/codegen/Marketing/Events/HeaderSelector.php +++ b/codegen/Marketing/Events/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -85,7 +85,7 @@ private function selectAcceptHeader(array $accept): ?string } # If none of the available Accept headers is of type "json", then just use all them - $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + $headersWithJson = $this->selectJsonMimeList($accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } @@ -95,6 +95,34 @@ private function selectAcceptHeader(array $accept): ?string return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } + /** + * Detects whether a string contains a valid JSON mime type + * + * @param string $searchString + * @return bool + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + * + * @param array $mimeList + * @return array + */ + private function selectJsonMimeList(array $mimeList): array { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + + /** * Create an Accept header string from the given "Accept" headers array, recalculating all weights * diff --git a/codegen/Marketing/Events/Model/AppInfo.php b/codegen/Marketing/Events/Model/AppInfo.php index 8843362d9..f7afdd6a3 100644 --- a/codegen/Marketing/Events/Model/AppInfo.php +++ b/codegen/Marketing/Events/Model/AppInfo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/AttendanceCounters.php b/codegen/Marketing/Events/Model/AttendanceCounters.php index ca9a1d835..71c13cfe6 100644 --- a/codegen/Marketing/Events/Model/AttendanceCounters.php +++ b/codegen/Marketing/Events/Model/AttendanceCounters.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('attended', $data ?? [], null); $this->setIfExists('registered', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/BatchInputMarketingEventCreateRequestParams.php b/codegen/Marketing/Events/Model/BatchInputMarketingEventCreateRequestParams.php index 30920db61..a18ebe2a2 100644 --- a/codegen/Marketing/Events/Model/BatchInputMarketingEventCreateRequestParams.php +++ b/codegen/Marketing/Events/Model/BatchInputMarketingEventCreateRequestParams.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/BatchInputMarketingEventEmailSubscriber.php b/codegen/Marketing/Events/Model/BatchInputMarketingEventEmailSubscriber.php index b0e2ebffe..d078d77c7 100644 --- a/codegen/Marketing/Events/Model/BatchInputMarketingEventEmailSubscriber.php +++ b/codegen/Marketing/Events/Model/BatchInputMarketingEventEmailSubscriber.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/BatchInputMarketingEventExternalUniqueIdentifier.php b/codegen/Marketing/Events/Model/BatchInputMarketingEventExternalUniqueIdentifier.php index cfb6dfe60..15a559cce 100644 --- a/codegen/Marketing/Events/Model/BatchInputMarketingEventExternalUniqueIdentifier.php +++ b/codegen/Marketing/Events/Model/BatchInputMarketingEventExternalUniqueIdentifier.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicObjectIdDeleteRequest.php b/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicObjectIdDeleteRequest.php index 486b95ace..5f1a52b2e 100644 --- a/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicObjectIdDeleteRequest.php +++ b/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicObjectIdDeleteRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicUpdateRequestFullV2.php b/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicUpdateRequestFullV2.php index 3e86d77ca..c5b572a49 100644 --- a/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicUpdateRequestFullV2.php +++ b/codegen/Marketing/Events/Model/BatchInputMarketingEventPublicUpdateRequestFullV2.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/BatchInputMarketingEventSubscriber.php b/codegen/Marketing/Events/Model/BatchInputMarketingEventSubscriber.php index 72d6be3b7..16f99514a 100644 --- a/codegen/Marketing/Events/Model/BatchInputMarketingEventSubscriber.php +++ b/codegen/Marketing/Events/Model/BatchInputMarketingEventSubscriber.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponse.php b/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponse.php index 57ebf1bc9..461f8e997 100644 --- a/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponse.php +++ b/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -300,10 +300,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2.php b/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2.php index 8c4d744f3..bf7a8cbdf 100644 --- a/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2.php +++ b/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -288,10 +288,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); $this->setIfExists('requested_at', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2WithErrors.php b/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2WithErrors.php index b7069e858..f91c55232 100644 --- a/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2WithErrors.php +++ b/codegen/Marketing/Events/Model/BatchResponseMarketingEventPublicDefaultResponseV2WithErrors.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -300,10 +300,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/BatchResponseSubscriberEmailResponse.php b/codegen/Marketing/Events/Model/BatchResponseSubscriberEmailResponse.php index 350707ab0..0b086d902 100644 --- a/codegen/Marketing/Events/Model/BatchResponseSubscriberEmailResponse.php +++ b/codegen/Marketing/Events/Model/BatchResponseSubscriberEmailResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -300,10 +300,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/BatchResponseSubscriberVidResponse.php b/codegen/Marketing/Events/Model/BatchResponseSubscriberVidResponse.php index 95d874606..0a5afdb04 100644 --- a/codegen/Marketing/Events/Model/BatchResponseSubscriberVidResponse.php +++ b/codegen/Marketing/Events/Model/BatchResponseSubscriberVidResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -300,10 +300,10 @@ public function getStatusAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging.php b/codegen/Marketing/Events/Model/CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging.php index f11843a2e..3950186df 100644 --- a/codegen/Marketing/Events/Model/CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging.php +++ b/codegen/Marketing/Events/Model/CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/CollectionResponseSearchPublicResponseWrapperNoPaging.php b/codegen/Marketing/Events/Model/CollectionResponseSearchPublicResponseWrapperNoPaging.php index 7cf2849b5..9f85f1f2d 100644 --- a/codegen/Marketing/Events/Model/CollectionResponseSearchPublicResponseWrapperNoPaging.php +++ b/codegen/Marketing/Events/Model/CollectionResponseSearchPublicResponseWrapperNoPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('results', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging.php b/codegen/Marketing/Events/Model/CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging.php index 9371aeb78..97fa0fa97 100644 --- a/codegen/Marketing/Events/Model/CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging.php +++ b/codegen/Marketing/Events/Model/CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('total', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/CollectionResponseWithTotalParticipationBreakdownForwardPaging.php b/codegen/Marketing/Events/Model/CollectionResponseWithTotalParticipationBreakdownForwardPaging.php index aae00c9b1..dc2420ed3 100644 --- a/codegen/Marketing/Events/Model/CollectionResponseWithTotalParticipationBreakdownForwardPaging.php +++ b/codegen/Marketing/Events/Model/CollectionResponseWithTotalParticipationBreakdownForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('total', $data ?? [], null); $this->setIfExists('paging', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/CollectionResponseWithTotalPublicListNoPaging.php b/codegen/Marketing/Events/Model/CollectionResponseWithTotalPublicListNoPaging.php index 178b064f0..2292d8d66 100644 --- a/codegen/Marketing/Events/Model/CollectionResponseWithTotalPublicListNoPaging.php +++ b/codegen/Marketing/Events/Model/CollectionResponseWithTotalPublicListNoPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('total', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/ContactAssociation.php b/codegen/Marketing/Events/Model/ContactAssociation.php index 0e13c250b..b1f56f4ef 100644 --- a/codegen/Marketing/Events/Model/ContactAssociation.php +++ b/codegen/Marketing/Events/Model/ContactAssociation.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('firstname', $data ?? [], null); $this->setIfExists('contact_id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/CrmPropertyWrapper.php b/codegen/Marketing/Events/Model/CrmPropertyWrapper.php index 5501e1de3..b53ea2307 100644 --- a/codegen/Marketing/Events/Model/CrmPropertyWrapper.php +++ b/codegen/Marketing/Events/Model/CrmPropertyWrapper.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/Error.php b/codegen/Marketing/Events/Model/Error.php index 52717870f..127570980 100644 --- a/codegen/Marketing/Events/Model/Error.php +++ b/codegen/Marketing/Events/Model/Error.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/ErrorDetail.php b/codegen/Marketing/Events/Model/ErrorDetail.php index 87ca0704f..3c6b53407 100644 --- a/codegen/Marketing/Events/Model/ErrorDetail.php +++ b/codegen/Marketing/Events/Model/ErrorDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/EventDetailSettings.php b/codegen/Marketing/Events/Model/EventDetailSettings.php index 9da8c5ece..189ded874 100644 --- a/codegen/Marketing/Events/Model/EventDetailSettings.php +++ b/codegen/Marketing/Events/Model/EventDetailSettings.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('app_id', $data ?? [], null); $this->setIfExists('event_details_url', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/EventDetailSettingsUrl.php b/codegen/Marketing/Events/Model/EventDetailSettingsUrl.php index 444344966..fa6e72076 100644 --- a/codegen/Marketing/Events/Model/EventDetailSettingsUrl.php +++ b/codegen/Marketing/Events/Model/EventDetailSettingsUrl.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event_details_url', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/ForwardPaging.php b/codegen/Marketing/Events/Model/ForwardPaging.php index ad774cefc..194c92db3 100644 --- a/codegen/Marketing/Events/Model/ForwardPaging.php +++ b/codegen/Marketing/Events/Model/ForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('next', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/MarketingEventAssociation.php b/codegen/Marketing/Events/Model/MarketingEventAssociation.php index 611df3db4..3317026a6 100644 --- a/codegen/Marketing/Events/Model/MarketingEventAssociation.php +++ b/codegen/Marketing/Events/Model/MarketingEventAssociation.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('external_account_id', $data ?? [], null); $this->setIfExists('marketing_event_id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventCompleteRequestParams.php b/codegen/Marketing/Events/Model/MarketingEventCompleteRequestParams.php index 93def327f..90c491a4c 100644 --- a/codegen/Marketing/Events/Model/MarketingEventCompleteRequestParams.php +++ b/codegen/Marketing/Events/Model/MarketingEventCompleteRequestParams.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('start_date_time', $data ?? [], null); $this->setIfExists('end_date_time', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventCreateRequestParams.php b/codegen/Marketing/Events/Model/MarketingEventCreateRequestParams.php index 473486870..53765c28a 100644 --- a/codegen/Marketing/Events/Model/MarketingEventCreateRequestParams.php +++ b/codegen/Marketing/Events/Model/MarketingEventCreateRequestParams.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -305,10 +305,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('start_date_time', $data ?? [], null); $this->setIfExists('custom_properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventDefaultResponse.php b/codegen/Marketing/Events/Model/MarketingEventDefaultResponse.php index e1a65d34f..c8ea6a54b 100644 --- a/codegen/Marketing/Events/Model/MarketingEventDefaultResponse.php +++ b/codegen/Marketing/Events/Model/MarketingEventDefaultResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -299,10 +299,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('start_date_time', $data ?? [], null); $this->setIfExists('custom_properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventEmailSubscriber.php b/codegen/Marketing/Events/Model/MarketingEventEmailSubscriber.php index 323768eb9..ef1d1b774 100644 --- a/codegen/Marketing/Events/Model/MarketingEventEmailSubscriber.php +++ b/codegen/Marketing/Events/Model/MarketingEventEmailSubscriber.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('contact_properties', $data ?? [], null); $this->setIfExists('properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventExternalUniqueIdentifier.php b/codegen/Marketing/Events/Model/MarketingEventExternalUniqueIdentifier.php index 9e970aa8c..a7f257611 100644 --- a/codegen/Marketing/Events/Model/MarketingEventExternalUniqueIdentifier.php +++ b/codegen/Marketing/Events/Model/MarketingEventExternalUniqueIdentifier.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('external_account_id', $data ?? [], null); $this->setIfExists('external_event_id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventIdentifiersResponse.php b/codegen/Marketing/Events/Model/MarketingEventIdentifiersResponse.php index 16f5024ab..868c30ad0 100644 --- a/codegen/Marketing/Events/Model/MarketingEventIdentifiersResponse.php +++ b/codegen/Marketing/Events/Model/MarketingEventIdentifiersResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('external_account_id', $data ?? [], null); $this->setIfExists('external_event_id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponse.php b/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponse.php index 1697e1704..d22877751 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponse.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -317,10 +317,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event_organizer', $data ?? [], null); $this->setIfExists('event_url', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponseV2.php b/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponseV2.php index 7e088213a..9ed9aa704 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponseV2.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicDefaultResponseV2.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -317,10 +317,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event_organizer', $data ?? [], null); $this->setIfExists('event_url', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicObjectIdDeleteRequest.php b/codegen/Marketing/Events/Model/MarketingEventPublicObjectIdDeleteRequest.php index e94a31f5a..977a9ec40 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicObjectIdDeleteRequest.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicObjectIdDeleteRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('object_id', $data ?? [], null); } diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicReadResponse.php b/codegen/Marketing/Events/Model/MarketingEventPublicReadResponse.php index aa1c80da1..426bce3d6 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicReadResponse.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicReadResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -347,10 +347,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('registrants', $data ?? [], null); $this->setIfExists('event_organizer', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicReadResponseV2.php b/codegen/Marketing/Events/Model/MarketingEventPublicReadResponseV2.php index 363f917f3..39289756c 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicReadResponseV2.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicReadResponseV2.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -353,10 +353,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('registrants', $data ?? [], null); $this->setIfExists('event_organizer', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestFullV2.php b/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestFullV2.php index f81739485..252dcf2e0 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestFullV2.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestFullV2.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -293,10 +293,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('start_date_time', $data ?? [], null); $this->setIfExists('custom_properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestV2.php b/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestV2.php index b1beba535..05b736733 100644 --- a/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestV2.php +++ b/codegen/Marketing/Events/Model/MarketingEventPublicUpdateRequestV2.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('start_date_time', $data ?? [], null); $this->setIfExists('custom_properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventSubscriber.php b/codegen/Marketing/Events/Model/MarketingEventSubscriber.php index 1888c9f2f..6e035d3bd 100644 --- a/codegen/Marketing/Events/Model/MarketingEventSubscriber.php +++ b/codegen/Marketing/Events/Model/MarketingEventSubscriber.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -251,10 +251,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('vid', $data ?? [], null); $this->setIfExists('properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/MarketingEventUpdateRequestParams.php b/codegen/Marketing/Events/Model/MarketingEventUpdateRequestParams.php index e974bae69..124b47021 100644 --- a/codegen/Marketing/Events/Model/MarketingEventUpdateRequestParams.php +++ b/codegen/Marketing/Events/Model/MarketingEventUpdateRequestParams.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -293,10 +293,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('start_date_time', $data ?? [], null); $this->setIfExists('custom_properties', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/ModelInterface.php b/codegen/Marketing/Events/Model/ModelInterface.php index 59e6c9b62..bf01195df 100644 --- a/codegen/Marketing/Events/Model/ModelInterface.php +++ b/codegen/Marketing/Events/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** diff --git a/codegen/Marketing/Events/Model/NextPage.php b/codegen/Marketing/Events/Model/NextPage.php index bb9111cc9..b379e343b 100644 --- a/codegen/Marketing/Events/Model/NextPage.php +++ b/codegen/Marketing/Events/Model/NextPage.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('link', $data ?? [], null); $this->setIfExists('after', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/ParticipationAssociations.php b/codegen/Marketing/Events/Model/ParticipationAssociations.php index 1b1115871..b635a4c49 100644 --- a/codegen/Marketing/Events/Model/ParticipationAssociations.php +++ b/codegen/Marketing/Events/Model/ParticipationAssociations.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('marketing_event', $data ?? [], null); $this->setIfExists('contact', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/ParticipationBreakdown.php b/codegen/Marketing/Events/Model/ParticipationBreakdown.php index 4ae136f10..52ab5f3cd 100644 --- a/codegen/Marketing/Events/Model/ParticipationBreakdown.php +++ b/codegen/Marketing/Events/Model/ParticipationBreakdown.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('associations', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/ParticipationProperties.php b/codegen/Marketing/Events/Model/ParticipationProperties.php index 1d12c986a..5ff5fce4f 100644 --- a/codegen/Marketing/Events/Model/ParticipationProperties.php +++ b/codegen/Marketing/Events/Model/ParticipationProperties.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -278,10 +278,10 @@ public function getAttendanceStateAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('occurred_at', $data ?? [], null); $this->setIfExists('attendance_percentage', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/PropertyValue.php b/codegen/Marketing/Events/Model/PropertyValue.php index 894fab15b..93ffe8472 100644 --- a/codegen/Marketing/Events/Model/PropertyValue.php +++ b/codegen/Marketing/Events/Model/PropertyValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -553,10 +553,10 @@ public function getDataSensitivityAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('source_id', $data ?? [], null); $this->setIfExists('selected_by_user', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/PublicList.php b/codegen/Marketing/Events/Model/PublicList.php index 863ab8435..85b6ca939 100644 --- a/codegen/Marketing/Events/Model/PublicList.php +++ b/codegen/Marketing/Events/Model/PublicList.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -311,10 +311,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('processing_type', $data ?? [], null); $this->setIfExists('object_type_id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/SearchPublicResponseWrapper.php b/codegen/Marketing/Events/Model/SearchPublicResponseWrapper.php index 306067e7a..8f5d15e26 100644 --- a/codegen/Marketing/Events/Model/SearchPublicResponseWrapper.php +++ b/codegen/Marketing/Events/Model/SearchPublicResponseWrapper.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('external_account_id', $data ?? [], null); $this->setIfExists('external_event_id', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/StandardError.php b/codegen/Marketing/Events/Model/StandardError.php index b29bda3e2..6e868c1ad 100644 --- a/codegen/Marketing/Events/Model/StandardError.php +++ b/codegen/Marketing/Events/Model/StandardError.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -281,10 +281,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/SubscriberEmailResponse.php b/codegen/Marketing/Events/Model/SubscriberEmailResponse.php index 2b0fedcc2..e400e6fd8 100644 --- a/codegen/Marketing/Events/Model/SubscriberEmailResponse.php +++ b/codegen/Marketing/Events/Model/SubscriberEmailResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('vid', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); diff --git a/codegen/Marketing/Events/Model/SubscriberVidResponse.php b/codegen/Marketing/Events/Model/SubscriberVidResponse.php index 5a8316bbe..9806f1d78 100644 --- a/codegen/Marketing/Events/Model/SubscriberVidResponse.php +++ b/codegen/Marketing/Events/Model/SubscriberVidResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('vid', $data ?? [], null); } diff --git a/codegen/Marketing/Events/ObjectSerializer.php b/codegen/Marketing/Events/ObjectSerializer.php index 7d342f4a3..d02bbea71 100644 --- a/codegen/Marketing/Events/ObjectSerializer.php +++ b/codegen/Marketing/Events/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -58,8 +58,8 @@ public static function setDateTimeFormat($format) * Serialize data * * @param mixed $data the data to serialize - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ @@ -194,6 +194,10 @@ private static function isEmptyValue($value, string $openApiType): bool case 'boolean': return !in_array($value, [false, 0], true); + # For string values, '' is considered empty. + case 'string': + return $value === ''; + # For all the other types, any value at this point can be considered empty. default: return true; @@ -265,6 +269,11 @@ public static function toQueryValue( $value = $flattenArray($value, $paramName); + // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values + if ($openApiType === 'array' && $style === 'deepObject' && $explode) { + return $value; + } + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { return $value; } @@ -338,7 +347,7 @@ public static function toFormValue($value) * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter + * @param float|int|bool|\DateTime $value the value of the parameter * * @return string the header string */ @@ -395,8 +404,7 @@ public static function serializeCollection(array $collection, $style, $allowColl * * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ @@ -473,7 +481,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if ( is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); @@ -546,22 +554,64 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** - * Native `http_build_query` wrapper. - * @see https://www.php.net/manual/en/function.http-build-query - * - * @param array|object $data May be an array or object containing properties. - * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. - * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. - * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. - * - * @return string - */ - public static function buildQuery( - $data, - string $numeric_prefix = '', - ?string $arg_separator = null, - int $encoding_type = \PHP_QUERY_RFC3986 - ): string { - return \GuzzleHttp\Psr7\Query::build($data, $encoding_type); + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 + * with a modification which is described in https://github.com/guzzle/psr7/pull/603 + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ + public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function (string $str): string { + return $str; + }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() + ? function ($v) { return (int) $v; } + : function ($v) { return $v ? 'true' : 'false'; }; + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder((string) $k); + if (!is_array($v)) { + $qs .= $k; + $v = is_bool($v) ? $castBool($v) : $v; + if ($v !== null) { + $qs .= '='.$encoder((string) $v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv !== null) { + $qs .= '='.$encoder((string) $vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; } }