Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 68 additions & 64 deletions codegen/Marketing/Events/Api/AddEventAttendeesApi.php

Large diffs are not rendered by default.

231 changes: 107 additions & 124 deletions codegen/Marketing/Events/Api/BasicApi.php

Large diffs are not rendered by default.

99 changes: 45 additions & 54 deletions codegen/Marketing/Events/Api/BatchApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()];

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
62 changes: 32 additions & 30 deletions codegen/Marketing/Events/Api/ChangePropertyApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
62 changes: 32 additions & 30 deletions codegen/Marketing/Events/Api/IdentifiersApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading