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
62 changes: 19 additions & 43 deletions codegen/Automation/Actions/Api/CallbacksApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: v4
* 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 CallbacksApi
* @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 @@ -128,9 +128,9 @@ public function getConfig()
/**
* Operation complete
*
* Completes a single callback
* Completes a callback
*
* @param string $callback_id callback_id (required)
* @param string $callback_id The ID of the action execution. (required)
* @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request callback_completion_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation
*
Expand All @@ -146,9 +146,9 @@ public function complete($callback_id, $callback_completion_request, string $con
/**
* Operation completeWithHttpInfo
*
* Completes a single callback
* Completes a callback
*
* @param string $callback_id (required)
* @param string $callback_id The ID of the action execution. (required)
* @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation
*
Expand Down Expand Up @@ -182,18 +182,6 @@ public function completeWithHttpInfo($callback_id, $callback_completion_request,

$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 All @@ -215,9 +203,9 @@ public function completeWithHttpInfo($callback_id, $callback_completion_request,
/**
* Operation completeAsync
*
* Completes a single callback
* Completes a callback
*
* @param string $callback_id (required)
* @param string $callback_id The ID of the action execution. (required)
* @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation
*
Expand All @@ -237,9 +225,9 @@ function ($response) {
/**
* Operation completeAsyncWithHttpInfo
*
* Completes a single callback
* Completes a callback
*
* @param string $callback_id (required)
* @param string $callback_id The ID of the action execution. (required)
* @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation
*
Expand Down Expand Up @@ -277,7 +265,7 @@ function ($exception) {
/**
* Create request for operation 'complete'
*
* @param string $callback_id (required)
* @param string $callback_id The ID of the action execution. (required)
* @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation
*
Expand Down Expand Up @@ -388,7 +376,7 @@ public function completeRequest($callback_id, $callback_completion_request, stri
/**
* Operation completeBatch
*
* Completes a batch of callbacks
* Complete a batch of callbacks
*
* @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request batch_input_callback_completion_batch_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation
Expand All @@ -405,7 +393,7 @@ public function completeBatch($batch_input_callback_completion_batch_request, st
/**
* Operation completeBatchWithHttpInfo
*
* Completes a batch of callbacks
* Complete a batch of callbacks
*
* @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation
Expand Down Expand Up @@ -440,18 +428,6 @@ public function completeBatchWithHttpInfo($batch_input_callback_completion_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()
);
}

return [null, $statusCode, $response->getHeaders()];

Expand All @@ -473,7 +449,7 @@ public function completeBatchWithHttpInfo($batch_input_callback_completion_batch
/**
* Operation completeBatchAsync
*
* Completes a batch of callbacks
* Complete a batch of callbacks
*
* @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation
Expand All @@ -494,7 +470,7 @@ function ($response) {
/**
* Operation completeBatchAsyncWithHttpInfo
*
* Completes a batch of callbacks
* Complete a batch of callbacks
*
* @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation
Expand Down
Loading