From 345e626a20d439d7d058867c9b3ec14b21bd91a3 Mon Sep 17 00:00:00 2001 From: ksvirkou Date: Tue, 29 Mar 2022 18:27:44 +0300 Subject: [PATCH] regeneration --- codegen/Crm/Contacts/Api/GDPRApi.php | 30 +-- codegen/Crm/Objects/Api/GDPRApi.php | 32 +-- .../Crm/Pipelines/Api/PipelineStagesApi.php | 8 +- codegen/Crm/Pipelines/Api/PipelinesApi.php | 8 +- codegen/Crm/Timeline/Api/TemplatesApi.php | 185 ++++----------- codegen/Crm/Timeline/Api/TokensApi.php | 111 +++------ codegen/Webhooks/Api/SettingsApi.php | 111 +++------ codegen/Webhooks/Api/SubscriptionsApi.php | 222 +++++------------- codegen/Webhooks/Model/ErrorCategory.php | 76 +++--- 9 files changed, 230 insertions(+), 553 deletions(-) diff --git a/codegen/Crm/Contacts/Api/GDPRApi.php b/codegen/Crm/Contacts/Api/GDPRApi.php index 24c0f659..e0300c2f 100644 --- a/codegen/Crm/Contacts/Api/GDPRApi.php +++ b/codegen/Crm/Contacts/Api/GDPRApi.php @@ -116,7 +116,7 @@ public function getConfig() } /** - * Operation delete + * Operation purge * * GDPR DELETE * @@ -126,13 +126,13 @@ public function getConfig() * @throws \InvalidArgumentException * @return void */ - public function delete($public_gdpr_delete_input) + public function purge($public_gdpr_delete_input) { - $this->deleteWithHttpInfo($public_gdpr_delete_input); + $this->purgeWithHttpInfo($public_gdpr_delete_input); } /** - * Operation deleteWithHttpInfo + * Operation purgeWithHttpInfo * * GDPR DELETE * @@ -142,9 +142,9 @@ public function delete($public_gdpr_delete_input) * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteWithHttpInfo($public_gdpr_delete_input) + public function purgeWithHttpInfo($public_gdpr_delete_input) { - $request = $this->deleteRequest($public_gdpr_delete_input); + $request = $this->purgeRequest($public_gdpr_delete_input); try { $options = $this->createHttpClientOption(); @@ -199,7 +199,7 @@ public function deleteWithHttpInfo($public_gdpr_delete_input) } /** - * Operation deleteAsync + * Operation purgeAsync * * GDPR DELETE * @@ -208,9 +208,9 @@ public function deleteWithHttpInfo($public_gdpr_delete_input) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAsync($public_gdpr_delete_input) + public function purgeAsync($public_gdpr_delete_input) { - return $this->deleteAsyncWithHttpInfo($public_gdpr_delete_input) + return $this->purgeAsyncWithHttpInfo($public_gdpr_delete_input) ->then( function ($response) { return $response[0]; @@ -219,7 +219,7 @@ function ($response) { } /** - * Operation deleteAsyncWithHttpInfo + * Operation purgeAsyncWithHttpInfo * * GDPR DELETE * @@ -228,10 +228,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAsyncWithHttpInfo($public_gdpr_delete_input) + public function purgeAsyncWithHttpInfo($public_gdpr_delete_input) { $returnType = ''; - $request = $this->deleteRequest($public_gdpr_delete_input); + $request = $this->purgeRequest($public_gdpr_delete_input); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -257,19 +257,19 @@ function ($exception) { } /** - * Create request for operation 'delete' + * Create request for operation 'purge' * * @param \HubSpot\Client\Crm\Contacts\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteRequest($public_gdpr_delete_input) + public function purgeRequest($public_gdpr_delete_input) { // verify the required parameter 'public_gdpr_delete_input' is set if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $public_gdpr_delete_input when calling delete' + 'Missing the required parameter $public_gdpr_delete_input when calling purge' ); } diff --git a/codegen/Crm/Objects/Api/GDPRApi.php b/codegen/Crm/Objects/Api/GDPRApi.php index 3da8bbf5..22f2caa0 100644 --- a/codegen/Crm/Objects/Api/GDPRApi.php +++ b/codegen/Crm/Objects/Api/GDPRApi.php @@ -116,7 +116,7 @@ public function getConfig() } /** - * Operation delete + * Operation purge * * GDPR DELETE * @@ -127,13 +127,13 @@ public function getConfig() * @throws \InvalidArgumentException * @return void */ - public function delete($object_type, $public_gdpr_delete_input) + public function purge($object_type, $public_gdpr_delete_input) { - $this->deleteWithHttpInfo($object_type, $public_gdpr_delete_input); + $this->purgeWithHttpInfo($object_type, $public_gdpr_delete_input); } /** - * Operation deleteWithHttpInfo + * Operation purgeWithHttpInfo * * GDPR DELETE * @@ -144,9 +144,9 @@ public function delete($object_type, $public_gdpr_delete_input) * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteWithHttpInfo($object_type, $public_gdpr_delete_input) + public function purgeWithHttpInfo($object_type, $public_gdpr_delete_input) { - $request = $this->deleteRequest($object_type, $public_gdpr_delete_input); + $request = $this->purgeRequest($object_type, $public_gdpr_delete_input); try { $options = $this->createHttpClientOption(); @@ -201,7 +201,7 @@ public function deleteWithHttpInfo($object_type, $public_gdpr_delete_input) } /** - * Operation deleteAsync + * Operation purgeAsync * * GDPR DELETE * @@ -211,9 +211,9 @@ public function deleteWithHttpInfo($object_type, $public_gdpr_delete_input) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAsync($object_type, $public_gdpr_delete_input) + public function purgeAsync($object_type, $public_gdpr_delete_input) { - return $this->deleteAsyncWithHttpInfo($object_type, $public_gdpr_delete_input) + return $this->purgeAsyncWithHttpInfo($object_type, $public_gdpr_delete_input) ->then( function ($response) { return $response[0]; @@ -222,7 +222,7 @@ function ($response) { } /** - * Operation deleteAsyncWithHttpInfo + * Operation purgeAsyncWithHttpInfo * * GDPR DELETE * @@ -232,10 +232,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAsyncWithHttpInfo($object_type, $public_gdpr_delete_input) + public function purgeAsyncWithHttpInfo($object_type, $public_gdpr_delete_input) { $returnType = ''; - $request = $this->deleteRequest($object_type, $public_gdpr_delete_input); + $request = $this->purgeRequest($object_type, $public_gdpr_delete_input); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -261,7 +261,7 @@ function ($exception) { } /** - * Create request for operation 'delete' + * Create request for operation 'purge' * * @param string $object_type (required) * @param \HubSpot\Client\Crm\Objects\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) @@ -269,18 +269,18 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteRequest($object_type, $public_gdpr_delete_input) + public function purgeRequest($object_type, $public_gdpr_delete_input) { // verify the required parameter 'object_type' is set if ($object_type === null || (is_array($object_type) && count($object_type) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_type when calling delete' + 'Missing the required parameter $object_type when calling purge' ); } // verify the required parameter 'public_gdpr_delete_input' is set if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $public_gdpr_delete_input when calling delete' + 'Missing the required parameter $public_gdpr_delete_input when calling purge' ); } diff --git a/codegen/Crm/Pipelines/Api/PipelineStagesApi.php b/codegen/Crm/Pipelines/Api/PipelineStagesApi.php index 32152b5c..a5c01fd3 100644 --- a/codegen/Crm/Pipelines/Api/PipelineStagesApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineStagesApi.php @@ -118,7 +118,7 @@ public function getConfig() /** * Operation archive * - * Archive a pipeline stage + * Delete a pipeline stage * * @param string $object_type object_type (required) * @param string $pipeline_id pipeline_id (required) @@ -136,7 +136,7 @@ public function archive($object_type, $pipeline_id, $stage_id) /** * Operation archiveWithHttpInfo * - * Archive a pipeline stage + * Delete a pipeline stage * * @param string $object_type (required) * @param string $pipeline_id (required) @@ -205,7 +205,7 @@ public function archiveWithHttpInfo($object_type, $pipeline_id, $stage_id) /** * Operation archiveAsync * - * Archive a pipeline stage + * Delete a pipeline stage * * @param string $object_type (required) * @param string $pipeline_id (required) @@ -227,7 +227,7 @@ function ($response) { /** * Operation archiveAsyncWithHttpInfo * - * Archive a pipeline stage + * Delete a pipeline stage * * @param string $object_type (required) * @param string $pipeline_id (required) diff --git a/codegen/Crm/Pipelines/Api/PipelinesApi.php b/codegen/Crm/Pipelines/Api/PipelinesApi.php index 42033812..29e7c611 100644 --- a/codegen/Crm/Pipelines/Api/PipelinesApi.php +++ b/codegen/Crm/Pipelines/Api/PipelinesApi.php @@ -118,7 +118,7 @@ public function getConfig() /** * Operation archive * - * Archive a pipeline + * Delete a pipeline * * @param string $object_type object_type (required) * @param string $pipeline_id pipeline_id (required) @@ -136,7 +136,7 @@ public function archive($object_type, $pipeline_id, $validate_references_before_ /** * Operation archiveWithHttpInfo * - * Archive a pipeline + * Delete a pipeline * * @param string $object_type (required) * @param string $pipeline_id (required) @@ -205,7 +205,7 @@ public function archiveWithHttpInfo($object_type, $pipeline_id, $validate_refere /** * Operation archiveAsync * - * Archive a pipeline + * Delete a pipeline * * @param string $object_type (required) * @param string $pipeline_id (required) @@ -227,7 +227,7 @@ function ($response) { /** * Operation archiveAsyncWithHttpInfo * - * Archive a pipeline + * Delete a pipeline * * @param string $object_type (required) * @param string $pipeline_id (required) diff --git a/codegen/Crm/Timeline/Api/TemplatesApi.php b/codegen/Crm/Timeline/Api/TemplatesApi.php index ee56f46b..5ae7981a 100644 --- a/codegen/Crm/Timeline/Api/TemplatesApi.php +++ b/codegen/Crm/Timeline/Api/TemplatesApi.php @@ -122,15 +122,14 @@ public function getConfig() * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function archive($event_template_id, $app_id, $app_id2) + public function archive($event_template_id, $app_id) { - $this->archiveWithHttpInfo($event_template_id, $app_id, $app_id2); + $this->archiveWithHttpInfo($event_template_id, $app_id); } /** @@ -140,15 +139,14 @@ public function archive($event_template_id, $app_id, $app_id2) * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($event_template_id, $app_id, $app_id2) + public function archiveWithHttpInfo($event_template_id, $app_id) { - $request = $this->archiveRequest($event_template_id, $app_id, $app_id2); + $request = $this->archiveRequest($event_template_id, $app_id); try { $options = $this->createHttpClientOption(); @@ -209,14 +207,13 @@ public function archiveWithHttpInfo($event_template_id, $app_id, $app_id2) * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($event_template_id, $app_id, $app_id2) + public function archiveAsync($event_template_id, $app_id) { - return $this->archiveAsyncWithHttpInfo($event_template_id, $app_id, $app_id2) + return $this->archiveAsyncWithHttpInfo($event_template_id, $app_id) ->then( function ($response) { return $response[0]; @@ -231,15 +228,14 @@ function ($response) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($event_template_id, $app_id, $app_id2) + public function archiveAsyncWithHttpInfo($event_template_id, $app_id) { $returnType = ''; - $request = $this->archiveRequest($event_template_id, $app_id, $app_id2); + $request = $this->archiveRequest($event_template_id, $app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -269,12 +265,11 @@ function ($exception) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($event_template_id, $app_id, $app_id2) + public function archiveRequest($event_template_id, $app_id) { // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { @@ -288,12 +283,6 @@ public function archiveRequest($event_template_id, $app_id, $app_id2) 'Missing the required parameter $app_id when calling archive' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling archive' - ); - } $resourcePath = '/crm/v3/timeline/{appId}/event-templates/{eventTemplateId}'; $formParams = []; @@ -320,14 +309,6 @@ public function archiveRequest($event_template_id, $app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -398,16 +379,15 @@ public function archiveRequest($event_template_id, $app_id, $app_id2) * Create an event template for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateCreateRequest $timeline_event_template_create_request The new event template definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error */ - public function create($app_id, $app_id2, $timeline_event_template_create_request) + public function create($app_id, $timeline_event_template_create_request) { - list($response) = $this->createWithHttpInfo($app_id, $app_id2, $timeline_event_template_create_request); + list($response) = $this->createWithHttpInfo($app_id, $timeline_event_template_create_request); return $response; } @@ -417,16 +397,15 @@ public function create($app_id, $app_id2, $timeline_event_template_create_reques * Create an event template for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateCreateRequest $timeline_event_template_create_request The new event template definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function createWithHttpInfo($app_id, $app_id2, $timeline_event_template_create_request) + public function createWithHttpInfo($app_id, $timeline_event_template_create_request) { - $request = $this->createRequest($app_id, $app_id2, $timeline_event_template_create_request); + $request = $this->createRequest($app_id, $timeline_event_template_create_request); try { $options = $this->createHttpClientOption(); @@ -532,15 +511,14 @@ public function createWithHttpInfo($app_id, $app_id2, $timeline_event_template_c * Create an event template for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateCreateRequest $timeline_event_template_create_request The new event template definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsync($app_id, $app_id2, $timeline_event_template_create_request) + public function createAsync($app_id, $timeline_event_template_create_request) { - return $this->createAsyncWithHttpInfo($app_id, $app_id2, $timeline_event_template_create_request) + return $this->createAsyncWithHttpInfo($app_id, $timeline_event_template_create_request) ->then( function ($response) { return $response[0]; @@ -554,16 +532,15 @@ function ($response) { * Create an event template for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateCreateRequest $timeline_event_template_create_request The new event template definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsyncWithHttpInfo($app_id, $app_id2, $timeline_event_template_create_request) + public function createAsyncWithHttpInfo($app_id, $timeline_event_template_create_request) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate'; - $request = $this->createRequest($app_id, $app_id2, $timeline_event_template_create_request); + $request = $this->createRequest($app_id, $timeline_event_template_create_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -602,13 +579,12 @@ function ($exception) { * Create request for operation 'create' * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateCreateRequest $timeline_event_template_create_request The new event template definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createRequest($app_id, $app_id2, $timeline_event_template_create_request) + public function createRequest($app_id, $timeline_event_template_create_request) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -616,12 +592,6 @@ public function createRequest($app_id, $app_id2, $timeline_event_template_create 'Missing the required parameter $app_id when calling create' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling create' - ); - } // verify the required parameter 'timeline_event_template_create_request' is set if ($timeline_event_template_create_request === null || (is_array($timeline_event_template_create_request) && count($timeline_event_template_create_request) === 0)) { throw new \InvalidArgumentException( @@ -646,14 +616,6 @@ public function createRequest($app_id, $app_id2, $timeline_event_template_create $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -730,15 +692,14 @@ public function createRequest($app_id, $app_id2, $timeline_event_template_create * List all event templates for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Timeline\Model\CollectionResponseTimelineEventTemplateNoPaging|\HubSpot\Client\Crm\Timeline\Model\Error */ - public function getAll($app_id, $app_id2) + public function getAll($app_id) { - list($response) = $this->getAllWithHttpInfo($app_id, $app_id2); + list($response) = $this->getAllWithHttpInfo($app_id); return $response; } @@ -748,15 +709,14 @@ public function getAll($app_id, $app_id2) * List all event templates for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Timeline\Model\CollectionResponseTimelineEventTemplateNoPaging|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAllWithHttpInfo($app_id, $app_id2) + public function getAllWithHttpInfo($app_id) { - $request = $this->getAllRequest($app_id, $app_id2); + $request = $this->getAllRequest($app_id); try { $options = $this->createHttpClientOption(); @@ -862,14 +822,13 @@ public function getAllWithHttpInfo($app_id, $app_id2) * List all event templates for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsync($app_id, $app_id2) + public function getAllAsync($app_id) { - return $this->getAllAsyncWithHttpInfo($app_id, $app_id2) + return $this->getAllAsyncWithHttpInfo($app_id) ->then( function ($response) { return $response[0]; @@ -883,15 +842,14 @@ function ($response) { * List all event templates for your app * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsyncWithHttpInfo($app_id, $app_id2) + public function getAllAsyncWithHttpInfo($app_id) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\CollectionResponseTimelineEventTemplateNoPaging'; - $request = $this->getAllRequest($app_id, $app_id2); + $request = $this->getAllRequest($app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -930,12 +888,11 @@ function ($exception) { * Create request for operation 'getAll' * * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllRequest($app_id, $app_id2) + public function getAllRequest($app_id) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -943,12 +900,6 @@ public function getAllRequest($app_id, $app_id2) 'Missing the required parameter $app_id when calling getAll' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling getAll' - ); - } $resourcePath = '/crm/v3/timeline/{appId}/event-templates'; $formParams = []; @@ -967,14 +918,6 @@ public function getAllRequest($app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -1046,15 +989,14 @@ public function getAllRequest($app_id, $app_id2) * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error */ - public function getById($event_template_id, $app_id, $app_id2) + public function getById($event_template_id, $app_id) { - list($response) = $this->getByIdWithHttpInfo($event_template_id, $app_id, $app_id2); + list($response) = $this->getByIdWithHttpInfo($event_template_id, $app_id); return $response; } @@ -1065,15 +1007,14 @@ public function getById($event_template_id, $app_id, $app_id2) * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($event_template_id, $app_id, $app_id2) + public function getByIdWithHttpInfo($event_template_id, $app_id) { - $request = $this->getByIdRequest($event_template_id, $app_id, $app_id2); + $request = $this->getByIdRequest($event_template_id, $app_id); try { $options = $this->createHttpClientOption(); @@ -1180,14 +1121,13 @@ public function getByIdWithHttpInfo($event_template_id, $app_id, $app_id2) * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($event_template_id, $app_id, $app_id2) + public function getByIdAsync($event_template_id, $app_id) { - return $this->getByIdAsyncWithHttpInfo($event_template_id, $app_id, $app_id2) + return $this->getByIdAsyncWithHttpInfo($event_template_id, $app_id) ->then( function ($response) { return $response[0]; @@ -1202,15 +1142,14 @@ function ($response) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($event_template_id, $app_id, $app_id2) + public function getByIdAsyncWithHttpInfo($event_template_id, $app_id) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate'; - $request = $this->getByIdRequest($event_template_id, $app_id, $app_id2); + $request = $this->getByIdRequest($event_template_id, $app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1250,12 +1189,11 @@ function ($exception) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($event_template_id, $app_id, $app_id2) + public function getByIdRequest($event_template_id, $app_id) { // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { @@ -1269,12 +1207,6 @@ public function getByIdRequest($event_template_id, $app_id, $app_id2) 'Missing the required parameter $app_id when calling getById' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling getById' - ); - } $resourcePath = '/crm/v3/timeline/{appId}/event-templates/{eventTemplateId}'; $formParams = []; @@ -1301,14 +1233,6 @@ public function getByIdRequest($event_template_id, $app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -1380,16 +1304,15 @@ public function getByIdRequest($event_template_id, $app_id, $app_id2) * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request The updated event template definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error */ - public function update($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request) + public function update($event_template_id, $app_id, $timeline_event_template_update_request) { - list($response) = $this->updateWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request); + list($response) = $this->updateWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request); return $response; } @@ -1400,16 +1323,15 @@ public function update($event_template_id, $app_id, $app_id2, $timeline_event_te * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request The updated event template definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request) + public function updateWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request) { - $request = $this->updateRequest($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request); + $request = $this->updateRequest($event_template_id, $app_id, $timeline_event_template_update_request); try { $options = $this->createHttpClientOption(); @@ -1516,15 +1438,14 @@ public function updateWithHttpInfo($event_template_id, $app_id, $app_id2, $timel * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request The updated event template definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request) + public function updateAsync($event_template_id, $app_id, $timeline_event_template_update_request) { - return $this->updateAsyncWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request) + return $this->updateAsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request) ->then( function ($response) { return $response[0]; @@ -1539,16 +1460,15 @@ function ($response) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request The updated event template definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request) + public function updateAsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate'; - $request = $this->updateRequest($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request); + $request = $this->updateRequest($event_template_id, $app_id, $timeline_event_template_update_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1588,13 +1508,12 @@ function ($exception) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request The updated event template definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($event_template_id, $app_id, $app_id2, $timeline_event_template_update_request) + public function updateRequest($event_template_id, $app_id, $timeline_event_template_update_request) { // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { @@ -1608,12 +1527,6 @@ public function updateRequest($event_template_id, $app_id, $app_id2, $timeline_e 'Missing the required parameter $app_id when calling update' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling update' - ); - } // verify the required parameter 'timeline_event_template_update_request' is set if ($timeline_event_template_update_request === null || (is_array($timeline_event_template_update_request) && count($timeline_event_template_update_request) === 0)) { throw new \InvalidArgumentException( @@ -1646,14 +1559,6 @@ public function updateRequest($event_template_id, $app_id, $app_id2, $timeline_e $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { diff --git a/codegen/Crm/Timeline/Api/TokensApi.php b/codegen/Crm/Timeline/Api/TokensApi.php index f5ab90d7..40d8e8a4 100644 --- a/codegen/Crm/Timeline/Api/TokensApi.php +++ b/codegen/Crm/Timeline/Api/TokensApi.php @@ -123,15 +123,14 @@ public function getConfig() * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function archive($event_template_id, $token_name, $app_id, $app_id2) + public function archive($event_template_id, $token_name, $app_id) { - $this->archiveWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2); + $this->archiveWithHttpInfo($event_template_id, $token_name, $app_id); } /** @@ -142,15 +141,14 @@ public function archive($event_template_id, $token_name, $app_id, $app_id2) * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2) + public function archiveWithHttpInfo($event_template_id, $token_name, $app_id) { - $request = $this->archiveRequest($event_template_id, $token_name, $app_id, $app_id2); + $request = $this->archiveRequest($event_template_id, $token_name, $app_id); try { $options = $this->createHttpClientOption(); @@ -212,14 +210,13 @@ public function archiveWithHttpInfo($event_template_id, $token_name, $app_id, $a * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($event_template_id, $token_name, $app_id, $app_id2) + public function archiveAsync($event_template_id, $token_name, $app_id) { - return $this->archiveAsyncWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2) + return $this->archiveAsyncWithHttpInfo($event_template_id, $token_name, $app_id) ->then( function ($response) { return $response[0]; @@ -235,15 +232,14 @@ function ($response) { * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2) + public function archiveAsyncWithHttpInfo($event_template_id, $token_name, $app_id) { $returnType = ''; - $request = $this->archiveRequest($event_template_id, $token_name, $app_id, $app_id2); + $request = $this->archiveRequest($event_template_id, $token_name, $app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -274,12 +270,11 @@ function ($exception) { * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($event_template_id, $token_name, $app_id, $app_id2) + public function archiveRequest($event_template_id, $token_name, $app_id) { // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { @@ -299,12 +294,6 @@ public function archiveRequest($event_template_id, $token_name, $app_id, $app_id 'Missing the required parameter $app_id when calling archive' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling archive' - ); - } $resourcePath = '/crm/v3/timeline/{appId}/event-templates/{eventTemplateId}/tokens/{tokenName}'; $formParams = []; @@ -339,14 +328,6 @@ public function archiveRequest($event_template_id, $token_name, $app_id, $app_id $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -418,16 +399,15 @@ public function archiveRequest($event_template_id, $token_name, $app_id, $app_id * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token The new token definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error */ - public function create($event_template_id, $app_id, $app_id2, $timeline_event_template_token) + public function create($event_template_id, $app_id, $timeline_event_template_token) { - list($response) = $this->createWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_token); + list($response) = $this->createWithHttpInfo($event_template_id, $app_id, $timeline_event_template_token); return $response; } @@ -438,16 +418,15 @@ public function create($event_template_id, $app_id, $app_id2, $timeline_event_te * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token The new token definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function createWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_token) + public function createWithHttpInfo($event_template_id, $app_id, $timeline_event_template_token) { - $request = $this->createRequest($event_template_id, $app_id, $app_id2, $timeline_event_template_token); + $request = $this->createRequest($event_template_id, $app_id, $timeline_event_template_token); try { $options = $this->createHttpClientOption(); @@ -554,15 +533,14 @@ public function createWithHttpInfo($event_template_id, $app_id, $app_id2, $timel * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token The new token definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsync($event_template_id, $app_id, $app_id2, $timeline_event_template_token) + public function createAsync($event_template_id, $app_id, $timeline_event_template_token) { - return $this->createAsyncWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_token) + return $this->createAsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_token) ->then( function ($response) { return $response[0]; @@ -577,16 +555,15 @@ function ($response) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token The new token definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsyncWithHttpInfo($event_template_id, $app_id, $app_id2, $timeline_event_template_token) + public function createAsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_token) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken'; - $request = $this->createRequest($event_template_id, $app_id, $app_id2, $timeline_event_template_token); + $request = $this->createRequest($event_template_id, $app_id, $timeline_event_template_token); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -626,13 +603,12 @@ function ($exception) { * * @param string $event_template_id The event template ID. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token The new token definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createRequest($event_template_id, $app_id, $app_id2, $timeline_event_template_token) + public function createRequest($event_template_id, $app_id, $timeline_event_template_token) { // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { @@ -646,12 +622,6 @@ public function createRequest($event_template_id, $app_id, $app_id2, $timeline_e 'Missing the required parameter $app_id when calling create' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling create' - ); - } // verify the required parameter 'timeline_event_template_token' is set if ($timeline_event_template_token === null || (is_array($timeline_event_template_token) && count($timeline_event_template_token) === 0)) { throw new \InvalidArgumentException( @@ -684,14 +654,6 @@ public function createRequest($event_template_id, $app_id, $app_id2, $timeline_e $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -770,16 +732,15 @@ public function createRequest($event_template_id, $app_id, $app_id2, $timeline_e * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request The updated token definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error */ - public function update($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request) + public function update($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request) { - list($response) = $this->updateWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request); + list($response) = $this->updateWithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request); return $response; } @@ -791,16 +752,15 @@ public function update($event_template_id, $token_name, $app_id, $app_id2, $time * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request The updated token definition. (required) * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request) + public function updateWithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request) { - $request = $this->updateRequest($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request); + $request = $this->updateRequest($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request); try { $options = $this->createHttpClientOption(); @@ -908,15 +868,14 @@ public function updateWithHttpInfo($event_template_id, $token_name, $app_id, $ap * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request The updated token definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request) + public function updateAsync($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request) { - return $this->updateAsyncWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request) + return $this->updateAsyncWithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request) ->then( function ($response) { return $response[0]; @@ -932,16 +891,15 @@ function ($response) { * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request The updated token definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request) + public function updateAsyncWithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken'; - $request = $this->updateRequest($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request); + $request = $this->updateRequest($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -982,13 +940,12 @@ function ($exception) { * @param string $event_template_id The event template ID. (required) * @param string $token_name The token name. (required) * @param int $app_id The ID of the target app. (required) - * @param int $app_id2 The ID of the target app. (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request The updated token definition. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($event_template_id, $token_name, $app_id, $app_id2, $timeline_event_template_token_update_request) + public function updateRequest($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request) { // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { @@ -1008,12 +965,6 @@ public function updateRequest($event_template_id, $token_name, $app_id, $app_id2 'Missing the required parameter $app_id when calling update' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling update' - ); - } // verify the required parameter 'timeline_event_template_token_update_request' is set if ($timeline_event_template_token_update_request === null || (is_array($timeline_event_template_token_update_request) && count($timeline_event_template_token_update_request) === 0)) { throw new \InvalidArgumentException( @@ -1054,14 +1005,6 @@ public function updateRequest($event_template_id, $token_name, $app_id, $app_id2 $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { diff --git a/codegen/Webhooks/Api/SettingsApi.php b/codegen/Webhooks/Api/SettingsApi.php index 484cb753..7a389e0e 100644 --- a/codegen/Webhooks/Api/SettingsApi.php +++ b/codegen/Webhooks/Api/SettingsApi.php @@ -119,30 +119,28 @@ public function getConfig() * Operation clear * * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function clear($app_id, $app_id2) + public function clear($app_id) { - $this->clearWithHttpInfo($app_id, $app_id2); + $this->clearWithHttpInfo($app_id); } /** * Operation clearWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function clearWithHttpInfo($app_id, $app_id2) + public function clearWithHttpInfo($app_id) { - $request = $this->clearRequest($app_id, $app_id2); + $request = $this->clearRequest($app_id); try { $options = $this->createHttpClientOption(); @@ -200,14 +198,13 @@ public function clearWithHttpInfo($app_id, $app_id2) * Operation clearAsync * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function clearAsync($app_id, $app_id2) + public function clearAsync($app_id) { - return $this->clearAsyncWithHttpInfo($app_id, $app_id2) + return $this->clearAsyncWithHttpInfo($app_id) ->then( function ($response) { return $response[0]; @@ -219,15 +216,14 @@ function ($response) { * Operation clearAsyncWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function clearAsyncWithHttpInfo($app_id, $app_id2) + public function clearAsyncWithHttpInfo($app_id) { $returnType = ''; - $request = $this->clearRequest($app_id, $app_id2); + $request = $this->clearRequest($app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -256,12 +252,11 @@ function ($exception) { * Create request for operation 'clear' * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function clearRequest($app_id, $app_id2) + public function clearRequest($app_id) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -269,12 +264,6 @@ public function clearRequest($app_id, $app_id2) 'Missing the required parameter $app_id when calling clear' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling clear' - ); - } $resourcePath = '/webhooks/v3/{appId}/settings'; $formParams = []; @@ -293,14 +282,6 @@ public function clearRequest($app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -369,16 +350,15 @@ public function clearRequest($app_id, $app_id2) * Operation configure * * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SettingsChangeRequest $settings_change_request settings_change_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SettingsResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function configure($app_id, $app_id2, $settings_change_request) + public function configure($app_id, $settings_change_request) { - list($response) = $this->configureWithHttpInfo($app_id, $app_id2, $settings_change_request); + list($response) = $this->configureWithHttpInfo($app_id, $settings_change_request); return $response; } @@ -386,16 +366,15 @@ public function configure($app_id, $app_id2, $settings_change_request) * Operation configureWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SettingsChangeRequest $settings_change_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\SettingsResponse|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function configureWithHttpInfo($app_id, $app_id2, $settings_change_request) + public function configureWithHttpInfo($app_id, $settings_change_request) { - $request = $this->configureRequest($app_id, $app_id2, $settings_change_request); + $request = $this->configureRequest($app_id, $settings_change_request); try { $options = $this->createHttpClientOption(); @@ -499,15 +478,14 @@ public function configureWithHttpInfo($app_id, $app_id2, $settings_change_reques * Operation configureAsync * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SettingsChangeRequest $settings_change_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function configureAsync($app_id, $app_id2, $settings_change_request) + public function configureAsync($app_id, $settings_change_request) { - return $this->configureAsyncWithHttpInfo($app_id, $app_id2, $settings_change_request) + return $this->configureAsyncWithHttpInfo($app_id, $settings_change_request) ->then( function ($response) { return $response[0]; @@ -519,16 +497,15 @@ function ($response) { * Operation configureAsyncWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SettingsChangeRequest $settings_change_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function configureAsyncWithHttpInfo($app_id, $app_id2, $settings_change_request) + public function configureAsyncWithHttpInfo($app_id, $settings_change_request) { $returnType = '\HubSpot\Client\Webhooks\Model\SettingsResponse'; - $request = $this->configureRequest($app_id, $app_id2, $settings_change_request); + $request = $this->configureRequest($app_id, $settings_change_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -567,13 +544,12 @@ function ($exception) { * Create request for operation 'configure' * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SettingsChangeRequest $settings_change_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function configureRequest($app_id, $app_id2, $settings_change_request) + public function configureRequest($app_id, $settings_change_request) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -581,12 +557,6 @@ public function configureRequest($app_id, $app_id2, $settings_change_request) 'Missing the required parameter $app_id when calling configure' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling configure' - ); - } // verify the required parameter 'settings_change_request' is set if ($settings_change_request === null || (is_array($settings_change_request) && count($settings_change_request) === 0)) { throw new \InvalidArgumentException( @@ -611,14 +581,6 @@ public function configureRequest($app_id, $app_id2, $settings_change_request) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -693,15 +655,14 @@ public function configureRequest($app_id, $app_id2, $settings_change_request) * Operation getAll * * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SettingsResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function getAll($app_id, $app_id2) + public function getAll($app_id) { - list($response) = $this->getAllWithHttpInfo($app_id, $app_id2); + list($response) = $this->getAllWithHttpInfo($app_id); return $response; } @@ -709,15 +670,14 @@ public function getAll($app_id, $app_id2) * Operation getAllWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\SettingsResponse|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAllWithHttpInfo($app_id, $app_id2) + public function getAllWithHttpInfo($app_id) { - $request = $this->getAllRequest($app_id, $app_id2); + $request = $this->getAllRequest($app_id); try { $options = $this->createHttpClientOption(); @@ -821,14 +781,13 @@ public function getAllWithHttpInfo($app_id, $app_id2) * Operation getAllAsync * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsync($app_id, $app_id2) + public function getAllAsync($app_id) { - return $this->getAllAsyncWithHttpInfo($app_id, $app_id2) + return $this->getAllAsyncWithHttpInfo($app_id) ->then( function ($response) { return $response[0]; @@ -840,15 +799,14 @@ function ($response) { * Operation getAllAsyncWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsyncWithHttpInfo($app_id, $app_id2) + public function getAllAsyncWithHttpInfo($app_id) { $returnType = '\HubSpot\Client\Webhooks\Model\SettingsResponse'; - $request = $this->getAllRequest($app_id, $app_id2); + $request = $this->getAllRequest($app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -887,12 +845,11 @@ function ($exception) { * Create request for operation 'getAll' * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllRequest($app_id, $app_id2) + public function getAllRequest($app_id) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -900,12 +857,6 @@ public function getAllRequest($app_id, $app_id2) 'Missing the required parameter $app_id when calling getAll' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling getAll' - ); - } $resourcePath = '/webhooks/v3/{appId}/settings'; $formParams = []; @@ -924,14 +875,6 @@ public function getAllRequest($app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { diff --git a/codegen/Webhooks/Api/SubscriptionsApi.php b/codegen/Webhooks/Api/SubscriptionsApi.php index d0e9e2e4..e25349d3 100644 --- a/codegen/Webhooks/Api/SubscriptionsApi.php +++ b/codegen/Webhooks/Api/SubscriptionsApi.php @@ -120,15 +120,14 @@ public function getConfig() * * @param int $subscription_id subscription_id (required) * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function archive($subscription_id, $app_id, $app_id2) + public function archive($subscription_id, $app_id) { - $this->archiveWithHttpInfo($subscription_id, $app_id, $app_id2); + $this->archiveWithHttpInfo($subscription_id, $app_id); } /** @@ -136,15 +135,14 @@ public function archive($subscription_id, $app_id, $app_id2) * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($subscription_id, $app_id, $app_id2) + public function archiveWithHttpInfo($subscription_id, $app_id) { - $request = $this->archiveRequest($subscription_id, $app_id, $app_id2); + $request = $this->archiveRequest($subscription_id, $app_id); try { $options = $this->createHttpClientOption(); @@ -203,14 +201,13 @@ public function archiveWithHttpInfo($subscription_id, $app_id, $app_id2) * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($subscription_id, $app_id, $app_id2) + public function archiveAsync($subscription_id, $app_id) { - return $this->archiveAsyncWithHttpInfo($subscription_id, $app_id, $app_id2) + return $this->archiveAsyncWithHttpInfo($subscription_id, $app_id) ->then( function ($response) { return $response[0]; @@ -223,15 +220,14 @@ function ($response) { * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($subscription_id, $app_id, $app_id2) + public function archiveAsyncWithHttpInfo($subscription_id, $app_id) { $returnType = ''; - $request = $this->archiveRequest($subscription_id, $app_id, $app_id2); + $request = $this->archiveRequest($subscription_id, $app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -261,12 +257,11 @@ function ($exception) { * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($subscription_id, $app_id, $app_id2) + public function archiveRequest($subscription_id, $app_id) { // verify the required parameter 'subscription_id' is set if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { @@ -280,12 +275,6 @@ public function archiveRequest($subscription_id, $app_id, $app_id2) 'Missing the required parameter $app_id when calling archive' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling archive' - ); - } $resourcePath = '/webhooks/v3/{appId}/subscriptions/{subscriptionId}'; $formParams = []; @@ -312,14 +301,6 @@ public function archiveRequest($subscription_id, $app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -388,16 +369,15 @@ public function archiveRequest($subscription_id, $app_id, $app_id2) * Operation create * * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionCreateRequest $subscription_create_request subscription_create_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function create($app_id, $app_id2, $subscription_create_request) + public function create($app_id, $subscription_create_request) { - list($response) = $this->createWithHttpInfo($app_id, $app_id2, $subscription_create_request); + list($response) = $this->createWithHttpInfo($app_id, $subscription_create_request); return $response; } @@ -405,16 +385,15 @@ public function create($app_id, $app_id2, $subscription_create_request) * Operation createWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionCreateRequest $subscription_create_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function createWithHttpInfo($app_id, $app_id2, $subscription_create_request) + public function createWithHttpInfo($app_id, $subscription_create_request) { - $request = $this->createRequest($app_id, $app_id2, $subscription_create_request); + $request = $this->createRequest($app_id, $subscription_create_request); try { $options = $this->createHttpClientOption(); @@ -518,15 +497,14 @@ public function createWithHttpInfo($app_id, $app_id2, $subscription_create_reque * Operation createAsync * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionCreateRequest $subscription_create_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsync($app_id, $app_id2, $subscription_create_request) + public function createAsync($app_id, $subscription_create_request) { - return $this->createAsyncWithHttpInfo($app_id, $app_id2, $subscription_create_request) + return $this->createAsyncWithHttpInfo($app_id, $subscription_create_request) ->then( function ($response) { return $response[0]; @@ -538,16 +516,15 @@ function ($response) { * Operation createAsyncWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionCreateRequest $subscription_create_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsyncWithHttpInfo($app_id, $app_id2, $subscription_create_request) + public function createAsyncWithHttpInfo($app_id, $subscription_create_request) { $returnType = '\HubSpot\Client\Webhooks\Model\SubscriptionResponse'; - $request = $this->createRequest($app_id, $app_id2, $subscription_create_request); + $request = $this->createRequest($app_id, $subscription_create_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -586,13 +563,12 @@ function ($exception) { * Create request for operation 'create' * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionCreateRequest $subscription_create_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createRequest($app_id, $app_id2, $subscription_create_request) + public function createRequest($app_id, $subscription_create_request) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -600,12 +576,6 @@ public function createRequest($app_id, $app_id2, $subscription_create_request) 'Missing the required parameter $app_id when calling create' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling create' - ); - } // verify the required parameter 'subscription_create_request' is set if ($subscription_create_request === null || (is_array($subscription_create_request) && count($subscription_create_request) === 0)) { throw new \InvalidArgumentException( @@ -630,14 +600,6 @@ public function createRequest($app_id, $app_id2, $subscription_create_request) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -712,15 +674,14 @@ public function createRequest($app_id, $app_id2, $subscription_create_request) * Operation getAll * * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SubscriptionListResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function getAll($app_id, $app_id2) + public function getAll($app_id) { - list($response) = $this->getAllWithHttpInfo($app_id, $app_id2); + list($response) = $this->getAllWithHttpInfo($app_id); return $response; } @@ -728,15 +689,14 @@ public function getAll($app_id, $app_id2) * Operation getAllWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\SubscriptionListResponse|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAllWithHttpInfo($app_id, $app_id2) + public function getAllWithHttpInfo($app_id) { - $request = $this->getAllRequest($app_id, $app_id2); + $request = $this->getAllRequest($app_id); try { $options = $this->createHttpClientOption(); @@ -840,14 +800,13 @@ public function getAllWithHttpInfo($app_id, $app_id2) * Operation getAllAsync * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsync($app_id, $app_id2) + public function getAllAsync($app_id) { - return $this->getAllAsyncWithHttpInfo($app_id, $app_id2) + return $this->getAllAsyncWithHttpInfo($app_id) ->then( function ($response) { return $response[0]; @@ -859,15 +818,14 @@ function ($response) { * Operation getAllAsyncWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsyncWithHttpInfo($app_id, $app_id2) + public function getAllAsyncWithHttpInfo($app_id) { $returnType = '\HubSpot\Client\Webhooks\Model\SubscriptionListResponse'; - $request = $this->getAllRequest($app_id, $app_id2); + $request = $this->getAllRequest($app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -906,12 +864,11 @@ function ($exception) { * Create request for operation 'getAll' * * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllRequest($app_id, $app_id2) + public function getAllRequest($app_id) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -919,12 +876,6 @@ public function getAllRequest($app_id, $app_id2) 'Missing the required parameter $app_id when calling getAll' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling getAll' - ); - } $resourcePath = '/webhooks/v3/{appId}/subscriptions'; $formParams = []; @@ -943,14 +894,6 @@ public function getAllRequest($app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -1020,15 +963,14 @@ public function getAllRequest($app_id, $app_id2) * * @param int $subscription_id subscription_id (required) * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function getById($subscription_id, $app_id, $app_id2) + public function getById($subscription_id, $app_id) { - list($response) = $this->getByIdWithHttpInfo($subscription_id, $app_id, $app_id2); + list($response) = $this->getByIdWithHttpInfo($subscription_id, $app_id); return $response; } @@ -1037,15 +979,14 @@ public function getById($subscription_id, $app_id, $app_id2) * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($subscription_id, $app_id, $app_id2) + public function getByIdWithHttpInfo($subscription_id, $app_id) { - $request = $this->getByIdRequest($subscription_id, $app_id, $app_id2); + $request = $this->getByIdRequest($subscription_id, $app_id); try { $options = $this->createHttpClientOption(); @@ -1150,14 +1091,13 @@ public function getByIdWithHttpInfo($subscription_id, $app_id, $app_id2) * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($subscription_id, $app_id, $app_id2) + public function getByIdAsync($subscription_id, $app_id) { - return $this->getByIdAsyncWithHttpInfo($subscription_id, $app_id, $app_id2) + return $this->getByIdAsyncWithHttpInfo($subscription_id, $app_id) ->then( function ($response) { return $response[0]; @@ -1170,15 +1110,14 @@ function ($response) { * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($subscription_id, $app_id, $app_id2) + public function getByIdAsyncWithHttpInfo($subscription_id, $app_id) { $returnType = '\HubSpot\Client\Webhooks\Model\SubscriptionResponse'; - $request = $this->getByIdRequest($subscription_id, $app_id, $app_id2); + $request = $this->getByIdRequest($subscription_id, $app_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1218,12 +1157,11 @@ function ($exception) { * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($subscription_id, $app_id, $app_id2) + public function getByIdRequest($subscription_id, $app_id) { // verify the required parameter 'subscription_id' is set if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { @@ -1237,12 +1175,6 @@ public function getByIdRequest($subscription_id, $app_id, $app_id2) 'Missing the required parameter $app_id when calling getById' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling getById' - ); - } $resourcePath = '/webhooks/v3/{appId}/subscriptions/{subscriptionId}'; $formParams = []; @@ -1269,14 +1201,6 @@ public function getByIdRequest($subscription_id, $app_id, $app_id2) $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -1346,16 +1270,15 @@ public function getByIdRequest($subscription_id, $app_id, $app_id2) * * @param int $subscription_id subscription_id (required) * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request subscription_patch_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function update($subscription_id, $app_id, $app_id2, $subscription_patch_request) + public function update($subscription_id, $app_id, $subscription_patch_request) { - list($response) = $this->updateWithHttpInfo($subscription_id, $app_id, $app_id2, $subscription_patch_request); + list($response) = $this->updateWithHttpInfo($subscription_id, $app_id, $subscription_patch_request); return $response; } @@ -1364,16 +1287,15 @@ public function update($subscription_id, $app_id, $app_id2, $subscription_patch_ * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($subscription_id, $app_id, $app_id2, $subscription_patch_request) + public function updateWithHttpInfo($subscription_id, $app_id, $subscription_patch_request) { - $request = $this->updateRequest($subscription_id, $app_id, $app_id2, $subscription_patch_request); + $request = $this->updateRequest($subscription_id, $app_id, $subscription_patch_request); try { $options = $this->createHttpClientOption(); @@ -1478,15 +1400,14 @@ public function updateWithHttpInfo($subscription_id, $app_id, $app_id2, $subscri * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($subscription_id, $app_id, $app_id2, $subscription_patch_request) + public function updateAsync($subscription_id, $app_id, $subscription_patch_request) { - return $this->updateAsyncWithHttpInfo($subscription_id, $app_id, $app_id2, $subscription_patch_request) + return $this->updateAsyncWithHttpInfo($subscription_id, $app_id, $subscription_patch_request) ->then( function ($response) { return $response[0]; @@ -1499,16 +1420,15 @@ function ($response) { * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($subscription_id, $app_id, $app_id2, $subscription_patch_request) + public function updateAsyncWithHttpInfo($subscription_id, $app_id, $subscription_patch_request) { $returnType = '\HubSpot\Client\Webhooks\Model\SubscriptionResponse'; - $request = $this->updateRequest($subscription_id, $app_id, $app_id2, $subscription_patch_request); + $request = $this->updateRequest($subscription_id, $app_id, $subscription_patch_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1548,13 +1468,12 @@ function ($exception) { * * @param int $subscription_id (required) * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($subscription_id, $app_id, $app_id2, $subscription_patch_request) + public function updateRequest($subscription_id, $app_id, $subscription_patch_request) { // verify the required parameter 'subscription_id' is set if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { @@ -1568,12 +1487,6 @@ public function updateRequest($subscription_id, $app_id, $app_id2, $subscription 'Missing the required parameter $app_id when calling update' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling update' - ); - } // verify the required parameter 'subscription_patch_request' is set if ($subscription_patch_request === null || (is_array($subscription_patch_request) && count($subscription_patch_request) === 0)) { throw new \InvalidArgumentException( @@ -1606,14 +1519,6 @@ public function updateRequest($subscription_id, $app_id, $app_id2, $subscription $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { @@ -1688,16 +1593,15 @@ public function updateRequest($subscription_id, $app_id, $app_id2, $subscription * Operation updateBatch * * @param int $app_id app_id (required) - * @param int $app_id2 app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\BatchInputSubscriptionBatchUpdateRequest $batch_input_subscription_batch_update_request batch_input_subscription_batch_update_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\BatchResponseSubscriptionResponse|\HubSpot\Client\Webhooks\Model\BatchResponseSubscriptionResponseWithErrors|\HubSpot\Client\Webhooks\Model\Error */ - public function updateBatch($app_id, $app_id2, $batch_input_subscription_batch_update_request) + public function updateBatch($app_id, $batch_input_subscription_batch_update_request) { - list($response) = $this->updateBatchWithHttpInfo($app_id, $app_id2, $batch_input_subscription_batch_update_request); + list($response) = $this->updateBatchWithHttpInfo($app_id, $batch_input_subscription_batch_update_request); return $response; } @@ -1705,16 +1609,15 @@ public function updateBatch($app_id, $app_id2, $batch_input_subscription_batch_u * Operation updateBatchWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\BatchInputSubscriptionBatchUpdateRequest $batch_input_subscription_batch_update_request (required) * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Webhooks\Model\BatchResponseSubscriptionResponse|\HubSpot\Client\Webhooks\Model\BatchResponseSubscriptionResponseWithErrors|\HubSpot\Client\Webhooks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateBatchWithHttpInfo($app_id, $app_id2, $batch_input_subscription_batch_update_request) + public function updateBatchWithHttpInfo($app_id, $batch_input_subscription_batch_update_request) { - $request = $this->updateBatchRequest($app_id, $app_id2, $batch_input_subscription_batch_update_request); + $request = $this->updateBatchRequest($app_id, $batch_input_subscription_batch_update_request); try { $options = $this->createHttpClientOption(); @@ -1838,15 +1741,14 @@ public function updateBatchWithHttpInfo($app_id, $app_id2, $batch_input_subscrip * Operation updateBatchAsync * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\BatchInputSubscriptionBatchUpdateRequest $batch_input_subscription_batch_update_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateBatchAsync($app_id, $app_id2, $batch_input_subscription_batch_update_request) + public function updateBatchAsync($app_id, $batch_input_subscription_batch_update_request) { - return $this->updateBatchAsyncWithHttpInfo($app_id, $app_id2, $batch_input_subscription_batch_update_request) + return $this->updateBatchAsyncWithHttpInfo($app_id, $batch_input_subscription_batch_update_request) ->then( function ($response) { return $response[0]; @@ -1858,16 +1760,15 @@ function ($response) { * Operation updateBatchAsyncWithHttpInfo * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\BatchInputSubscriptionBatchUpdateRequest $batch_input_subscription_batch_update_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateBatchAsyncWithHttpInfo($app_id, $app_id2, $batch_input_subscription_batch_update_request) + public function updateBatchAsyncWithHttpInfo($app_id, $batch_input_subscription_batch_update_request) { $returnType = '\HubSpot\Client\Webhooks\Model\BatchResponseSubscriptionResponse'; - $request = $this->updateBatchRequest($app_id, $app_id2, $batch_input_subscription_batch_update_request); + $request = $this->updateBatchRequest($app_id, $batch_input_subscription_batch_update_request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1906,13 +1807,12 @@ function ($exception) { * Create request for operation 'updateBatch' * * @param int $app_id (required) - * @param int $app_id2 (required) * @param \HubSpot\Client\Webhooks\Model\BatchInputSubscriptionBatchUpdateRequest $batch_input_subscription_batch_update_request (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateBatchRequest($app_id, $app_id2, $batch_input_subscription_batch_update_request) + public function updateBatchRequest($app_id, $batch_input_subscription_batch_update_request) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { @@ -1920,12 +1820,6 @@ public function updateBatchRequest($app_id, $app_id2, $batch_input_subscription_ 'Missing the required parameter $app_id when calling updateBatch' ); } - // verify the required parameter 'app_id2' is set - if ($app_id2 === null || (is_array($app_id2) && count($app_id2) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id2 when calling updateBatch' - ); - } // verify the required parameter 'batch_input_subscription_batch_update_request' is set if ($batch_input_subscription_batch_update_request === null || (is_array($batch_input_subscription_batch_update_request) && count($batch_input_subscription_batch_update_request) === 0)) { throw new \InvalidArgumentException( @@ -1950,14 +1844,6 @@ public function updateBatchRequest($app_id, $app_id2, $batch_input_subscription_ $resourcePath ); } - // path params - if ($app_id2 !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id2), - $resourcePath - ); - } if ($multipart) { diff --git a/codegen/Webhooks/Model/ErrorCategory.php b/codegen/Webhooks/Model/ErrorCategory.php index cba9aa3c..fc2bf3a6 100644 --- a/codegen/Webhooks/Model/ErrorCategory.php +++ b/codegen/Webhooks/Model/ErrorCategory.php @@ -59,8 +59,8 @@ class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'http_status' => 'string', - 'name' => 'string' + 'name' => 'string', + 'http_status' => 'string' ]; /** @@ -71,8 +71,8 @@ class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'http_status' => null, - 'name' => null + 'name' => null, + 'http_status' => null ]; /** @@ -102,8 +102,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'http_status' => 'httpStatus', - 'name' => 'name' + 'name' => 'name', + 'http_status' => 'httpStatus' ]; /** @@ -112,8 +112,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'http_status' => 'setHttpStatus', - 'name' => 'setName' + 'name' => 'setName', + 'http_status' => 'setHttpStatus' ]; /** @@ -122,8 +122,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'http_status' => 'getHttpStatus', - 'name' => 'getName' + 'name' => 'getName', + 'http_status' => 'getHttpStatus' ]; /** @@ -318,8 +318,8 @@ public function getHttpStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['http_status'] = $data['http_status'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['http_status'] = $data['http_status'] ?? null; } /** @@ -331,6 +331,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } if ($this->container['http_status'] === null) { $invalidProperties[] = "'http_status' can't be null"; } @@ -343,9 +346,6 @@ public function listInvalidProperties() ); } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } return $invalidProperties; } @@ -362,59 +362,59 @@ public function valid() /** - * Gets http_status + * Gets name * * @return string */ - public function getHttpStatus() + public function getName() { - return $this->container['http_status']; + return $this->container['name']; } /** - * Sets http_status + * Sets name * - * @param string $http_status http_status + * @param string $name name * * @return self */ - public function setHttpStatus($http_status) + public function setName($name) { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; + $this->container['name'] = $name; return $this; } /** - * Gets name + * Gets http_status * * @return string */ - public function getName() + public function getHttpStatus() { - return $this->container['name']; + return $this->container['http_status']; } /** - * Sets name + * Sets http_status * - * @param string $name name + * @param string $http_status http_status * * @return self */ - public function setName($name) + public function setHttpStatus($http_status) { - $this->container['name'] = $name; + $allowedValues = $this->getHttpStatusAllowableValues(); + if (!in_array($http_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'http_status', must be one of '%s'", + $http_status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['http_status'] = $http_status; return $this; }